:root {
  --ink: #1a2430;
  --ink-2: #243344;
  --panel: rgba(255, 248, 235, 0.94);
  --panel-solid: #fff8eb;
  --panel-2: rgba(255, 241, 220, 0.96);
  --line: #3d5166;
  --line-strong: #c47a4a;
  --text: #243344;
  --muted: #5c6f82;
  --ice: #4aa8b8;
  --ice-deep: #2f7f8f;
  --gold: #d4a04a;
  --gold-deep: #b07828;
  --ember: #e07a5a;
  --ok: #5aaa72;
  --danger: #d46464;
  --ryan: #5a90c4;
  --alice: #6ab8b0;
  --cream: #fff8eb;
  --sky: #d8eef4;
  --mint: #dff3ea;
  --peach: #ffe4d2;
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 10px 24px rgba(36, 51, 68, 0.12);
  --shadow-lift: 0 14px 28px rgba(36, 51, 68, 0.16);
  --font-pixel: "Press Start 2P", "Ma Shan Zheng", "Noto Sans SC", cursive;
  --font-display: "Ma Shan Zheng", "Noto Sans SC", cursive;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[data-locale="en"],
html[data-locale="es"] {
  --font-pixel: "Press Start 2P", "Cinzel", "Noto Sans", cursive;
  --font-display: "Cinzel", "Noto Sans", serif;
  --font-body: "Noto Sans", "Segoe UI", sans-serif;
}

html[data-locale="ja"] {
  --font-pixel: "Press Start 2P", "Noto Sans JP", sans-serif;
  --font-display: "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", sans-serif;
}

html[data-locale="ko"] {
  --font-pixel: "Press Start 2P", "Noto Sans KR", sans-serif;
  --font-display: "Noto Sans KR", sans-serif;
  --font-body: "Noto Sans KR", "Malgun Gothic", sans-serif;
}

html[data-script="latin"] .card-name,
html[data-script="latin"] .deck-item-name,
html[data-script="latin"] .lobby-sign-text {
  letter-spacing: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* 拉丁长效果文：保持 ≥13px；卡略加高、描述区加高、侧 pad 略收，禁止靠 overflow 裁字 */
html[data-script="latin"] .card .desc {
  font-size: 13px;
  line-height: 1.12;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

html[data-script="latin"] .card.card-rarity-common,
html[data-script="latin"] .card.card-rarity-rare,
html[data-script="latin"] .card.card-rarity-legendary {
  --card-pad-x: 18px;
  --card-desc-h: 140px;
  --card-name-h: 28px;
  --card-zone-gap: 3px;
  height: 308px;
  min-height: 308px;
  max-height: 308px;
}

/* 组牌/合成缩略：描述已收起，高度回到 272，避免拉丁加高把图鉴格子撑破 */
html[data-script="latin"] .deck-card-wrap.is-mini .card.card-rarity-common,
html[data-script="latin"] .deck-card-wrap.is-mini .card.card-rarity-rare,
html[data-script="latin"] .deck-card-wrap.is-mini .card.card-rarity-legendary,
html[data-script="latin"] .craft-card-wrap .card.card-rarity-common,
html[data-script="latin"] .craft-card-wrap .card.card-rarity-rare,
html[data-script="latin"] .craft-card-wrap .card.card-rarity-legendary {
  height: 272px;
  min-height: 272px;
  max-height: 272px;
  --card-desc-h: 0px;
  --card-pad-x: 22px;
}

html[data-script="latin"] .deck-card-scale {
  height: 308px;
}

html[data-script="latin"] .deck-card-wrap.is-mini .deck-card-scale {
  height: 272px;
}

.settings-lang {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 14px;
}

.settings-lang select {
  flex: 1;
  min-height: 36px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--panel-solid);
  color: var(--text);
  padding: 4px 10px;
  font: inherit;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--ink);
  image-rendering: pixelated;
}

body {
  background:
    linear-gradient(180deg, rgba(216, 238, 244, 0.35) 0%, transparent 38%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 7px,
      rgba(36, 51, 68, 0.04) 7px,
      rgba(36, 51, 68, 0.04) 8px
    ),
    linear-gradient(165deg, #9fd0dc 0%, #d8eef4 28%, #ffe8d4 62%, #f4d7b0 100%);
  background-attachment: fixed;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.atm-rift {
  position: absolute;
  width: 120%;
  height: 28%;
  left: -10%;
  top: 18%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 10px,
      rgba(255, 255, 255, 0.18) 10px 12px
    );
  opacity: 0.35;
  transform: rotate(-4deg);
  animation: riftDrift 14s steps(8) infinite alternate;
}

.atm-frost {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 38%, rgba(74, 168, 184, 0.4) 0 2px, transparent 3px),
    radial-gradient(circle at 44% 70%, rgba(255, 200, 140, 0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 78%, rgba(255, 255, 255, 0.4) 0 2px, transparent 3px);
  background-size: 96px 96px, 128px 128px, 80px 80px, 112px 112px;
  animation: frostShift 24s steps(12) infinite;
}

.atm-grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(36, 51, 68, 0.15) 0 1px,
      transparent 1px 4px
    );
}

@keyframes riftDrift {
  from { transform: rotate(-4deg) translateX(-1%); }
  to { transform: rotate(-2deg) translateX(2%); }
}

@keyframes frostShift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 32px 16px, -24px 20px, 16px -20px, -12px 28px; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bladeIn {
  from { opacity: 0; transform: scaleX(0.2); }
  to { opacity: 1; transform: scaleX(1); }
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: none;
  background:
    linear-gradient(180deg, #fff8eb 0%, #ffe8d0 100%);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-en {
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ice-deep);
  text-transform: uppercase;
  line-height: 1.4;
}

.brand-zh {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--text);
  font-weight: 400;
  line-height: 1;
}

.brand-heading {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.seo-about,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


.topbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

/* 顶栏资源条：色砖宝石 + 数字，禁堆「金币/时空回响」等说明字（UX-V） */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  background: linear-gradient(180deg, #fffdf8 0%, #eef6ff 100%);
  border: none;
  border-radius: var(--radius-pill);
  padding: 5px 12px 5px 7px;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-soft);
  font: inherit;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

button.chip-gold {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button.chip-gold:hover,
button.chip-gold:focus-visible {
  filter: brightness(1.04);
}

.chip strong {
  color: var(--ice-deep);
  font-family: var(--font-pixel);
  font-size: 14px;
  font-weight: 400;
  margin-left: 0;
  letter-spacing: 0.02em;
}

.chip-portrait {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  image-rendering: pixelated;
  box-shadow: 0 1px 2px rgba(36, 51, 68, 0.18);
  flex: 0 0 auto;
}

.chip-place {
  max-width: 7.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* 顶栏图标：物件形（币 / 星 / 盾），禁止圆球以免和中毒/昏睡状态点撞车 */
.chip-gem {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  position: relative;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* 金币：带中线厚币（与大厅 .stat-gold 同语） */
.chip-gold .chip-gem {
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 44%, rgba(120, 70, 20, 0.55) 46% 54%, transparent 56%),
    linear-gradient(180deg, #ffe9a8 0%, #e0b24a 48%, #b07828 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(160, 100, 30, 0.55),
    0 1px 2px rgba(40, 30, 10, 0.35);
}

/* 等级：五角星（与大厅 .stat-lv 同语） */
.chip-lv .chip-gem {
  background: linear-gradient(160deg, #f0e4ff, #9a6ad8 55%, #5a3488);
  clip-path: polygon(
    50% 4%,
    61% 35%,
    96% 35%,
    68% 57%,
    79% 92%,
    50% 72%,
    21% 92%,
    32% 57%,
    4% 35%,
    39% 35%
  );
  filter: drop-shadow(0 1px 1px rgba(40, 20, 70, 0.45));
}

/* 回响（若再启用）：弯月，非圆球 */
.chip-echo .chip-gem {
  border-radius: 50%;
  background: linear-gradient(160deg, #e8fbff, #5aa8d0 55%, #3a68a0);
  box-shadow: inset -5px -1px 0 1px #eef6ff;
  filter: drop-shadow(0 1px 1px rgba(20, 50, 80, 0.35));
}

.chip-adfree {
  padding-right: 9px;
}

/* 免广告：盾牌，非绿毒球 */
.chip-adfree .chip-gem {
  background: linear-gradient(180deg, #e8f8dc 0%, #7cbc58 55%, #3e8a38 100%);
  clip-path: polygon(50% 2%, 92% 18%, 88% 58%, 50% 98%, 12% 58%, 8% 18%);
  filter: drop-shadow(0 1px 1px rgba(20, 50, 20, 0.4));
}

.screen {
  flex: 1;
  padding: 24px 18px 36px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  animation: riseIn 0.35s steps(6) both;
}

.panel {
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  box-shadow: var(--shadow-lift);
}

.panel.title-panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(26, 36, 48, 0.18) 0%, rgba(26, 36, 48, 0.55) 48%, rgba(26, 36, 48, 0.82) 100%),
    url("assets/scene-cold.jpg") center 28% / cover no-repeat;
  image-rendering: pixelated;
  padding-top: 24px;
  overflow: hidden;
}

.title-settings {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
  background: #fff8eb;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.lobby-tools {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 7;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.lobby-tools .lobby-tool.icon-btn {
  position: relative;
  min-height: 40px;
  min-width: 40px;
  padding: 8px;
  background: #fff8eb;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.lobby-tools .lobby-tool.has-new::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe8a0 0 35%, #e07030 40% 100%);
  box-shadow: 0 0 0 2px #fff8eb, 0 1px 3px rgba(80, 30, 10, 0.35);
  pointer-events: none;
}

.title-hero {
  text-align: center;
  padding: 44px 12px 24px;
  margin-bottom: 4px;
  min-height: 32vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-shadow: 2px 2px 0 rgba(26, 36, 48, 0.55);
}

.title-hero .brand-mark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 62px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.15;
  color: #fff8eb;
  margin: 0 0 8px;
}

.title-hero .brand-sub {
  display: block;
  font-family: var(--font-pixel);
  font-size: clamp(12px, 2vw, 14px);
  letter-spacing: 0.12em;
  color: #ffe0a8;
  margin-bottom: 14px;
  line-height: 1.6;
}

.title-hero .blade {
  display: block;
  width: min(220px, 50%);
  height: 4px;
  margin: 0 auto 16px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--ice) 0 8px,
      var(--gold) 8px 16px,
      transparent 16px 20px
    );
  animation: bladeIn 0.6s steps(5) both;
}

.title-hero .tag {
  margin: 0;
  color: #fff8eb;
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  max-width: 28em;
  padding: 10px 14px;
  background: #1a2430;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  text-shadow: none;
}

.story {
  min-height: min(62vh, 520px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius);
  padding: 32px 28px 24px;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  image-rendering: pixelated;
}

.story::before {
  content: "";
  position: absolute;
  inset: 0;
  /* 仅轻烘托场景，不压正文；正文落在不透明 .story-copy */
  background: linear-gradient(180deg, transparent 55%, rgba(26, 36, 48, 0.22) 100%);
  pointer-events: none;
  z-index: 1;
}

.story::after {
  content: none;
}

.story > * { position: relative; z-index: 2; }

.story-copy {
  max-width: 42em;
  padding: 16px 18px;
  margin: 0 0 12px;
  background: #1a2430;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

.story-copy-choice {
  max-width: 100%;
}

.story.bg-cold {
  background:
    linear-gradient(180deg, rgba(26, 36, 48, 0.12) 0%, rgba(26, 36, 48, 0.45) 55%, rgba(26, 36, 48, 0.9) 100%),
    url("assets/scene-cold.jpg") center 35% / cover no-repeat;
}
.story.bg-warm {
  background:
    linear-gradient(180deg, rgba(40, 28, 20, 0.1) 0%, rgba(40, 28, 20, 0.45) 55%, rgba(26, 20, 14, 0.9) 100%),
    url("assets/scene-warm.jpg") center 40% / cover no-repeat;
}
.story.bg-gold {
  background:
    linear-gradient(180deg, rgba(40, 30, 14, 0.12) 0%, rgba(36, 28, 14, 0.48) 55%, rgba(26, 20, 10, 0.9) 100%),
    url("assets/scene-gold.jpg") center 42% / cover no-repeat;
}
.story.bg-fog {
  background:
    linear-gradient(180deg, rgba(28, 22, 40, 0.18) 0%, rgba(20, 28, 34, 0.52) 55%, rgba(14, 18, 24, 0.92) 100%),
    url("assets/scene-fog.jpg") center 40% / cover no-repeat;
}
.story.bg-fortress {
  background:
    linear-gradient(180deg, rgba(30, 24, 28, 0.16) 0%, rgba(28, 22, 24, 0.52) 55%, rgba(20, 16, 18, 0.92) 100%),
    url("assets/scene-fortress.jpg") center 40% / cover no-repeat;
}
.story.bg-sand {
  background:
    linear-gradient(180deg, rgba(40, 30, 16, 0.14) 0%, rgba(36, 28, 16, 0.5) 55%, rgba(26, 20, 12, 0.92) 100%),
    url("assets/scene-sand.jpg") center 40% / cover no-repeat;
}
.story.bg-sea {
  background:
    linear-gradient(180deg, rgba(16, 28, 40, 0.14) 0%, rgba(16, 28, 40, 0.52) 55%, rgba(12, 20, 28, 0.92) 100%),
    url("assets/scene-sea.jpg") center 45% / cover no-repeat;
}
.story.bg-temple {
  background:
    linear-gradient(180deg, rgba(28, 16, 24, 0.18) 0%, rgba(24, 14, 22, 0.55) 55%, rgba(16, 10, 14, 0.92) 100%),
    url("assets/scene-temple.jpg") center 40% / cover no-repeat;
}
.story.bg-canyon {
  background:
    linear-gradient(180deg, rgba(24, 22, 28, 0.16) 0%, rgba(20, 18, 24, 0.55) 55%, rgba(12, 12, 16, 0.92) 100%),
    url("assets/scene-canyon.jpg") center 40% / cover no-repeat;
}
.story.bg-blood {
  background:
    linear-gradient(180deg, rgba(40, 16, 12, 0.18) 0%, rgba(36, 14, 10, 0.55) 55%, rgba(22, 10, 8, 0.92) 100%),
    url("assets/scene-blood.jpg") center 42% / cover no-repeat;
}
.story.bg-star {
  background:
    linear-gradient(180deg, rgba(20, 22, 40, 0.16) 0%, rgba(18, 20, 36, 0.55) 55%, rgba(10, 12, 24, 0.92) 100%),
    url("assets/scene-star.jpg") center 40% / cover no-repeat;
}
.story.bg-ruins {
  background:
    linear-gradient(180deg, rgba(40, 24, 14, 0.16) 0%, rgba(34, 20, 12, 0.55) 55%, rgba(22, 14, 8, 0.92) 100%),
    url("assets/scene-ruins.jpg") center 42% / cover no-repeat;
}
.story.bg-abyss {
  background:
    linear-gradient(180deg, rgba(12, 10, 20, 0.2) 0%, rgba(10, 8, 18, 0.58) 55%, rgba(6, 6, 12, 0.94) 100%),
    url("assets/scene-abyss.jpg") center 40% / cover no-repeat;
}
.story.bg-peak {
  background:
    linear-gradient(180deg, rgba(28, 34, 44, 0.16) 0%, rgba(22, 28, 38, 0.55) 55%, rgba(14, 18, 26, 0.92) 100%),
    url("assets/scene-peak.jpg") center 38% / cover no-repeat;
}

.speaker {
  font-family: var(--font-display);
  color: #ffe0a8;
  font-size: 22px;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-shadow: none;
}

.story-text {
  font-size: clamp(17px, 2.3vw, 21px);
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
  max-width: 42em;
  color: #fff8eb;
  text-shadow: none;
}

/* —— 序章开场短片（非 mp4 分镜） —— */
.cinematic {
  position: relative;
  min-height: min(72vh, 620px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 18px 18px 16px;
  background: #0a0e14;
  box-shadow: var(--shadow-lift);
}

.cinematic-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.cinematic-frame {
  position: absolute;
  inset: -6%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  image-rendering: auto;
  will-change: transform, opacity, filter;
}

.cinematic-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: #fff8eb;
}

.cinematic-copy {
  position: relative;
  z-index: 2;
  max-width: 42em;
  padding: 14px 18px;
  margin: 0 0 12px;
  background: #1a2430;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

.cinematic-copy-empty {
  min-height: 0;
  padding: 0;
  margin: 0 0 12px;
  background: transparent;
  box-shadow: none;
}

.cinematic-actions {
  position: relative;
  z-index: 2;
}

.cinematic-fx-kenburns {
  animation: cineKenBurns 3.2s ease-out both;
}

.cinematic-fx-kenburns-in {
  animation: cineKenBurnsIn 3.2s ease-out both;
}

.cinematic-fx-flash {
  animation: cineKenBurns 4.2s ease-out both;
}

.cinematic:has(.cinematic-fx-flash) .cinematic-flash {
  animation: cineFlash 0.7s ease-out both;
}

.cinematic-fx-shake {
  animation: cineShake 4.2s ease-out both;
}

.cinematic-fx-vortex {
  animation: cineVortex 4.2s ease-in both;
}

.cinematic-fx-fade {
  animation: cineFadeIn 3s ease-out both;
}

.cinematic-fx-fade-out {
  animation: cineFadeOut 2.1s ease-in both;
}

@keyframes cineKenBurns {
  from { transform: scale(1.02); }
  to { transform: scale(1.12) translate(-1.5%, -1%); }
}

@keyframes cineKenBurnsIn {
  from { transform: scale(1.18); filter: brightness(0.75); }
  to { transform: scale(1.05); filter: brightness(1); }
}

@keyframes cineFlash {
  0% { opacity: 0; }
  18% { opacity: 0.85; }
  100% { opacity: 0; }
}

@keyframes cineShake {
  0% { transform: scale(1.04) translate(0, 0); }
  12% { transform: scale(1.08) translate(-1.2%, 0.8%); }
  24% { transform: scale(1.1) translate(1.4%, -0.6%); }
  40% { transform: scale(1.12) translate(-0.8%, 0.4%); }
  100% { transform: scale(1.14) translate(0, 0); filter: hue-rotate(12deg); }
}

@keyframes cineVortex {
  0% { transform: scale(1.05) rotate(0deg); filter: saturate(1); }
  55% { transform: scale(1.35) rotate(-6deg); filter: saturate(1.35) brightness(0.85); }
  100% { transform: scale(1.7) rotate(-14deg); filter: saturate(0.6) brightness(0.25); opacity: 0.55; }
}

@keyframes cineFadeIn {
  from { opacity: 0; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cineFadeOut {
  from { opacity: 1; filter: brightness(1); }
  to { opacity: 0.35; filter: brightness(1.35); }
}

.row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* 人物卡：大圆角色块 + 软阴影（禁止双线铭牌/描边硬框）；三卡底缘与名条对齐 */
.hero-card {
  --hero-accent: #5a90c4;
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, #fffaf2 0%, #ffe8d0 100%);
  border: none;
  border-radius: 28px;
  padding: 0 0 20px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
  color: inherit;
  font: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--hero-accent) 35%, transparent),
    var(--shadow-lift);
}

.hero-card .portrait {
  display: block;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: center 18%;
  border-bottom: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: none;
}

.hero-card .progress-map {
  --foot-x: 8;
  --foot-y: 82;
  position: relative;
  display: block;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #1c2838;
}

.hero-card .progress-map .map-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  image-rendering: pixelated;
  filter: saturate(0.92) brightness(0.88);
}

.hero-card .progress-map .map-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 18, 28, 0.15), rgba(12, 18, 28, 0.42) 70%, rgba(12, 18, 28, 0.62)),
    radial-gradient(circle at 50% 70%, transparent 30%, rgba(8, 12, 20, 0.35) 100%);
  pointer-events: none;
}

.hero-card .progress-map .map-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.hero-card .progress-map .map-route-glow {
  stroke: rgba(255, 220, 140, 0.28);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-card .progress-map .map-route-line {
  stroke: rgba(255, 232, 170, 0.82);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2.2 1.6;
}

.hero-card .progress-map .map-nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-card .progress-map .map-node {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(236, 228, 210, 0.38);
  box-shadow: 0 0 0 2px rgba(24, 18, 12, 0.3);
  transform: translate(-50%, -50%);
}

.hero-card .progress-map .map-node.is-trash.is-done {
  background: #e2c86a;
  box-shadow: 0 0 0 2px rgba(80, 55, 18, 0.42), 0 0 5px rgba(230, 190, 80, 0.5);
}

.hero-card .progress-map .map-node.is-trash2 {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: rgba(140, 190, 210, 0.55);
  box-shadow: 0 0 0 2px rgba(20, 40, 50, 0.35);
  transform: translate(-50%, -50%);
}

.hero-card .progress-map .map-node.is-trash2.is-done {
  background: #8ec8e0;
  box-shadow: 0 0 0 2px rgba(30, 60, 70, 0.45), 0 0 5px rgba(120, 190, 220, 0.55);
}

.hero-card .progress-map .map-node.is-trash2.is-here {
  width: 12px;
  height: 12px;
  background: #d8f2ff;
  box-shadow: 0 0 0 2px rgba(30, 60, 70, 0.5), 0 0 10px rgba(160, 220, 245, 0.9);
}

.hero-card .progress-map .map-node.is-boss {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(210, 96, 64, 0.55);
  box-shadow: 0 0 0 2px rgba(60, 22, 10, 0.4);
  transform: translate(-50%, -50%) rotate(45deg);
}

.hero-card .progress-map .map-node.is-boss.is-done {
  background: #ff8a3a;
  box-shadow: 0 0 0 2px rgba(90, 40, 12, 0.5), 0 0 8px rgba(255, 130, 50, 0.7);
}

.hero-card .progress-map .map-node.is-trash.is-here {
  width: 11px;
  height: 11px;
  background: #fff2c8;
  box-shadow: 0 0 0 2px rgba(90, 60, 20, 0.5), 0 0 10px rgba(255, 230, 140, 0.9);
}

.hero-card .progress-map .map-node.is-boss.is-here {
  width: 15px;
  height: 15px;
  background: #ffb060;
  box-shadow: 0 0 0 2px rgba(90, 40, 12, 0.55), 0 0 12px rgba(255, 150, 70, 1);
}

.hero-card .progress-map .map-walker {
  position: absolute;
  left: calc(var(--foot-x) * 1%);
  top: calc(var(--foot-y) * 1%);
  width: 46px;
  height: 70px;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, calc(-100% + 6px));
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.45));
}

.hero-card .progress-map .walker-sprite {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  image-rendering: auto;
  animation: mapWalkerBob 0.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}

@keyframes mapWalkerBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.hero-card.is-loading {
  min-height: 220px;
  background:
    linear-gradient(90deg, #fff4e4 0%, #ffe8d0 45%, #fff4e4 100%);
  background-size: 200% 100%;
  animation: mapLoadShimmer 1.1s linear infinite;
  pointer-events: none;
}

@keyframes mapLoadShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.hero-card .hero-body {
  padding: 16px 18px 0;
  position: relative;
  z-index: 1;
  margin-top: auto;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-card .hero-body h2 {
  margin: 0;
}

.hero-card::after {
  content: none;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--hero-accent) 45%, transparent),
    0 18px 32px rgba(36, 51, 68, 0.2);
}

.hero-card.ryan { --hero-accent: #5a90c4; }
.hero-card.alice { --hero-accent: #6ab8b0; }
.hero-card.locked { cursor: not-allowed; opacity: 0.72; }
.hero-card.locked:hover {
  transform: none;
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--hero-accent) 35%, transparent),
    var(--shadow-lift);
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--peach);
  border: none;
  color: var(--gold-deep);
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  line-height: 1.4;
  z-index: 4;
  box-shadow: var(--shadow-soft);
}

.badge.ok {
  background: var(--mint);
  color: #2f6a42;
}

.badge.play {
  left: 14px;
  right: auto;
  top: 14px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--hero-accent, #5a90c4) 70%, #1a2838);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hero-accent, #5a90c4) 35%, transparent);
  font-size: 0;
  color: transparent;
}

.badge.play .ico-play {
  width: 12px;
  height: 12px;
  background: #f5fbff;
  clip-path: polygon(28% 18%, 82% 50%, 28% 82%);
}

.hero-card.has-progress {
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--hero-accent) 40%, transparent),
    var(--shadow-lift);
}

.hero-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 0.08em;
  font-weight: 400;
  display: inline-block;
  padding: 6px 16px 8px;
  background: #fff;
  color: var(--text);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.tagline {
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.65;
  font-size: 15px;
}

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  background: color-mix(in srgb, var(--hero-accent, var(--sky)) 22%, #fff);
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  box-shadow: 0 4px 10px rgba(36, 51, 68, 0.08);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

button, .btn {
  appearance: none;
  border: none;
  background: linear-gradient(180deg, #fff8eb, #f0e0c8);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 13px 22px;
  min-height: 46px;
  font-size: 16px;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  color: var(--ice-deep);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(36, 51, 68, 0.12);
}

button.primary, .btn.primary {
  background: linear-gradient(180deg, #ffe29a, #e0a84a 55%, #c48a30);
  color: #2a1a06;
  font-weight: 700;
  font-size: 17px;
  min-width: 140px;
  box-shadow: 0 10px 22px rgba(196, 138, 48, 0.35);
}

button.primary:hover {
  color: #2a1a06;
  filter: brightness(1.05);
  box-shadow: 0 14px 28px rgba(196, 138, 48, 0.4);
}

button.primary:active {
  box-shadow: 0 6px 14px rgba(196, 138, 48, 0.28);
}

button.danger {
  background: linear-gradient(180deg, #ffd8d8, #f0a0a0);
  color: #5a1818;
  box-shadow: 0 10px 22px rgba(212, 100, 100, 0.28);
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.battle {
  display: grid;
  gap: 12px;
  position: relative;
}

/* 回大厅：浮在面板/战斗页顶角，不占底栏 */
.battle-exit.icon-btn,
.panel-exit.icon-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(120% 100% at 28% 16%, rgba(255, 255, 255, 0.95) 0%, transparent 46%),
    linear-gradient(165deg, #fffdf8 0%, #ffe8c4 52%, #f0d098 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -3px 8px rgba(176, 118, 48, 0.14),
    0 8px 18px rgba(36, 28, 20, 0.28);
}

.battle-exit.icon-btn:hover,
.battle-exit.icon-btn:focus-visible,
.panel-exit.icon-btn:hover,
.panel-exit.icon-btn:focus-visible {
  filter: brightness(1.05);
  outline: none;
}

.adventure-panel,
.craft-panel,
.shop-panel {
  position: relative;
  padding-top: 52px;
}

.battle-top, .enemy-panel, .hand-panel, .battle-hud {
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}


/* —— 战斗 HUD：主角卡 + 能量宝石 + 牌堆（色块无硬线框） —— */
.battle-hud {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 16px;
  align-items: stretch;
  border: none;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(255, 236, 214, 0.96));
  box-shadow: var(--shadow-soft);
}

.hero-battle-card {
  --hero-accent: #5a90c4;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(180deg, #fffaf2, #ffe8d0);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--hero-accent) 32%, transparent),
    var(--shadow-soft);
}

.hero-battle-card.alice { --hero-accent: #6ab8b0; }
.hero-battle-card.ryan { --hero-accent: #5a90c4; }

.hero-battle-portrait {
  position: relative;
  width: 88px;
  height: 110px;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  background: var(--sky);
  box-shadow: var(--shadow-soft);
}

.hero-battle-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  image-rendering: pixelated;
}

.fighter-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  min-height: 28px;
}

.fighter-status-row:empty {
  display: none;
  margin-top: 0;
  min-height: 0;
}

.hero-block-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #dceef8;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #244a62;
  box-shadow: var(--shadow-soft);
}


.block-icon {
  width: 12px;
  height: 14px;
  display: inline-block;
  background: #fff;
  border: none;
  border-radius: 50% 50% 40% 40%;
  box-shadow: inset 0 5px 0 rgba(106, 168, 208, 0.4);
}

.hero-status-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-pixel);
  font-size: 12px;
  box-shadow: var(--shadow-soft);
}


.hero-poison { background: #c8f0c0; color: #2a6a38; }
.hero-burn { background: #ffd0b0; color: #8a3a18; }
.hero-thorns { background: #e4f0d0; color: #4a6830; }

.status-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-poison {
  background:
    radial-gradient(circle at 35% 30%, #f0ffe8 0 28%, transparent 32%),
    linear-gradient(160deg, #a8e090, #3e8a48);
}

.status-burn {
  background:
    radial-gradient(circle at 35% 30%, #fff0d0 0 28%, transparent 32%),
    linear-gradient(160deg, #ffb060, #d05020);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border-radius: 0;
}

.status-thorns {
  background:
    linear-gradient(160deg, #c8e080, #5a8830);
  clip-path: polygon(50% 0, 100% 45%, 78% 100%, 22% 100%, 0 45%);
  border-radius: 0;
}

.status-bleed {
  background:
    radial-gradient(circle at 35% 30%, #ffe0e0 0 28%, transparent 32%),
    linear-gradient(160deg, #f09090, #a02828);
}

.status-sleep {
  background:
    radial-gradient(circle at 35% 30%, #f4f0ff 0 28%, transparent 32%),
    linear-gradient(160deg, #c8b8f0, #5848a0);
}

.status-silence {
  background:
    radial-gradient(circle at 35% 30%, #f0f4f8 0 28%, transparent 32%),
    linear-gradient(160deg, #c0ccd8, #4a5a6a);
}

.hero-battle-body { min-width: 0; }

.hero-battle-name {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px 5px;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.06em;
  color: var(--text);
  background: #fff;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.hero-hp-bar {
  margin-bottom: 6px;
}

.hero-hp-bar i {
  background:
    repeating-linear-gradient(90deg, #5aaa72 0 6px, #8ed0a0 6px 8px);
}

.hero-battle-hp {
  font-size: 15px;
  color: var(--muted);
}

.hero-battle-hp strong {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: #245038;
  margin-right: 2px;
}

.hud-widgets {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
}

.energy-rack {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  padding: 8px 12px;
  background:
    radial-gradient(ellipse at 50% 82%, rgba(255, 168, 48, 0.22) 0 34%, transparent 68%),
    radial-gradient(ellipse at 50% 8%, rgba(255, 252, 240, 0.95) 0 40%, transparent 72%),
    linear-gradient(180deg, #fffaf0, #ffe8c0 52%, #f0d090);
  border: none;
  border-radius: 18px;
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -6px 12px rgba(200, 120, 28, 0.1);
}

.energy-gems {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* 琥珀切面晶：精致软像素立绘；空槽同形去饱和玻璃窝（禁线框） */
.energy-gem {
  position: relative;
  width: 30px;
  height: 38px;
  flex: 0 0 auto;
  display: block;
  background: url("assets/ui-energy-gem-on.png") center / contain no-repeat;
  filter:
    sepia(0.28)
    saturate(0.42)
    brightness(0.88)
    contrast(0.92)
    drop-shadow(0 1px 1px rgba(80, 45, 10, 0.22));
  opacity: 0.58;
  transition: filter 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.energy-gem.is-on {
  opacity: 1;
  filter:
    drop-shadow(0 0 4px rgba(255, 190, 60, 0.85))
    drop-shadow(0 0 10px rgba(255, 150, 40, 0.4))
    drop-shadow(0 2px 2px rgba(100, 50, 0, 0.28));
  animation: energyGlow 1.6s steps(6) infinite alternate;
}

.energy-gem.is-overflow.is-on {
  filter:
    drop-shadow(0 0 6px rgba(255, 210, 90, 0.95))
    drop-shadow(0 0 14px rgba(255, 160, 40, 0.55))
    drop-shadow(0 2px 2px rgba(120, 60, 0, 0.3))
    brightness(1.08);
}

@keyframes energyGlow {
  from {
    filter:
      drop-shadow(0 0 4px rgba(255, 190, 60, 0.7))
      drop-shadow(0 0 10px rgba(255, 150, 40, 0.32))
      drop-shadow(0 2px 2px rgba(100, 50, 0, 0.26))
      brightness(1);
  }
  to {
    filter:
      drop-shadow(0 0 6px rgba(255, 205, 80, 0.95))
      drop-shadow(0 0 14px rgba(255, 160, 40, 0.5))
      drop-shadow(0 2px 2px rgba(100, 50, 0, 0.26))
      brightness(1.07);
  }
}

.pile-rack {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

/* 结束回合：更大金色圆钮，牌堆行内靠右（图案优先，文案走 title/aria） */
.end-turn-btn.icon-btn,
button.primary.end-turn-btn,
button.end-turn-btn.primary {
  width: 88px;
  height: 88px;
  min-width: 88px;
  min-height: 88px;
  margin-left: auto;
  padding: 0;
  border-radius: 50%;
  flex: 0 0 auto;
  background:
    radial-gradient(120% 100% at 30% 14%, rgba(255, 255, 255, 0.75) 0%, transparent 42%),
    linear-gradient(165deg, #ffe9b0 0%, #f0c258 48%, #d4a038 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 230, 0.9),
    inset 0 -3px 8px rgba(140, 90, 20, 0.18),
    0 1px 0 rgba(255, 236, 180, 0.55),
    0 12px 26px rgba(180, 120, 30, 0.36),
    0 3px 6px rgba(120, 70, 10, 0.14);
}

.end-turn-btn.icon-btn:hover,
button.primary.end-turn-btn:hover {
  color: inherit;
  filter: brightness(1.06);
}

.end-turn-btn.icon-btn:disabled,
button.primary.end-turn-btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.25);
  cursor: not-allowed;
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 230, 0.55),
    0 4px 10px rgba(120, 70, 10, 0.12);
}

.pile {
  position: relative;
  width: 78px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 6px 12px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf0, #f0e0c8);
  box-shadow: var(--shadow-soft);
}

.pile-stack {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 52px;
  margin: 6px 0 2px;
  background: linear-gradient(180deg, #fffdf8, #ffe8c8);
  border: none;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(36, 51, 68, 0.16);
}

.pile-stack::before,
.pile-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
  box-shadow: inherit;
}

.pile-stack::before {
  transform: translate(-5px, -5px) rotate(-6deg);
  opacity: 0.75;
  z-index: -2;
}

.pile-stack::after {
  transform: translate(4px, -2px) rotate(5deg);
  opacity: 0.85;
  z-index: -1;
}

.pile-draw .pile-stack {
  background: linear-gradient(180deg, #e8f4ff, #b8d8f0);
}

.pile-discard .pile-stack {
  background: linear-gradient(180deg, #fff3d0, #e0b85a);
}

.pile-count {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  min-width: 22px;
  padding: 4px 6px;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #fff8eb;
  background: #243344;
  border-radius: var(--radius-pill);
  border: none;
  box-shadow: var(--shadow-soft);
}

.pile-rack.is-draw-empty .pile-draw {
  animation: pileEmptyPulse 0.65s steps(6);
}

@keyframes pileEmptyPulse {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  40% { transform: translateY(-4px) scale(1.05); filter: brightness(1.12); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@media (max-width: 720px) {
  .battle-hud {
    grid-template-columns: 1fr;
  }
  .hud-widgets {
    justify-content: stretch;
    gap: 8px;
  }
  .energy-rack {
    padding: 6px 8px;
  }
  .energy-gem {
    width: 24px;
    height: 30px;
  }
  .pile-rack {
    gap: 8px;
  }
  .pile {
    width: 58px;
    min-height: 58px;
    padding: 8px 4px 6px;
  }
  .pile-stack {
    width: 30px;
    height: 38px;
    margin: 4px 0 0;
  }
  .pile-count {
    top: 4px;
    right: 4px;
    min-width: 18px;
    padding: 2px 5px;
    font-size: 11px;
  }
  .end-turn-btn.icon-btn,
  button.primary.end-turn-btn,
  button.end-turn-btn.primary,
  .class-trait-btn.icon-btn {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
  }
  .end-turn-btn .ico-end-turn {
    width: 30px;
    height: 30px;
  }
}

.enemy-panel {
  min-height: 210px;
  text-align: left;
  position: relative;
  overflow: hidden;
  /* 右上角回大厅圆钮占位，避免压住敌方名 / 战斗日志 */
  padding-right: 58px;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.88), rgba(255, 232, 208, 0.95));
  image-rendering: pixelated;
}

.enemy-panel.bg-fog,
.enemy-panel.bg-fortress,
.enemy-panel.bg-sand,
.enemy-panel.bg-sea,
.enemy-panel.bg-temple,
.enemy-panel.bg-canyon,
.enemy-panel.bg-blood,
.enemy-panel.bg-star,
.enemy-panel.bg-ruins,
.enemy-panel.bg-abyss,
.enemy-panel.bg-peak,
.enemy-panel.bg-cold,
.enemy-panel.bg-warm,
.enemy-panel.bg-gold {
  background-blend-mode: normal;
}

.enemy-panel.bg-fog {
  background:
    linear-gradient(180deg, rgba(36, 28, 48, 0.42), rgba(22, 34, 36, 0.58)),
    url("assets/scene-fog.jpg") center 40% / cover no-repeat;
}
.enemy-panel.bg-fortress {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.72), rgba(236, 224, 220, 0.9)),
    url("assets/scene-fortress.jpg") center 40% / cover no-repeat;
}
.enemy-panel.bg-sand {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.72), rgba(244, 228, 200, 0.9)),
    url("assets/scene-sand.jpg") center 40% / cover no-repeat;
}
.enemy-panel.bg-sea {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.72), rgba(208, 228, 240, 0.9)),
    url("assets/scene-sea.jpg") center 45% / cover no-repeat;
}
.enemy-panel.bg-temple {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.7), rgba(236, 214, 228, 0.9)),
    url("assets/scene-temple.jpg") center 40% / cover no-repeat;
}
.enemy-panel.bg-canyon {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.7), rgba(220, 220, 228, 0.9)),
    url("assets/scene-canyon.jpg") center 40% / cover no-repeat;
}
.enemy-panel.bg-blood {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.68), rgba(244, 210, 200, 0.9)),
    url("assets/scene-blood.jpg") center 42% / cover no-repeat;
}
.enemy-panel.bg-star {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.7), rgba(214, 220, 244, 0.9)),
    url("assets/scene-star.jpg") center 40% / cover no-repeat;
}
.enemy-panel.bg-ruins {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.7), rgba(244, 224, 200, 0.9)),
    url("assets/scene-ruins.jpg") center 42% / cover no-repeat;
}
.enemy-panel.bg-abyss {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.66), rgba(210, 208, 228, 0.9)),
    url("assets/scene-abyss.jpg") center 40% / cover no-repeat;
}
.enemy-panel.bg-peak {
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.7), rgba(220, 228, 240, 0.9)),
    url("assets/scene-peak.jpg") center 38% / cover no-repeat;
}

.enemy-panel > * { position: relative; z-index: 1; }

.enemy-layout {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: start;
}

.enemy-figure {
  position: relative;
  width: 132px;
  height: 168px;
  border-radius: 20px;
  overflow: hidden;
  border: none;
  box-shadow: var(--shadow-soft);
  background: var(--sky);
}

.enemy-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.enemy-hp {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 242, 0.94);
  font-size: 15px;
  color: #5c6f82;
  box-shadow: var(--shadow-soft);
}

.enemy-hp strong {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: #8a3030;
  margin-right: 2px;
}

.enemy-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-pixel);
  font-size: 13px;
  box-shadow: var(--shadow-soft);
  transform: none;
}

.enemy-shield {
  background: #d7e4f2;
  color: #24384c;
}

.enemy-chill {
  background: #e4f6ff;
  color: #1a5870;
}

.enemy-bleed {
  background: #f8d4d4;
  color: #8a2424;
}

.enemy-sleep {
  background: #e6dff8;
  color: #4a3888;
}

.enemy-silence {
  background: #dde3ea;
  color: #3a4a5a;
}


.shield-icon,
.chill-icon {
  width: 12px;
  height: 14px;
  display: inline-block;
}

.shield-icon {
  background: #f4f8fc;
  border-radius: 3px 3px 6px 6px;
  box-shadow: inset 0 -5px 0 #7aa4c8;
}

.chill-icon {
  background: #ffffff;
  clip-path: polygon(50% 0, 100% 38%, 78% 100%, 22% 100%, 0 38%);
  box-shadow: none;
}

.hp-bar {
  height: 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  overflow: hidden;
  margin: 0 0 10px;
  box-shadow: inset 0 0 0 1px rgba(36, 51, 68, 0.06);
}

.hp-bar i {
  display: block;
  height: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      #e07a5a 0 6px,
      #f0a090 6px 8px
    );
  border-radius: inherit;
  transition: width 0.2s steps(4);
}

.enemy-figure.hit-flash {
  animation: hitFlash 0.42s steps(5);
}

.hero-battle-card.player-hit {
  animation: playerHit 0.36s steps(5);
}

@keyframes hitFlash {
  0% { filter: brightness(1) saturate(1); }
  20% { filter: brightness(1.55) saturate(1.35) drop-shadow(0 0 10px rgba(255, 160, 60, 0.7)); }
  55% { filter: brightness(1.2) saturate(1.15); }
  100% { filter: brightness(1) saturate(1); }
}

@keyframes playerHit {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* —— 战斗 FX：软像素冲击 / 火花 / 弹道（对齐奖牌档，禁线框、不挡交互） —— */
.fx-burst {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 10;
}

.fx-burst-core {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  margin: -28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%,
      #fff8e0 0 14%,
      #ffc060 28%,
      #e07040 48%,
      transparent 68%);
  opacity: 0;
  animation: fxBurstCore 0.55s steps(7) forwards;
}

.fx-burst.is-player .fx-burst-core {
  background:
    radial-gradient(circle at 50% 50%,
      #ffe8e0 0 14%,
      #f07060 28%,
      #a03838 50%,
      transparent 68%);
}

.fx-burst.is-block .fx-burst-core {
  background:
    radial-gradient(circle at 50% 50%,
      #f0f8ff 0 14%,
      #90c8f0 28%,
      #4888c0 50%,
      transparent 68%);
}

.fx-burst.is-shield .fx-burst-core,
.fx-burst.is-strip .fx-burst-core {
  background:
    radial-gradient(circle at 50% 50%,
      #f4faff 0 14%,
      #a8d4f8 30%,
      #5a98d0 52%,
      transparent 70%);
}

.fx-burst.is-poison .fx-burst-core {
  background:
    radial-gradient(circle at 50% 50%,
      #f0ffe8 0 14%,
      #98e078 30%,
      #489038 52%,
      transparent 70%);
}

.fx-burst.is-burn .fx-burst-core,
.fx-burst.is-fury .fx-burst-core {
  background:
    radial-gradient(circle at 50% 50%,
      #fff0d8 0 12%,
      #ff9a48 28%,
      #d04818 52%,
      transparent 70%);
}

.fx-burst.is-energy .fx-burst-core {
  background:
    radial-gradient(circle at 50% 50%,
      #fff8d8 0 14%,
      #f0c048 30%,
      #c08820 52%,
      transparent 70%);
}

.fx-burst.is-skip .fx-burst-core {
  background:
    radial-gradient(circle at 50% 50%,
      #f8f4e8 0 14%,
      #d0c8a8 30%,
      #908868 52%,
      transparent 70%);
}

.fx-burst i {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fffdf0 0 28%, #ffe08a 42%, #ffb040 68%, transparent 78%);
  box-shadow: 0 0 8px rgba(255, 190, 70, 0.75);
  animation: fxBurstSpark 0.62s cubic-bezier(0.15, 0.85, 0.25, 1) both;
}

.fx-burst.is-player i {
  background:
    radial-gradient(circle at 35% 30%, #fff4f0 0 28%, #ffb0a0 42%, #e85848 68%, transparent 78%);
  box-shadow: 0 0 8px rgba(220, 80, 60, 0.7);
}

.fx-burst.is-block i,
.fx-burst.is-shield i,
.fx-burst.is-strip i {
  background:
    radial-gradient(circle at 35% 30%, #f8fcff 0 28%, #b0d8f8 42%, #5898d8 68%, transparent 78%);
  box-shadow: 0 0 8px rgba(90, 160, 220, 0.7);
}

.fx-burst.is-poison i {
  background:
    radial-gradient(circle at 35% 30%, #f4ffe8 0 28%, #b0e878 42%, #58a838 68%, transparent 78%);
  box-shadow: 0 0 8px rgba(80, 180, 60, 0.7);
}

.fx-burst.is-burn i,
.fx-burst.is-fury i {
  background:
    radial-gradient(circle at 35% 30%, #fff6e8 0 28%, #ffb070 42%, #f06028 68%, transparent 78%);
  box-shadow: 0 0 8px rgba(255, 120, 40, 0.75);
}

.fx-burst.is-energy i {
  background:
    radial-gradient(circle at 35% 30%, #fffdf0 0 28%, #ffe08a 42%, #e0a830 68%, transparent 78%);
  box-shadow: 0 0 8px rgba(220, 160, 40, 0.75);
}

.fx-burst.is-skip i {
  background:
    radial-gradient(circle at 35% 30%, #faf6ec 0 28%, #e0d4b0 42%, #a89868 68%, transparent 78%);
  box-shadow: 0 0 6px rgba(160, 140, 80, 0.55);
}

.fx-burst i:nth-child(2) { --sx: -48px; --sy: -10px; animation-delay: 0.02s; }
.fx-burst i:nth-child(3) { --sx: 46px; --sy: -16px; animation-delay: 0.04s; }
.fx-burst i:nth-child(4) { --sx: -36px; --sy: 34px; animation-delay: 0.06s; }
.fx-burst i:nth-child(5) { --sx: 40px; --sy: 30px; animation-delay: 0.05s; }
.fx-burst i:nth-child(6) { --sx: -8px; --sy: -44px; animation-delay: 0.08s; }
.fx-burst i:nth-child(7) { --sx: 12px; --sy: 46px; animation-delay: 0.09s; }
.fx-burst i:nth-child(8) { --sx: -54px; --sy: 12px; animation-delay: 0.1s; }
.fx-burst i:nth-child(9) { --sx: 52px; --sy: 6px; animation-delay: 0.11s; width: 7px; height: 7px; }

.fx-burst.is-lite i:nth-child(n + 6) { display: none; }

.fx-bolt {
  position: absolute;
  width: 88px;
  height: 28px;
  margin-left: -44px;
  margin-top: -14px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 70% 45% at 50% 50%,
      rgba(255, 252, 235, 0.95) 0 12%,
      rgba(255, 200, 90, 0.75) 28%,
      rgba(255, 120, 50, 0.35) 52%,
      transparent 72%);
  box-shadow: none;
  filter: drop-shadow(0 0 6px rgba(255, 160, 60, 0.55));
  pointer-events: none;
  z-index: 9;
  animation: boltFly 0.38s ease-out forwards;
}

.fx-float {
  position: absolute;
  left: var(--fx-x, 50%);
  top: var(--fx-y, 30%);
  transform: translate(-50%, 0);
  font-family: var(--font-pixel);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  pointer-events: none;
  z-index: 11;
  text-shadow:
    0 0 6px rgba(255, 240, 200, 0.55),
    2px 2px 0 rgba(0, 0, 0, 0.45),
    -1px 0 0 rgba(40, 20, 10, 0.35);
  animation: floatOut 0.85s steps(8) forwards;
}

.fx-float.fx-dmg { color: #e84838; }
.fx-float.fx-block { color: var(--ice-deep); font-size: 16px; }

.fx-strike {
  position: absolute;
  width: 110px;
  height: 30px;
  margin-left: -55px;
  margin-top: -15px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 72% 48% at 50% 50%,
      rgba(255, 248, 230, 0.95) 0 12%,
      rgba(255, 140, 70, 0.7) 30%,
      rgba(255, 70, 40, 0.32) 55%,
      transparent 74%);
  box-shadow: none;
  filter: drop-shadow(0 0 7px rgba(255, 110, 50, 0.55));
  pointer-events: none;
  z-index: 9;
  animation: strikeFly 0.5s ease-out forwards;
}

.fx-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #243344;
  pointer-events: none;
  z-index: 11;
  box-shadow:
    0 6px 14px rgba(36, 51, 68, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  animation: floatOut 0.85s steps(8) forwards;
}

.fx-badge.fx-shield { background: linear-gradient(180deg, #eef7ff, #c8e4ff); }
.fx-badge.fx-poison { background: linear-gradient(180deg, #e8f8e0, #b8e8a8); }
.fx-badge.fx-burn { background: linear-gradient(180deg, #ffe8d0, #ffc090); }
.fx-badge.fx-energy { background: linear-gradient(180deg, #fff6d0, #f0d878); }
.fx-badge.fx-strip { background: linear-gradient(180deg, #eef7ff, #c8e4ff); }
.fx-badge.fx-fury { background: linear-gradient(180deg, #ffe4d0, #ffb080); }
.fx-badge.fx-skip { background: linear-gradient(180deg, #f6f0dc, #e0d4b0); }

.fx-discard {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 14px;
  background: #fff8eb;
  color: #243344;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(36, 51, 68, 0.18);
  pointer-events: none;
  z-index: 9;
  animation: discardFly 0.55s steps(8) forwards;
}

@keyframes fxBurstCore {
  0% { opacity: 0; transform: scale(0.25); }
  35% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.35); }
}

@keyframes fxBurstSpark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--sx, 40px), var(--sy, -30px)) scale(0.55) rotate(48deg); }
}

@keyframes boltFly {
  0% { opacity: 0; transform: translate(0, 0) rotate(var(--rot, -28deg)) scaleX(0.28); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, -80px)) rotate(var(--rot, -28deg)) scaleX(1.15); }
}

@keyframes strikeFly {
  0% { opacity: 0; transform: translate(0, 0) rotate(-18deg) scaleX(0.3); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 80px)) rotate(-30deg) scaleX(1.35); }
}

@keyframes discardFly {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 120px)), calc(-50% + var(--dy, -80px))) rotate(-12deg) scale(0.72); }
}

@keyframes floatOut {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.88); }
  16% { opacity: 1; transform: translate(-50%, -4px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(1.02); }
}

@media (max-width: 640px) {
  .enemy-layout {
    grid-template-columns: 96px 1fr;
    gap: 12px;
  }
  .enemy-figure {
    width: 96px;
    height: 122px;
  }
}

.story-choice {
  justify-content: flex-end;
  gap: 8px;
}

.choice-heading {
  margin: 0 0 6px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 28px;
  color: #fff8eb;
  text-shadow: none;
}

.choice-hint {
  margin: 0 !important;
  color: #fff8eb !important;
  text-shadow: none;
  font-size: 15px !important;
}

.choice-result {
  margin-top: 10px !important;
  color: #b8f0ff !important;
}

.enemy-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.enemy-name {
  display: inline-block;
  margin-bottom: 0;
  padding: 4px 12px 5px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: 0.08em;
  color: var(--text);
  background: #fff;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}

.combat-log-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 248, 235, 0.92);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.combat-log-btn:hover,
.combat-log-btn:focus-visible {
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(90, 120, 180, 0.28);
}

.modal-combat-log .combat-log-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  max-height: min(46vh, 360px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-combat-log .combat-log-item {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 248, 235, 0.92);
  box-shadow: inset 0 0 0 1px rgba(40, 28, 16, 0.06);
}

.modal-combat-log .combat-log-item.is-empty {
  color: #6a5a48;
}

.modal-combat-log .combat-log-turn {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(90, 70, 40, 0.12);
  font-size: 12px;
  color: #5a4630;
}

.modal-combat-log .combat-log-body {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

.modal-combat-log .combat-log-detail {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #6a5a48;
}

.modal-combat-log .combat-log-intent {
  background: rgba(255, 236, 210, 0.95);
}

.modal-combat-log .combat-log-card {
  background: rgba(220, 236, 250, 0.95);
}

.modal-combat-log .combat-log-ally {
  background: rgba(228, 242, 228, 0.95);
}

.modal-combat-log .combat-log-dot {
  background: rgba(255, 220, 210, 0.95);
}

.modal-combat-log .combat-log-skip {
  background: rgba(220, 228, 240, 0.95);
}

/* 结算一屏构图：场景铺满，避免标题+挂机条顶在上面、下面大块空白 */
.screen:has(> .reward-panel) {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.reward-panel {
  overflow: hidden;
  position: relative;
  cursor: pointer;
  flex: 1 1 auto;
  min-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0;
  padding: 28px 22px 28px;
  /* 盖掉 .panel 实色，让章节场景铺满整块 */
  background: transparent;
  box-shadow: var(--shadow-lift);
}

.reward-panel .reward-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 16px 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.2) 0%, rgba(255, 244, 220, 0.55) 100%);
  box-shadow: 0 18px 36px rgba(16, 22, 34, 0.22);
}

.reward-panel.has-boss-prize .reward-stage {
  align-items: center;
  max-width: 420px;
}

.reward-panel.bg-fog,
.reward-panel.bg-fortress,
.reward-panel.bg-sand,
.reward-panel.bg-sea,
.reward-panel.bg-temple,
.reward-panel.bg-canyon,
.reward-panel.bg-blood,
.reward-panel.bg-star,
.reward-panel.bg-ruins,
.reward-panel.bg-abyss,
.reward-panel.bg-peak {
  background-color: transparent;
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
}

.reward-panel.bg-fog {
  background-image:
    linear-gradient(180deg, rgba(16, 22, 34, 0.18) 0%, rgba(16, 26, 34, 0.36) 100%),
    url("assets/scene-fog.jpg");
}
.reward-panel.bg-fortress {
  background-image:
    linear-gradient(180deg, rgba(24, 18, 14, 0.16) 0%, rgba(28, 20, 16, 0.34) 100%),
    url("assets/scene-fortress.jpg");
}
.reward-panel.bg-sand {
  background-image:
    linear-gradient(180deg, rgba(36, 24, 12, 0.14) 0%, rgba(40, 28, 14, 0.32) 100%),
    url("assets/scene-sand.jpg");
}
.reward-panel.bg-sea {
  background-image:
    linear-gradient(180deg, rgba(12, 28, 40, 0.16) 0%, rgba(14, 32, 44, 0.34) 100%),
    url("assets/scene-sea.jpg");
}
.reward-panel.bg-temple {
  background-image:
    linear-gradient(180deg, rgba(28, 16, 28, 0.16) 0%, rgba(32, 18, 32, 0.34) 100%),
    url("assets/scene-temple.jpg");
}
.reward-panel.bg-canyon {
  background-image:
    linear-gradient(180deg, rgba(20, 20, 28, 0.16) 0%, rgba(22, 22, 30, 0.34) 100%),
    url("assets/scene-canyon.jpg");
}
.reward-panel.bg-blood {
  background-image:
    linear-gradient(180deg, rgba(40, 16, 14, 0.16) 0%, rgba(44, 18, 16, 0.34) 100%),
    url("assets/scene-blood.jpg");
}
.reward-panel.bg-star {
  background-image:
    linear-gradient(180deg, rgba(16, 18, 40, 0.16) 0%, rgba(18, 20, 44, 0.34) 100%),
    url("assets/scene-star.jpg");
}
.reward-panel.bg-ruins {
  background-image:
    linear-gradient(180deg, rgba(36, 24, 12, 0.16) 0%, rgba(40, 26, 14, 0.34) 100%),
    url("assets/scene-ruins.jpg");
}
.reward-panel.bg-abyss {
  background-image:
    linear-gradient(180deg, rgba(18, 16, 32, 0.18) 0%, rgba(20, 18, 36, 0.36) 100%),
    url("assets/scene-abyss.jpg");
}
.reward-panel.bg-peak {
  background-image:
    linear-gradient(180deg, rgba(16, 22, 34, 0.16) 0%, rgba(18, 26, 38, 0.34) 100%),
    url("assets/scene-peak.jpg");
}

.ending-art {
  margin: 12px 0 16px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  max-height: 280px;
}
.ending-art img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  image-rendering: auto;
}

.reward-panel:focus-visible {
  outline: 3px solid rgba(196, 152, 64, 0.55);
  outline-offset: 2px;
}

.reward-panel .reward-stage > .speaker {
  display: inline-block;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  color: #8a5a18;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow-soft);
  text-shadow: none;
}

.reward-panel .reward-stage > h2 {
  margin: 0;
  font-family: var(--font-display);
  display: inline-block;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 250, 240, 0.96);
  box-shadow: var(--shadow-soft);
}

.reward-panel .reward-stage > .hint {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: var(--shadow-soft);
  color: var(--text);
}

.reward-panel.is-idle-only .reward-idle-line {
  padding: 18px 22px;
  gap: 14px 20px;
}

.reward-panel.is-idle-only .reward-idle-clock {
  width: 36px;
  height: 36px;
}

.reward-panel.is-idle-only .reward-idle-stat {
  min-height: 40px;
  padding: 6px 14px 6px 10px;
}

.reward-panel.is-idle-only .reward-idle-stat strong {
  font-size: 18px;
}

.reward-panel.is-idle-only .reward-ico {
  width: 26px;
  height: 26px;
}

.boss-prize {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 12px 0 8px;
  min-height: 260px;
  overflow: visible;
}

.boss-prize-burst {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%,
      #fff6c8 0 12%,
      #ffd45a 22%,
      #f0a828 42%,
      rgba(240, 160, 40, 0.55) 58%,
      transparent 72%);
  box-shadow:
    0 0 28px rgba(255, 200, 60, 0.85),
    0 0 60px rgba(255, 170, 40, 0.45);
  pointer-events: none;
  animation: bossPrizeBurst 0.9s cubic-bezier(0.15, 0.85, 0.25, 1) both;
}

.boss-prize-rays {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0 8deg,
    rgba(255, 230, 120, 0.95) 8deg 14deg,
    transparent 14deg 30deg,
    rgba(255, 200, 70, 0.85) 30deg 36deg,
    transparent 36deg 52deg,
    rgba(255, 240, 170, 0.9) 52deg 58deg,
    transparent 58deg 74deg,
    rgba(255, 190, 60, 0.8) 74deg 80deg,
    transparent 80deg 96deg,
    rgba(255, 230, 120, 0.9) 96deg 102deg,
    transparent 102deg 118deg,
    rgba(255, 200, 70, 0.85) 118deg 124deg,
    transparent 124deg 140deg,
    rgba(255, 240, 170, 0.9) 140deg 146deg,
    transparent 146deg 162deg,
    rgba(255, 190, 60, 0.8) 162deg 168deg,
    transparent 168deg 184deg,
    rgba(255, 230, 120, 0.9) 184deg 190deg,
    transparent 190deg 206deg,
    rgba(255, 200, 70, 0.85) 206deg 212deg,
    transparent 212deg 228deg,
    rgba(255, 240, 170, 0.9) 228deg 234deg,
    transparent 234deg 250deg,
    rgba(255, 190, 60, 0.8) 250deg 256deg,
    transparent 256deg 272deg,
    rgba(255, 230, 120, 0.9) 272deg 278deg,
    transparent 278deg 294deg,
    rgba(255, 200, 70, 0.85) 294deg 300deg,
    transparent 300deg 316deg,
    rgba(255, 240, 170, 0.9) 316deg 322deg,
    transparent 322deg 338deg,
    rgba(255, 190, 60, 0.8) 338deg 344deg,
    transparent 344deg 360deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 18%, #000 34%, #000 58%, transparent 72%);
  mask-image: radial-gradient(circle, transparent 18%, #000 34%, #000 58%, transparent 72%);
  pointer-events: none;
  animation: bossPrizeRays 1.4s linear both, bossPrizeRaysSpin 4.5s linear 1.4s infinite;
}

.boss-prize-sparks {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}

.boss-prize-sparks i {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px;
  border-radius: 2px;
  background: linear-gradient(135deg, #fff9d8, #ffc84a);
  box-shadow: 0 0 8px rgba(255, 210, 80, 0.95);
  animation: bossPrizeSpark 1.15s cubic-bezier(0.15, 0.8, 0.2, 1) both;
}

.boss-prize-sparks i:nth-child(1) { --sx: -92px; --sy: -18px; animation-delay: 0.05s; }
.boss-prize-sparks i:nth-child(2) { --sx: 88px; --sy: -28px; animation-delay: 0.08s; }
.boss-prize-sparks i:nth-child(3) { --sx: -70px; --sy: 54px; animation-delay: 0.12s; }
.boss-prize-sparks i:nth-child(4) { --sx: 76px; --sy: 48px; animation-delay: 0.1s; }
.boss-prize-sparks i:nth-child(5) { --sx: -20px; --sy: -78px; animation-delay: 0.14s; }
.boss-prize-sparks i:nth-child(6) { --sx: 24px; --sy: 86px; animation-delay: 0.16s; }
.boss-prize-sparks i:nth-child(7) { --sx: -108px; --sy: 22px; animation-delay: 0.18s; }
.boss-prize-sparks i:nth-child(8) { --sx: 110px; --sy: 8px; animation-delay: 0.2s; }
.boss-prize-sparks i:nth-child(9) { --sx: -48px; --sy: -62px; animation-delay: 0.22s; width: 7px; height: 7px; }
.boss-prize-sparks i:nth-child(10) { --sx: 52px; --sy: -68px; animation-delay: 0.24s; width: 7px; height: 7px; }

.boss-prize-card {
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 12px 24px rgba(100, 60, 10, 0.45));
}

.boss-prize-card.fly-in {
  animation: bossPrizeFly 0.85s cubic-bezier(0.18, 1.15, 0.28, 1) both;
}

.boss-prize-card.fly-in .card {
  animation: bossPrizeCardShine 1.2s ease-out both;
}

.boss-prize-card .card {
  pointer-events: none;
  cursor: default;
}

.boss-prize-caption {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 6px 14px;
  font-size: 15px;
  color: var(--text);
  text-align: center;
  background: #fffaf0;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  animation: bossPrizeCaption 0.55s ease-out 0.45s both;
}

.boss-prize.is-dust .boss-prize-burst {
  background:
    radial-gradient(circle at 50% 50%,
      #fff0c0 0 12%,
      #e8c060 28%,
      #c99838 48%,
      rgba(180, 140, 50, 0.45) 62%,
      transparent 74%);
}

.boss-prize.is-dust .boss-prize-rays {
  filter: saturate(0.75) brightness(0.95);
}

@keyframes bossPrizeBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  100% { opacity: 0.88; transform: translate(-50%, -50%) scale(1); }
}

@keyframes bossPrizeRays {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(0deg); }
  35% { opacity: 1; }
  100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1) rotate(48deg); }
}

@keyframes bossPrizeRaysSpin {
  from { transform: translate(-50%, -50%) scale(1) rotate(48deg); }
  to { transform: translate(-50%, -50%) scale(1) rotate(408deg); }
}

@keyframes bossPrizeSpark {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.3) rotate(0deg);
  }
  25% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(var(--sx), var(--sy)) scale(1) rotate(160deg);
  }
}

@keyframes bossPrizeFly {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.45) rotate(-8deg);
    filter: brightness(1.8) drop-shadow(0 0 24px rgba(255, 220, 100, 1));
  }
  55% {
    opacity: 1;
    transform: translateY(-10px) scale(1.08) rotate(2deg);
    filter: brightness(1.25) drop-shadow(0 0 20px rgba(255, 200, 80, 0.9));
  }
  75% {
    transform: translateY(4px) scale(0.97) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: drop-shadow(0 12px 24px rgba(100, 60, 10, 0.45));
  }
}

@keyframes bossPrizeCardShine {
  0% { box-shadow: 0 0 0 0 rgba(255, 220, 120, 0); }
  35% { box-shadow: 0 0 0 10px rgba(255, 220, 120, 0.55); }
  100% { box-shadow: 0 0 0 0 rgba(255, 220, 120, 0); }
}

@keyframes bossPrizeCaption {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.reward-hand {
  margin-top: 16px;
  gap: 16px;
}

.reward-hand .card:hover {
  box-shadow: 0 12px 28px rgba(180, 120, 30, 0.28), var(--shadow-lift);
  transform: translateY(-8px) scale(1.02);
}

.card.card-reward {
  --card-band: #e8b84a;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 230, 150, 0.55) 0 42%, transparent 70%),
    linear-gradient(180deg, #fff8e8 0%, #ffe2a8 48%, #f0c878 100%);
  border-top: 10px solid var(--card-band);
  box-shadow: 0 8px 22px rgba(160, 110, 28, 0.22), var(--shadow-soft);
}

.card.card-reward .card-namebar {
  background: linear-gradient(90deg, #ffe7a8, #f0c050 55%, #ffe7a8);
  color: #3a2808;
}

.card.card-reward .card-descbox {
  background: rgba(255, 248, 235, 0.92);
}

.card.card-reward .card-art {
  box-shadow: inset 0 -10px 18px rgba(232, 184, 74, 0.25);
}

.card.card-reward .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #fff0c0, #e8b84a 55%, #a87820);
}

.card-reward-badge,
.card-rarity-badge {
  position: absolute;
  top: 52px;
  right: 10px;
  z-index: 4;
  min-width: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 248, 235, 0.72);
  border-radius: 50%;
  border: none;
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}

.card-rarity-badge .rarity-dot {
  width: 12px;
  height: 12px;
}

.card-rarity-badge.rarity-rare {
  background: rgba(246, 239, 255, 0.85);
}

.card-rarity-badge.rarity-legendary {
  background: rgba(255, 246, 216, 0.9);
}

/* 唯一印：单颗菱形，无文字；悬停/读屏说明「最多 1 张」 */
.card-unique-mark,
.unique-mark {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background:
    radial-gradient(circle at 35% 30%, #fff6d0 0 28%, transparent 32%),
    linear-gradient(160deg, #ffe08a, #d4a040 55%, #8a5a18);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 1px 3px rgba(80, 50, 10, 0.35);
}

.card-unique-mark {
  position: absolute;
  top: var(--card-pad-t, 10px);
  right: var(--card-pad-x, 10px);
  z-index: 5;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.deck-item-top .unique-mark {
  margin-left: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  box-shadow:
    0 0 0 2px rgba(255, 244, 200, 0.95),
    0 0 10px rgba(255, 200, 80, 0.7),
    0 1px 3px rgba(80, 50, 10, 0.35);
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}

.meta-bar.reward-idle-bar {
  display: block;
  margin: 0;
  width: 100%;
}

.reward-idle-line {
  margin: 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8eb, #ffe7c0);
  box-shadow: var(--shadow-soft);
  color: #5c3b16;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
}

.reward-idle-line.is-capped {
  background: linear-gradient(180deg, #f4efe6, #e8dcc8);
}

.reward-idle-clock {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff8eb 0 38%, transparent 40%),
    conic-gradient(from -90deg, #c49840 0 8%, transparent 8% 100%),
    linear-gradient(160deg, #e8c878, #a87830);
  box-shadow:
    inset 0 0 0 3px rgba(90, 60, 20, 0.18),
    0 2px 4px rgba(80, 50, 10, 0.2);
  position: relative;
}

.reward-idle-clock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 8px;
  margin: -7px 0 0 -1px;
  background: #5c3b16;
  border-radius: 1px;
  transform-origin: 50% 90%;
  transform: rotate(20deg);
}

.reward-idle-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.9);
  box-shadow: inset 0 0 0 1px rgba(90, 60, 20, 0.08);
}

.reward-idle-stat strong {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: #5c3b16;
  margin: 0;
}

.reward-ico {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.reward-ico-gold {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 22%, transparent 26%),
    linear-gradient(160deg, #ffe7a8, #d4a04a 55%, #a87828);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.reward-ico-xp {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9) 0 20%, transparent 24%),
    linear-gradient(160deg, #c8b8ff, #7a68d0 55%, #4a3a98);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14);
  clip-path: polygon(50% 6%, 78% 28%, 70% 92%, 30% 92%, 22% 28%);
  border-radius: 0;
}

.reward-dust-line {
  margin: -6px 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #7a5a28;
  font-size: 14px;
}

.reward-dust-line strong {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: #8a5a18;
}

.meta-pill {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #fff4e0;
  color: #5c3b16;
  font-size: 15px;
  box-shadow: var(--shadow-soft);
}

.meta-pill strong {
  font-family: var(--font-pixel);
  font-size: 13px;
  margin-left: 4px;
}

button.meta-pill.meta-dust-all {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  font: inherit;
  background: linear-gradient(180deg, #fff0c8, #e8b84a);
  color: #5c3b16;
  box-shadow: var(--shadow-soft);
}

button.meta-pill.meta-dust-all .ico-dust {
  width: 18px;
  height: 18px;
}

button.meta-pill.meta-dust-all.is-ready {
  background: linear-gradient(180deg, #ffe08a, #d4a040);
  box-shadow: 0 4px 12px rgba(140, 100, 30, 0.28), var(--shadow-soft);
}

button.meta-pill.meta-dust-all:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

button.meta-pill.meta-dust-all:not(:disabled):hover {
  filter: brightness(1.05);
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .hero-row-3 {
    grid-template-columns: 1fr;
  }
}

.hero-card.archer {
  --hero-accent: #6a9a58;
}

.hub-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.deckbuild-panel > .deckbuild-actions {
  margin: 4px 0 10px;
  justify-content: flex-start;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 6px 0 8px;
  /* 粘顶时挡住下方卡面，避免按钮被盖住 */
  background: var(--panel-solid);
  box-shadow: 0 10px 16px -8px rgba(36, 51, 68, 0.18);
}

.deckbuild-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 6px;
  min-height: 0;
}

.deckbuild-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px 4px 10px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255, 248, 232, 0.88), rgba(236, 220, 190, 0.78));
  box-shadow: 0 8px 20px rgba(48, 28, 12, 0.14);
}

.deckbuild-section.is-loadout {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 220, 140, 0.28), transparent 46%),
    linear-gradient(165deg, rgba(255, 244, 220, 0.92), rgba(228, 204, 164, 0.84));
}

.deckbuild-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.deckbuild-col-head h3 {
  margin: 0;
}

.deckbuild-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 16px 14px;
  justify-items: center;
  max-height: min(36vh, 420px);
  overflow: auto;
  padding: 8px 4px 12px;
}

/* 组牌图鉴：缩小完整卡面，一屏多张；效果靠悬停 tip 读 */
.deckbuild-cards.is-gallery {
  --deck-mini-w: 92px;
  --deck-mini-scale: calc(92 / 158);
  /* 固定卡宽，不把列拉满，避免左右大空隙 */
  grid-template-columns: repeat(auto-fill, var(--deck-mini-w));
  gap: 8px 4px;
  justify-content: start;
  justify-items: stretch;
  align-content: start;
  max-height: min(42vh, 420px);
  padding: 4px 2px 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

@media (min-width: 860px) {
  .deckbuild-stack {
    flex-direction: row;
    min-height: min(52vh, 560px);
  }

  .deckbuild-section {
    flex: 1 1 0;
    min-height: 0;
  }

  .deckbuild-list,
  .deckbuild-cards.is-gallery {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
}

.deck-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 158px;
  min-height: 248px;
  overflow: visible;
}

.deck-card-wrap.is-mini {
  width: var(--deck-mini-w, 92px);
  height: calc(272px * var(--deck-mini-scale, 0.582));
  min-height: 0;
  z-index: 0;
}

.deck-card-wrap.is-mini:hover,
.deck-card-wrap.is-mini:focus-within {
  z-index: 8;
}

.deck-card-hit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 158px;
  min-height: 248px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  overflow: visible;
}

.deck-card-wrap.is-mini .deck-card-hit {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.deck-card-scale {
  display: block;
  width: 158px;
  height: 272px;
  flex: 0 0 auto;
}

.deck-card-wrap.is-mini .deck-card-scale {
  position: absolute;
  top: 0;
  left: 0;
  transform: scale(var(--deck-mini-scale, 0.582));
  transform-origin: top left;
  pointer-events: none;
}

.deck-card-hit .card {
  pointer-events: none;
  margin: 0;
  flex: 0 0 auto;
}

/* 缩略图鉴：收起描述区把高度还给插画；效果只在悬停 tip 展示 */
.deck-card-wrap.is-mini .card {
  --card-desc-h: 0px;
}
.deck-card-wrap.is-mini .card-descbox {
  display: none;
}

.deck-card-hit .card.disabled {
  opacity: 1;
  filter: none;
}

.deck-card-wrap.is-short .deck-card-hit {
  cursor: not-allowed;
  opacity: 0.72;
  filter: saturate(0.82);
}

.deck-card-wrap.is-ready .deck-card-hit:hover .deck-card-scale .card,
.deck-card-wrap.is-in-loadout .deck-card-hit:hover .deck-card-scale .card {
  filter: brightness(1.05);
}

/* 组牌悬停效果：fixed 浮层，避免被图鉴 overflow 裁切 */
.deck-float-tip {
  position: fixed;
  z-index: 80;
  width: 260px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
  pointer-events: none;
  color: #4a3420;
  background: linear-gradient(180deg, #fffaf0, #f3e4c4);
  box-shadow: 0 10px 24px rgba(48, 28, 12, 0.28);
}

.deck-float-tip[hidden] {
  display: none !important;
}

.deck-float-tip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  line-height: 1.3;
}

.deck-float-tip .deck-float-effect {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #5c3b16;
  white-space: normal;
  overflow-wrap: break-word;
}

.deck-float-gloss {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border: none;
  box-shadow: inset 0 1px 0 rgba(120, 80, 30, 0.18);
}

.deck-float-gloss[hidden] {
  display: none !important;
}

.deck-float-gloss li {
  margin: 0 0 5px;
  font-size: 12px;
  line-height: 1.4;
  color: #6a4a28;
}

.deck-float-gloss li:last-child {
  margin-bottom: 0;
}

.deck-float-gloss b {
  color: #8a5a18;
  font-weight: 700;
}

.deck-card-wrap.is-mini .deck-card-count {
  right: 2px;
  top: 2px;
  min-width: 28px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}

.deck-card-wrap.is-mini .deck-card-remove {
  right: 2px;
  top: 2px;
  width: 22px;
  height: 22px;
}

.deck-card-wrap.is-mini .deck-card-remove .ico-remove {
  width: 12px;
  height: 12px;
}

.deck-card-count,
.deck-card-used,
.deck-card-remove {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}

.deck-card-count {
  right: 6px;
  top: 6px;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #5a4828;
  background: linear-gradient(180deg, #fff8e8, #e8d8b8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 2px 6px rgba(60, 40, 16, 0.22);
}

.deck-card-used {
  left: 6px;
  top: 6px;
  min-width: 34px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: #3a4a28;
  background: linear-gradient(180deg, #eefae8, #c8e0b8);
  box-shadow: 0 2px 6px rgba(40, 60, 20, 0.2);
}

.deck-card-remove {
  right: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffd0c0, #e07060);
  box-shadow: 0 2px 8px rgba(120, 40, 20, 0.28);
}

.deck-card-remove .ico-remove {
  width: 14px;
  height: 14px;
}

.deck-card-wrap .deck-dust-btn {
  position: absolute;
  right: 4px;
  bottom: 8px;
  z-index: 7;
}

.deck-auto-dust {
  width: 40px;
  height: 36px;
  border: none;
  border-radius: 14px;
  background: #fff0d0;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}

.deck-auto-dust .ico-dust {
  width: 18px;
  height: 18px;
}

.deck-auto-dust.is-ready {
  background: linear-gradient(180deg, #ffe08a, #d4a040);
}

.deck-auto-dust:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.deck-auto-dust:not(:disabled):hover {
  filter: brightness(1.06);
}

.deckbuild-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(42vh, 420px);
  overflow: auto;
  padding: 2px 2px 6px;
}

/* 合成小屋：缩略完整卡面网格（与组牌图鉴同语），一屏多张 */
.craft-list {
  --craft-mini-w: 100px;
  --craft-mini-scale: calc(100 / 158);
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--craft-mini-w));
  gap: 8px 6px;
  justify-content: start;
  justify-items: stretch;
  align-content: start;
  max-height: min(58vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 2px 10px;
}

.craft-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: var(--craft-mini-w, 100px);
  height: calc(272px * var(--craft-mini-scale, 0.633));
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  overflow: visible;
  z-index: 0;
}

.craft-card-wrap:hover,
.craft-card-wrap:focus-visible {
  z-index: 8;
}

.craft-card-scale {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 158px;
  height: 272px;
  transform: scale(var(--craft-mini-scale, 0.633));
  transform-origin: top left;
  pointer-events: none;
}

.craft-card-wrap .card {
  pointer-events: none;
  margin: 0;
  flex: 0 0 auto;
}

.craft-card-wrap .card.disabled {
  opacity: 1;
  filter: none;
}

.craft-card-wrap.is-short {
  cursor: not-allowed;
  opacity: 0.72;
  filter: saturate(0.82);
}

.craft-card-wrap.is-ready {
  filter: none;
}

.craft-card-wrap.is-ready .craft-card-scale .card {
  box-shadow:
    0 0 16px rgba(80, 170, 110, 0.32),
    var(--shadow-soft);
}

.craft-card-wrap:not(:disabled):hover .craft-card-scale .card {
  filter: brightness(1.03);
}

.craft-count {
  position: absolute;
  right: 2px;
  top: 2px;
  z-index: 6;
  min-width: 28px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #5a4828;
  background: linear-gradient(180deg, #fff8e8, #e8d8b8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 2px 6px rgba(60, 40, 16, 0.22);
  pointer-events: none;
}

.craft-count.is-ready {
  color: #1e4a2c;
  background: linear-gradient(180deg, #eefae8, #b8e0c0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 10px rgba(70, 160, 100, 0.35),
    0 2px 6px rgba(30, 80, 40, 0.2);
}

/* 列表触顶滚动时禁止把行高压扁，否则效果文案会溢出色块 */
.deckbuild-list > .deck-item,
.deckbuild-list > .deck-item-row {
  flex-shrink: 0;
}

.deck-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px 10px;
  border: none;
  border-radius: 14px;
  background: #fff8eb;
  color: inherit;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-soft);
  height: auto;
  min-height: 48px;
  overflow: visible;
  box-sizing: border-box;
  width: 100%;
}

.deck-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.deck-item.rarity-common {
  background: linear-gradient(90deg, #c47a3a 0 14px, #fff8ef 14px);
  box-shadow: var(--shadow-soft);
}

.deck-item.rarity-rare {
  background: linear-gradient(90deg, #c8d0dc 0 14px, #f4f6fa 14px, #e8eef6 100%);
  box-shadow: var(--shadow-soft);
}

.deck-item.rarity-legendary {
  background: linear-gradient(90deg, #e8b84a 0 16px, #fff6d8 16px, #ffe9a0 100%);
  box-shadow: 0 6px 16px rgba(140, 100, 30, 0.22), var(--shadow-soft);
}

.deck-item.is-unique {
  box-shadow:
    0 0 0 3px rgba(255, 196, 64, 0.7),
    0 0 14px rgba(255, 180, 40, 0.35),
    0 6px 16px rgba(140, 100, 30, 0.18);
}

.deck-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 0;
  width: 0;
}

.deck-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.deck-cost {
  flex: 0 0 auto;
  min-width: 1.4em;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 13px;
  line-height: 1.2;
  color: #fff8eb;
  background: linear-gradient(160deg, #5a90c4, #2a4868);
  text-align: center;
}

.deck-item-name {
  font-size: 15px;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: anywhere;
}

.deck-item-text {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #5c3b16;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.deck-item-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  align-self: flex-start;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
}

/*
 * —— 大厅场景（UX-L）——
 * 外框 .lobby-world 与选人 / 战斗面板同宽（贴满 .screen），宽画幅 16:10。
 * 内层 .lobby-stage 保持底图 3:4，整体上移只露出村庄带（底图 y≈48.5%–95%）；
 * 热点百分比始终相对整张底图，换画幅不必重标。
 * 窄屏回落 3:4 整图（不上移）。
 */
.panel.title-panel.lobby-scene {
  background: transparent;
  box-shadow: none;
  padding: 0 0 12px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: none;
  width: 100%;
  margin-inline: 0;
  overflow: visible;
}

.lobby-world {
  --lobby-shift: -48.5%;
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 0 0 10px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: #c8d8e2;
}

.lobby-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 3 / 4;
  transform: translateY(var(--lobby-shift));
  z-index: 1;
}

.lobby-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.lobby-world::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 32, 48, 0.22) 0%, rgba(20, 32, 48, 0) 16%, rgba(20, 32, 48, 0) 82%, rgba(20, 32, 48, 0.18) 100%);
}

.lobby-world .title-settings,
.lobby-world .lobby-tools {
  z-index: 7;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 24px 16px;
}

.auth-card {
  width: min(420px, 100%);
  padding: 28px 24px 22px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(120, 180, 220, 0.18), transparent 55%),
    linear-gradient(165deg, rgba(28, 42, 58, 0.92), rgba(16, 26, 38, 0.94));
  box-shadow: 0 18px 40px rgba(8, 14, 24, 0.45);
  color: #eef5fb;
}

.auth-title {
  margin: 0 0 10px;
  font-family: "Ma Shan Zheng", "Noto Sans SC", sans-serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.auth-hint {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(220, 232, 244, 0.82);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: rgba(210, 224, 238, 0.9);
}

.auth-field input {
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(245, 250, 255, 0.1);
  color: #f5f9fd;
  font: inherit;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(180, 210, 235, 0.18);
}

.auth-field input:focus {
  box-shadow: inset 0 0 0 1px rgba(160, 210, 255, 0.55);
}

.auth-actions {
  margin-top: 8px;
}

.auth-error {
  margin: 12px 0 0;
  color: #ffb4a8;
  font-size: 0.88rem;
}

.lobby-stat.stat-player strong {
  max-width: 7em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ico-account {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #e8f0f8 0 28%, transparent 30%),
    radial-gradient(circle at 50% 78%, #e8f0f8 0 36%, transparent 38%),
    linear-gradient(180deg, #6a8498, #3a5060);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.ico-logout {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 42%, #d8e6f4 42% 58%, transparent 58%),
    radial-gradient(circle at 30% 50%, transparent 0 28%, #d8e6f4 30% 38%, transparent 40%);
  box-shadow: inset -6px 0 0 -2px #d8e6f4;
}

@media (max-width: 720px) {
  .lobby-world {
    --lobby-shift: 0%;
    aspect-ratio: 3 / 4;
  }
}

/* 霜雪资源条：半透明融进雪景，不用奶油色胶囊砖 */
.lobby-meta {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  pointer-events: none;
  max-width: calc(100% - 72px);
}

/* 小屏：靠左，给右侧布告/设置钮留空，避免叠压金币/等级 */
@media (max-width: 720px) {
  .lobby-meta {
    left: 10px;
    right: auto;
    transform: none;
    justify-content: flex-start;
    max-width: calc(100% - 120px);
  }
}

.lobby-stat {
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 3px 10px 3px 7px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.26), rgba(200, 222, 238, 0.16));
  box-shadow: 0 6px 14px rgba(30, 50, 70, 0.1);
  color: #f7fbff;
  text-shadow: 0 1px 2px rgba(20, 36, 52, 0.55);
  font-size: 13px;
  white-space: nowrap;
  font: inherit;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

/* 等级砖可悬停看挂机每小时产量（其余 lobby-stat 仍穿透） */
.lobby-stat.stat-lv {
  pointer-events: auto;
  cursor: help;
}

/* 换金入口：大厅金币砖可点（其余 lobby-stat 仍穿透） */
button.lobby-stat.stat-gold {
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button.lobby-stat.stat-gold:hover,
button.lobby-stat.stat-gold:focus-visible {
  filter: brightness(1.08);
}

.lobby-stat strong {
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.lobby-stat .stat-sub {
  font-family: var(--font-pixel);
  font-size: 12px;
  opacity: 0.78;
  margin-left: 1px;
}

.lobby-stat .stat-gem {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  position: relative;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* 玩家：头肩剪影 */
.stat-player .stat-gem {
  background:
    radial-gradient(circle at 50% 30%, #eef5fb 0 28%, transparent 30%),
    radial-gradient(ellipse 70% 55% at 50% 88%, #eef5fb 0 42%, transparent 44%);
  filter: drop-shadow(0 1px 1px rgba(20, 36, 52, 0.45));
}

/* 等级：五角星 */
.stat-lv .stat-gem {
  background: linear-gradient(160deg, #f0e4ff, #9a6ad8 55%, #5a3488);
  clip-path: polygon(
    50% 4%,
    61% 35%,
    96% 35%,
    68% 57%,
    79% 92%,
    50% 72%,
    21% 92%,
    32% 57%,
    4% 35%,
    39% 35%
  );
  filter: drop-shadow(0 1px 1px rgba(40, 20, 70, 0.45));
}

/* 金币：带中线的厚币 */
.stat-gold .stat-gem {
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 44%, rgba(120, 70, 20, 0.55) 46% 54%, transparent 56%),
    linear-gradient(180deg, #ffe9a8 0%, #e0b24a 48%, #b07828 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(160, 100, 30, 0.55),
    0 1px 2px rgba(40, 30, 10, 0.35);
}
.lobby-bldg {
  position: absolute;
  z-index: 4;
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lobby-bldg .bldg-affordance {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: block;
}

/* 脚下暖光：静止很淡，悬停 / 聚焦才亮，避免满屏光团 */
.lobby-bldg .bldg-glow {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -4%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 214, 140, 0.55) 0%, rgba(255, 190, 100, 0.2) 50%, transparent 74%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

/*
 * 木牌：立在建筑上的像素风木牌，写清功能（用户定案：要能直接看出是商店 / 合成小屋）。
 * 暖木色（不加积雪顶）；默认无木桩，仅签到保留立桩。禁线框。
 */
.lobby-bldg .bldg-sign {
  position: absolute;
  left: var(--sign-x, 50%);
  top: var(--sign-y, 0%);
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 100%;
  transition: transform 0.15s ease, filter 0.15s ease;
  filter: drop-shadow(0 3px 2px rgba(30, 24, 18, 0.45));
}

.lobby-bldg .sign-board {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px 4px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0) 0 5px, rgba(60, 30, 10, 0.12) 5px 6px),
    linear-gradient(180deg, #c8915a 0%, #a8703e 55%, #8a5a30 100%);
  box-shadow:
    inset 0 -3px 0 rgba(60, 30, 10, 0.35),
    inset 0 2px 0 rgba(255, 230, 190, 0.35);
  color: #fff3dc;
  font-family: var(--font-display);
  /* 随大厅宽度缩放：手机 12px，1080 宽约 17px */
  font-size: clamp(12px, 1.6cqw, 17px);
  line-height: 1.2;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 1px 1px 0 #4a2a12;
}

/* 木牌不加积雪顶（用户定案：全部去掉） */

/* 默认隐藏小木棍；签到立牌在 .bldg-checkin 里单独打开 */
.lobby-bldg .sign-post {
  display: none;
}

.lobby-bldg .sign-loot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff6d0 0 28%, transparent 32%),
    linear-gradient(160deg, #ffe7a8, #d4a04a 70%, #a87828);
  box-shadow: 0 0 6px rgba(255, 210, 120, 0.9);
  animation: signLootPulse 1.6s ease-in-out infinite;
}

/* 等级锁挂在木牌右下角，不加宽木牌（窄屏免出框） */
.lobby-bldg .sign-lock {
  position: absolute;
  top: calc(100% - 4px);
  right: -6px;
  font-style: normal;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(40, 24, 12, 0.55);
  color: #ffe2b0;
  text-shadow: none;
}

@keyframes signLootPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; }
}

.lobby-bldg:hover:not(:disabled),
.lobby-bldg:focus-visible:not(:disabled) {
  outline: none;
  background: transparent;
  box-shadow: none;
}

.lobby-bldg:hover:not(:disabled) .bldg-glow,
.lobby-bldg:focus-visible:not(:disabled) .bldg-glow {
  opacity: 1;
}

.lobby-bldg:hover:not(:disabled) .bldg-sign,
.lobby-bldg:focus-visible:not(:disabled) .bldg-sign {
  transform: translate(-50%, -100%) translateY(-2px) rotate(-2deg);
  filter: drop-shadow(0 5px 3px rgba(30, 24, 18, 0.45)) brightness(1.08);
}

.lobby-bldg:disabled,
.lobby-bldg.is-locked {
  cursor: not-allowed;
  /* 全局 button:disabled 会把整块压到 0.42，锁住的建筑木牌仍须读得清 */
  opacity: 1;
}

.lobby-bldg.is-locked .sign-board {
  filter: grayscale(0.5) brightness(0.85);
}

/*
 * 热点相对 .lobby-stage（= 整张 scene-lobby.jpg 768×1024）。
 * --sign-x / --sign-y 为木牌落脚点（木桩底），相对热点。
 */
.bldg-idle { left: 0%; top: 58%; width: 24%; height: 16%; --sign-x: 50%; --sign-y: 36%; }       /* 帐篷前立牌 */

/* 挂机进度：帐篷口小灯上的小圆点（按积攒比例点亮，无外圈） */
.bldg-idle .idle-lamp-gauge {
  position: absolute;
  left: 69%;
  top: 56%;
  width: 11px;
  height: 11px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    rgba(255, 214, 120, 0.95) 0deg calc(var(--pct, 0) * 360deg),
    rgba(40, 28, 14, 0.28) calc(var(--pct, 0) * 360deg) 360deg
  );
  box-shadow:
    0 0 5px rgba(255, 190, 80, calc(0.25 + var(--pct, 0) * 0.45)),
    inset 0 0 0 1px rgba(255, 230, 160, 0.2);
}

.bldg-idle.has-loot .idle-lamp-gauge,
.bldg-idle .idle-lamp-gauge.has-loot {
  animation: idleLampPulse 1.7s ease-in-out infinite;
}

.bldg-idle .idle-lamp-gauge.is-full {
  background: radial-gradient(circle at 40% 35%, #fff6d0 0 35%, #ffd45a 55%, #e09830 100%);
  box-shadow:
    0 0 7px rgba(255, 210, 100, 0.85),
    0 0 12px rgba(255, 180, 70, 0.4);
}

@keyframes idleLampPulse {
  0%, 100% { filter: brightness(1); transform: translate(-50%, -50%) scale(1); }
  50% { filter: brightness(1.15); transform: translate(-50%, -50%) scale(1.12); }
}
.bldg-adventure { left: 24%; top: 54%; width: 20%; height: 14%; --sign-x: 50%; --sign-y: 14%; }  /* 石门拱顶 */
.bldg-shop { left: 56%; top: 54%; width: 30%; height: 21%; --sign-x: 50%; --sign-y: 6%; }        /* 红屋顶 */
/* 木屋：木牌贴在门楣上沿 */
.bldg-deck { left: 15%; top: 71%; width: 27%; height: 17%; --sign-x: 50%; --sign-y: 45%; }
.bldg-craft { left: 74%; top: 68%; width: 22%; height: 18%; --sign-x: 38%; --sign-y: 28%; }      /* 锻炉+铁砧；热点贴合炉身，木牌落点不变 */
/* 广场签到：栅栏前雪地小立牌（热点仍在原广场坑位，桩脚贴热点底） */
.bldg-checkin {
  left: 42%;
  top: 60%;
  width: 12%;
  height: 11%;
  --sign-x: 50%;
  --sign-y: 96%;
  z-index: 6;
}
/* 签到木牌与其它建筑共用 .sign-board 材质 / 字号 / 字体；仅多一根立桩 */
.bldg-checkin .sign-post {
  display: block;
  position: relative;
  z-index: 1;
  width: 8px;
  height: clamp(30px, 4cqw, 42px);
  background: linear-gradient(90deg, #1a1008 0%, #6b4224 38%, #4a2e14 68%, #140c06 100%);
  border-radius: 1px 1px 2px 2px;
  box-shadow:
    inset 1px 0 0 rgba(255, 210, 150, 0.2),
    1px 0 0 rgba(0, 0, 0, 0.45);
}
/* 贴地暗影：木桩尖直接扎进泥雪，不要发白托盘 */
.bldg-checkin .sign-post::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 16px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(28, 20, 12, 0.45) 0%, transparent 75%);
  pointer-events: none;
}
.lobby-bldg.bldg-checkin.is-claimed .sign-board {
  filter: grayscale(0.35) brightness(0.9);
}
.lobby-bldg .sign-done {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #e8f5d8 0 28%, transparent 32%),
    linear-gradient(160deg, #9cc86a, #5a8f4a 70%, #3e6a32);
  box-shadow: 0 0 4px rgba(120, 180, 80, 0.55);
}

.lobby-stands {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.lobby-stand {
  pointer-events: auto;
  position: absolute;
  /* 相对场景宽度，避免大屏 vw 把人放大 */
  width: clamp(40px, 11%, 56px);
  height: auto;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
  /* 只有脚下接触阴影，不要外发光边框 */
  filter: drop-shadow(1px 8px 2px rgba(35, 45, 55, 0.4));
  transition: filter 0.15s ease, transform 0.12s ease;
  transform-origin: 50% 100%;
}

.lobby-stand .stand-base,
.lobby-stand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  border: none;
  border-radius: 0;
  background: transparent;
  image-rendering: pixelated;
  pointer-events: none;
}

.lobby-stand.is-on {
  z-index: 4;
  transform: translateY(-2px);
  filter: drop-shadow(1px 8px 2px rgba(35, 45, 55, 0.4));
}

.lobby-stand.is-on::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 2%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 230, 150, 0.55) 0%, rgba(255, 200, 90, 0.18) 55%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.lobby-stand.is-on img {
  position: relative;
  z-index: 1;
  filter: brightness(1.05) saturate(1.05);
}

.lobby-stand:hover,
.lobby-stand:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.lobby-stand.is-react {
  animation: standHop 0.42s steps(5) both;
  z-index: 6;
}

.lobby-stand.is-levelup {
  z-index: 8;
  animation: standLevelUpHop 0.75s cubic-bezier(0.18, 0.9, 0.28, 1) both;
  animation-delay: var(--lu-delay, 0s);
  filter:
    drop-shadow(1px 8px 2px rgba(35, 45, 55, 0.4))
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.4))
    drop-shadow(0 -4px 12px rgba(210, 230, 255, 0.35));
}

.lobby-stand.is-levelup img {
  filter: brightness(1.08) saturate(1.04);
}

@keyframes standHop {
  0% { transform: translateY(0) scale(1, 1); }
  25% { transform: translateY(-10px) scale(0.96, 1.06); }
  55% { transform: translateY(-2px) scale(1.04, 0.94); }
  100% { transform: translateY(0) scale(1, 1); }
}

@keyframes standLevelUpHop {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(-14px) scale(0.94, 1.1); }
  42% { transform: translateY(-4px) scale(1.06, 0.92); }
  68% { transform: translateY(-10px) scale(0.98, 1.04); }
  100% { transform: translateY(-2px) scale(1, 1); }
}

/* 升级：脚底白光柱（图案反馈，无字） */
.stand-levelup {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 140%;
  height: 220%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

.stand-levelup .lu-bloom {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 110%;
  height: 24%;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 55%,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(220, 235, 255, 0.32) 32%,
      rgba(180, 210, 255, 0.12) 58%,
      transparent 78%);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.35),
    0 0 20px rgba(190, 220, 255, 0.22);
  animation: luBloom 1.55s cubic-bezier(0.15, 0.85, 0.25, 1) both;
  animation-delay: var(--lu-delay, 0s);
}

.stand-levelup .lu-pillar {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 36%;
  height: 90%;
  transform: translateX(-50%) scaleY(0.15);
  transform-origin: 50% 100%;
  border-radius: 40% 40% 20% 20% / 18% 18% 40% 40%;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.22) 22%,
      rgba(235, 245, 255, 0.48) 52%,
      rgba(255, 255, 255, 0.58) 78%,
      rgba(210, 230, 255, 0.18) 100%);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.35),
    0 0 16px rgba(200, 225, 255, 0.28),
    0 -12px 24px rgba(180, 210, 255, 0.18);
  filter: blur(0.5px);
  animation: luPillar 1.45s cubic-bezier(0.12, 0.85, 0.2, 1) both;
  animation-delay: var(--lu-delay, 0s);
}

.stand-levelup .lu-flare {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 62%;
  height: 62%;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 80%,
      rgba(255, 255, 255, 0.42) 0%,
      rgba(220, 235, 255, 0.18) 38%,
      transparent 70%);
  mix-blend-mode: screen;
  animation: luFlare 1.35s ease-out both;
  animation-delay: var(--lu-delay, 0s);
}

.stand-levelup .lu-ring {
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: 50%;
  height: 14%;
  transform: translateX(-50%) scale(0.4);
  border-radius: 50%;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.35),
    0 0 8px rgba(220, 240, 255, 0.4),
    inset 0 0 6px rgba(255, 255, 255, 0.28);
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  animation: luRing 1.2s cubic-bezier(0.15, 0.8, 0.25, 1) both;
  animation-delay: var(--lu-delay, 0s);
}

.stand-levelup .lu-ring-2 {
  animation-delay: calc(var(--lu-delay, 0s) + 0.14s);
  animation-duration: 1.35s;
}

.stand-levelup .lu-spark {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 4px;
  height: 4px;
  margin: -2px;
  border-radius: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(210, 230, 255, 0.7));
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.45);
  --ang: calc(var(--i) * 45deg);
  --dist: calc(14px + (var(--i) % 3) * 8px);
  animation: luSpark 1.25s cubic-bezier(0.15, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--lu-delay, 0s) + var(--i) * 0.04s);
}

.stand-levelup.is-multi .lu-pillar {
  width: 42%;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.42),
    0 0 22px rgba(190, 220, 255, 0.32),
    0 -16px 28px rgba(170, 205, 255, 0.2);
}

.stand-levelup.is-multi .lu-bloom {
  width: 120%;
  height: 28%;
}

@keyframes luBloom {
  0% { opacity: 0; transform: translateX(-50%) scale(0.35); }
  22% { opacity: 0.85; transform: translateX(-50%) scale(1.1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.45); }
}

@keyframes luPillar {
  0% { opacity: 0; transform: translateX(-50%) scaleX(0.4) scaleY(0.08); }
  18% { opacity: 0.85; transform: translateX(-50%) scaleX(1.02) scaleY(0.55); }
  48% { opacity: 0.75; transform: translateX(-50%) scaleX(0.9) scaleY(1.02); }
  100% { opacity: 0; transform: translateX(-50%) scaleX(0.68) scaleY(1.15); }
}

@keyframes luFlare {
  0% { opacity: 0; transform: translateX(-50%) scale(0.5); }
  25% { opacity: 0.7; transform: translateX(-50%) scale(1.05); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.35); }
}

@keyframes luRing {
  0% { opacity: 0; transform: translateX(-50%) scale(0.35); }
  20% { opacity: 0.7; }
  100% { opacity: 0; transform: translateX(-50%) scale(2); }
}

@keyframes luSpark {
  0% {
    opacity: 0;
    transform: rotate(var(--ang)) translateY(0) scale(0.4);
  }
  18% { opacity: 1; }
  100% {
    opacity: 0;
    transform: rotate(var(--ang)) translateY(calc(-1 * var(--dist) - 42px)) scale(0.2);
  }
}

.lobby-stat.stat-lv.is-level-flash {
  animation: lvStatFlash 1.1s ease-out both;
}

.lobby-stat.stat-lv.is-level-flash strong {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 18px rgba(190, 220, 255, 0.8);
}

@keyframes lvStatFlash {
  0% { transform: scale(1); filter: brightness(1); }
  30% { transform: scale(1.12); filter: brightness(1.35); }
  100% { transform: scale(1); filter: brightness(1); }
}

.stand-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(4px);
  max-width: 9.5rem;
  padding: 0.35rem 0.55rem;
  border: none;
  border-radius: 8px;
  background: rgba(28, 22, 16, 0.88);
  color: #f4ebe0;
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  z-index: 8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  animation: standBubbleIn 0.18s ease-out both;
}

.stand-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(28, 22, 16, 0.88);
}

.stand-bubble.is-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@keyframes standBubbleIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 贴在前景雪径（3:4 整图；避开卡屋/锻炉） */
.stand-ryan { left: 33%; bottom: 7%; }
.stand-alice { left: 44%; bottom: 8%; }
.stand-archer { left: 55%; bottom: 7%; }


.lobby-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 14px;
  margin: 8px 0 16px;
}

.lobby-tile {
  border: none;
  border-radius: 24px;
  padding: 10px 10px 12px;
  background: linear-gradient(180deg, #fffaf2, #ffe8c8);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: grid;
  gap: 8px;
  justify-items: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lobby-tile:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.lobby-tile:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lobby-tile.primary-tile,
.gacha-btn.primary-tile {
  background: linear-gradient(180deg, #ffe7a8, #f0c050);
}

.tile-scene {
  position: relative;
  width: 100%;
  max-width: 118px;
  height: 86px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.06);
}

.tile-scene > * {
  position: absolute;
  pointer-events: none;
}

.tile-scene .sc-sky {
  inset: 0;
}

.adventure-art .sc-sky {
  background: linear-gradient(180deg, #9fd0f0 0%, #c8e8ff 42%, #8fbc78 42%, #6a9a58 100%);
}
.adventure-art .sc-sun {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  right: 14px;
  top: 10px;
  background: radial-gradient(circle at 35% 30%, #fff8d0, #f0c050 70%);
  box-shadow: 0 0 10px rgba(240, 192, 80, 0.55);
}
.adventure-art .sc-mt {
  bottom: 22%;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: transparent transparent #5a7a68 transparent;
}
.adventure-art .mt-back {
  left: 8%;
  border-width: 0 28px 36px 28px;
  border-bottom-color: #6a8a78;
  opacity: 0.9;
}
.adventure-art .mt-front {
  right: 10%;
  border-width: 0 34px 46px 34px;
  border-bottom-color: #4a6858;
}
.adventure-art .sc-path {
  left: 36%;
  right: 36%;
  bottom: 0;
  height: 26%;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #d8b888, #b89058);
}

.shop-art .sc-sky {
  background: linear-gradient(180deg, #ffe8c0, #f0d098 55%, #c8a878 55%, #a88858 100%);
}
.shop-art .sc-shop-body {
  left: 22%;
  right: 22%;
  bottom: 12%;
  height: 42%;
  border-radius: 6px 6px 4px 4px;
  background: linear-gradient(180deg, #f6e0b8, #d4a868);
}
.shop-art .sc-shop-roof {
  left: 14%;
  right: 14%;
  bottom: 48%;
  height: 22%;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #c05038, #8a3020);
  transform: perspective(40px) rotateX(12deg);
}
.shop-art .sc-shop-door {
  left: 42%;
  width: 16%;
  bottom: 12%;
  height: 22%;
  border-radius: 4px 4px 0 0;
  background: #6a4020;
}
.shop-art .sc-shop-sign {
  left: 30%;
  right: 30%;
  bottom: 56%;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ffe7a8, #e0b85a);
}

.idle-art .sc-sky {
  background: linear-gradient(180deg, #f0e0c0, #d8c098 50%, #8a9a68 50%, #6a7a48 100%);
}
.idle-art .sc-camp {
  left: 28%;
  right: 28%;
  bottom: 10%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, #f0a040, #8a4018 70%);
}
.idle-art .sc-tent {
  left: 34%;
  right: 34%;
  bottom: 24%;
  height: 38%;
  background: linear-gradient(180deg, #e8d0a0, #c8a070);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.idle-art .sc-smoke {
  left: 46%;
  width: 10px;
  height: 18px;
  bottom: 58%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 6px -8px 0 rgba(255, 255, 255, 0.35);
}

.deck-art {
  background: linear-gradient(160deg, #fff4e8, #e8d0b0);
}
.deck-art .sc-card {
  width: 34px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(165deg, #fffaf2, #f0d8a8);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
}
.deck-art .c1 { left: 18%; bottom: 16%; transform: rotate(-12deg); }
.deck-art .c2 { left: 36%; bottom: 20%; background: linear-gradient(165deg, #e8f0ff, #a8c0e8); }
.deck-art .c3 { left: 52%; bottom: 14%; transform: rotate(10deg); background: linear-gradient(165deg, #fff0c0, #e0b85a); }

.tile-lock {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: #fff8eb;
  background: rgba(60, 40, 20, 0.72);
  pointer-events: none;
}

.lobby-tile {
  position: relative;
}

.rarity-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  vertical-align: middle;
  flex: 0 0 auto;
}

.deck-item-meta .rarity-dot {
  width: 18px;
  height: 18px;
}

.rarity-dot.rarity-common {
  background: linear-gradient(160deg, #e8b888, #a06030);
}

.rarity-dot.rarity-rare {
  background: linear-gradient(160deg, #e8eef8, #98a8c0);
}

.rarity-dot.rarity-legendary {
  background: linear-gradient(160deg, #ffe7a8, #d4a04a);
}

.meta-pill.meta-warn {
  background: linear-gradient(180deg, #ffe0d0, #f0b090);
  color: #6a2818;
}

.icon-btn,
.icon-btn-wide {
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  min-width: 0;
  letter-spacing: 0;
  image-rendering: auto;
  background:
    radial-gradient(120% 100% at 28% 16%, rgba(255, 255, 255, 0.92) 0%, transparent 46%),
    linear-gradient(165deg, #fffdf8 0%, #ffe8c4 52%, #f0d098 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -3px 8px rgba(176, 118, 48, 0.14),
    0 1px 0 rgba(255, 248, 235, 0.65),
    0 8px 18px rgba(60, 40, 18, 0.14),
    0 2px 4px rgba(60, 40, 18, 0.08);
}

.icon-btn::before,
.icon-btn-wide::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: radial-gradient(80% 70% at 70% 78%, rgba(210, 150, 70, 0.1), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.icon-btn > *,
.icon-btn-wide > * {
  position: relative;
  z-index: 1;
}

.icon-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 15px;
  padding: 0;
}

.icon-btn-wide {
  min-width: 54px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 17px;
}

.icon-btn-wide.primary,
button.primary.icon-btn-wide {
  min-width: 54px;
  background:
    radial-gradient(120% 100% at 30% 14%, rgba(255, 255, 255, 0.7) 0%, transparent 42%),
    linear-gradient(165deg, #ffe9b0 0%, #f0c258 48%, #d4a038 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 230, 0.9),
    inset 0 -3px 8px rgba(140, 90, 20, 0.18),
    0 1px 0 rgba(255, 236, 180, 0.55),
    0 10px 22px rgba(180, 120, 30, 0.28),
    0 2px 4px rgba(120, 70, 10, 0.12);
}

.icon-btn:hover,
.icon-btn-wide:hover {
  color: inherit;
  filter: brightness(1.03);
}

.icon-btn:active,
.icon-btn-wide:active {
  filter: brightness(0.98);
}

.icon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.ico-gear,
.ico-logout,
.ico-account,
.ico-home,
.ico-play,
.ico-save,
.ico-reset,
.ico-clear,
.ico-skip,
.ico-end-turn,
.ico-remove,
.ico-craft-ok,
.ico-craft-no,
.ico-craft-merge,
.ico-dust,
.ico-adfree,
.ico-log,
.ico-feedback,
.ico-bulletin {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  position: relative;
  flex: 0 0 auto;
}

.ico-log,
.ico-bulletin {
  background:
    linear-gradient(180deg, #f8ecd0 0 16%, #e4bc68 16% 22%, #f4e2bc 22% 100%);
  border-radius: 3px 9px 9px 3px;
  box-shadow:
    inset 4px 0 0 #b88840,
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 8px 0 rgba(90, 60, 20, 0.1),
    inset 0 15px 0 rgba(90, 60, 20, 0.1),
    0 2px 4px rgba(70, 40, 10, 0.2);
}

.ico-bulletin::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 5px;
  top: 8px;
  height: 2px;
  background: rgba(120, 80, 30, 0.35);
  box-shadow: 0 4px 0 rgba(120, 80, 30, 0.28), 0 8px 0 rgba(120, 80, 30, 0.22);
}

.ico-feedback {
  background:
    linear-gradient(160deg, #f6f0e4 0%, #e8d4a8 55%, #c8a060 100%);
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 2px 4px rgba(70, 40, 10, 0.2);
}

.ico-feedback::before {
  content: "";
  position: absolute;
  inset: 3px 3px auto;
  height: 9px;
  background: linear-gradient(180deg, transparent 40%, #a87838 42% 58%, transparent 60%);
  clip-path: polygon(0 0, 50% 70%, 100% 0);
  opacity: 0.85;
}

.ico-feedback::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 4px;
  height: 3px;
  border-radius: 1px;
  background: rgba(120, 80, 30, 0.35);
}

/* 设置齿轮：金属齿环 + 中心轴帽 */
.ico-gear {
  background:
    radial-gradient(circle at 50% 50%, #fff8eb 0 18%, transparent 20%),
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.55) 0 10%, transparent 16%),
    conic-gradient(
      from 12deg,
      #7a5a28 0 12%,
      #e0b860 12% 20%,
      #7a5a28 20% 32%,
      #e0b860 32% 40%,
      #7a5a28 40% 52%,
      #e0b860 52% 60%,
      #7a5a28 60% 72%,
      #e0b860 72% 80%,
      #7a5a28 80% 92%,
      #e0b860 92% 100%
    );
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 3px #c09040,
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 3px rgba(70, 40, 10, 0.28),
    0 2px 4px rgba(70, 40, 10, 0.22);
}

/* 回大厅小屋：瓦顶 + 暖墙 + 门窗，不用糙几何色块 */
.ico-home {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background:
    linear-gradient(180deg, #5e2e20, #3f1c14) 76% 2% / 12% 22% no-repeat;
  filter: drop-shadow(0 2px 2px rgba(70, 35, 15, 0.3));
}

.ico-home::before {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  top: 10%;
  height: 42%;
  background:
    linear-gradient(180deg, rgba(255, 220, 190, 0.35), transparent 40%),
    linear-gradient(165deg, #f08664 0%, #c04830 50%, #842818 100%);
  clip-path: polygon(50% 0, 100% 84%, 93% 100%, 7% 100%, 0 84%);
  pointer-events: none;
}

.ico-home::after {
  content: "";
  position: absolute;
  left: 17%;
  right: 17%;
  top: 42%;
  bottom: 6%;
  border-radius: 2px 2px 4px 4px;
  background:
    radial-gradient(circle at 68% 78%, #f6d078 0 8%, transparent 10%),
    linear-gradient(180deg, #a8d8e4 0%, #5a9aac 100%) 18% 22% / 30% 30% no-repeat,
    linear-gradient(180deg, #734328 0%, #3f2212 100%) 58% 100% / 34% 52% no-repeat,
    linear-gradient(180deg, #f8e6b0 0%, #e4bc70 50%, #c89848 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 3px rgba(120, 70, 20, 0.2);
  pointer-events: none;
}

.ico-play {
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.35) 0 14%, transparent 22%),
    linear-gradient(155deg, #8a5a28 0%, #5c3b16 55%, #3a2410 100%);
  clip-path: polygon(30% 16%, 84% 50%, 30% 84%);
  filter: drop-shadow(0 1px 1px rgba(40, 20, 5, 0.35));
  box-shadow: none;
  border-radius: 0;
}

.ico-save {
  background:
    linear-gradient(180deg, #fff8eb 0%, #fff8eb 100%) 50% 78% / 42% 22% no-repeat,
    linear-gradient(180deg, #9ec4e0 0%, #5a90c4 45%, #2a4868 100%);
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -5px 0 #1e3850,
    0 2px 4px rgba(20, 40, 60, 0.28);
}

.ico-save::before {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 14%;
  height: 28%;
  border-radius: 2px;
  background: linear-gradient(180deg, #d8ecf8, #a8c8e0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.ico-reset {
  background:
    radial-gradient(circle at 68% 32%, transparent 0 18%, #fff8eb 20% 34%, transparent 36%),
    radial-gradient(circle at 50% 50%, transparent 36%, #a87030 38% 56%, transparent 58%),
    linear-gradient(145deg, #f0d080, #c09040 55%, #8a5a28);
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 3px rgba(80, 45, 10, 0.25),
    0 2px 4px rgba(80, 45, 10, 0.2);
}

.ico-clear {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.55) 0 14%, transparent 20%),
    linear-gradient(135deg, transparent 40%, #b04838 40% 60%, transparent 60%),
    linear-gradient(45deg, transparent 40%, #b04838 40% 60%, transparent 60%),
    linear-gradient(160deg, #f8e8d0, #e0c8a0);
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 4px rgba(90, 40, 20, 0.2);
}

/* 旧合成勾：保留类名以免残留，视觉改成与 merge 一致的炉火点 */
.ico-craft-ok {
  background:
    radial-gradient(circle at 50% 58%, #ffe08a 0 18%, transparent 32%),
    linear-gradient(160deg, #6a5040, #3a2a22);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 一键合成：三料汇成一星，不用打勾 */
.ico-craft-merge {
  background:
    radial-gradient(circle at 50% 42%, #fff3c0 0 12%, #f0b84a 22%, transparent 36%),
    linear-gradient(160deg, #5a4030, #2e2018);
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 3px rgba(40, 24, 10, 0.28);
}

.ico-craft-merge::before,
.ico-craft-merge::after {
  content: "";
  position: absolute;
  border-radius: 3px;
  background: linear-gradient(180deg, #e8dcc8, #b8a088);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.ico-craft-merge::before {
  left: 18%;
  top: 62%;
  width: 18%;
  height: 18%;
  transform: rotate(-18deg);
}

.ico-craft-merge::after {
  right: 18%;
  top: 62%;
  width: 18%;
  height: 18%;
  transform: rotate(18deg);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.2),
    -11px 2px 0 #c8b898;
}

.ico-skip {
  background: #5c3b16;
  clip-path: polygon(8% 20%, 48% 50%, 8% 80%, 8% 20%, 52% 20%, 92% 50%, 52% 80%);
}

/* 结束回合：沙漏（上腔→咽喉→下腔），圆钮内一眼可读 */
.ico-end-turn {
  width: 26px;
  height: 26px;
  border-radius: 0;
  background:
    linear-gradient(180deg, #5c3b16 0 14%, transparent 14% 86%, #5c3b16 86% 100%),
    linear-gradient(180deg, transparent 0 18%, #7a4e1c 18% 46%, transparent 46% 54%, #7a4e1c 54% 82%, transparent 82%),
    linear-gradient(180deg, #c89038 0%, #a07028 42%, #5c3b16 50%, #a07028 58%, #c89038 100%);
  clip-path: polygon(
    18% 8%, 82% 8%, 82% 18%, 58% 42%, 58% 58%, 82% 82%, 82% 92%,
    18% 92%, 18% 82%, 42% 58%, 42% 42%, 18% 18%
  );
  box-shadow: none;
  filter: drop-shadow(0 1px 1px rgba(60, 30, 8, 0.35));
}

.end-turn-btn .ico-end-turn {
  width: 36px;
  height: 36px;
}

.ico-remove {
  width: 16px;
  height: 16px;
  background: #a04030;
  clip-path: polygon(20% 8%, 50% 38%, 80% 8%, 92% 20%, 62% 50%, 92% 80%, 80% 92%, 50% 62%, 20% 92%, 8% 80%, 38% 50%, 8% 20%);
  flex: 0 0 auto;
  margin-top: 4px;
}

.ico-craft-no {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35) 0 18%, transparent 24%),
    linear-gradient(160deg, #d8d0c4, #a09888 60%, #786f62);
  border-radius: 50%;
  opacity: 0.72;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ico-craft-no::before {
  content: "";
  position: absolute;
  left: 26%;
  right: 26%;
  top: 46%;
  height: 12%;
  border-radius: 999px;
  background: rgba(255, 248, 235, 0.75);
}

.ico-dust {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff6d0 0 28%, transparent 30%),
    linear-gradient(160deg, #ffe08a, #c99428 60%, #8a5a18);
  box-shadow: 0 1px 2px rgba(80, 50, 10, 0.25);
}

.deck-item-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.deck-item-row .deck-item {
  flex: 1;
  min-width: 0;
}

.deck-dust-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 36px;
  border: none;
  border-radius: 14px;
  background: #fff0d0;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.deck-dust-btn .ico-dust {
  width: 18px;
  height: 18px;
}

.deck-dust-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.deck-dust-btn:not(:disabled):hover {
  background: #ffe08a;
}

.deck-excess {
  margin-left: 4px;
  color: #a06020;
  font-size: 12px;
}

.ico-adfree {
  width: 28px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffe0a8, #d4a04a);
  box-shadow: inset 0 0 0 2px rgba(90, 40, 20, 0.25);
}

.ico-adfree::after {
  content: "";
  position: absolute;
  inset: 40% -2px;
  height: 3px;
  background: #a04030;
  transform: rotate(-28deg);
}

.icon-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.gacha-pack-visual {
  position: relative;
  width: 78px;
  height: 54px;
}

/* 抽卡钮：职业武器徽章（剑/杖/弓），禁小人卡面、禁线框 */
.gacha-pack-visual .mini-weapon {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 252, 240, 0.95), transparent 42%),
    linear-gradient(165deg, #fff6e4, #e8d0a0 70%, #d0b078);
  box-shadow:
    0 3px 0 rgba(90, 55, 18, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.gacha-pack-visual .mini-weapon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

.gacha-pack-visual .mini-weapon.weapon-ryan {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 248, 220, 0.95), transparent 42%),
    linear-gradient(165deg, #fff0d0, #e0b868 70%, #c89848);
  box-shadow:
    0 3px 0 rgba(90, 55, 18, 0.18),
    0 0 10px rgba(224, 170, 70, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.gacha-pack-visual .mini-weapon.weapon-alice {
  background:
    radial-gradient(circle at 35% 28%, rgba(240, 248, 255, 0.95), transparent 42%),
    linear-gradient(165deg, #e8f4ff, #b0d0e8 70%, #88b0d0);
  box-shadow:
    0 3px 0 rgba(40, 60, 90, 0.14),
    0 0 10px rgba(140, 190, 230, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.gacha-pack-visual .mini-weapon.weapon-archer {
  background:
    radial-gradient(circle at 35% 28%, rgba(244, 255, 236, 0.95), transparent 42%),
    linear-gradient(165deg, #e8f4d8, #b8d090 70%, #88a868);
  box-shadow:
    0 3px 0 rgba(40, 60, 28, 0.14),
    0 0 10px rgba(120, 170, 80, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.gacha-pack-visual .pull-count {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: #5c3b16;
  background: linear-gradient(180deg, #fff8e8, #f0c868);
  box-shadow: 0 2px 0 rgba(120, 80, 20, 0.25);
  z-index: 2;
}

.pack-one .mini-weapon {
  left: 19px;
  top: 5px;
}

.pack-ten .mini-weapon:nth-child(1) { left: 0; top: 10px; transform: rotate(-14deg); }
.pack-ten .mini-weapon:nth-child(2) { left: 19px; top: 2px; z-index: 1; }
.pack-ten .mini-weapon:nth-child(3) { left: 38px; top: 10px; transform: rotate(14deg); }

.gacha-btn.gacha-ten .pull-count {
  color: #5a3a10;
  background: linear-gradient(180deg, #fff4c8, #e8b040);
  box-shadow: 0 0 8px rgba(240, 190, 70, 0.45), 0 2px 0 rgba(120, 80, 20, 0.25);
}

.gacha-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-pixel);
  font-size: 13px;
  color: #6a4820;
}

.craft-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

/* 合成小屋头图：软像素炉火锻造插画，禁线框 */
.craft-hero-art {
  display: block;
  width: min(280px, 72vw);
  max-width: 280px;
  height: 128px;
  object-fit: cover;
  object-position: center 58%;
  border: none;
  border-radius: 22px;
  image-rendering: auto;
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 248, 230, 0.35);
  pointer-events: none;
  user-select: none;
}

.craft-toolbar {
  justify-content: center;
  margin-bottom: 10px;
}

button.meta-pill.meta-craft-all {
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  background: linear-gradient(160deg, #e8f6ec, #c8e6d0);
  color: #1e4a2c;
}

button.meta-pill.meta-craft-all .ico-craft-merge {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

button.meta-pill.meta-craft-all.is-ready {
  box-shadow: 0 4px 12px rgba(40, 120, 70, 0.22);
}

button.meta-pill.meta-craft-all:disabled {
  opacity: 0.45;
  box-shadow: none;
}

button.meta-pill.meta-craft-all:not(:disabled):hover {
  filter: brightness(1.04);
}

/* —— 合成升阶仪式：三合一 → 壳合拢镀层 → 定格收下 —— */
.modal-card.modal-craft-ritual {
  width: min(560px, 100%);
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, #fff8ec 0%, #f3e2c4 100%);
  box-shadow: var(--shadow-lift);
}

.modal-card.modal-craft-batch {
  width: min(720px, 100%);
}

.craft-ritual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.craft-ritual-arena {
  position: relative;
  width: min(100%, 340px);
  min-height: 300px;
  display: grid;
  place-items: center;
}

.craft-ritual-tri {
  position: relative;
  width: 280px;
  height: 160px;
  z-index: 2;
}

.craft-fuel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  margin: -44px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(40, 28, 12, 0.28);
  transition: transform 0.55s cubic-bezier(0.2, 1.1, 0.3, 1), opacity 0.45s ease;
  background: #c4a574;
  /* 材料卡全程半透明，合成完成的结果卡才实色 */
  opacity: 0.72;
}

.craft-fuel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.88;
}

.craft-fuel.rarity-common { background: #a85a22; }
.craft-fuel.rarity-rare { background: #8aa0b4; }
.craft-fuel.rarity-legendary { background: #c99838; }

.craft-ritual-tri .craft-fuel:nth-child(1) {
  transform: translate(-78px, -8px) rotate(-8deg);
  opacity: 0.55;
  z-index: 0;
}
.craft-ritual-tri .craft-fuel:nth-child(2) {
  transform: translate(0, 10px) rotate(2deg);
  opacity: 0.78;
  z-index: 2;
}
.craft-ritual-tri .craft-fuel:nth-child(3) {
  transform: translate(78px, -8px) rotate(8deg);
  opacity: 0.55;
  z-index: 0;
}

.craft-ritual-tri.is-merge .craft-fuel:nth-child(1),
.craft-ritual-tri.is-merge .craft-fuel:nth-child(2),
.craft-ritual-tri.is-merge .craft-fuel:nth-child(3) {
  transform: translate(0, 0) rotate(0deg) scale(0.72);
  opacity: 0.28;
}

.craft-ritual-forge {
  position: absolute;
  inset: 18% 12% 28%;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.craft-ritual-forge.is-on { opacity: 1; }

.craft-shell {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 54%;
  border-radius: 22px;
  box-shadow: 0 10px 22px rgba(40, 28, 12, 0.22);
  transition: transform 0.45s cubic-bezier(0.2, 1.05, 0.3, 1);
}

.craft-shell-l {
  left: 0;
  transform: translateX(-118%);
  background:
    linear-gradient(120deg, #d8e2ea 0%, #9eb0c2 45%, #7e93a8 100%);
}

.craft-shell-r {
  right: 0;
  transform: translateX(118%);
  background:
    linear-gradient(240deg, #f0d48a 0%, #d4a84a 48%, #b8862c 100%);
}

.craft-ritual.rarity-rare .craft-shell-l,
.craft-ritual.rarity-rare .craft-shell-r {
  background: linear-gradient(135deg, #e8eef4 0%, #a8b8c8 50%, #7e93a8 100%);
}

.craft-ritual.rarity-legendary .craft-shell-l,
.craft-ritual.rarity-legendary .craft-shell-r {
  background: linear-gradient(135deg, #fff0c0 0%, #e0b44a 48%, #b8862c 100%);
}

.craft-ritual-forge.is-on .craft-shell-l,
.craft-ritual-forge.is-on .craft-shell-r {
  transform: translateX(0);
}

.craft-plate-sweep {
  position: absolute;
  inset: -8%;
  border-radius: 28px;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 36%,
    rgba(255, 248, 220, 0.15) 44%,
    rgba(255, 240, 180, 0.85) 50%,
    rgba(255, 248, 220, 0.15) 56%,
    transparent 64%,
    transparent 100%
  );
  background-size: 220% 100%;
  background-position: 120% 0;
  opacity: 0;
  pointer-events: none;
}

.craft-ritual-forge.is-plate .craft-plate-sweep {
  opacity: 1;
  animation: craftPlateSweep 0.55s ease-out both;
}

@keyframes craftPlateSweep {
  from { background-position: 120% 0; }
  to { background-position: -40% 0; }
}

.craft-ritual-result {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  min-height: 300px;
}

.craft-ritual-card {
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 12px 24px rgba(100, 60, 10, 0.35));
}

.craft-ritual-card .card {
  pointer-events: none;
  cursor: default;
}

/* 展示用 disabled 只禁点击，合成/奖励结果必须实色，勿吃 .card.disabled 的 0.38 */
.craft-ritual-card .card.disabled,
.boss-prize-card .card.disabled,
.gacha-gold-reveal .boss-prize-card .card.disabled {
  opacity: 1;
  filter: none;
  transform: none;
  box-shadow: var(--shadow-soft);
}

.craft-ritual-card.fly-in {
  animation: bossPrizeFly 0.85s cubic-bezier(0.18, 1.15, 0.28, 1) both;
}

.craft-ritual-card.fly-in .card {
  animation: bossPrizeCardShine 1.2s ease-out both;
}

.craft-ritual-sparks {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}

.craft-ritual-sparks i {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px;
  border-radius: 2px;
  background: linear-gradient(135deg, #fff9d8, #ffc84a);
  box-shadow: 0 0 8px rgba(255, 210, 80, 0.95);
  animation: bossPrizeSpark 1.15s cubic-bezier(0.15, 0.8, 0.2, 1) both;
}

.craft-ritual-sparks i:nth-child(1) { --sx: -92px; --sy: -18px; animation-delay: 0.05s; }
.craft-ritual-sparks i:nth-child(2) { --sx: 88px; --sy: -28px; animation-delay: 0.08s; }
.craft-ritual-sparks i:nth-child(3) { --sx: -70px; --sy: 54px; animation-delay: 0.12s; }
.craft-ritual-sparks i:nth-child(4) { --sx: 76px; --sy: 48px; animation-delay: 0.1s; }
.craft-ritual-sparks i:nth-child(5) { --sx: -20px; --sy: -78px; animation-delay: 0.14s; }
.craft-ritual-sparks i:nth-child(6) { --sx: 24px; --sy: 86px; animation-delay: 0.16s; }
.craft-ritual-sparks i:nth-child(7) { --sx: -108px; --sy: 22px; animation-delay: 0.18s; }
.craft-ritual-sparks i:nth-child(8) { --sx: 110px; --sy: 8px; animation-delay: 0.2s; }
.craft-ritual-sparks i:nth-child(9) { --sx: -48px; --sy: -62px; animation-delay: 0.22s; width: 7px; height: 7px; }
.craft-ritual-sparks i:nth-child(10) { --sx: 52px; --sy: -68px; animation-delay: 0.24s; width: 7px; height: 7px; }

.craft-ritual.rarity-rare .craft-ritual-sparks i {
  background: linear-gradient(135deg, #f2f7ff, #9eb4c8);
  box-shadow: 0 0 8px rgba(150, 180, 210, 0.9);
}

.craft-ritual-actions {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}

.craft-batch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
  justify-content: center;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 4px 2px 8px;
}

.craft-batch-item {
  position: relative;
}

.craft-batch-item .craft-ritual-card .card {
  transform: scale(0.82);
  transform-origin: top center;
}

.craft-batch-item {
  width: 168px;
  min-height: 236px;
}

.craft-batch-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 4;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff6e4;
  color: #6a4820;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.craft-batch-more {
  margin: 0;
  text-align: center;
}

.deck-count {
  font-size: 12px;
  color: var(--muted);
}

.badge.ok {
  min-width: 12px;
  min-height: 12px;
  padding: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3a8a58;
  box-shadow: 0 0 0 3px rgba(58, 138, 88, 0.25);
  font-size: 0;
  color: transparent;
}

.title-settings.icon-btn {
  position: absolute;
  top: 12px;
  right: 12px;
}

.meta-ico {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -2px;
}
.gold-ico { background: linear-gradient(160deg, #ffe7a8, #d4a04a); }
.lv-ico { background: linear-gradient(160deg, #d0b8f0, #8a5cc8); }
.idle-ico { background: linear-gradient(160deg, #c8f0c0, #5aaa72); }
.meta-sub { margin-left: 4px; opacity: 0.7; font-size: 12px; }

.shop-hero-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 8px 0 14px;
}

.shop-hero-chip {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background: #fff4e0;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0.55;
}

.shop-hero-chip.is-on {
  opacity: 1;
  box-shadow: 0 0 18px rgba(224, 184, 90, 0.55), var(--shadow-soft);
}

.shop-hero-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  image-rendering: pixelated;
}

.class-pack-stage {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 8px 0 18px;
}

.class-pack-box {
  width: min(168px, 46vw);
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  background: #1c2438;
  box-shadow:
    0 0 0 1px rgba(255, 230, 170, 0.18),
    0 14px 28px rgba(20, 14, 8, 0.35),
    var(--shadow-lift);
  animation: packIdleFloat 2.8s ease-in-out infinite;
}

.class-pack-box .pack-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  border: none;
  border-radius: 22px;
}

.class-pack-box .pack-glow {
  position: absolute;
  inset: -8%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 18%, rgba(255, 236, 180, 0.28), transparent 48%);
  mix-blend-mode: screen;
}

.class-pack-box .pack-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.0) 42%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.0) 58%,
    transparent 68%
  );
  transform: translateX(-120%);
  animation: packShine 3.6s ease-in-out infinite;
}

.class-pack-box.pack-ryan {
  box-shadow:
    0 0 22px rgba(224, 170, 70, 0.28),
    0 14px 28px rgba(20, 14, 8, 0.35);
}

.class-pack-box.pack-alice {
  box-shadow:
    0 0 22px rgba(140, 190, 230, 0.32),
    0 14px 28px rgba(20, 14, 8, 0.35);
}

.class-pack-box.pack-archer {
  box-shadow:
    0 0 22px rgba(120, 170, 80, 0.28),
    0 14px 28px rgba(20, 14, 8, 0.35);
}

.class-pack-box.is-shaking {
  animation: packShake 0.35s steps(4) infinite;
}

.class-pack-box.is-gold-next .pack-glow {
  inset: -14%;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 236, 160, 0.72) 0 18%, rgba(255, 190, 60, 0.42) 36%, transparent 62%),
    radial-gradient(circle at 50% 70%, rgba(255, 200, 80, 0.28), transparent 55%);
  box-shadow: 0 0 36px rgba(255, 196, 70, 0.55);
}

.class-pack-box.is-gold-next.is-shaking {
  animation: packShakeGold 0.28s steps(4) infinite;
}

.class-pack-box.is-gold-next {
  box-shadow:
    0 0 28px rgba(255, 200, 70, 0.55),
    0 14px 28px rgba(20, 14, 8, 0.35);
}

/* 商店大卡：右上角换装入口——暖金色砖 + 循环图标（禁线框；醒目优先） */
.pack-skin-peel {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  aspect-ratio: 1 / 1;
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 10px;
  cursor: pointer;
  z-index: 5;
}

/* 覆盖全局 button 的 min-height / hover 上移，保持正方形角标 */
.pack-skin-peel:hover,
.pack-skin-peel:active {
  transform: none;
  box-shadow: none;
}

.pack-skin-peel .peel-chip {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 248, 220, 0.95), transparent 42%),
    linear-gradient(160deg, #ffe08a 0%, #f0b43a 48%, #d4891c 100%);
  box-shadow:
    0 0 0 2px rgba(255, 236, 180, 0.55),
    0 4px 10px rgba(80, 40, 0, 0.35),
    0 0 12px rgba(255, 200, 70, 0.5);
  animation: peelChipPulse 2.2s ease-in-out infinite;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

/* 双环循环图标：表示切换皮肤 */
.pack-skin-peel .peel-ico {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 2px rgba(90, 48, 8, 0.78);
  background: transparent;
}

.pack-skin-peel .peel-ico::before,
.pack-skin-peel .peel-ico::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.pack-skin-peel .peel-ico::before {
  top: -1px;
  right: 0;
  border-width: 0 0 5px 4px;
  border-color: transparent transparent rgba(90, 48, 8, 0.85) transparent;
  transform: rotate(28deg);
}

.pack-skin-peel .peel-ico::after {
  bottom: -1px;
  left: 0;
  border-width: 5px 4px 0 0;
  border-color: rgba(90, 48, 8, 0.85) transparent transparent transparent;
  transform: rotate(28deg);
}

.pack-skin-peel:hover .peel-chip,
.pack-skin-peel:focus-visible .peel-chip {
  transform: scale(1.08);
  box-shadow:
    0 0 0 3px rgba(255, 244, 200, 0.75),
    0 5px 12px rgba(80, 40, 0, 0.4),
    0 0 16px rgba(255, 210, 80, 0.7);
  filter: brightness(1.06);
  animation: none;
}

.pack-skin-peel:focus-visible {
  outline: none;
}

.pack-skin-peel:focus-visible .peel-chip {
  box-shadow:
    0 0 0 3px rgba(255, 250, 220, 0.95),
    0 0 0 6px rgba(255, 200, 80, 0.32),
    0 5px 12px rgba(80, 40, 0, 0.4);
}

@keyframes peelChipPulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(255, 236, 180, 0.5),
      0 4px 10px rgba(80, 40, 0, 0.35),
      0 0 10px rgba(255, 200, 70, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(255, 236, 180, 0.75),
      0 4px 10px rgba(80, 40, 0, 0.35),
      0 0 16px rgba(255, 210, 80, 0.7);
  }
}

.class-pack-box .skin-snow.pack-snow,
.lobby-stand .skin-snow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.95) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 62% 8%, rgba(230, 245, 255, 0.9) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 36%, rgba(220, 238, 255, 0.9) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 88% 52%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 22% 68%, rgba(235, 248, 255, 0.85) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 54% 78%, rgba(255, 255, 255, 0.75) 0 1px, transparent 2px);
  animation: skinSnowDrift 5.5s linear infinite;
  opacity: 0.85;
  mix-blend-mode: screen;
}

/*
 * 霜风立绘拉弓画布更宽；大厅按宽度缩放会显得矮一截。
 * 按宽高比补偿到与 Ryan/Alice 同视觉身高（约 ×1.45）。
 */
.lobby-stand.is-skin-frost {
  width: clamp(58px, 15.9%, 81px);
}

.lobby-stand.is-skin-frost .stand-base,
.class-pack-box.is-skin-frost .pack-cover {
  transform-origin: 50% 85%;
  animation: skinCapeSway 3.6s ease-in-out infinite;
}

@keyframes skinSnowDrift {
  0% { background-position: 0 0, 8px -10px, -6px -20px, 4px -6px, -10px -30px, 6px -14px, 0 -8px; }
  100% { background-position: 6px 48px, -4px 40px, 10px 52px, -8px 44px, 4px 56px, -6px 48px, 8px 50px; }
}

@keyframes skinCapeSway {
  0%, 100% { transform: rotate(-0.6deg) translateX(0); }
  50% { transform: rotate(0.7deg) translateX(0.5px); }
}

@keyframes packIdleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes packShine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

@keyframes packShake {
  0% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-4px); }
  100% { transform: rotate(-1deg) translateY(0); }
}

@keyframes packShakeGold {
  0% { transform: rotate(-4deg) translateY(0) scale(1.02); }
  50% { transform: rotate(5deg) translateY(-6px) scale(1.04); }
  100% { transform: rotate(-3deg) translateY(0) scale(1.02); }
}

.panel.shop-panel {
  position: relative;
}

.gacha-gold-reveal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(40, 28, 10, 0.55) 0 28%, rgba(20, 14, 8, 0.72) 58%, rgba(12, 10, 8, 0.82) 100%);
  animation: gachaGoldVeil 0.28s ease-out both;
}

.gacha-gold-reveal .boss-prize {
  margin: 0;
  min-height: 0;
  transform: scale(0.92);
  transform-origin: center center;
}

@keyframes gachaGoldVeil {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gacha-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 14px;
}

.gacha-btn {
  border: none;
  border-radius: 22px;
  min-width: 124px;
  padding: 12px 14px 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(180deg, #fffaf2, #ffe0a8 58%, #e8c078);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: center;
  font: inherit;
  color: inherit;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.gacha-btn:hover:not(:disabled),
.gacha-btn:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.gacha-btn:disabled {
  opacity: 0.55;
  cursor: default;
  filter: grayscale(0.15);
}

.gacha-btn.gacha-ten {
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 250, 210, 0.55), transparent 42%),
    linear-gradient(180deg, #fff3c4, #f0c050 55%, #d4a04a);
  box-shadow:
    0 0 16px rgba(224, 184, 90, 0.35),
    var(--shadow-soft);
}

.gacha-first-hint {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 2px 7px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #3a2a10;
  background: linear-gradient(180deg, #ffe9a0, #e0b84a 70%, #c9982e);
  box-shadow: 0 2px 6px rgba(80, 50, 10, 0.28);
  pointer-events: none;
  white-space: nowrap;
}

.gacha-ico {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: #5c3b16;
}

.gacha-result {
  display: none;
  flex-wrap: wrap;
  gap: 8px 6px;
  justify-content: center;
  align-content: flex-start;
  min-height: 48px;
  margin: 2px 0 10px;
  max-height: min(56vh, 440px);
  overflow: auto;
  padding: 4px 2px 6px;
}

.gacha-result.is-open,
.gacha-result:not([hidden]) {
  display: flex;
}

.gacha-card-wrap {
  position: relative;
  flex: 0 0 auto;
  cursor: help;
  outline: none;
}

.gacha-card-wrap:hover,
.gacha-card-wrap:focus-visible {
  z-index: 6;
}

.gacha-card-wrap .card {
  pointer-events: none;
  cursor: inherit;
}

.gacha-card-wrap .card.disabled {
  opacity: 1;
  filter: none;
  transform: none;
  box-shadow: var(--shadow-soft);
}

/*
 * 十连：缩略铺满（同组牌 mini 手法）。
 * transform 不占布局，须把格子收成缩放后尺寸，并把卡绝对定位，
 * 否则仍按 158×272 撑出横竖滚动条，看起来又稀又空。
 * 面板够宽时固定 5 列（十连两行收完）；窄屏再退回 auto-fit。
 */
.gacha-result.is-ten.is-open,
.gacha-result.is-ten:not([hidden]) {
  --gacha-ten-gap-x: 6px;
  /* ~560 内容宽也能排下 5 列（含滚动条占位） */
  --gacha-ten-scale: 0.64;
  --gacha-ten-w: calc(158px * var(--gacha-ten-scale));
  --gacha-ten-h: calc(272px * var(--gacha-ten-scale));
  display: grid;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  grid-template-columns: repeat(5, var(--gacha-ten-w));
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  justify-items: center;
  gap: 8px var(--gacha-ten-gap-x);
}

.gacha-result.is-ten .gacha-card-wrap {
  width: var(--gacha-ten-w);
  height: var(--gacha-ten-h);
  min-height: 0;
}

.gacha-result.is-ten .gacha-card-wrap .card,
.gacha-result.is-ten .gacha-card-wrap .card.disabled {
  position: absolute;
  top: 0;
  left: 0;
  transform: scale(var(--gacha-ten-scale));
  transform-origin: top left;
}

@media (max-width: 560px) {
  .gacha-result.is-ten.is-open,
  .gacha-result.is-ten:not([hidden]) {
    --gacha-ten-scale: 0.58;
    grid-template-columns: repeat(auto-fit, var(--gacha-ten-w));
    max-width: 100%;
  }
}

.gacha-card-wrap.flip-in {
  animation: flipIn 0.28s steps(4) both;
}

.gacha-card-wrap.rarity-rare.soft-glow {
  animation: flipIn 0.32s steps(4) both, rareSoftGlow 0.7s ease-out both;
}

.gacha-card-wrap.rarity-rare.soft-glow .card {
  box-shadow:
    0 0 16px rgba(180, 200, 230, 0.55),
    var(--shadow-soft);
}

.gacha-card-wrap.rarity-legendary.is-settled::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: 22px;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 248, 210, 0.55) 50%,
    rgba(255, 255, 255, 0) 60%,
    transparent 70%
  );
  transform: translateX(-130%);
  animation: gachaGoldChipShine 1.1s ease-out 0.05s both;
}

@keyframes flipIn {
  from { transform: scale(0.6) rotateY(60deg); opacity: 0; }
  to { transform: scale(1) rotateY(0); opacity: 1; }
}

@keyframes rareSoftGlow {
  0% { filter: brightness(1.08); }
  100% { filter: brightness(1); }
}

@keyframes gachaGoldChipShine {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

.intent {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #ffe0d8;
  border: none;
  color: #8a3030;
  font-size: 15px;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-soft);
  max-width: 100%;
}

/* 职业特性钮：插画充满圆面，软落影，无描边线框 */
.class-trait-btn.icon-btn {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 3px 8px rgba(80, 50, 20, 0.22);
  overflow: visible;
  image-rendering: auto;
}

.class-trait-btn.icon-btn::before {
  content: none;
}

.class-trait-btn--iron_wall {
  background-image: url("assets/ui-trait-iron-wall.png?v=2");
}

.class-trait-btn--aftertone {
  background-image: url("assets/ui-trait-aftertone.png?v=2");
}

.class-trait-btn--eagle_eye {
  background-image: url("assets/ui-trait-eagle-eye.png?v=2");
}

.class-trait-btn.icon-btn::after {
  content: "";
  position: absolute;
  inset: 7% 10% 50%;
  border-radius: 50%;
  background: radial-gradient(120% 100% at 50% 0%, rgba(255, 255, 255, 0.28), transparent 72%);
  pointer-events: none;
  z-index: 1;
}

.class-trait-btn.icon-btn:hover:not(:disabled) {
  filter: brightness(1.05) saturate(1.08);
  transform: translateY(-1px);
}

.class-trait-btn.icon-btn:disabled {
  opacity: 0.55;
  filter: grayscale(0.75) brightness(0.92);
  transform: none;
}

.class-trait-btn.icon-btn.is-trait-active,
.class-trait-btn.icon-btn.is-trait-active:disabled {
  opacity: 1;
  filter: none;
  box-shadow:
    0 0 0 2px rgba(196, 130, 60, 0.55),
    0 0 14px rgba(200, 120, 40, 0.5),
    0 3px 8px rgba(80, 50, 20, 0.2);
}

.class-trait-btn.icon-btn.is-trait-cooldown,
.class-trait-btn.icon-btn.is-trait-cooldown:disabled {
  opacity: 0.55;
  filter: grayscale(0.82) brightness(0.9);
  transform: none;
  box-shadow: 0 2px 6px rgba(80, 50, 20, 0.14);
}

/* 插画已铺满按钮，隐藏内部几何符号（状态徽章仍用下方 .ico-trait-* 几何样式） */
.class-trait-btn .ico-trait-wall,
.class-trait-btn .ico-trait-echo,
.class-trait-btn .ico-trait-eye {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  box-shadow: none;
  clip-path: none;
  filter: none;
  border-radius: 0;
}

.class-trait-btn .ico-trait-wall::before,
.class-trait-btn .ico-trait-echo::before,
.class-trait-btn .ico-trait-eye::after {
  content: none;
}

.ico-trait-wall,
.ico-trait-echo,
.ico-trait-eye {
  position: relative;
  display: block;
}

/* 铁壁：冷钢盾 + 银脊 */
.ico-trait-wall {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0 20%, transparent 42%),
    linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.7) 48% 52%, transparent 55%),
    linear-gradient(180deg, #eef3f7 0%, #b7c4d0 36%, #7f92a4 70%, #445566 100%);
  clip-path: polygon(50% 4%, 90% 20%, 90% 58%, 50% 96%, 10% 58%, 10% 20%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ico-trait-wall::before {
  content: "";
  position: absolute;
  inset: 20% 26% 26%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 65%);
  clip-path: polygon(50% 0, 100% 22%, 100% 70%, 50% 100%, 0 70%, 0 22%);
  pointer-events: none;
}

/* 余韵：亮霜核 + 清晰涟漪 */
.ico-trait-echo {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 12%, #b8eaf8 18%, transparent 26%),
    radial-gradient(circle at 50% 50%, transparent 0 38%, #6ec4e4 40% 48%, transparent 50%),
    radial-gradient(circle at 50% 50%, transparent 0 62%, #3a98c0 64% 74%, transparent 76%),
    radial-gradient(circle at 36% 32%, rgba(255, 255, 255, 0.7) 0 14%, transparent 22%);
  box-shadow:
    inset 0 0 0 1px rgba(200, 240, 255, 0.5),
    0 0 8px rgba(90, 190, 230, 0.35);
}

.ico-trait-echo::before {
  content: "";
  position: absolute;
  left: 40%;
  top: 16%;
  width: 18%;
  height: 30%;
  border-radius: 40% 40% 30% 30%;
  background: linear-gradient(180deg, #ffffff, #c8efff 70%, transparent);
  transform: rotate(-18deg);
  pointer-events: none;
  opacity: 0.9;
}

/* 鹰眼：大杏仁眼 + 翠绿虹膜 */
.ico-trait-eye {
  border-radius: 50% / 42%;
  background:
    radial-gradient(circle at 60% 40%, #ffffff 0 8%, transparent 12%),
    radial-gradient(circle at 50% 50%, #142010 0 16%, #8fd03a 20% 38%, #4a7a1c 42% 56%, #d8e8a0 60% 78%, #6a8040 82% 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 3px rgba(40, 60, 20, 0.28);
  clip-path: ellipse(50% 36% at 50% 50%);
}

.ico-trait-eye::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 46%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  pointer-events: none;
}

.hero-trait {
  background: #e8d8b8;
  color: #5c3b16;
}

.hero-trait-iron_wall {
  background: linear-gradient(180deg, #efe4d0, #d4c09a);
}

.hero-trait-aftertone {
  background: linear-gradient(180deg, #dff0f8, #b8d8e8);
  color: #245a78;
}

.hero-trait-eagle_eye {
  background: linear-gradient(180deg, #e8f0c0, #c8d888);
  color: #3a5818;
}

.hero-trait .ico-trait-wall,
.hero-trait .ico-trait-echo,
.hero-trait .ico-trait-eye {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
  filter: none;
}

.meter {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.meter strong {
  color: var(--text);
  font-weight: 700;
  margin-left: 4px;
}

.hand-limit-note {
  margin: 0 0 10px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #ffe7c2;
  color: #5c3b16;
  font-size: 15px;
  line-height: 1.4;
}

.hand {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 130px;
  align-items: stretch;
}


.card {
  --card-rim: #3d5166;
  --card-band: #c4a574;
  --card-ink: #243344;
  --card-radius: 22px;
  --card-pad-t: 10px;
  --card-pad-x: 10px;
  --card-pad-b: 12px;
  width: 158px;
  height: 248px;
  min-height: 248px;
  background: linear-gradient(180deg, #fffdf8 0%, #ffe8c8 100%);
  border: none;
  border-top: 8px solid var(--card-band);
  border-radius: var(--card-radius);
  padding: var(--card-pad-t) var(--card-pad-x) var(--card-pad-b);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
  color: inherit;
  font: inherit;
  box-shadow: var(--shadow-soft);
  box-sizing: border-box;
}

/*
 * 稀有度壳：实心填色 SVG 金属框（铜简 / 银卷草 / 金雕龙），中间挖空露奶油底。
 * 禁止 inset 勾线、禁止描边龙形；框图本身只有 fill，没有 stroke。
 * 银花/金龙浮雕必须 clip 在壳环内，禁止侵入名条/描述（遮字硬项）。
 */
.card-frame {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  /* 金属框压在插画/名条之上，挖空处露出内容，边框不再被盖住 */
  z-index: 4;
  background: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  box-shadow: none;
  border: none;
}

.card-ornament {
  display: none;
}

.card.card-rarity-common,
.card.card-rarity-rare,
.card.card-rarity-legendary {
  border-top: none;
  /* 样张壳环约 18–22px；银底花/金龙盘尾更厚，底 pad 须盖过壳环内缘，描述才落在挖空内 */
  --card-pad-t: 22px;
  --card-pad-x: 22px;
  --card-pad-b: 32px;
  /* 三区固定高：名条 / 描述 / 插画同卡同高，并排对齐（硬项） */
  --card-name-h: 28px;
  /* 须装下五语最长效果原文（含 en/es 多子句）；短文同样占此高以对齐。禁止靠裁字凑齐 */
  --card-desc-h: 104px;
  --card-zone-gap: 3px;
  padding: var(--card-pad-t) var(--card-pad-x) var(--card-pad-b);
  height: 272px;
  min-height: 272px;
  max-height: 272px;
  background: linear-gradient(180deg, #fffdf8 0%, #ffe8c8 100%);
  gap: var(--card-zone-gap);
}

.card.card-rarity-common {
  /*
   * 外壳铺铜色（与 SVG 壳中段同色）：外缘抗锯齿不再透出奶油，
   * 避免铜框底缘出现「泥边 / 异物」；奶油只画在挖空井里。
   */
  background: #a85a22;
  box-shadow: none;
}

/* 挖空井：对齐 rarity-copper.svg 内孔 inset 10 / 圆角 10 */
.card.card-rarity-common::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff8ec 0%, #f2dcc0 100%);
  z-index: 1;
  pointer-events: none;
}

.card.card-rarity-common.card-family-slash::before,
.card.card-rarity-common.card-family-guard::before,
.card.card-rarity-common.card-family-frost::before,
.card.card-rarity-common.card-family-echo::before,
.card.card-rarity-common.card-family-draw::before {
  background: linear-gradient(180deg, #fff8ec 0%, #f2dcc0 100%);
}

.card.card-rarity-common .card-frame {
  /* 矢量框避免 PNG 栅格底缘脏边；尺寸仍按 158×272 贴齐 */
  background-image: url("assets/frames/rarity-copper.svg?v=26");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.card.card-rarity-common .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #ffe2b0, #d49248 55%, #8a4820);
  color: #3a2410;
  text-shadow: none;
}

.card.card-rarity-common .card-namebar {
  background: linear-gradient(180deg, #fff4e0, #f0d8b0);
}
.card.card-rarity-common .card-descbox {
  background: #fffaf0;
}

.card.card-rarity-rare {
  --card-pad-t: 22px;
  --card-pad-x: 24px;
  /* 银框底缘卷草约从卡高 89% 起封实心，底 pad ≥ 34px 才能让描述底板落在挖空内 */
  --card-pad-b: 34px;
  box-shadow: none;
}

.card.card-rarity-rare .card-frame {
  background-image: url("assets/frames/rarity-silver.png?v=24");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.card.card-rarity-legendary {
  --card-pad-t: 24px;
  --card-pad-x: 26px;
  /* 金龙盘尾更厚，底 pad 再让一点，避免盘尾压描述 */
  --card-pad-b: 36px;
  box-shadow: none;
}

.card.card-rarity-legendary .card-frame {
  background-image: url("assets/frames/rarity-gold.png?v=24");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 3px rgba(90, 55, 10, 0.28));
}

/* 插画等在框下；名条/描述必须排除在外，否则 :not() 链特异性会压过后面的 z-index:5 */
.card.card-rarity-common > *:not(.card-frame):not(.card-ornament):not(.cost):not(.card-unique-mark):not(.card-namebar):not(.card-descbox),
.card.card-rarity-rare > *:not(.card-frame):not(.card-ornament):not(.cost):not(.card-unique-mark):not(.card-namebar):not(.card-descbox),
.card.card-rarity-legendary > *:not(.card-frame):not(.card-ornament):not(.cost):not(.card-unique-mark):not(.card-namebar):not(.card-descbox) {
  position: relative;
  z-index: 2;
}

/* 名条/描述高于框：杜绝银花/金龙压字；框仍压住插画。文字随底板同层，禁止框饰裁字 */
.card.card-rarity-common > .card-namebar,
.card.card-rarity-rare > .card-namebar,
.card.card-rarity-legendary > .card-namebar,
.card.card-rarity-common > .card-descbox,
.card.card-rarity-rare > .card-descbox,
.card.card-rarity-legendary > .card-descbox {
  position: relative;
  z-index: 5;
}

.card.card-rarity-common > .cost,
.card.card-rarity-rare > .cost,
.card.card-rarity-legendary > .cost,
.card.card-rarity-common > .card-unique-mark,
.card.card-rarity-rare > .card-unique-mark,
.card.card-rarity-legendary > .card-unique-mark {
  z-index: 6;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.card.card-rarity-common:hover {
  box-shadow: 0 12px 22px -14px rgba(100, 55, 20, 0.28);
}

.card.card-rarity-rare:hover {
  box-shadow: 0 12px 22px -14px rgba(70, 90, 120, 0.26);
}

.card.card-rarity-legendary:hover {
  box-shadow: 0 14px 24px -14px rgba(120, 80, 20, 0.3);
}

.card.disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-soft);
}

.card-corner {
  position: relative;
  z-index: 1;
  justify-self: end;
  min-width: 26px;
  padding: 6px 10px;
  font-family: var(--font-pixel);
  font-size: 12px;
  line-height: 1.2;
  color: #fff8eb;
  background: var(--card-rim);
  border-radius: var(--radius-pill);
  border: none;
  box-shadow: var(--shadow-soft);
}

.card-top {
  display: none;
}

.card > .cost,
.card > .cost.cost-tl,
.card.card-rarity-common > .cost,
.card.card-rarity-rare > .cost,
.card.card-rarity-legendary > .cost {
  position: absolute;
  top: var(--card-pad-t, 10px);
  left: var(--card-pad-x, 10px);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: visible;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #ffe7a8, #d4a04a 55%, #8f7344);
  border: none;
  box-shadow: var(--shadow-soft);
  color: #3a2808;
  font-family: var(--font-pixel);
  font-size: 14px;
}

.card > .card-unique-mark {
  position: absolute;
  z-index: 5;
}

.card .cost-gem {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
}

.card-type {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-art {
  flex: 1 1 auto;
  min-height: 124px;
  height: 124px;
  margin: 0;
  border-radius: 14px;
  border: none;
  position: relative;
  z-index: 2;
  overflow: hidden;
  image-rendering: pixelated;
  background: #7ec8f0;
  box-shadow: 0 4px 10px rgba(36, 51, 68, 0.12);
}

.card.card-rarity-common .card-art,
.card.card-rarity-rare .card-art,
.card.card-rarity-legendary .card-art {
  /* 名条+描述固定后，余高一律归插画；禁止再设 min-height 把描述顶出壳 */
  flex: 1 1 0;
  min-height: 0;
  height: auto;
}

/* 费用叠在立绘上，立绘从框内顶缘铺满，不再空出顶栏奶油条 */
.card > .card-art {
  order: 0;
}

.card-art-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.card-art-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, transparent 28%, transparent 62%, rgba(26, 36, 48, 0.28) 100%),
    repeating-linear-gradient(
      0deg,
      transparent 0 3px,
      rgba(0, 0, 0, 0.04) 3px 4px
    );
}

.card-namebar {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--card-name-h, 30px);
  height: var(--card-name-h, 30px);
  min-height: var(--card-name-h, 30px);
  max-height: var(--card-name-h, 30px);
  margin: 0;
  padding: 4px 8px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  /* 与描述区一致：禁止外扩阴影画进金属壳 */
  box-shadow: none;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.card .name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
  line-height: 1.15;
  color: var(--card-ink);
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  width: 100%;
}

.card-descbox {
  position: relative;
  z-index: 1;
  /* 描述区固定高（可容五语最长效果原文）；禁止靠裁字凑齐，短文也占同高以对齐 */
  flex: 0 0 var(--card-desc-h, 58px);
  height: var(--card-desc-h, 58px);
  min-height: var(--card-desc-h, 58px);
  max-height: var(--card-desc-h, 58px);
  padding: 3px 6px;
  border: none;
  border-radius: 12px;
  background: #fffdf8;
  /* 不用外扩阴影：会画进铜壳底缘，看起来像米色矩形叠在金属框上 */
  box-shadow: none;
  box-sizing: border-box;
  /* 禁止 overflow:hidden 裁掉效果字（画面规则 3.4）；装不下须改断行/字号/固定高 */
  overflow: visible;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: flex-start;
}

.card .desc {
  font-size: 13px;
  color: #243344;
  line-height: 1.15;
  letter-spacing: 0;
  position: relative;
  z-index: 1;
  margin: 0;
  display: block;
  overflow: visible;
  width: 100%;
  /* 中文按词换行：勿逐字拆「格挡」「伤害」；断点靠标点后的 <wbr> */
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: normal;
  white-space: normal;
}

/* —— 招式族视觉：像素插画 + 框色 —— */

.card.card-family-slash {
  --card-rim: #8a4030;
  --card-band: #e07a5a;
  --card-ink: #6a2818;
  background:
    repeating-linear-gradient(135deg, rgba(224, 122, 90, 0.1) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, #fff6f0 0%, #ffd8c4 100%);
}
.card.card-family-slash .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #ffd0b8, #e07a5a 55%, #8a4030);
  color: #fff8eb;
  text-shadow: 0 1px 0 rgba(90, 30, 16, 0.45);
}
.card.card-family-slash .card-type { color: #b04a3a; }

.card.card-family-slash .card-namebar {
  background: linear-gradient(180deg, #ffe0d4, #ffd0bc);
}
.card.card-family-slash .card-descbox {
  background: #fff4ee;
}
.card.card-family-slash .card-corner { background: #c05038; }

.card.card-family-guard {
  --card-rim: #3a6a8a;
  --card-band: #6aa8d0;
  --card-ink: #244a62;
  background:
    repeating-linear-gradient(0deg, rgba(90, 150, 190, 0.12) 0 4px, transparent 4px 10px),
    linear-gradient(180deg, #f4faff 0%, #d4e8f8 100%);
}
.card.card-family-guard .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #e8f4ff, #6aa8d0 55%, #3a6a8a);
  color: #143044;
  text-shadow: none;
}
.card.card-family-guard .card-type { color: #3a6a8a; }

.card.card-family-guard .card-namebar {
  background: linear-gradient(180deg, #e8f4ff, #d0e8f8);
}
.card.card-family-guard .card-descbox {
  background: #eef6fc;
}
.card.card-family-guard .card-corner { background: #3a7aa0; }

.card.card-family-frost {
  --card-rim: #2f7f8f;
  --card-band: #7fd4e0;
  --card-ink: #1f5a66;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 58%, rgba(127, 212, 224, 0.5) 0 2px, transparent 3px),
    linear-gradient(180deg, #f2fcff 0%, #c8f0f4 100%);
}
.card.card-family-frost .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #e8fbff, #7fd4e0 55%, #2f7f8f);
  color: #104850;
}
.card.card-family-frost .card-type { color: #2f7f8f; }

.card.card-family-frost .card-namebar {
  background: linear-gradient(180deg, #e4f8fc, #c8eef4);
}
.card.card-family-frost .card-descbox {
  background: #e8f8fc;
}
.card.card-family-frost .card-corner { background: #2f8f9c; }

.card.card-family-echo {
  --card-rim: #7a5a28;
  --card-band: #e0b85a;
  --card-ink: #5a4018;
  background:
    repeating-linear-gradient(-20deg, transparent 0 8px, rgba(224, 184, 90, 0.16) 8px 10px),
    linear-gradient(180deg, #fffaf0 0%, #ffe4a8 100%);
}
.card.card-family-echo .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #fff3d0, #e0b85a 55%, #7a5a28);
  color: #4a3408;
}
.card.card-family-echo .card-type { color: #8a6a28; }

.card.card-family-echo .card-namebar {
  background: linear-gradient(180deg, #fff0c8, #ffe0a0);
}
.card.card-family-echo .card-descbox {
  background: #fff8e6;
}
.card.card-family-echo .card-corner { background: #b88830; }

.card.card-family-draw {
  --card-rim: #3a7a52;
  --card-band: #6ec48a;
  --card-ink: #245038;
  background:
    repeating-linear-gradient(90deg, rgba(110, 196, 138, 0.14) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, #f4fff6 0%, #d4f0dc 100%);
}
.card.card-family-draw .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #e4f8ea, #6ec48a 55%, #3a7a52);
  color: #143820;
  text-shadow: none;
  border-radius: 14px;
}

/* 稀有度费用宝石压过族色：普卡必须读铜，不能被「续」绿盖掉 */
.card.card-rarity-common.card-family-slash .cost,
.card.card-rarity-common.card-family-guard .cost,
.card.card-rarity-common.card-family-frost .cost,
.card.card-rarity-common.card-family-echo .cost,
.card.card-rarity-common.card-family-draw .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 248, 220, 0.95) 0 12%, transparent 18%),
    linear-gradient(160deg, #ffe2b0, #d49248 52%, #7a3e18);
  color: #3a2410;
  text-shadow: none;
}
.card.card-rarity-rare.card-family-slash .cost,
.card.card-rarity-rare.card-family-guard .cost,
.card.card-rarity-rare.card-family-frost .cost,
.card.card-rarity-rare.card-family-echo .cost,
.card.card-rarity-rare.card-family-draw .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #f4f7fb, #c0ccd8 55%, #7a8a9c);
  color: #243444;
  text-shadow: none;
}
.card.card-rarity-legendary.card-family-slash .cost,
.card.card-rarity-legendary.card-family-guard .cost,
.card.card-rarity-legendary.card-family-frost .cost,
.card.card-rarity-legendary.card-family-echo .cost,
.card.card-rarity-legendary.card-family-draw .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #fff0c0, #e0b85a 55%, #8a5a18);
  color: #3a2808;
  text-shadow: 0 1px 0 rgba(255, 240, 180, 0.35);
}

/* 稀有度名条/描述压过族色，铜/银/金身份优先 */
.card.card-rarity-common.card-family-slash .card-namebar,
.card.card-rarity-common.card-family-guard .card-namebar,
.card.card-rarity-common.card-family-frost .card-namebar,
.card.card-rarity-common.card-family-echo .card-namebar,
.card.card-rarity-common.card-family-draw .card-namebar {
  background: linear-gradient(180deg, #fff4e0, #f0d8b0);
}
.card.card-rarity-common.card-family-slash .card-descbox,
.card.card-rarity-common.card-family-guard .card-descbox,
.card.card-rarity-common.card-family-frost .card-descbox,
.card.card-rarity-common.card-family-echo .card-descbox,
.card.card-rarity-common.card-family-draw .card-descbox {
  background: #fffaf0;
}
.card.card-rarity-common.card-family-slash .name,
.card.card-rarity-common.card-family-guard .name,
.card.card-rarity-common.card-family-frost .name,
.card.card-rarity-common.card-family-echo .name,
.card.card-rarity-common.card-family-draw .name {
  color: #5c3b16;
}

.card.card-rarity-rare.card-family-slash .card-namebar,
.card.card-rarity-rare.card-family-guard .card-namebar,
.card.card-rarity-rare.card-family-frost .card-namebar,
.card.card-rarity-rare.card-family-echo .card-namebar,
.card.card-rarity-rare.card-family-draw .card-namebar {
  background: linear-gradient(180deg, #eef2f8, #dde6f0);
}
.card.card-rarity-rare.card-family-slash .card-descbox,
.card.card-rarity-rare.card-family-guard .card-descbox,
.card.card-rarity-rare.card-family-frost .card-descbox,
.card.card-rarity-rare.card-family-echo .card-descbox,
.card.card-rarity-rare.card-family-draw .card-descbox {
  background: #f4f7fb;
}

.card.card-rarity-legendary.card-family-slash .card-namebar,
.card.card-rarity-legendary.card-family-guard .card-namebar,
.card.card-rarity-legendary.card-family-frost .card-namebar,
.card.card-rarity-legendary.card-family-echo .card-namebar,
.card.card-rarity-legendary.card-family-draw .card-namebar {
  background: linear-gradient(180deg, #ffe7a8, #f0c050 55%, #ffe7a8);
}
.card.card-rarity-legendary.card-family-slash .card-descbox,
.card.card-rarity-legendary.card-family-guard .card-descbox,
.card.card-rarity-legendary.card-family-frost .card-descbox,
.card.card-rarity-legendary.card-family-echo .card-descbox,
.card.card-rarity-legendary.card-family-draw .card-descbox {
  background: rgba(255, 248, 235, 0.95);
}

/*
 * 干粮只允许微调插画取景；禁止改 pad / gap / min-height，
 * 否则会破坏 §3.4 三区固定高对齐，且描述底板会压过铜壳底缘。
 */
.card[data-card="field_ration"] .card-art-img {
  object-fit: cover;
  object-position: center 42%;
}
.card.card-family-draw .card-type { color: #3a7a52; }

.card.card-family-draw .card-namebar {
  background: linear-gradient(180deg, #e4f8ea, #ccecd8);
}
.card.card-family-draw .card-descbox {
  background: #ecfcf0;
}
.card.card-family-draw .card-corner { background: #3a8a58; }

/*
 * 稀有度压招式族：银/金读金属壳，不让「续」绿、「时」棕抢戏。
 * 族角标仍保留，费用宝石跟稀有度金属色。
 */
.card.card-rarity-rare {
  background: linear-gradient(180deg, #f8fafc 0%, #e6ecf4 100%);
  color: #243444;
}
.card.card-rarity-rare .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #f4f7fb, #c0ccd8 55%, #7a8a9c);
  color: #243444;
  text-shadow: none;
}
.card.card-rarity-rare .card-corner {
  background: #8a9ab0;
}
.card.card-rarity-rare .card-type {
  color: #5a6a80;
}
.card.card-rarity-rare .card-namebar {
  background: linear-gradient(180deg, #eef2f8, #dde6f0);
}
.card.card-rarity-rare .card-descbox {
  background: #f4f7fb;
}

.card.card-rarity-legendary {
  background: linear-gradient(180deg, #fffaf0 0%, #ffe6b0 100%);
  color: #3a2808;
}
.card.card-rarity-legendary .cost {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 10%, transparent 16%),
    linear-gradient(160deg, #fff0c0, #e0b85a 55%, #8a5a18);
  color: #3a2808;
  text-shadow: 0 1px 0 rgba(255, 240, 180, 0.35);
}
.card.card-rarity-legendary .card-corner {
  background: #c99428;
}
.card.card-rarity-legendary .card-type {
  color: #8a6a28;
}
.card.card-rarity-legendary .card-namebar {
  background: linear-gradient(180deg, #fff0c8, #ffe08a);
}
.card.card-rarity-legendary .card-descbox {
  background: #fff8e8;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.choice-card {
  background: var(--cream);
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.choice-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.choice-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  font-weight: 400;
}

.choice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(36, 51, 68, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal[hidden] { display: none !important; }

.modal-card {
  width: min(520px, 100%);
  background: var(--cream);
  border: none;
  border-radius: var(--radius);
  padding: 24px 22px;
  animation: riseIn 0.25s steps(5) both;
  box-shadow: var(--shadow-lift);
}

.modal-card.modal-death {
  border: none;
  background: #fff0f0;
  box-shadow: var(--shadow-soft);
}

.modal-card.modal-echo {
  border: none;
  background: #eef8fa;
  box-shadow: var(--shadow-soft);
}

.modal-card.modal-ad {
  border: none;
  background: #fff6e4;
  box-shadow: var(--shadow-soft);
}

.modal-card.modal-auth {
  max-width: 22rem;
}

.modal-card.modal-goldshop {
  width: min(420px, 100%);
}

.modal-card.modal-pass-detail {
  width: min(360px, 100%);
  padding: 1.1rem 1.15rem 1rem;
}

.modal-card.modal-pass-detail .pass-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #4a3212;
}

.modal-card.modal-pass-detail .pass-detail-days {
  flex: 0 0 auto;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #5a3a14;
  background: linear-gradient(180deg, #fff3d0, #efc86a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.modal-card.modal-pass-detail .pass-detail-skin {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 252, 240, 0.95), transparent 48%),
    linear-gradient(160deg, #eef6ff 0%, #d4e6f4 55%, #c2d8ea 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.modal-card.modal-pass-detail .pass-detail-skin-art {
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(160deg, #e8f4ff, #b0d0e8);
  box-shadow: 0 2px 8px rgba(60, 90, 120, 0.22);
}

.modal-card.modal-pass-detail .pass-detail-skin-art img {
  display: block;
  width: 148%;
  height: 148%;
  max-width: none;
  margin: -28% 0 0 -24%;
  object-fit: cover;
  object-position: 52% 28%;
}

.modal-card.modal-pass-detail .pass-detail-skin-art.is-empty {
  background:
    radial-gradient(circle at 35% 30%, #fff8d0, transparent 45%),
    linear-gradient(160deg, #fff0c0 0%, #e0a830 55%, #a86818 100%);
}

.modal-card.modal-pass-detail .pass-detail-skin-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.modal-card.modal-pass-detail .pass-detail-skin-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2f4560;
  line-height: 1.2;
}

.modal-card.modal-pass-detail .pass-detail-skin-tag {
  align-self: flex-start;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3a5a78;
  background: linear-gradient(180deg, #f7fbff, #d5e6f4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.modal-card.modal-pass-detail .pass-detail-list {
  list-style: none;
  margin: 0 0 0.95rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.modal-card.modal-pass-detail .pass-detail-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf0, #f3e6cf);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.modal-card.modal-pass-detail .pass-detail-ico {
  position: relative;
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
}

.modal-card.modal-pass-detail .pass-detail-ico-gold {
  background:
    radial-gradient(circle at 35% 30%, #fff8d0, transparent 45%),
    linear-gradient(160deg, #fff0c0 0%, #e0a830 55%, #a86818 100%);
  box-shadow: inset 0 0 0 1.5px rgba(140, 90, 20, 0.35);
}

.modal-card.modal-pass-detail .pass-detail-ico-cards {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(160deg, #f4efe6, #e0d2bc);
}

.modal-card.modal-pass-detail .pass-detail-chip {
  width: 0.55rem;
  height: 0.78rem;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(40, 30, 10, 0.25);
}

.modal-card.modal-pass-detail .pass-detail-chip.is-rare {
  background: linear-gradient(160deg, #f2f5f8, #b8c4d0 55%, #8a98a8);
}

.modal-card.modal-pass-detail .pass-detail-chip.is-gold {
  background: linear-gradient(160deg, #fff4c8, #e0b040 55%, #a87818);
}

.modal-card.modal-pass-detail .pass-detail-ico-ad {
  background:
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.75), transparent 42%),
    linear-gradient(160deg, #dff5e4, #7cbc8c 55%, #3f7a4e);
  box-shadow: inset 0 0 0 1.5px rgba(40, 90, 50, 0.28);
}

.modal-card.modal-pass-detail .pass-detail-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #4a3418;
  line-height: 1.25;
}

.modal-card.modal-pass-detail .pass-detail-amt {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #8a5a10;
  line-height: 1.1;
}

.modal-card.modal-pass-detail .pass-detail-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(74, 52, 24, 0.72);
}

.modal-card.modal-pass-detail .pass-detail-row.is-gold {
  background: linear-gradient(180deg, #fff8e8, #f5e0b0);
}

.modal-card.modal-pass-detail .pass-detail-actions {
  margin-top: 0.15rem;
  gap: 0.5rem;
}

/* 购买 CTA：暖橙金，相对奶油底高对比，促点击 */
.modal-card.modal-pass-detail #btnPassDetailBuy {
  min-width: 5.6rem;
  border: 0;
  border-radius: 14px;
  padding: 0.62rem 1.15rem;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #fffaf2;
  cursor: pointer;
  background:
    radial-gradient(circle at 26% 24%, rgba(255, 240, 190, 0.95), transparent 44%),
    linear-gradient(155deg, #ffc45a 0%, #ff8a2a 46%, #f04a16 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 7px 18px rgba(210, 70, 18, 0.4);
  transition: filter 0.12s ease, transform 0.12s ease;
}

.modal-card.modal-pass-detail #btnPassDetailBuy:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.modal-card.modal-pass-detail #btnPassDetailBuy:active {
  filter: brightness(0.97);
  transform: translateY(1px);
}

.modal-card.modal-goldshop .goldshop-title {
  margin: 0 0 0.55rem;
  text-align: center;
}

.modal-card.modal-goldshop .goldshop-hint {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.modal-card.modal-goldshop .goldshop-pass-wrap {
  margin: 0 0 0.85rem;
}

.modal-card.modal-goldshop .goldshop-pass {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff6d8 0%, #f0d090 100%);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.modal-card.modal-goldshop .goldshop-pass.is-active {
  cursor: default;
  background: linear-gradient(180deg, #eef8ef 0%, #d4e8d6 100%);
}

.modal-card.modal-goldshop .goldshop-pass-gem.goldshop-pass-skin {
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(160deg, #e8f4ff, #b0d0e8);
  padding: 0;
}

.modal-card.modal-goldshop .goldshop-pass-gem.goldshop-pass-skin img {
  display: block;
  width: 148%;
  height: 148%;
  max-width: none;
  margin: -28% 0 0 -24%;
  object-fit: cover;
  object-position: 52% 28%;
  border-radius: inherit;
}

.modal-card.modal-goldshop .goldshop-pass-skin-chip {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3a5a78;
  background: linear-gradient(180deg, #eef6ff, #c8dcee);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.modal-card.modal-goldshop .goldshop-pass-gem {
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff8d0, transparent 45%),
    linear-gradient(160deg, #fff0c0 0%, #e0a830 55%, #a86818 100%);
  box-shadow: inset 0 0 0 1.5px rgba(140, 90, 20, 0.4);
}

.modal-card.modal-goldshop .goldshop-pass-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.modal-card.modal-goldshop .goldshop-pass-kicker {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.modal-card.modal-goldshop .goldshop-pass-price {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.modal-card.modal-goldshop .goldshop-pass-note {
  margin-left: auto;
  font-size: 0.78rem;
  color: rgba(80, 50, 10, 0.72);
  max-width: 7.5em;
  line-height: 1.25;
}

.modal-card.modal-goldshop .goldshop-packs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.modal-card.modal-goldshop .goldshop-pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.4rem 0.65rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8 0%, #eef4ff 100%);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.modal-card.modal-goldshop .goldshop-pack:hover,
.modal-card.modal-goldshop .goldshop-pack:focus-visible {
  filter: brightness(1.04);
}

.modal-card.modal-goldshop .goldshop-pack.is-soon {
  opacity: 0.72;
}

.modal-card.modal-goldshop .goldshop-gem {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 44%, rgba(120, 70, 20, 0.55) 46% 54%, transparent 56%),
    linear-gradient(180deg, #ffe9a8 0%, #e0b24a 48%, #b07828 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(160, 100, 30, 0.55),
    0 1px 2px rgba(40, 30, 10, 0.35);
}

.modal-card.modal-goldshop .goldshop-amt {
  font-family: var(--font-pixel);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ice-deep);
}

.modal-card.modal-goldshop .goldshop-price {
  font-size: 0.82rem;
  color: var(--muted);
}

.modal-card.modal-feedback {
  width: min(480px, 100%);
}

.modal-card.modal-feedback textarea {
  resize: vertical;
  min-height: 7rem;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: 8px;
  background: rgba(40, 28, 18, 0.08);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}

.modal-card.modal-feedback .feedback-hint {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
}

.modal-card.modal-bulletin {
  width: min(520px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
}

.modal-card.modal-bulletin .bulletin-list {
  overflow: auto;
  flex: 1 1 auto;
  margin: 0.25rem 0 0.75rem;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-card.modal-bulletin .bulletin-entry {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf2 0%, #f3e8d4 100%);
  box-shadow: var(--shadow-soft);
}

.modal-card.modal-bulletin .bulletin-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.modal-card.modal-bulletin .bulletin-ver {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  color: var(--ink);
}

.modal-card.modal-bulletin .bulletin-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.modal-card.modal-bulletin .bulletin-items {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink);
  line-height: 1.55;
  font-size: 0.92rem;
}

.modal-card.modal-bulletin .bulletin-loading,
.modal-card.modal-bulletin .bulletin-empty {
  margin: 0.4rem 0 0.8rem;
  color: var(--muted);
}

.modal-card .auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.55rem 0;
  font-size: 0.85rem;
  color: var(--ink);
}

.modal-card .auth-field input {
  padding: 0.45rem 0.55rem;
  border: none;
  border-radius: 6px;
  background: rgba(40, 28, 18, 0.08);
  color: var(--ink);
}

.modal-card .auth-hint {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.modal-card .auth-error {
  color: #a04030;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
}

.modal-card h2 {
  margin-top: 0;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 28px;
  font-weight: 400;
}

.modal-card p {
  color: var(--muted);
  line-height: 1.7;
}

.settings-audio {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf2 0%, #eef6ff 100%);
  box-shadow: var(--shadow-soft);
}

.settings-audio.is-muted {
  background: linear-gradient(180deg, #f4efe8 0%, #e8e0d6 100%);
  opacity: 0.82;
}

.settings-mute-row {
  display: flex;
  justify-content: flex-end;
}

.settings-mute {
  background: linear-gradient(180deg, #fffaf2, #e8f4ff);
}

.settings-mute.is-muted {
  background: linear-gradient(180deg, #f4efe8, #e0d8d0);
  opacity: 0.78;
}

.vol-ico.is-off {
  position: relative;
  opacity: 0.7;
}

.vol-ico.is-off::after {
  content: "";
  position: absolute;
  inset: 2px -1px;
  background: linear-gradient(125deg, transparent 44%, #a04030 45% 55%, transparent 56%);
  border-radius: 2px;
}

.vol-row {
  display: grid;
  grid-template-columns: 28px 1fr 36px;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

.vol-row .vol-ico {
  justify-self: center;
}

.vol-ico {
  width: 24px;
  height: 24px;
  display: block;
  border-radius: 6px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
  image-rendering: auto;
}

/* 八分音符：音乐行 + 静音钮（文案约定「点音符」） */
.vol-ico-music {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none'%3E%3Cellipse cx='7.2' cy='15.8' rx='5.2' ry='3.7' transform='rotate(-22 7.2 15.8)' fill='%232a4a68'/%3E%3Cpath d='M11.6 4.2v11.2' stroke='%232a4a68' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M12.9 4.1c3.6.4 6.2 2.6 6.4 5.8-2.6-1.5-4.6-2.2-6.4-2.5V4.1z' fill='%233a6a90'/%3E%3Ccircle cx='5.4' cy='14.6' r='1.1' fill='%235a8ab0' opacity='.55'/%3E%3C/svg%3E");
}

/* 扬声器 + 声波：音效行，暖色与音符蓝区分 */
.vol-ico-sfx {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none'%3E%3Cpath d='M3.2 8.2h3.4l4.6-3.6v12.8l-4.6-3.6H3.2a1.2 1.2 0 0 1-1.2-1.2V9.4a1.2 1.2 0 0 1 1.2-1.2z' fill='%23c87838'/%3E%3Cpath d='M3.6 9h2.6l3.8-2.8v9.6L6.2 13H3.6V9z' fill='%23e8b060' opacity='.55'/%3E%3Cpath d='M14.2 8.1c1.5 1.4 1.5 4.4 0 5.8' stroke='%238a5a28' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M17.1 5.8c2.6 2.4 2.6 7.9 0 10.4' stroke='%23a87828' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.vol-row input[type="range"] {
  width: 100%;
  accent-color: #3a6a90;
  height: 28px;
  cursor: pointer;
}

.vol-pct {
  font-family: var(--font-pixel);
  font-size: 12px;
  font-weight: 400;
  color: var(--ice-deep);
  text-align: right;
  letter-spacing: 0.02em;
}

.settings-note {
  margin-top: 0;
}

.ad-box {
  background:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(212, 160, 74, 0.12) 8px,
      rgba(212, 160, 74, 0.12) 10px
    ),
    #fffaf0;
  border: none;
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  margin: 16px 0;
  min-height: 120px;
  color: var(--gold-deep);
  letter-spacing: 0.06em;
  font-family: var(--font-display);
  font-size: 22px;
  box-shadow: var(--shadow-soft);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--cream);
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  z-index: 30;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-lift);
  animation: riseIn 0.2s steps(4) both;
}

.flash { animation: flash 0.25s steps(3); }

@keyframes flash {
  from { filter: brightness(1.4); }
  to { filter: brightness(1); }
}

.hint {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.panel > h1,
.panel > h2 {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-weight: 400;
}

img,
.portrait,
.enemy-figure img,
.panel.title-panel,
.story,
.enemy-panel,
.reward-panel {
  image-rendering: pixelated;
}

/* —— 签到月历（单栏：普通奖励 + 高级锁定叠在同一日格） —— */
.checkin-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.checkin-single {
  flex: 1;
  min-height: 0;
  display: flex;
}
.checkin-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
  padding: 12px 12px 14px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255, 248, 232, 0.92), rgba(236, 220, 190, 0.88));
  box-shadow: 0 10px 24px rgba(48, 28, 12, 0.18);
}
.checkin-col.is-unified {
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 220, 140, 0.35), transparent 42%),
    linear-gradient(165deg, rgba(255, 248, 232, 0.94), rgba(236, 220, 190, 0.9));
}
.checkin-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
}
.checkin-head-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.checkin-col-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5a3a18;
}
.checkin-month-label {
  font-size: 13px;
  color: #7a5a32;
  letter-spacing: 0.06em;
}
.checkin-pack-hook {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 5px 12px 5px 6px;
  border: 0;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 248, 210, 0.95), transparent 42%),
    linear-gradient(155deg, #ffe9b4 0%, #f0c14a 48%, #b87a1c 100%);
  color: #3f2a0c;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 6px 14px rgba(120, 70, 10, 0.28);
}
.checkin-pack-hook:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.checkin-pack-gem {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, #fff6d0, #e2b34a 55%, #8a5a12);
  box-shadow:
    0 2px 6px rgba(80, 45, 8, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  flex: 0 0 auto;
}

.checkin-pack-gem.checkin-pack-skin {
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(160deg, #e8f4ff, #b0d0e8);
  padding: 0;
}

/* 肖像圆底外的发丝/弓臂裁掉，避免「穿出」金胶囊 */
.checkin-pack-gem.checkin-pack-skin img {
  display: block;
  width: 148%;
  height: 148%;
  max-width: none;
  margin: -28% 0 0 -24%;
  object-fit: cover;
  object-position: 52% 28%;
}
.checkin-pack-gem-core {
  position: absolute;
  inset: 6px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 35% 30%, #fff8e0 0%, #f0c860 45%, #c48a20 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.checkin-pack-gem-core::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}
.checkin-pack-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  gap: 1px;
}
.checkin-pack-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(74, 48, 14, 0.72);
}
.checkin-pack-price {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #3f2a0c;
}
.checkin-pack-hook.is-active {
  background:
    radial-gradient(circle at 18% 28%, rgba(230, 255, 210, 0.9), transparent 42%),
    linear-gradient(155deg, #dff3c8 0%, #8fbf5e 55%, #4e8a32 100%);
  color: #1f3214;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 6px 14px rgba(40, 80, 20, 0.22);
}
.checkin-pack-hook.is-active .checkin-pack-gem {
  background: linear-gradient(145deg, #e8ffd0, #7aaa48 55%, #3f6e22);
}
.checkin-pack-hook.is-active .checkin-pack-gem-core {
  background: radial-gradient(circle at 35% 30%, #f4ffe8 0%, #9ed06a 50%, #5a9a38 100%);
}
.checkin-pack-hook.is-active .checkin-pack-kicker {
  color: rgba(32, 56, 20, 0.72);
}
.checkin-pack-hook.is-active .checkin-pack-price {
  color: #1f3214;
}
.checkin-weekdays,
.checkin-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.checkin-wd {
  text-align: center;
  font-size: 12px;
  color: #8a6a42;
  padding: 2px 0;
}
.checkin-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  min-height: 72px;
  padding: 4px 2px 6px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.9);
  box-shadow: 0 3px 8px rgba(60, 36, 12, 0.1);
  color: #4a3218;
  cursor: default;
}
.checkin-day.is-pad {
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
  background: transparent;
}
.checkin-day.is-today {
  background: linear-gradient(165deg, #fff8e6, #f0d9a0);
  box-shadow: 0 0 0 2px rgba(212, 160, 74, 0.45), 0 4px 12px rgba(120, 70, 10, 0.18);
}
.checkin-day.status-claimable {
  cursor: pointer;
  background: linear-gradient(165deg, #fff6d8, #ffe0a0);
  box-shadow: 0 0 0 2px rgba(230, 170, 60, 0.55), 0 6px 14px rgba(140, 80, 10, 0.2);
}
.checkin-day.status-claimable:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.checkin-day.status-premium-pending {
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 236, 170, 0.95), transparent 55%),
    linear-gradient(165deg, #fff3c8, #e8b84a 70%, #c48a18);
  box-shadow:
    0 0 0 3px rgba(212, 150, 40, 0.75),
    0 0 0 6px rgba(255, 220, 120, 0.35),
    0 8px 16px rgba(120, 70, 10, 0.28);
  color: #3f2a0c;
}
.checkin-day.status-premium-pending:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.checkin-day.status-premium-pending .checkin-day-num {
  color: #6a4210;
}
.checkin-day.status-claimed {
  opacity: 0.72;
  background: rgba(230, 220, 200, 0.85);
}
.checkin-day.status-missed {
  opacity: 0.45;
  background: rgba(210, 200, 185, 0.7);
}
.checkin-day.status-future {
  opacity: 0.88;
}
.checkin-day-num {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}
.checkin-day-loot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.checkin-premium-hint {
  position: absolute;
  left: 3px;
  top: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.checkin-premium-hint .checkin-lock {
  position: static;
  width: 12px;
  height: 12px;
}
.checkin-premium-hint .checkin-lock::before {
  left: 2px;
  top: -2px;
  width: 6px;
  height: 4px;
}
.checkin-gold {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
}
.checkin-gold.is-premium {
  padding: 1px 4px 1px 3px;
  border-radius: 999px;
  background: rgba(255, 248, 220, 0.88);
  box-shadow: 0 1px 3px rgba(90, 50, 10, 0.18);
}
.checkin-gold.is-premium em {
  color: #6a4210;
  font-size: 12px;
}
.checkin-x2 {
  margin-left: 1px;
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
  color: #a86b10;
  letter-spacing: -0.02em;
}
.checkin-gold .gold-ico,
.checkin-gold i.gold-ico {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  background: linear-gradient(160deg, #ffe7a8, #d4a04a);
}
.checkin-gold em {
  font-style: normal;
  font-size: 11px;
}
.checkin-card-mark {
  width: 14px;
  height: 18px;
  border-radius: 3px;
  position: relative;
  box-shadow: 0 2px 4px rgba(40, 24, 8, 0.25);
}
.checkin-card-mark.rarity-rare {
  background: linear-gradient(160deg, #f2f4f8, #9aa4b4 45%, #c8d0dc);
}
.checkin-card-mark.rarity-legendary {
  background: linear-gradient(160deg, #fff0b8, #d4a04a 48%, #8a5a12);
}
.checkin-card-mark[data-count="2"]::after {
  content: "2";
  position: absolute;
  right: -4px;
  bottom: -3px;
  min-width: 12px;
  height: 12px;
  padding: 0 2px;
  border-radius: 999px;
  background: rgba(60, 36, 12, 0.88);
  color: #fff8e8;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  font-weight: 700;
}
.checkin-day.status-premium-pending .checkin-card-mark[data-count="2"]::after {
  content: "×2";
  min-width: 16px;
  font-size: 9px;
  background: rgba(120, 70, 10, 0.92);
}
.checkin-lock,
.checkin-done {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
}
.checkin-lock {
  background:
    linear-gradient(180deg, #d8c4a0 40%, #a88858 42%),
    #6a5030;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.checkin-lock::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -3px;
  width: 6px;
  height: 5px;
  border-radius: 6px 6px 0 0;
  box-shadow: inset 0 0 0 1.5px #8a7050;
}
.checkin-done {
  background: linear-gradient(160deg, #b8e0a8, #5a9a48);
}
.checkin-actions {
  justify-content: center;
}

@media (max-width: 900px) {
  .checkin-day {
    min-height: 64px;
  }
}

@media (max-width: 640px) {
  .topbar { padding: 10px 12px; }
  .screen { padding: 14px 10px 24px; }
  .panel { padding: 16px 12px; }
  .story { padding: 22px 14px 16px; min-height: 50vh; }
  .title-hero .brand-mark { letter-spacing: 0.06em; }
  .title-hero .brand-sub { letter-spacing: 0.08em; font-size: 12px; }
  .brand-en { font-size: 12px; }
  button, .btn { font-size: 15px; min-height: 44px; }
  /*
   * 稀有度卡面按 158×272 画框；不得只压宽度成 148，否则 PNG 非等比拉伸，
   * 铜壳底缘会出现「鼓包 / 异物」残影。无框旧卡同样保持 158，手牌可换行。
   */
  .card { width: 158px; }
  .checkin-day {
    min-height: 58px;
    padding: 3px 1px 4px;
  }
  .checkin-gold em { font-size: 10px; }
  .checkin-pack-hook {
    padding: 4px 10px 4px 5px;
    min-height: 36px;
    gap: 6px;
  }
  .checkin-pack-gem { width: 24px; height: 24px; border-radius: 8px; }
  .checkin-pack-gem-core { inset: 5px; }
  .checkin-pack-kicker { font-size: 9px; }
  .checkin-pack-price { font-size: 12px; }
}

/* Launch legal / age marks */
.age-badge {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0 0.32rem;
  border: 1px solid rgba(215, 181, 106, 0.7);
  border-radius: 3px;
  color: #d7b56a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  vertical-align: middle;
}
/* 顶栏法律链已迁到设置；display:flex 会盖掉 [hidden]，须显式 none */
.site-legal {
  display: none;
}
.settings-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  justify-content: center;
  margin-top: 0.85rem;
  font-size: 12px;
}
.settings-legal a { color: inherit; }
.settings-age {
  border: 1px solid currentColor;
  padding: 0 0.3rem;
  border-radius: 3px;
  font-weight: 700;
}
