:root {
  --ink: #080b09;
  --ink-soft: #101511;
  --panel: rgba(13, 19, 15, 0.92);
  --panel-light: rgba(22, 30, 24, 0.9);
  --blood: #9d2f2a;
  --blood-bright: #dd5143;
  --jade: #497d62;
  --jade-bright: #86b798;
  --gold: #bda26d;
  --paper: #ded5bd;
  --muted: #8e948a;
  --line: rgba(190, 170, 122, 0.22);
  --shadow: rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 1024px;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: auto;
  color: var(--paper);
  font-size: 16px;
  font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 17% 48%, rgba(79, 123, 91, 0.16), transparent 34%),
    radial-gradient(circle at 76% 30%, rgba(116, 28, 25, 0.18), transparent 34%),
    linear-gradient(145deg, #070a08 0%, #0d1310 45%, #090706 100%);
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    repeating-linear-gradient(112deg, transparent 0 11px, rgba(221, 206, 169, 0.018) 12px 13px),
    repeating-linear-gradient(4deg, transparent 0 47px, rgba(255, 255, 255, 0.018) 48px 49px);
  mix-blend-mode: screen;
}

button {
  font: inherit;
}

.mist {
  position: fixed;
  z-index: 0;
  width: 44vw;
  height: 44vw;
  border: 1px solid rgba(95, 140, 106, 0.06);
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}

.mist-one {
  top: -26vw;
  left: -8vw;
  background: rgba(46, 86, 60, 0.14);
}

.mist-two {
  right: -20vw;
  bottom: -28vw;
  background: rgba(104, 29, 25, 0.12);
  animation-delay: -7s;
}

@keyframes drift {
  to { transform: translate(5vw, 3vw) scale(1.12); }
}

.game-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(340px, 1fr) minmax(190px, 240px) minmax(250px, 310px);
  grid-template-rows: auto minmax(300px, 1fr) auto;
  gap: 12px;
  width: min(1880px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 0;
}

.topbar,
.combatant,
.arena-panel,
.log-panel,
.hand-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18, 25, 20, 0.94), rgba(8, 11, 9, 0.96));
  box-shadow: 0 14px 34px var(--shadow), inset 0 1px rgba(255, 255, 255, 0.025);
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 10px 18px;
  border-top-color: rgba(189, 162, 109, 0.5);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-right: 13px;
  border: 1px solid rgba(189, 162, 109, 0.65);
  color: var(--gold);
  font: 700 25px "STKaiti", "KaiTi", serif;
  transform: rotate(45deg);
  background: rgba(112, 27, 23, 0.2);
}

.brand-mark::first-letter {
  transform: rotate(-45deg);
}

.title-group h1,
.panel-heading h2,
.log-heading h2,
.hand-heading h2,
.battle-copy h2,
.result-card h2 {
  margin: 0;
  letter-spacing: 0.12em;
  font-family: "STKaiti", "KaiTi", serif;
}

.title-group h1 {
  font-size: clamp(24px, 2vw, 33px);
  font-weight: 600;
}

.eyebrow,
.arena-kicker,
.section-kicker,
.log-heading span,
.side-label {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.turn-plaque {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.turn-plaque strong {
  color: var(--paper);
  font: 600 32px/1 "KaiTi", serif;
}

.deck-view-button {
  flex: 0 0 auto;
  margin-left: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(189, 162, 109, 0.34);
  color: var(--gold);
  cursor: pointer;
  background: linear-gradient(145deg, rgba(54, 39, 18, 0.62), rgba(7, 10, 8, 0.9));
  box-shadow: inset 0 0 0 2px rgba(189, 162, 109, 0.04);
}

.deck-view-button:hover,
.deck-mini-button:hover {
  border-color: var(--gold);
  filter: brightness(1.12);
}

.tower-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  padding: 0 18px;
}

.tower-node {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  border-radius: 50%;
  color: #666c66;
  font: 12px "KaiTi", serif;
  background: #090d0a;
  transition: 180ms ease;
}

.tower-node.completed {
  border-color: rgba(104, 164, 120, 0.55);
  color: #8fc19d;
  background: rgba(49, 101, 66, 0.18);
}

.tower-node.current {
  border-color: rgba(199, 169, 101, 0.8);
  color: #ead9ad;
  background: rgba(132, 88, 30, 0.22);
  box-shadow: 0 0 0 3px rgba(189, 162, 109, 0.1), 0 0 22px rgba(224, 184, 94, 0.36);
  transform: scale(1.18);
  animation: current-floor-pulse 1.8s ease-in-out infinite alternate;
}

@keyframes current-floor-pulse {
  to { box-shadow: 0 0 0 4px rgba(189, 162, 109, 0.16), 0 0 28px rgba(224, 184, 94, 0.52); }
}

.tower-link {
  width: 27px;
  height: 1px;
  background: rgba(189, 162, 109, 0.14);
}

.tower-link.completed { background: rgba(104, 164, 120, 0.5); }

.tower-floor-label {
  margin-left: 11px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tower-floor-label strong {
  display: block;
  color: var(--paper);
  font: 13px "KaiTi", serif;
}

.top-gu-stone,
.map-gu-stones {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(189, 162, 109, 0.24);
  color: #bfb295;
  font-size: 11px;
  letter-spacing: 0.1em;
  background: rgba(7, 10, 8, 0.72);
}

.top-gu-stone strong,
.map-gu-stones strong {
  color: var(--gold);
  font: 16px "KaiTi", serif;
}

.map-screen {
  position: fixed;
  z-index: 14;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(120, 44, 34, 0.18), transparent 32%),
    radial-gradient(circle at 20% 80%, rgba(44, 96, 65, 0.16), transparent 36%),
    rgba(2, 4, 3, 0.9);
  backdrop-filter: blur(5px);
}

.map-card {
  position: relative;
  width: min(1060px, 96vw);
  max-height: calc(100vh - 36px); /* 老内核(无 dvh)兜底，否则 .map-card 失去高度上限→地图撑满裁切不可滚 */
  max-height: calc(100dvh - 36px);
  min-height: 0;
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(189, 162, 109, 0.48);
  background:
    linear-gradient(180deg, rgba(24, 34, 27, 0.96), rgba(6, 9, 7, 0.98)),
    repeating-linear-gradient(90deg, rgba(189, 162, 109, 0.03) 0 1px, transparent 1px 42px);
  box-shadow: 0 30px 90px #000, inset 0 0 0 6px rgba(189, 162, 109, 0.035);
}

.map-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.map-eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.24em;
}

.map-heading h2 {
  margin: 0 0 6px;
  font: 34px "KaiTi", serif;
  letter-spacing: 0.18em;
}

.map-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 4px 0 18px;
}

.map-progress span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 44px;
  border: 1px solid rgba(189, 162, 109, 0.2);
  color: #6e756e;
  background: rgba(0, 0, 0, 0.28);
  font: 18px "KaiTi", serif;
}

.map-progress span small {
  display: block;
  margin-top: 2px;
  font: 9px sans-serif;
  letter-spacing: 0.12em;
}

.map-progress span.completed {
  border-color: rgba(102, 171, 125, 0.52);
  color: #8cc79d;
  background: rgba(42, 91, 57, 0.22);
}

.map-progress span.current {
  border-color: rgba(218, 182, 98, 0.78);
  color: #ead9ad;
  box-shadow: 0 0 24px rgba(218, 182, 98, 0.22);
}

.map-progress i {
  width: 70px;
  height: 1px;
  background: rgba(189, 162, 109, 0.22);
}

.map-route {
  display: grid;
  gap: 14px;
}

.map-segment {
  position: relative;
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(189, 162, 109, 0.12);
  background: rgba(255, 255, 255, 0.018);
}

.map-segment::before {
  content: "";
  position: absolute;
  left: 62px;
  top: -18px;
  bottom: -18px;
  width: 2px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(189, 162, 109, 0.28), transparent);
  box-shadow: 0 0 18px rgba(189, 162, 109, 0.12);
}

.map-segment:first-child::before { top: 24px; }
.map-segment:last-child::before { bottom: 24px; }
.map-segment.completed::before { background: linear-gradient(180deg, transparent, rgba(99, 174, 125, 0.5), transparent); }
.map-segment.current::before { background: linear-gradient(180deg, transparent, rgba(225, 185, 91, 0.72), transparent); }

.map-segment.map-segment-focus {
  animation: map-segment-focus-pulse 1.35s ease-out both;
}

@keyframes map-segment-focus-pulse {
  0% {
    border-color: rgba(225, 185, 91, 0.18);
    box-shadow: 0 0 0 rgba(225, 185, 91, 0);
  }
  18% {
    border-color: rgba(225, 185, 91, 0.62);
    box-shadow: 0 0 28px rgba(225, 185, 91, 0.2), inset 0 0 18px rgba(225, 185, 91, 0.05);
  }
  100% {
    border-color: rgba(189, 162, 109, 0.12);
    box-shadow: 0 0 0 rgba(225, 185, 91, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-segment.map-segment-focus {
    animation: none;
    border-color: rgba(225, 185, 91, 0.42);
  }
  .prologue-overlay { animation: none; } /* V0.9.18 序章淡入：尊重减弱动效偏好 */
}

.map-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: -6px 0 14px;
}

.map-status span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(189, 162, 109, 0.14);
  background: rgba(0, 0, 0, 0.18);
}

.map-status em {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.15em;
}

.map-status strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #d8ccb1;
  font: 13px "KaiTi", serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-notice {
  width: fit-content;
  max-width: min(620px, 90%);
  margin: 12px auto 0;
  padding: 9px 16px;
  border: 1px solid rgba(108, 177, 131, 0.38);
  color: #c7e3c8;
  text-align: center;
  letter-spacing: 0.08em;
  background: rgba(22, 67, 40, 0.28);
  box-shadow: 0 0 22px rgba(77, 158, 94, 0.12);
}

.map-transition {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(8, 10, 8, 0.78), rgba(3, 4, 3, 0.2) 58%, transparent 75%);
}

.map-transition strong {
  padding: 15px 28px;
  border: 1px solid rgba(189, 162, 109, 0.5);
  color: #f0dfac;
  font: 30px "KaiTi", serif;
  letter-spacing: 0.18em;
  background: rgba(6, 8, 6, 0.82);
  box-shadow: 0 0 45px rgba(189, 162, 109, 0.24);
}

.map-transition.show strong {
  animation: map-transition-flash 520ms ease both;
}

@keyframes map-transition-flash {
  from { opacity: 0; transform: scale(0.94); filter: blur(3px); }
  30% { opacity: 1; transform: scale(1); filter: blur(0); }
  to { opacity: 0; transform: scale(1.03); filter: blur(2px); }
}

.map-segment-label {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.map-segment-label i {
  width: 1px;
  height: 48px;
  background: linear-gradient(var(--gold), transparent);
  opacity: 0.35;
}

.map-segment.current .map-segment-label {
  color: var(--gold);
}

.map-node-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.map-segment:first-child .map-node-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-segment.segment-step-3 .map-node-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-segment.segment-step-4 .map-node-row {
  grid-template-columns: minmax(0, 1fr);
}

.map-node {
  position: relative;
  min-height: 136px;
  min-width: 0;
  padding: 14px 13px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.22);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  background:
    radial-gradient(circle at top right, rgba(189, 162, 109, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(21, 31, 25, 0.96), rgba(7, 10, 8, 0.98));
  transition: 160ms ease;
}

.map-node:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4), 0 0 24px rgba(189, 162, 109, 0.14);
}

.map-node:disabled {
  cursor: default;
}

.map-node.locked,
.map-node.unlocked {
  opacity: 0.48;
  filter: grayscale(0.45);
}

.map-node.completed {
  border-color: rgba(102, 171, 125, 0.55);
  background: linear-gradient(145deg, rgba(30, 61, 42, 0.84), rgba(7, 11, 8, 0.96));
}

.map-node.completed::after {
  content: "已踏破";
  position: absolute;
  top: 10px;
  right: 10px;
  color: #94cda1;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.map-node.available {
  border-color: rgba(218, 182, 98, 0.56);
  animation: map-node-breathe 1.9s ease-in-out infinite alternate;
}

@keyframes map-node-breathe {
  to { box-shadow: 0 0 0 2px rgba(189, 162, 109, 0.06), 0 0 26px rgba(213, 179, 98, 0.2); }
}

.map-node.locked::after {
  content: "岔路封闭";
  position: absolute;
  right: 9px;
  bottom: 8px;
  color: #6f716c;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.map-node.unlocked::after {
  content: "未解锁";
  position: absolute;
  right: 9px;
  bottom: 8px;
  color: #6f716c;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.map-node.elite.available {
  border-color: rgba(178, 65, 55, 0.72);
  box-shadow: inset 0 0 38px rgba(138, 30, 28, 0.16);
}

.map-node.boss.available {
  border-color: rgba(180, 57, 50, 0.8);
  box-shadow: inset 0 0 45px rgba(118, 20, 22, 0.28), 0 0 25px rgba(118, 20, 22, 0.16);
}

.map-node-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 9px;
  border: 1px solid rgba(189, 162, 109, 0.28);
  border-radius: 50%;
  color: var(--gold);
  font: 20px "KaiTi", serif;
  background: rgba(0, 0, 0, 0.24);
}

.map-node strong {
  display: block;
  margin-bottom: 4px;
  font: 21px "KaiTi", serif;
  letter-spacing: 0.1em;
}

.map-node-target {
  display: block;
  margin: -2px 0 7px;
  color: #c7b88c;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.1em;
}

.map-node small {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.map-node p {
  margin: 0;
  color: #a9ad9d;
  font-size: 13px;
  line-height: 1.55;
}

.map-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.08em;
}

.combatant {
  position: relative;
  overflow: hidden;
  padding: 17px;
}

.combatant::before,
.arena-panel::before,
.log-panel::before,
.hand-panel::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  bottom: 7px;
  left: 7px;
  border: 1px solid rgba(189, 162, 109, 0.07);
  pointer-events: none;
}

.player-panel { grid-column: 1; }
.enemy-panel { grid-column: 3; }

.panel-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

.panel-heading h2 {
  font-size: 22px;
}

.enemy-heading {
  text-align: right;
}

.portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(150px, 20vh, 225px);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.24);
  background:
    radial-gradient(circle, rgba(91, 141, 106, 0.18), transparent 52%),
    repeating-radial-gradient(circle, transparent 0 19px, rgba(189, 162, 109, 0.05) 20px 21px),
    #0b100d;
}

.portrait-fallback {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 220ms ease;
}

.portrait-image {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: contain;
  object-position: center;
  transition: opacity 260ms ease, filter 260ms ease;
}

.portrait.image-loaded .portrait-image { opacity: 1; }
.portrait.image-loaded .portrait-fallback { opacity: 0; }
.player-portrait.image-loaded .portrait-image { filter: drop-shadow(0 0 13px rgba(78, 150, 102, 0.27)); }
.enemy-portrait.image-loaded .portrait-image { filter: drop-shadow(0 0 14px rgba(170, 54, 44, 0.28)); }

.portrait-image-shade {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 6, 4, 0.12), transparent 42%, rgba(4, 7, 5, 0.62) 100%),
    linear-gradient(90deg, rgba(5, 9, 7, 0.42), transparent 23%, transparent 77%, rgba(5, 9, 7, 0.42));
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.42);
}

.enemy-portrait .portrait-image-shade {
  /* V0.9.8.3：减弱底部压暗，让敌人主体下半身不再发黑，主体更完整。 */
  background:
    linear-gradient(180deg, rgba(12, 4, 3, 0.06), transparent 50%, rgba(11, 4, 3, 0.42) 100%),
    linear-gradient(90deg, rgba(12, 5, 4, 0.3), transparent 24%, transparent 76%, rgba(12, 5, 4, 0.3));
}

.portrait::before,
.portrait::after {
  content: "";
  position: absolute;
  width: 72%;
  height: 72%;
  border: 1px solid rgba(114, 156, 124, 0.18);
  transform: rotate(45deg);
}

.portrait::after {
  width: 46%;
  height: 46%;
  border-color: rgba(189, 162, 109, 0.2);
}

.portrait-rune {
  z-index: 1;
  color: rgba(142, 191, 157, 0.8);
  font: 700 clamp(42px, 4vw, 65px) "STKaiti", "KaiTi", serif;
  text-shadow: 0 0 24px rgba(78, 146, 101, 0.38);
}

.enemy-portrait {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(135, 39, 34, 0.27), transparent 48%),
    repeating-radial-gradient(circle, transparent 0 19px, rgba(151, 56, 45, 0.06) 20px 21px),
    #100b09;
}

.enemy-portrait::before {
  border-color: rgba(165, 58, 49, 0.24);
}

.beast-mark {
  color: rgba(168, 62, 52, 0.38);
  font: 700 clamp(52px, 5vw, 74px) "STKaiti", "KaiTi", serif;
}

.beast-eyes {
  position: absolute;
  z-index: 2;
  top: 42%;
  display: flex;
  gap: 30px;
}

.beast-eyes i {
  width: 16px;
  height: 5px;
  border-radius: 50% 50% 15% 15%;
  background: var(--blood-bright);
  box-shadow: 0 0 12px #d6352b, 0 0 24px rgba(217, 48, 38, 0.8);
}

.vital-block {
  margin-bottom: 13px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.stat-line strong {
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(220, 209, 183, 0.13);
  background: #050706;
}

.bar-fill {
  height: 100%;
  transform-origin: left;
  transition: width 300ms ease;
}

.hp-fill {
  width: 100%;
  background: linear-gradient(90deg, #6b1e1d, #c33f35);
  box-shadow: 0 0 10px rgba(196, 48, 42, 0.45);
}

.enemy-hp-fill {
  width: 100%;
  background: linear-gradient(90deg, #4f1918, #9d2f2a);
}

.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.resource {
  display: grid;
  grid-template-columns: 29px 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 49px;
  padding: 7px;
  border: 1px solid rgba(189, 162, 109, 0.13);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-size: 11px;
}

.resource-icon {
  grid-row: 1 / 3;
  align-self: center;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: "KaiTi", serif;
}

.resource strong {
  align-self: end;
  color: var(--paper);
  font-size: 16px;
}

.yuan-resource .resource-icon { color: #82b8a0; }
.armor-resource .resource-icon { color: #9aa8ad; }
.life-resource .resource-icon { color: #c1a66a; }
.blood-resource .resource-icon { color: #c94b40; }

.buff-list {
  display: grid;
  gap: 6px;
  min-height: 32px;
  margin-top: 10px;
}

.buff-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.buff-group > b {
  flex: 0 0 auto;
  color: #7f8e82;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.buff-tag,
.empty-buff,
.enemy-power {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(189, 162, 109, 0.16);
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.05em;
  background: rgba(111, 82, 35, 0.09);
}

.buff-tag.fate-status { border-color: rgba(218, 184, 95, 0.35); color: #e2c879; }
.buff-tag.blood-status { border-color: rgba(190, 63, 53, 0.35); color: #df857b; }
.buff-tag.poison-passive-status,
.buff-tag.poison-status { border-color: rgba(99, 169, 106, 0.35); color: #92c98f; }
.buff-tag.relic-status,
.buff-tag.ordinary-relic-status { border-color: rgba(189, 162, 109, 0.28); color: #d6bd7d; }
.buff-tag.curse-mark-status { border-color: rgba(164, 65, 56, 0.28); color: #c9847a; }
.buff-tag.high-blood {
  box-shadow: 0 0 13px rgba(194, 44, 36, 0.22), inset 0 0 12px rgba(194, 44, 36, 0.12);
}

.buff-tag.fate-pulse { animation: fate-status-pulse 520ms ease both; }
.buff-tag.blood-pulse,
.resource.blood-pulse { animation: blood-status-pulse 520ms ease both; }
.resource.resource-pulse,
.resource.yuan-pulse { animation: resource-pulse 520ms ease both; }
.hp-fill.hp-damage-pulse { animation: hp-damage-pulse 520ms ease both; }
.hp-fill.hp-heal-pulse { animation: hp-heal-pulse 560ms ease both; }

@keyframes fate-status-pulse {
  35% { transform: rotate(5deg) scale(1.08); box-shadow: 0 0 15px rgba(221, 194, 105, 0.28); }
}

@keyframes blood-status-pulse {
  35% { transform: scale(1.08); box-shadow: 0 0 16px rgba(208, 54, 45, 0.32); }
}

@keyframes resource-pulse {
  35% { transform: scale(1.07); filter: brightness(1.34); box-shadow: 0 0 18px rgba(132, 214, 167, 0.24); }
}

@keyframes hp-damage-pulse {
  28% { filter: brightness(1.22) saturate(1.25); box-shadow: 0 0 14px rgba(211, 52, 43, 0.42); }
}

@keyframes hp-heal-pulse {
  30% { filter: brightness(1.28) saturate(1.18); box-shadow: 0 0 16px rgba(172, 219, 126, 0.38); }
}

.enemy-panel.boss-mode {
  border-color: rgba(170, 46, 37, 0.52);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(129, 26, 22, 0.1);
}

.enemy-panel.boss-mode .enemy-portrait {
  border-color: rgba(206, 65, 52, 0.48);
  background: radial-gradient(circle, rgba(145, 35, 29, 0.24), transparent 66%), #100807;
  box-shadow: inset 0 0 27px rgba(126, 26, 21, 0.18), 0 0 22px rgba(141, 34, 27, 0.12);
}

.enemy-panel.boss-mode .side-label,
.enemy-panel.boss-mode .panel-heading h2 { color: #df8277; }

.enemy-panel.boss-mode .intent-box {
  border-color: rgba(206, 65, 52, 0.52);
  background: linear-gradient(90deg, rgba(132, 29, 24, 0.23), rgba(65, 18, 15, 0.06));
}

.enemy-panel.phase2-mode {
  border-color: rgba(217, 62, 49, 0.72);
  box-shadow:
    0 14px 42px rgba(0, 0, 0, 0.72),
    0 0 22px rgba(151, 31, 26, 0.18),
    inset 0 0 42px rgba(150, 28, 24, 0.16);
}

.enemy-portrait.enemy-phase2 {
  border-color: rgba(222, 71, 58, 0.58);
  background:
    radial-gradient(circle at 50% 34%, rgba(168, 38, 31, 0.32), transparent 54%),
    radial-gradient(circle at 50% 70%, rgba(58, 9, 9, 0.62), transparent 70%),
    #100605;
}

.enemy-portrait.enemy-phase2.image-loaded .portrait-image {
  filter: drop-shadow(0 0 18px rgba(213, 55, 45, 0.36)) saturate(1.06);
}

.enemy-panel.elite-mode {
  border-color: rgba(178, 65, 55, 0.66);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.6), inset 0 0 42px rgba(122, 23, 23, 0.17);
}

.enemy-panel.elite-mode .enemy-portrait {
  border-color: rgba(178, 65, 55, 0.5);
  box-shadow: inset 0 0 44px rgba(119, 24, 23, 0.18), 0 0 24px rgba(128, 27, 25, 0.2);
}

.enemy-panel.elite-mode .side-label,
.enemy-panel.elite-mode .panel-heading h2 {
  color: #df7569;
}

.enemy-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
  margin-top: 7px;
}

.enemy-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid rgba(104, 165, 91, 0.32);
  color: #9bc58d;
  font-size: 10px;
  background: rgba(52, 103, 48, 0.11);
}

.enemy-boss-passive {
  border-color: rgba(205, 64, 53, 0.34);
  color: #d98578;
  background: rgba(91, 22, 18, 0.22);
  box-shadow: 0 0 12px rgba(160, 38, 31, 0.08);
}

.enemy-boss-phase {
  border-color: rgba(220, 82, 59, 0.5);
  color: #f0a08f;
  background: rgba(117, 25, 19, 0.3);
  box-shadow: 0 0 14px rgba(198, 45, 34, 0.16);
}

/* V0.9.9 寿道·子批3：桑田·衰老状态——霜白暗金，呼应寿道卡。 */
.enemy-weaken-status {
  border-color: rgba(203, 189, 146, 0.4);
  color: #e2d4a6;
  background: rgba(120, 108, 70, 0.16);
}

.buff-list.status-bounce,
.enemy-status-list.status-bounce,
.enemy-status.status-bounce {
  animation: status-bounce 420ms ease both;
}

.enemy-status-list.boss-charge-glow {
  animation: boss-charge-glow 760ms ease both;
}

@keyframes status-bounce {
  30% { transform: translateY(-3px) scale(1.08); filter: brightness(1.25); }
}

@keyframes boss-charge-glow {
  35% {
    filter: brightness(1.35);
    box-shadow: 0 0 22px rgba(202, 48, 39, 0.3), inset 0 0 16px rgba(202, 48, 39, 0.18);
  }
}

.empty-buff {
  color: #687069;
  border-style: dashed;
  background: transparent;
}

.arena-panel {
  position: relative;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
  text-align: center;
  background:
    linear-gradient(rgba(7, 10, 8, 0.78), rgba(7, 10, 8, 0.94)),
    repeating-conic-gradient(from 45deg, rgba(100, 135, 107, 0.08) 0 8deg, transparent 8deg 18deg);
}

.tower-sigil {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(92px, 10vw, 130px);
  height: clamp(92px, 10vw, 130px);
  margin-bottom: 12px;
}

.sigil-ring {
  position: absolute;
  border: 1px solid rgba(189, 162, 109, 0.25);
  border-radius: 50%;
}

.ring-outer {
  inset: 0;
  border-style: dashed;
  animation: rotate 32s linear infinite;
}

.ring-inner {
  inset: 17%;
  border-color: rgba(122, 163, 133, 0.29);
  animation: rotate-reverse 22s linear infinite;
}

.sigil-character {
  color: rgba(189, 162, 109, 0.78);
  font: 700 clamp(40px, 4vw, 61px) "STKaiti", "KaiTi", serif;
  text-shadow: 0 0 25px rgba(189, 162, 109, 0.18);
}

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes rotate-reverse { to { transform: rotate(-360deg); } }

.battle-copy {
  position: relative;
  z-index: 1;
  max-width: 540px;
}

.battle-copy h2 {
  margin: 5px 0 7px;
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 500;
}

.battle-message {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.pile-status {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 14px 0;
}

.pile-status div {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.pile-status strong {
  color: var(--paper);
  font-size: 17px;
}

.pile-status i {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.end-turn-button,
.result-card button {
  position: relative;
  min-width: 190px;
  padding: 10px 25px;
  border: 1px solid rgba(189, 162, 109, 0.5);
  color: var(--paper);
  cursor: pointer;
  background: linear-gradient(135deg, rgba(91, 28, 25, 0.72), rgba(42, 20, 17, 0.86));
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.05);
  transition: 160ms ease;
}

.end-turn-button span {
  display: block;
  font-family: "KaiTi", serif;
  font-size: 18px;
  letter-spacing: 0.16em;
}

.end-turn-button small {
  color: #a79d88;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.end-turn-button:hover:not(:disabled),
.result-card button:hover {
  border-color: var(--gold);
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.end-turn-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.end-turn-tip {
  margin: 7px 0 0;
  color: #777d75;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.intent-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 11px;
  border: 1px solid rgba(181, 58, 48, 0.28);
  background: linear-gradient(90deg, rgba(118, 31, 27, 0.14), rgba(64, 22, 19, 0.04));
}

.intent-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 1px solid rgba(211, 78, 66, 0.5);
  border-radius: 50%;
  color: #e16a5f;
  font: 600 22px "KaiTi", serif;
  box-shadow: inset 0 0 15px rgba(172, 48, 40, 0.12), 0 0 18px rgba(151, 40, 34, 0.08);
}

.intent-box span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.intent-box strong {
  display: block;
  margin: 2px 0;
  color: #e1c6b7;
  font: 600 17px "KaiTi", serif;
}

.intent-box p {
  margin: 0;
  color: #aa958c;
  font-size: 10px;
  line-height: 1.45;
}

.enemy-power {
  margin-top: 9px;
  border-color: rgba(207, 67, 55, 0.32);
  color: #dc776d;
  background: rgba(117, 24, 21, 0.11);
}

.log-panel {
  position: relative;
  grid-column: 4;
  grid-row: 2 / 4;
  display: flex;
  align-self: start;
  width: 100%;
  height: clamp(430px, calc(100vh - 112px), 760px);
  max-height: calc(100vh - 28px);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.log-heading,
.hand-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px 11px;
  border-bottom: 1px solid var(--line);
}

.log-heading h2,
.hand-heading h2 {
  font-size: 19px;
}

.log-heading button {
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  background: transparent;
}

.log-heading button:hover {
  color: var(--paper);
  border-color: var(--gold);
}

.log-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 12px 0;
  flex: 0 0 auto;
}

.log-tabs button {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(189, 162, 109, 0.16);
  color: #837b69;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.018);
}

.log-tabs button.active {
  color: #e0cf9a;
  border-color: rgba(189, 162, 109, 0.48);
  background: rgba(189, 162, 109, 0.08);
  box-shadow: 0 0 14px rgba(189, 162, 109, 0.08);
}

.log-history-toggle {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin: 8px 12px 0;
  padding: 7px 10px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  color: #a99b7c;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.05em;
  background: rgba(189, 162, 109, 0.045);
}

.log-history-toggle:hover,
.log-history-toggle:focus-visible {
  border-color: rgba(189, 162, 109, 0.48);
  color: var(--paper);
  outline: none;
}

.battle-log {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 10px 16px 18px 38px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(157, 47, 42, 0.65) transparent;
}

.battle-log.hidden {
  display: none;
}

.battle-log li {
  padding: 8px 3px 9px 1px;
  border-bottom: 1px solid rgba(189, 162, 109, 0.08);
  color: #858b83;
  font-size: 11px;
  line-height: 1.55;
}

.battle-log li::marker {
  color: rgba(189, 162, 109, 0.48);
  font-size: 9px;
}

.battle-log li.important { color: #d8cab0; }
.battle-log li.player-log { color: #dec98e; }
.battle-log li.damage-log,
.battle-log li.enemy-log { color: #b7655f; }
.battle-log li.positive-log { color: #84b895; }
.battle-log li.poison-log { color: #74b882; }
.battle-log li.system-log { color: #708778; }
.battle-log li.boss-log {
  color: #e16d61;
  border-bottom-color: rgba(205, 64, 53, 0.22);
  text-shadow: 0 0 10px rgba(202, 57, 47, 0.18);
}

.hand-panel {
  position: relative;
  grid-column: 1 / 4;
  min-height: 236px;
  overflow: hidden;
}

.hand-heading {
  padding-top: 10px;
  padding-bottom: 8px;
}

.hand-heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.hand-heading .section-kicker {
  margin: 0;
}

.hand-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: #c1b79f;
  font-family: inherit;
  font-size: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.hand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: clamp(7px, 0.8vw, 12px);
  min-height: 180px;
  padding: 12px 14px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: rgba(189, 162, 109, 0.4) transparent;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 1 166px;
  width: min(166px, 18%);
  min-width: 116px;
  height: 174px;
  padding: 11px 10px 10px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.36);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  background:
    linear-gradient(155deg, rgba(24, 35, 28, 0.98), rgba(8, 12, 10, 0.98));
  box-shadow: 0 9px 15px rgba(0, 0, 0, 0.34), inset 0 0 0 4px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease, border-color 150ms ease, filter 150ms ease;
}

.card::before {
  content: attr(data-glyph);
  position: absolute;
  z-index: 0;
  right: -4px;
  bottom: -17px;
  color: rgba(189, 162, 109, 0.045);
  font: 700 76px "KaiTi", serif;
  transform: rotate(-10deg);
}

.card::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 5px;
  border: 1px solid rgba(189, 162, 109, 0.1);
  pointer-events: none;
}

.card:hover:not(:disabled) {
  z-index: 3;
  border-color: rgba(212, 187, 126, 0.82);
  filter: brightness(1.12);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.48), 0 0 18px rgba(211, 184, 119, 0.18), inset 0 0 0 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-9px) scale(1.045);
}

.card:focus-visible,
.end-turn-button:focus-visible,
.result-card button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.card:disabled {
  cursor: not-allowed;
  filter: grayscale(0.68) brightness(0.58);
}

.card.insufficient-energy {
  border-color: rgba(105, 110, 105, 0.18);
  filter: grayscale(0.88) brightness(0.38);
}

.card.insufficient-energy .card-cost {
  border-color: #7e3934;
  color: #df8278;
  background: #321413;
  box-shadow: 0 0 13px rgba(164, 44, 37, 0.2);
}

.card-block-reason {
  position: absolute;
  z-index: 5;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border: 1px solid rgba(199, 91, 78, 0.35);
  color: #d5877b;
  font-size: 9px;
  letter-spacing: 0.06em;
  background: rgba(35, 10, 9, 0.9);
}

.card.attack { border-top: 3px solid #a83d35; }
.card.defense { border-top: 3px solid #738d8e; }
.card.utility { border-top: 3px solid #708f63; }
.card.fate { border-top: 3px solid #c5a35d; background: linear-gradient(155deg, #28200f, #0f0c08); }
.card.blood { border-top: 3px solid #cb3932; background: linear-gradient(155deg, #321716, #100909); }
.card.poison { border-top: 3px solid #5da56f; background: linear-gradient(155deg, #142818, #090f0a); }
/* V0.9.9 寿道·子批3：寿道蛊霜白暗金——清冷寿元意象 + 暗金焚命底。 */
.card.lifespan { border-top: 3px solid #cbbd92; background: linear-gradient(155deg, #20201b, #0c0c0a); }

.card-cost {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #79a992;
  border-radius: 50%;
  color: #cce2d2;
  font: 700 14px Georgia, serif;
  background: #18382e;
  box-shadow: 0 0 12px rgba(57, 119, 91, 0.24);
}

.card-title-row,
.card-meta-row {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-height: 31px;
}

.card-top-marks {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.card h3 {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  margin: 1px 0 0;
  overflow: hidden;
  font: 600 clamp(15px, 1.18vw, 19px) "STKaiti", "KaiTi", serif;
  letter-spacing: 0.06em;
  line-height: 1.18;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 18px;
  margin-top: 3px;
  overflow: hidden;
}

.card-type {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 2px 5px;
  border: 1px solid rgba(189, 162, 109, 0.15);
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.card-art {
  position: absolute;
  z-index: 0;
  left: 12px;
  right: 12px;
  top: 59px;
  display: grid;
  place-items: center;
  height: 54px;
  margin: 0;
  border-top: 1px solid rgba(189, 162, 109, 0.1);
  border-bottom: 1px solid rgba(189, 162, 109, 0.1);
  color: rgba(189, 162, 109, 0.3);
  font: 700 27px "KaiTi", serif;
  background: radial-gradient(circle, rgba(99, 139, 108, 0.13), transparent 66%);
  pointer-events: none;
}

.blood .card-art {
  color: rgba(211, 73, 62, 0.65);
  background: radial-gradient(circle, rgba(157, 47, 42, 0.19), transparent 66%);
}

.card-effect {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  margin: auto 0 0;
  min-height: 48px;
  max-height: 52px;
  overflow: hidden;
  color: #b9b9ae;
  font-size: clamp(11.5px, 0.78vw, 12.5px);
  line-height: 1.42;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.card-effect em {
  color: #ddc98f;
  font-style: normal;
}

.card.played {
  animation: card-played 260ms ease forwards;
}

@keyframes card-played {
  to { opacity: 0; transform: translateY(-35px) scale(0.92); }
}

.hit-shake { animation: hit-shake 320ms ease; }
.panel-hit { animation: panel-hit 320ms ease; }
.panel-hit-heavy { animation: panel-hit-heavy 360ms ease; }
.damage-flash { animation: damage-flash 320ms ease; }
.blood-trail { animation: blood-trail 360ms ease; }
.boss-awake { animation: boss-awake 940ms ease both; }
.boss-phase-flash { animation: boss-phase-flash 900ms ease both; }
.portrait-dimmed { animation: portrait-dimmed 900ms ease both; }
.portrait-phase-shift .portrait-image { animation: portrait-phase-shift 820ms ease both; }
/* 朝暮·寿道形态切换：焚寿衰老的明暗爆闪（作用于立绘容器，与换图 crossfade 解耦；老内核/reduced-motion 自动降级，不影响换图正确性） */
.portrait-form-shift { animation: portrait-form-shift 900ms ease; }
@keyframes portrait-form-shift {
  0% { filter: none; transform: none; }
  30% { filter: brightness(0.55) sepia(0.4); }
  52% { filter: brightness(1.7) saturate(1.4) drop-shadow(0 0 16px rgba(232, 195, 106, 0.5)); transform: scale(1.02); }
  100% { filter: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .portrait-form-shift { animation: none; } }

@keyframes hit-shake {
  0%, 100% { transform: translateX(0); filter: none; }
  25% { transform: translateX(-8px); filter: brightness(1.7) saturate(1.5); }
  60% { transform: translateX(6px); }
}

@keyframes panel-hit {
  0%, 100% { transform: translateX(0); }
  24% { transform: translateX(-6px); }
  52% { transform: translateX(5px); }
  76% { transform: translateX(-2px); }
}

@keyframes panel-hit-heavy {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-10px); }
  42% { transform: translateX(8px); }
  66% { transform: translateX(-4px); }
}

@keyframes damage-flash {
  0%, 100% { box-shadow: none; filter: none; }
  24% { box-shadow: inset 0 0 48px rgba(224, 54, 44, 0.64), 0 0 22px rgba(202, 43, 35, 0.25); filter: brightness(1.45) saturate(1.5); }
}

@keyframes blood-trail {
  35% { filter: brightness(1.32) saturate(1.5) drop-shadow(0 0 16px rgba(181, 38, 31, 0.46)); }
}

@keyframes boss-awake {
  0%, 100% { box-shadow: 0 14px 38px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(129, 26, 22, 0.1); }
  45% { box-shadow: 0 18px 46px rgba(0, 0, 0, 0.78), 0 0 34px rgba(197, 48, 39, 0.32), inset 0 0 44px rgba(150, 34, 28, 0.24); }
}

@keyframes boss-phase-flash {
  0%, 100% {
    border-color: rgba(217, 62, 49, 0.72);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.72), 0 0 22px rgba(151, 31, 26, 0.18), inset 0 0 42px rgba(150, 28, 24, 0.16);
  }
  34% {
    border-color: rgba(255, 102, 82, 0.9);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.78), 0 0 34px rgba(212, 54, 43, 0.32), inset 0 0 54px rgba(167, 31, 27, 0.28);
  }
}

@keyframes portrait-phase-shift {
  0% { opacity: 0.18; filter: brightness(0.36) saturate(0.7); transform: scale(0.99); }
  45% { opacity: 0.78; filter: brightness(0.86) saturate(1.25) drop-shadow(0 0 20px rgba(211, 47, 38, 0.32)); }
  100% { opacity: 1; filter: drop-shadow(0 0 18px rgba(213, 55, 45, 0.36)) saturate(1.06); transform: scale(1); }
}

@keyframes portrait-dimmed {
  55%, 100% { filter: brightness(0.42) saturate(0.72); }
}

body.screen-shake-lite .game-shell {
  animation: screen-shake-lite 110ms linear both;
}

body.hit-pause-lite .arena-panel {
  animation: hit-pause-lite 110ms steps(2, end) both;
}

@keyframes screen-shake-lite {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  55% { transform: translate(2px, -1px); }
  80% { transform: translate(-1px, 0); }
}

@keyframes hit-pause-lite {
  0%, 100% { filter: none; transform: scale(1); }
  50% { filter: contrast(1.08) saturate(1.08); transform: scale(0.997); }
}

.result-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 4, 3, 0.84);
  backdrop-filter: blur(6px);
}

.result-card {
  position: relative;
  width: min(460px, 95vw);
  padding: 39px 34px 33px;
  border: 1px solid rgba(189, 162, 109, 0.56);
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(88, 126, 98, 0.18), transparent 42%),
    linear-gradient(145deg, #111813, #080b09);
  box-shadow: 0 30px 90px #000, inset 0 0 0 7px rgba(189, 162, 109, 0.04);
  animation: result-in 360ms ease both;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
}

.result-seal {
  display: grid;
  place-items: center;
  width: 73px;
  height: 73px;
  margin: 0 auto 18px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font: 700 37px "KaiTi", serif;
  box-shadow: 0 0 28px rgba(189, 162, 109, 0.12), inset 0 0 25px rgba(189, 162, 109, 0.08);
}

.result-card > p:first-of-type {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.28em;
}

.result-card h2 {
  margin-bottom: 11px;
  font-size: 38px;
}

.result-card > p:nth-of-type(2) {
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 21px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 11px;
}

.result-stats strong { color: var(--paper); }
.result-card button { font-family: "KaiTi", serif; letter-spacing: 0.12em; }
.result-card.defeat .result-seal { color: #be4a40; border-color: #97352f; }
.result-card.defeat h2 { color: #d1aaa1; }

.deck-mini-button {
  min-width: 110px;
  margin: 0;
  padding: 6px 13px;
  border: 1px solid rgba(189, 162, 109, 0.3);
  color: var(--gold);
  cursor: pointer;
  white-space: nowrap;
  background: rgba(10, 14, 11, 0.72);
}

.result-mini-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  width: min(100%, 620px);
  max-width: 100%;
  min-width: 0;
  margin: -8px auto 13px;
}

.result-mini-actions .deck-mini-button {
  flex: 0 1 auto;
  max-width: 100%;
}

.lore-mini-button {
  border-color: rgba(116, 174, 135, 0.34);
  color: #a9c9ad;
}

.hidden {
  display: none !important;
  pointer-events: none !important;
}

/* ===== 绗簩鐗堬細鏍囬鐣岄潰涓庡眬澶栦俊鎭?===== */

.start-screen {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(5, 9, 7, 0.34), rgba(4, 6, 5, 0.92)),
    radial-gradient(circle at 50% 30%, rgba(75, 119, 88, 0.2), transparent 36%),
    #050806;
  isolation: isolate;
}

.start-screen::before,
.start-screen::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

.start-screen::before {
  inset: 15px;
  border: 1px solid rgba(189, 162, 109, 0.25);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.75);
}

.start-screen::after {
  inset: 0;
  opacity: 0.22;
  background: repeating-linear-gradient(110deg, transparent 0 18px, rgba(189, 162, 109, 0.025) 19px 20px);
}

.start-backdrop {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.start-moon {
  position: absolute;
  top: 6%;
  left: 50%;
  width: min(31vw, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(161, 194, 169, 0.24);
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 42% 40%, rgba(161, 194, 169, 0.16), rgba(38, 62, 46, 0.04) 68%, transparent 69%);
  box-shadow: 0 0 110px rgba(75, 118, 87, 0.14);
}

.mountain {
  position: absolute;
  right: -10%;
  bottom: -33%;
  left: -10%;
  height: 67%;
  background: #08100c;
  clip-path: polygon(0 64%, 10% 46%, 18% 58%, 29% 28%, 38% 55%, 49% 14%, 58% 49%, 69% 25%, 78% 55%, 88% 35%, 100% 60%, 100% 100%, 0 100%);
}

.mountain-two {
  bottom: -43%;
  opacity: 0.65;
  transform: scaleX(-1) scaleY(0.8);
  background: #17251c;
}

.start-content {
  width: min(1020px, 94vw);
  padding: 22px 38px 25px;
  text-align: center;
}

.start-kicker {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.34em;
}

.start-logo {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 8px;
  border: 1px solid rgba(189, 162, 109, 0.8);
  transform: rotate(45deg);
  color: var(--gold);
  background: rgba(104, 31, 25, 0.38);
  box-shadow: 0 0 30px rgba(146, 53, 43, 0.14), inset 0 0 18px rgba(189, 162, 109, 0.08);
}

.start-logo span {
  font: 700 29px "STKaiti", "KaiTi", serif;
  transform: rotate(-45deg);
}

.start-content > h1 {
  margin: 0;
  font: 500 clamp(48px, 6vw, 74px)/1.05 "STKaiti", "KaiTi", serif;
  letter-spacing: 0.18em;
  text-shadow: 0 4px 28px #000;
}

.start-subtitle {
  margin: 9px 0 16px;
  color: #9aa098;
  font: 14px "KaiTi", serif;
  letter-spacing: 0.14em;
}

.start-guide-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -5px 0 12px;
}

.start-guide-button,
.start-reset-button {
  padding: 6px 12px;
  border: 1px solid rgba(189, 162, 109, 0.32);
  color: #d2bd82;
  cursor: pointer;
  font: 12px "KaiTi", serif;
  letter-spacing: 0.12em;
  background: rgba(10, 14, 11, 0.62);
}

.start-guide-button {
  border-color: rgba(116, 174, 135, 0.42);
  color: #9ed0aa;
}

.lore-guide-button {
  border-color: rgba(189, 162, 109, 0.42);
  color: #d6bd7a;
}

.recording-mode-button {
  border-color: rgba(116, 174, 135, 0.28);
  color: #b6c8ad;
}

.trial-settings-button,
.settings-guide-button {
  border-color: rgba(189, 162, 109, 0.38);
  color: #d8c78f;
}

.trial-mode-hint {
  margin: -4px auto 10px;
  color: #bda26d;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.start-reset-button {
  color: #9f947b;
}

.start-guide-button:hover,
.start-reset-button:hover {
  border-color: var(--gold);
  color: var(--paper);
}

.start-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 13px;
  max-width: 680px;
  margin: 0 auto 10px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.start-divider i {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(189, 162, 109, 0.5));
}

.start-divider i:last-child { transform: scaleX(-1); }

.hero-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  max-width: 920px;
  margin: 0 auto 12px;
}

.hero-choice {
  position: relative;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 11px;
  align-items: stretch;
  min-height: 156px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.2);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  background: linear-gradient(145deg, rgba(18, 27, 21, 0.96), rgba(7, 11, 8, 0.98));
  transition: 170ms ease;
}

.hero-choice:hover,
.hero-choice.selected {
  border-color: rgba(189, 162, 109, 0.82);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 0 22px rgba(91, 145, 106, 0.05);
}

.hero-choice.selected::after {
  content: "已选择";
  position: absolute;
  z-index: 5;
  top: 5px;
  right: 6px;
  padding: 2px 5px;
  border: 1px solid rgba(189, 162, 109, 0.32);
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.08em;
  background: rgba(8, 12, 9, 0.82);
}

.hero-choice.hero-blood.selected { border-color: rgba(190, 65, 54, 0.82); }
.hero-choice.hero-poison.selected { border-color: rgba(103, 160, 89, 0.82); }

.hero-choice-portrait {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.13);
  background:
    radial-gradient(circle, rgba(65, 111, 79, 0.12), transparent 62%),
    #080c09;
}

.hero-choice-portrait::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 4, 3, 0.04), transparent 55%, rgba(4, 7, 5, 0.72));
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.38);
}

.hero-choice-image {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: contain;
  object-position: center;
  transition: opacity 220ms ease;
}

.hero-choice.image-loaded .hero-choice-image { opacity: 1; }
.hero-choice.image-loaded .hero-choice-fallback { opacity: 0; }

.hero-choice-fallback {
  color: rgba(126, 177, 141, 0.45);
  font: 700 42px "KaiTi", serif;
  transition: opacity 180ms ease;
}

.hero-choice-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 5px 5px 4px 0;
}

.hero-choice-role {
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.hero-choice-info strong {
  font: 600 17px "KaiTi", serif;
  letter-spacing: 0.06em;
}

.hero-choice-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 7px 0;
}

.hero-choice-stats span {
  padding: 2px 5px;
  border: 1px solid rgba(189, 162, 109, 0.12);
  color: #aeb2a9;
  font-size: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.hero-choice-passive {
  margin: 0;
  color: #90978e;
  font-size: 8px;
  line-height: 1.5;
}

.hero-choice-passive em {
  color: var(--jade-bright);
  font-style: normal;
}

.relic-choices {
  display: grid;
  /* V0.9.9 寿道·子批2c：本命遗物增至 4 个（+饲岁轮），改 2×2 网格，避免第 4 个在 3 列下落单。 */
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  max-width: 850px;
  margin: 0 auto 12px;
}

.relic-choice {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 80px;
  padding: 10px 13px;
  border: 1px solid rgba(189, 162, 109, 0.2);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  background: linear-gradient(135deg, rgba(22, 31, 25, 0.93), rgba(8, 12, 9, 0.95));
  transition: 160ms ease;
}

.relic-choice:hover,
.relic-choice.selected {
  border-color: rgba(189, 162, 109, 0.8);
  background: linear-gradient(135deg, rgba(45, 62, 49, 0.95), rgba(17, 23, 19, 0.96));
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(103, 146, 113, 0.05);
}

.relic-choice.selected::after {
  content: "已择";
  position: absolute;
  top: 5px;
  right: 6px;
  color: var(--gold);
  font: 9px "KaiTi", serif;
  letter-spacing: 0.1em;
}

.relic-choice > span {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(122, 177, 141, 0.46);
  border-radius: 50%;
  color: var(--jade-bright);
  font: 600 24px "KaiTi", serif;
  background: rgba(61, 111, 79, 0.12);
}

.relic-choice strong {
  display: block;
  margin-bottom: 3px;
  font: 600 17px "KaiTi", serif;
  letter-spacing: 0.08em;
}

.relic-choice small {
  display: block;
  color: #939a90;
  font-size: 9px;
  line-height: 1.45;
}

.start-deck-note {
  max-width: 850px;
  margin: 0 auto 13px;
  padding: 9px 14px;
  border: 1px solid rgba(189, 162, 109, 0.13);
  background: rgba(5, 9, 7, 0.72);
}

.start-deck-note > span {
  color: var(--blood-bright);
  font: 12px "KaiTi", serif;
  letter-spacing: 0.14em;
}

.start-deck-note p {
  display: inline;
  margin: 0 0 0 7px;
  color: #92988f;
  font-size: 9px;
}

.advanced-card-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
}

.advanced-card-preview span {
  padding: 2px 7px;
  border: 1px solid rgba(189, 162, 109, 0.13);
  color: #b6aa8d;
  font-size: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.start-button {
  min-width: 260px;
  padding: 11px 32px 9px;
  border: 1px solid rgba(189, 162, 109, 0.66);
  color: var(--paper);
  cursor: pointer;
  background: linear-gradient(135deg, #64221e, #291311);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.08);
  transition: 160ms ease;
}

.start-button:hover {
  filter: brightness(1.18);
  transform: translateY(-2px);
  border-color: var(--gold);
}

.start-button span {
  display: block;
  font: 18px "KaiTi", serif;
  letter-spacing: 0.18em;
}

.start-button small {
  display: block;
  margin-top: 2px;
  color: #b5a78b;
  font-size: 8px;
}

.run-progress {
  margin: 9px 0 0;
  color: var(--jade-bright);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.start-feedback-note {
  position: fixed;
  right: 18px;
  bottom: 14px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid rgba(189, 162, 109, 0.16);
  color: #817765;
  font-size: 9px;
  background: rgba(5, 8, 6, 0.58);
}

body.recording-mode #tutorialResetButton,
body.recording-mode #loreResetButton,
body.recording-mode .start-feedback-note {
  display: none !important;
}

.tutorial-overlay {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background: rgba(2, 4, 3, 0.78);
  backdrop-filter: blur(8px);
}

.tutorial-card {
  position: relative;
  width: min(560px, 94vw);
  max-height: calc(100vh - 36px); /* 老内核 dvh 兜底 */
  max-height: calc(100dvh - 36px);
  padding: 24px 26px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(189, 162, 109, 0.48);
  text-align: left;
  background:
    radial-gradient(circle at 18% 0, rgba(118, 40, 33, 0.22), transparent 34%),
    radial-gradient(circle at 90% 22%, rgba(76, 132, 91, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(18, 25, 20, 0.98), rgba(5, 8, 6, 0.99));
  box-shadow: 0 28px 76px #000, inset 0 0 0 5px rgba(189, 162, 109, 0.035);
}

.tutorial-close-button {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(189, 162, 109, 0.25);
  color: var(--muted);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.24);
}

.tutorial-eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.tutorial-card h2 {
  margin: 0 0 12px;
  color: var(--paper);
  font: 28px "KaiTi", serif;
  letter-spacing: 0.14em;
}

.tutorial-body ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tutorial-body li {
  position: relative;
  padding: 9px 11px 9px 28px;
  border: 1px solid rgba(189, 162, 109, 0.12);
  color: #b7ad95;
  font-size: 12px;
  line-height: 1.65;
  background: rgba(255, 255, 255, 0.018);
}

.tutorial-body li::before {
  content: "蛊";
  position: absolute;
  top: 9px;
  left: 9px;
  color: var(--jade-bright);
  font: 13px "KaiTi", serif;
}

.tutorial-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 12px;
  color: #94886f;
  font-size: 10px;
}

.tutorial-progress i {
  display: inline-flex;
  gap: 5px;
  font-style: normal;
}

.tutorial-progress b {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(189, 162, 109, 0.35);
  border-radius: 50%;
}

.tutorial-progress b.current {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 12px rgba(189, 162, 109, 0.3);
}

.tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.tutorial-actions button {
  padding: 7px 13px;
  border: 1px solid rgba(189, 162, 109, 0.28);
  color: #cbb88a;
  cursor: pointer;
  font: 12px "KaiTi", serif;
  letter-spacing: 0.12em;
  background: rgba(8, 12, 9, 0.74);
}

.tutorial-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

.tutorial-actions .tutorial-skip-button {
  color: #8f8877;
  background: transparent;
}

/* ===== V0.9.18 塔中回声：开场序章弹窗（黑石—命途塔—入塔），比新手教程更具电影感 ===== */
.prologue-overlay {
  position: fixed;
  z-index: 118; /* 高于新手教程(110)，序章为最先出现的开场 */
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 34%, rgba(20, 8, 6, 0.78), rgba(1, 2, 2, 0.97) 70%);
  /* V0.9.20.2：去掉 backdrop-filter——压在标题页动态雾气上时老内核 GPU 每帧重算模糊导致持续闪屏（玩家实机反馈）；背景近全黑，模糊本无可见收益。 */
  animation: prologueFade 0.5s ease both;
}

.prologue-card {
  position: relative;
  width: min(540px, 94vw);
  max-height: calc(100vh - 36px); /* 老内核 dvh 兜底 */
  max-height: calc(100dvh - 36px);
  padding: 30px 30px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(189, 162, 109, 0.42);
  text-align: center;
  background:
    radial-gradient(circle at 50% -8%, rgba(118, 40, 33, 0.28), transparent 46%),
    linear-gradient(160deg, rgba(14, 14, 16, 0.99), rgba(4, 4, 6, 0.99));
  box-shadow: 0 30px 90px #000, inset 0 0 0 1px rgba(189, 162, 109, 0.06);
}

.prologue-close-button {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(189, 162, 109, 0.25);
  color: var(--muted);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.24);
}

.prologue-eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.42em;
  opacity: 0.8;
}

.prologue-card h2 {
  position: relative;
  margin: 0 0 20px;
  padding-bottom: 16px;
  color: var(--paper);
  font: 34px "KaiTi", serif;
  letter-spacing: 0.34em;
  text-indent: 0.34em; /* 抵消字间距，视觉居中 */
  text-shadow: 0 0 22px rgba(118, 40, 33, 0.5);
}

.prologue-card h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 44px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(189, 162, 109, 0.7), transparent);
}

.prologue-body {
  min-height: 132px;
}

.prologue-body p {
  margin: 0 0 15px;
  color: #cfc4ab;
  font: 16px/2.05 "KaiTi", serif;
  letter-spacing: 0.05em;
  text-align: justify;
  text-align-last: center;
}

.prologue-body p:last-child {
  margin-bottom: 0;
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.prologue-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: #94886f;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.prologue-progress i {
  display: inline-flex;
  gap: 6px;
  font-style: normal;
}

.prologue-progress b {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(189, 162, 109, 0.35);
  border-radius: 50%;
}

.prologue-progress b.current {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 12px rgba(189, 162, 109, 0.35);
}

.prologue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.prologue-actions button {
  padding: 8px 18px;
  border: 1px solid rgba(189, 162, 109, 0.32);
  color: #cbb88a;
  cursor: pointer;
  font: 13px "KaiTi", serif;
  letter-spacing: 0.14em;
  background: rgba(8, 12, 9, 0.74);
}

.prologue-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

.prologue-actions .prologue-skip-button {
  color: #8f8877;
  background: transparent;
}

@keyframes prologueFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 480px) {
  .prologue-card { padding: 24px 20px 18px; }
  .prologue-card h2 { font-size: 28px; }
  .prologue-body p { font-size: 15px; line-height: 1.95; }
}

/* ===== V0.8.2锛氬懡铔婃畫鍗?/ 娈嬪嵎閲嶉摳 ===== */

.lore-overlay {
  position: fixed;
  z-index: 112;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(92, 132, 99, 0.12), transparent 36%),
    rgba(2, 4, 3, 0.78);
  backdrop-filter: blur(7px);
}

.lore-card {
  position: relative;
  width: min(980px, 96vw);
  max-height: calc(100vh - 36px); /* 老内核 dvh 兜底 */
  max-height: calc(100dvh - 36px);
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(189, 162, 109, 0.5);
  background:
    radial-gradient(circle at 12% 0, rgba(126, 70, 31, 0.24), transparent 36%),
    radial-gradient(circle at 100% 20%, rgba(89, 133, 99, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(17, 24, 19, 0.985), rgba(5, 8, 6, 0.99));
  box-shadow: 0 28px 80px #000, inset 0 0 0 6px rgba(189, 162, 109, 0.035);
}

.lore-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(189, 162, 109, 0.28);
  color: var(--muted);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
}

.lore-eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.lore-card h2 {
  margin: 0 0 8px;
  font: 30px "KaiTi", serif;
  letter-spacing: 0.16em;
}

.lore-intro {
  max-width: 620px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.lore-progress {
  display: inline-flex;
  margin-bottom: 13px;
  padding: 5px 9px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  color: #cdbd93;
  font-size: 10px;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.018);
}

.lore-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
}

.lore-page {
  position: relative;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.18);
  background: linear-gradient(145deg, rgba(23, 32, 25, 0.86), rgba(8, 12, 9, 0.96));
}

.lore-page.unlocked {
  border-color: rgba(189, 162, 109, 0.36);
  box-shadow: inset 0 0 24px rgba(189, 162, 109, 0.035);
}

.lore-page.locked {
  opacity: 0.68;
  filter: grayscale(0.22);
  background: linear-gradient(145deg, rgba(15, 18, 15, 0.88), rgba(6, 8, 7, 0.98));
}

.lore-page h3 {
  margin: 0 0 7px;
  color: var(--paper);
  font: 20px "KaiTi", serif;
  letter-spacing: 0.1em;
}

.lore-page.locked h3 { color: #7d796d; }

.lore-source {
  display: inline-block;
  margin-bottom: 9px;
  padding: 2px 7px;
  border: 1px solid rgba(116, 174, 135, 0.22);
  color: #94b99c;
  font-size: 9px;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.2);
}

.lore-page.locked .lore-source {
  border-color: rgba(189, 162, 109, 0.12);
  color: #807867;
}

.lore-body {
  margin: 0;
  color: #c8c0a8;
  font: 13px/1.8 "KaiTi", serif;
  letter-spacing: 0.04em;
}

.lore-quote {
  display: block;
  margin-top: 10px;
  color: var(--gold);
  font: 15px/1.6 "KaiTi", serif;
}

.lore-settings {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(189, 162, 109, 0.1);
}

.lore-settings span {
  color: #807867;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.lore-settings button,
.deck-lore-button {
  padding: 6px 10px;
  border: 1px solid rgba(189, 162, 109, 0.24);
  color: #b9a371;
  cursor: pointer;
  font: 11px "KaiTi", serif;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.24);
}

.lore-settings button {
  color: #9c8372;
  border-color: rgba(173, 60, 50, 0.24);
}

.deck-lore-button {
  position: absolute;
  top: 52px;
  right: 14px;
}

.lore-index-card {
  width: 100%;
  min-height: 154px;
  text-align: left;
}

button.lore-index-card {
  color: inherit;
  cursor: pointer;
  font: inherit;
}

button.lore-index-card:hover {
  border-color: rgba(216, 184, 106, 0.62);
  box-shadow: 0 0 18px rgba(189, 162, 109, 0.12), inset 0 0 26px rgba(189, 162, 109, 0.05);
  transform: translateY(-1px);
}

.lore-index-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.lore-index-head h3 {
  margin-bottom: 0;
}

.lore-status-pill {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(189, 162, 109, 0.2);
  color: #cdbd93;
  font-size: 9px;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.24);
}

.lore-page.locked .lore-status-pill {
  border-color: rgba(110, 105, 92, 0.24);
  color: #797365;
}

.lore-detail {
  position: relative;
  grid-column: 1 / -1;
  min-height: 430px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.42);
  background:
    radial-gradient(circle at 50% 0, rgba(189, 162, 109, 0.12), transparent 34%),
    radial-gradient(circle at 16% 80%, rgba(72, 126, 89, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(25, 29, 21, 0.94), rgba(7, 9, 7, 0.98));
  box-shadow: inset 0 0 48px rgba(189, 162, 109, 0.055);
}

.lore-detail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(216, 184, 106, 0.28), transparent),
    repeating-linear-gradient(115deg, rgba(189, 162, 109, 0.035) 0 1px, transparent 1px 12px);
  opacity: 0;
  transform: translateX(-80%);
}

.lore-detail.unfolding {
  animation: lorePageUnfold 440ms ease-out both;
}

.lore-detail.unfolding::before {
  animation: loreGoldSweep 520ms ease-out both;
}

.lore-detail.unfolding .lore-detail-body,
.lore-detail.unfolding .lore-detail-quote {
  opacity: 0;
  transform: translateY(8px);
  animation: loreTextReveal 460ms ease-out 160ms both;
}

.lore-detail.unfolding .lore-detail-quote {
  animation-delay: 300ms;
}

.lore-detail.animation-skipped,
.lore-detail.animation-complete,
.lore-detail.animation-complete::before,
.lore-detail.animation-complete .lore-detail-body,
.lore-detail.animation-complete .lore-detail-quote {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.lore-detail.animation-skipped::before,
.lore-detail.animation-complete::before {
  opacity: 0 !important;
}

.lore-back-button {
  margin: 0 0 12px;
  padding: 6px 10px;
  border: 1px solid rgba(189, 162, 109, 0.24);
  color: #bba572;
  cursor: pointer;
  font: 11px "KaiTi", serif;
  letter-spacing: 0.12em;
  background: rgba(0, 0, 0, 0.22);
}

.lore-detail h3 {
  margin: 10px 0 16px;
  color: #efe2bd;
  font: 27px "KaiTi", serif;
  letter-spacing: 0.14em;
}

.lore-detail-body {
  max-width: 780px;
  color: #d0c4a8;
  font-size: 15px;
  line-height: 2;
}

.lore-detail-quote {
  max-width: 760px;
  margin-top: 18px;
  padding-left: 13px;
  border-left: 2px solid rgba(216, 184, 106, 0.55);
  font-size: 18px;
}

.lore-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-top: 18px;
}

.lore-detail-actions button {
  padding: 7px 12px;
  border: 1px solid rgba(189, 162, 109, 0.28);
  color: #d1b977;
  cursor: pointer;
  font: 12px "KaiTi", serif;
  letter-spacing: 0.12em;
  background: rgba(0, 0, 0, 0.22);
}

@keyframes lorePageUnfold {
  from { opacity: 0; transform: translateY(10px) scaleY(0.985); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes loreGoldSweep {
  0% { opacity: 0; transform: translateX(-86%); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateX(86%); }
}

@keyframes loreTextReveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .lore-list { grid-template-columns: 1fr; }
  .deck-lore-button {
    position: static;
    margin: -6px 0 10px;
  }
}

.battle-coach {
  position: fixed;
  z-index: 46;
  left: 50%;
  bottom: clamp(214px, 27vh, 292px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  bottom: clamp(214px, 27dvh, 292px);
  width: min(520px, calc(100vw - 44px));
  padding: 12px 38px 12px 14px;
  border: 1px solid rgba(116, 174, 135, 0.32);
  color: #c9c0a8;
  background: linear-gradient(145deg, rgba(12, 19, 14, 0.95), rgba(5, 9, 7, 0.96));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45), inset 0 0 22px rgba(81, 139, 96, 0.04);
  transform: translateX(-50%);
}

.battle-coach button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(189, 162, 109, 0.2);
  color: var(--muted);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.18);
}

.battle-coach strong {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font: 15px "KaiTi", serif;
  letter-spacing: 0.12em;
}

.battle-coach ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 17px;
  font-size: 11px;
  line-height: 1.45;
}

.keyword-tooltip {
  position: fixed;
  z-index: 260; /* V0.9.13：须高于卡牌预览浮层(200)与蛊囊浮层，否则浮层内点按术语看不到提示 */
  max-width: min(260px, calc(100vw - 20px));
  padding: 8px 10px;
  border: 1px solid rgba(189, 162, 109, 0.38);
  color: #cfc5ab;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(17, 24, 19, 0.98), rgba(5, 8, 6, 0.99));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.keyword-tooltip strong {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font: 13px "KaiTi", serif;
  letter-spacing: 0.08em;
}

.keyword-tooltip span {
  display: block;
  color: #9da492;
  font-size: 11px;
  line-height: 1.45;
}

[data-keyword] {
  cursor: help;
}

/* ===== 绗簩鐗堬細绔嬬粯銆侀仐鐗╀笌鎴樻枟淇℃伅 ===== */

.top-relic {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 18px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.top-relic > span,
.active-relic-card > span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(116, 174, 135, 0.46);
  border-radius: 50%;
  color: var(--jade-bright);
  font: 600 17px "KaiTi", serif;
  background: rgba(58, 107, 76, 0.12);
}

.top-relic p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.top-relic strong {
  display: block;
  color: var(--paper);
  font: 13px "KaiTi", serif;
  letter-spacing: 0.08em;
}

.active-relic-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 7px 8px;
  border: 1px solid rgba(116, 174, 135, 0.18);
  background: linear-gradient(90deg, rgba(58, 107, 76, 0.09), transparent);
}

.active-relic-card p { margin: 0; }
.active-relic-card small { display: block; color: var(--muted); font-size: 8px; }
.active-relic-card strong { font: 13px "KaiTi", serif; letter-spacing: 0.08em; }

/* V0.9.9.2 战斗内随身遗物条：字形芯片常驻可见，触发时脉冲高亮 */
.combat-relic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.combat-relic-strip:empty { display: none; }
/* V0.9.12.2：本命芯片常驻 DOM 后 strip 永不 :empty——桌面 0 普通遗物时收掉 6px 空隙（老内核不支持 :has 最多多 6px 空白，无碍） */
.combat-relic-strip:not(:has(.combat-relic-chip:not(.active-relic-chip))) { margin-top: 0; }
.combat-relic-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(196, 164, 96, 0.42);
  background: linear-gradient(160deg, rgba(42, 35, 22, 0.82), rgba(20, 16, 12, 0.6));
  color: var(--paper);
  cursor: help;
  transition: transform 140ms ease;
}
.combat-relic-chip b { font: 15px "KaiTi", serif; line-height: 1; }
.combat-relic-chip.relic-blood { border-color: rgba(191, 64, 54, 0.5); }
.combat-relic-chip.relic-poison { border-color: rgba(99, 177, 88, 0.5); }
.combat-relic-chip.relic-jade { border-color: rgba(110, 174, 139, 0.5); }
.combat-relic-chip.relic-soul { border-color: rgba(154, 102, 176, 0.5); }
.combat-relic-chip.relic-gold { border-color: rgba(196, 164, 96, 0.5); }
.combat-relic-chip.relic-chip-trigger {
  animation: relic-chip-pulse 800ms ease-out;
  z-index: 3;
}
/* V0.9.12.2 本命遗物芯片：桌面已有 activeRelicCard 展示故隐藏，仅手机战斗态（activeRelicCard 被隐）时显示 */
.combat-relic-chip.active-relic-chip { display: none; }
body.mobile-combat-safe .combat-relic-chip.active-relic-chip {
  display: inline-flex;
  border-color: rgba(240, 214, 130, 0.85);
  box-shadow: inset 0 0 6px rgba(228, 196, 112, 0.35);
}
@keyframes relic-chip-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(228, 196, 112, 0); }
  22% { transform: scale(1.42); box-shadow: 0 0 18px 6px rgba(228, 196, 112, 0.9); border-color: rgba(240, 214, 130, 1); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(228, 196, 112, 0); }
}

.player-figure-svg,
.enemy-figure-svg {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait-caption {
  position: absolute;
  z-index: 3;
  right: 6px;
  bottom: 5px;
  padding: 2px 5px;
  color: rgba(214, 204, 178, 0.64);
  font: 8px "KaiTi", serif;
  letter-spacing: 0.1em;
  background: rgba(5, 8, 6, 0.72);
}

.portrait-smoke {
  stroke: rgba(112, 177, 135, 0.5);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 9 7;
  animation: smoke-flow 8s linear infinite;
}

.smoke-two { animation-delay: -4s; }

@keyframes smoke-flow {
  to { stroke-dashoffset: -64; opacity: 0.35; }
}

.portrait-gu { animation: gu-hover 2.6s ease-in-out infinite alternate; transform-origin: 58px 131px; }

@keyframes gu-hover { to { transform: translateY(-7px) rotate(4deg); } }

.enemy-figure-svg .enemy-eye {
  filter: drop-shadow(0 0 5px currentColor);
  animation: enemy-eye-pulse 1.8s ease-in-out infinite alternate;
}

@keyframes enemy-eye-pulse { to { opacity: 0.5; } }

.enemy-figure-svg .enemy-limb {
  transform-origin: center;
  animation: enemy-breathe 2.7s ease-in-out infinite alternate;
}

@keyframes enemy-breathe { to { transform: translateY(3px) scale(1.012); } }

/* ===== 绗簩鐗堬細鏂芥硶銆侀瀛椾笌鍥炲悎杩囨浮 ===== */

.fx-layer {
  position: fixed;
  z-index: 40;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.effect-layer {
  position: fixed;
  z-index: 39;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.battle-effect {
  position: fixed;
  left: 50%;
  top: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform, opacity, filter;
}

.center-effect {
  left: 50%;
  top: 46%;
  min-width: min(520px, 72vw);
  padding: 12px 32px;
  border-top: 1px solid rgba(218, 184, 95, 0.44);
  border-bottom: 1px solid rgba(218, 184, 95, 0.44);
  color: #ead28c;
  font: 700 22px "KaiTi", serif;
  letter-spacing: 0.18em;
  text-align: center;
  text-shadow: 0 0 18px rgba(216, 166, 62, 0.34), 0 2px 5px #000;
  background: linear-gradient(90deg, transparent, rgba(7, 10, 8, 0.86) 20%, rgba(7, 10, 8, 0.86) 80%, transparent);
}

.effect-moon-slash {
  width: 142px;
  height: 62px;
  border-top: 3px solid rgba(238, 217, 160, 0.88);
  border-radius: 50%;
  filter: drop-shadow(0 0 12px rgba(238, 217, 160, 0.46));
  animation: effect-slash 420ms ease-out both;
}

.effect-moon-slash::after {
  content: "";
  position: absolute;
  inset: 15px 18px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 188, 0.92), transparent);
}

.effect-blood-rune {
  width: 118px;
  height: 118px;
  border: 2px solid rgba(207, 50, 42, 0.64);
  border-radius: 50%;
  box-shadow: inset 0 0 30px rgba(132, 18, 16, 0.3), 0 0 24px rgba(183, 35, 30, 0.34);
  animation: effect-rune-spread 520ms ease-out both;
}

.effect-blood-rune::before,
.effect-blood-rune::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 56px;
  height: 2px;
  background: rgba(220, 72, 60, 0.76);
  transform: rotate(36deg);
}

.effect-blood-rune::after { transform: rotate(-36deg); }

.effect-blood-splash {
  width: 110px;
  height: 80px;
  border-radius: 44% 56% 48% 52%;
  background: radial-gradient(circle, rgba(180, 45, 37, 0.34), transparent 64%);
  box-shadow: 0 0 28px rgba(168, 34, 29, 0.22);
  animation: effect-soft-flash 430ms ease-out both;
}

.effect-armor-sigil {
  width: 132px;
  height: 132px;
  border: 2px solid rgba(139, 202, 176, 0.62);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(92, 152, 130, 0.22), 0 0 20px rgba(92, 152, 130, 0.2);
  animation: effect-sigil-rise 650ms ease-out both;
}

.effect-armor-sigil::before {
  content: "甲";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(174, 224, 201, 0.74);
  font: 700 42px "KaiTi", serif;
}

.effect-heal-sparks {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 70%, rgba(220, 200, 105, 0.85) 0 3px, transparent 4px),
    radial-gradient(circle at 52% 58%, rgba(132, 217, 157, 0.84) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 76%, rgba(224, 211, 134, 0.82) 0 2px, transparent 3px);
  filter: drop-shadow(0 0 14px rgba(138, 205, 153, 0.32));
  animation: effect-heal-sparks 760ms ease-out both;
}

.effect-poison-mist {
  width: 148px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 188, 91, 0.28), rgba(30, 90, 42, 0.12) 48%, transparent 72%);
  filter: blur(0.5px) drop-shadow(0 0 18px rgba(80, 190, 88, 0.24));
  animation: effect-poison-mist 720ms ease-out both;
}

.effect-bug-shadow {
  width: 130px;
  height: 46px;
  background:
    radial-gradient(ellipse at 22% 50%, rgba(134, 231, 126, 0.82) 0 3px, transparent 4px),
    radial-gradient(ellipse at 52% 28%, rgba(134, 231, 126, 0.7) 0 2px, transparent 3px),
    radial-gradient(ellipse at 78% 58%, rgba(134, 231, 126, 0.76) 0 3px, transparent 4px);
  animation: effect-bug-flicker 650ms ease-out both;
}

.effect-poison-corrosion {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  box-shadow: inset 0 0 32px rgba(87, 213, 91, 0.38), 0 0 26px rgba(87, 213, 91, 0.18);
  animation: effect-corrosion 620ms ease-out both;
}

.effect-poison-burst {
  min-width: 74px;
  padding: 6px 12px;
  border: 1px solid rgba(116, 225, 105, 0.48);
  border-radius: 999px;
  color: #9beb89;
  font: 700 18px "KaiTi", serif;
  text-align: center;
  background: rgba(18, 66, 24, 0.62);
  box-shadow: 0 0 24px rgba(81, 207, 78, 0.3);
  animation: effect-poison-burst 700ms ease-out both;
}

.effect-fate-wheel {
  animation: effect-center-reveal 880ms ease both;
}

.effect-fate-wheel::before,
.effect-gold-seal::before,
.effect-furnace-seal::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118px;
  height: 118px;
  margin: -59px 0 0 -59px;
  border: 1px solid rgba(226, 195, 105, 0.46);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(221, 184, 83, 0.2), inset 0 0 18px rgba(221, 184, 83, 0.08);
  transform: rotate(0);
  animation: effect-wheel-rotate 880ms ease both;
}

.effect-boss-title {
  color: #e28477;
  border-color: rgba(215, 77, 64, 0.5);
  text-shadow: 0 0 20px rgba(201, 51, 42, 0.42), 0 2px 5px #000;
  animation: effect-center-reveal 980ms ease both;
}

.effect-boss-mist {
  width: 186px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(145, 30, 26, 0.3), rgba(59, 10, 9, 0.16) 58%, transparent 76%);
  filter: blur(1px);
  animation: effect-poison-mist 940ms ease-out both;
}

.effect-yuan-flow {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 1px solid rgba(143, 211, 154, 0.46);
  background:
    radial-gradient(circle at 42% 28%, rgba(230, 199, 117, 0.32), transparent 22%),
    conic-gradient(from 20deg, transparent, rgba(131, 217, 154, 0.28), transparent, rgba(220, 184, 91, 0.24), transparent);
  box-shadow: inset 0 0 24px rgba(109, 186, 131, 0.14), 0 0 22px rgba(219, 184, 91, 0.14);
  animation: effect-yuan-flow 560ms ease both;
}

.effect-fate-ring {
  width: 126px;
  height: 126px;
  border: 1px solid rgba(226, 195, 105, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(221, 184, 83, 0.2), inset 0 0 22px rgba(221, 184, 83, 0.08);
  animation: effect-fate-ring 620ms ease both;
}

.effect-fate-ring::before,
.effect-utility-rune::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(226, 195, 105, 0.36);
  border-radius: 50%;
}

.effect-utility-rune {
  color: #e5c174;
  border-color: rgba(218, 184, 95, 0.42);
  text-shadow: 0 0 16px rgba(218, 184, 95, 0.28), 0 2px 5px #000;
}

.effect-boss-phase-haze {
  width: min(760px, 76vw);
  height: min(420px, 58vh);
  border: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(162, 37, 31, 0.18), transparent 38%),
    radial-gradient(circle at 20% 70%, rgba(95, 16, 14, 0.18), transparent 32%),
    radial-gradient(circle at 80% 36%, rgba(122, 26, 23, 0.16), transparent 30%);
  filter: blur(1px);
  animation: effect-boss-haze 980ms ease both;
}

.effect-boss-claw {
  width: 152px;
  height: 106px;
  background:
    linear-gradient(120deg, transparent 35%, rgba(219, 74, 62, 0.78) 36% 39%, transparent 40%),
    linear-gradient(134deg, transparent 42%, rgba(219, 74, 62, 0.58) 43% 46%, transparent 47%),
    linear-gradient(150deg, transparent 48%, rgba(219, 74, 62, 0.48) 49% 52%, transparent 53%);
  filter: drop-shadow(0 0 14px rgba(197, 47, 40, 0.36));
  animation: effect-boss-claw 620ms ease-out both;
}

.effect-boss-greenfire {
  width: 172px;
  height: 118px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 54%, rgba(81, 190, 92, 0.34), transparent 34%),
    radial-gradient(circle at 58% 35%, rgba(143, 45, 38, 0.24), transparent 42%),
    radial-gradient(circle, rgba(39, 92, 45, 0.16), transparent 70%);
  filter: blur(0.5px) drop-shadow(0 0 18px rgba(78, 197, 82, 0.22));
  animation: effect-boss-greenfire 680ms ease-out both;
}

.effect-gold-seal,
.effect-furnace-seal,
.effect-furnace-mutation,
.effect-furnace-backlash {
  animation: effect-center-reveal 900ms ease both;
}

.effect-furnace-seal {
  color: #f1cb73;
  border-color: rgba(234, 175, 67, 0.52);
}

.effect-furnace-mutation {
  color: #edb56f;
  border-color: rgba(202, 73, 56, 0.54);
  text-shadow: 0 0 18px rgba(202, 73, 56, 0.38), 0 0 16px rgba(82, 193, 84, 0.16), 0 2px 5px #000;
}

.effect-furnace-mutation::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 134px;
  height: 134px;
  margin: -67px 0 0 -67px;
  border: 1px solid rgba(201, 73, 55, 0.48);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 174, 86, 0.1), transparent 64%);
  box-shadow: 0 0 30px rgba(201, 73, 55, 0.2);
  animation: effect-rune-spread 900ms ease both;
}

.effect-furnace-backlash {
  color: #e2877d;
  border-color: rgba(209, 58, 48, 0.56);
  animation: effect-crack 900ms ease both;
}

.effect-crack {
  color: #d48278;
  border-color: rgba(184, 61, 51, 0.46);
  animation: effect-crack 900ms ease both;
}

.effect-crack::before {
  content: "";
  position: absolute;
  inset: -18px 38%;
  clip-path: polygon(45% 0, 62% 26%, 48% 26%, 67% 62%, 42% 62%, 55% 100%, 35% 54%, 52% 54%, 32% 18%, 48% 18%);
  background: rgba(209, 82, 72, 0.42);
  filter: drop-shadow(0 0 14px rgba(209, 82, 72, 0.32));
}

@keyframes effect-slash {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-26deg) scaleX(0.35); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-18deg) scaleX(1.25) translateX(18px); }
}

@keyframes effect-rune-spread {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.42) rotate(-12deg); }
  32% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.32) rotate(10deg); }
}

@keyframes effect-soft-flash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.75); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.16); }
}

@keyframes effect-sigil-rise {
  0% { opacity: 0; transform: translate(-50%, -42%) scale(0.62) rotate(-20deg); }
  38% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -64%) scale(1.06) rotate(10deg); }
}

@keyframes effect-heal-sparks {
  0% { opacity: 0; transform: translate(-50%, -34%) scale(0.68); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -92%) scale(1.2); }
}

@keyframes effect-poison-mist {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.72); }
  32% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -54%) scale(1.28); }
}

@keyframes effect-bug-flicker {
  0% { opacity: 0; transform: translate(-62%, -50%); }
  36% { opacity: 1; }
  100% { opacity: 0; transform: translate(-32%, -58%); }
}

@keyframes effect-corrosion {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.62); filter: hue-rotate(0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18); filter: hue-rotate(25deg); }
}

@keyframes effect-poison-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  22%, 64% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -82%) scale(1.05); }
}

@keyframes effect-center-reveal {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleX(0.32); }
  20%, 74% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleX(1.08); }
}

@keyframes effect-wheel-rotate {
  0% { opacity: 0; transform: rotate(-80deg) scale(0.72); }
  28%, 72% { opacity: 0.86; }
  100% { opacity: 0; transform: rotate(90deg) scale(1.08); }
}

@keyframes effect-crack {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.86); filter: brightness(1.35); }
  28%, 72% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes effect-yuan-flow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.58) rotate(-28deg); }
  34% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.12) rotate(36deg); }
}

@keyframes effect-fate-ring {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.56) rotate(-60deg); }
  32%, 68% { opacity: 0.92; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18) rotate(80deg); }
}

@keyframes effect-boss-haze {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
  32%, 72% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes effect-boss-claw {
  0% { opacity: 0; transform: translate(-62%, -50%) scale(0.72) rotate(-8deg); }
  26% { opacity: 1; }
  100% { opacity: 0; transform: translate(-42%, -50%) scale(1.1) rotate(3deg); }
}

@keyframes effect-boss-greenfire {
  0% { opacity: 0; transform: translate(-50%, -42%) scale(0.72); }
  32%, 62% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1.22); }
}

.float-text {
  position: fixed;
  z-index: 2;
  min-width: 72px;
  text-align: center;
  color: #f07466;
  font: 700 24px "KaiTi", serif;
  text-shadow: 0 2px 3px #000, 0 0 12px rgba(205, 57, 46, 0.7);
  animation: float-away 900ms ease-out forwards;
}

.float-text.defense-float { color: #9cc2c2; text-shadow: 0 2px 3px #000, 0 0 12px rgba(109, 160, 160, 0.6); }
.float-text.heal-float { color: #8bd0a2; text-shadow: 0 2px 3px #000, 0 0 12px rgba(81, 151, 102, 0.6); }
.float-text.resource-float { color: #e0c777; font-size: 18px; }
.float-text.poison-float { color: #72ca82; font-size: 21px; text-shadow: 0 2px 3px #000, 0 0 14px rgba(72, 178, 89, 0.72); }
.float-text.relic-float { color: #f0d68a; font-size: 22px; letter-spacing: 0.03em; text-shadow: 0 2px 4px #000, 0 0 16px rgba(224, 188, 96, 0.9); z-index: 4; }
.float-text.crit-float { color: #ffcf6b; font-size: 30px; font-weight: 900; letter-spacing: 0.04em; text-shadow: 0 2px 4px #000, 0 0 18px rgba(255, 120, 60, 0.95), 0 0 7px rgba(255, 80, 40, 0.9); z-index: 5; }

@keyframes float-away {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.7); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -54px) scale(0.92); }
}

.turn-banner {
  position: fixed;
  z-index: 45;
  top: 44%;
  left: 50%;
  width: min(520px, 70vw);
  padding: 11px 40px 13px;
  border-top: 1px solid rgba(189, 162, 109, 0.45);
  border-bottom: 1px solid rgba(189, 162, 109, 0.45);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%) scaleX(0.3);
  background: linear-gradient(90deg, transparent, rgba(7, 12, 9, 0.95) 18%, rgba(7, 12, 9, 0.95) 82%, transparent);
}

.turn-banner.show { animation: turn-banner 850ms ease both; }
.turn-banner span { display: block; color: var(--gold); font-size: 8px; letter-spacing: 0.3em; }
.turn-banner strong { display: block; margin-top: 2px; font: 24px "KaiTi", serif; letter-spacing: 0.18em; }

@keyframes turn-banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleX(0.25); }
  18%, 70% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleX(1.08); }
}

.cast-display {
  position: absolute;
  z-index: 4;
  top: 19%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 114px;
  height: 114px;
  border: 1px solid rgba(189, 162, 109, 0.34);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.55);
  background: radial-gradient(circle, rgba(100, 43, 36, 0.8), rgba(7, 12, 9, 0.8) 62%, transparent 64%);
}

.cast-display.show { animation: cast-burst 700ms ease both; }
.cast-display span { color: var(--blood-bright); font: 700 37px "KaiTi", serif; text-shadow: 0 0 17px rgba(215, 65, 53, 0.6); }
.cast-display strong { position: absolute; top: 105px; min-width: 150px; color: var(--paper); font: 15px "KaiTi", serif; letter-spacing: 0.1em; }

@keyframes cast-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(-20deg); }
  25%, 62% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3) rotate(9deg); }
}

.card-phantom {
  position: fixed !important;
  z-index: 41 !important;
  left: var(--card-x) !important;
  top: var(--card-y) !important;
  width: var(--card-w) !important;
  height: var(--card-h) !important;
  margin: 0 !important;
  pointer-events: none !important;
  transform-origin: center !important;
  animation: card-cast-flight 260ms cubic-bezier(.18,.8,.25,1) forwards !important;
}

.card-phantom.phantom-attack,
.card-phantom.phantom-blade {
  border-color: rgba(241, 218, 164, 0.86) !important;
  box-shadow: 0 0 22px rgba(239, 216, 158, 0.32), inset 0 0 16px rgba(239, 216, 158, 0.1) !important;
}

.card-phantom.phantom-defense,
.card-phantom.phantom-armor {
  border-color: rgba(142, 216, 183, 0.86) !important;
  box-shadow: 0 0 22px rgba(118, 204, 173, 0.3), inset 0 0 16px rgba(118, 204, 173, 0.1) !important;
}

.card-phantom.phantom-poison {
  border-color: rgba(115, 220, 100, 0.86) !important;
  box-shadow: 0 0 22px rgba(78, 214, 82, 0.34), inset 0 0 16px rgba(78, 214, 82, 0.12) !important;
}

.card-phantom.phantom-blood {
  border-color: rgba(220, 73, 62, 0.9) !important;
  box-shadow: 0 0 24px rgba(197, 47, 40, 0.4), inset 0 0 18px rgba(197, 47, 40, 0.14) !important;
}

.card-phantom.phantom-utility {
  border-color: rgba(218, 174, 91, 0.86) !important;
  box-shadow: 0 0 22px rgba(210, 151, 67, 0.28), inset 0 0 16px rgba(210, 151, 67, 0.1) !important;
}

.card-phantom.phantom-yuan {
  border-color: rgba(139, 220, 160, 0.88) !important;
  box-shadow: 0 0 22px rgba(122, 216, 148, 0.28), inset 0 0 16px rgba(226, 197, 104, 0.12) !important;
}

.card-phantom.phantom-fate {
  border-color: rgba(226, 195, 105, 0.9) !important;
  box-shadow: 0 0 24px rgba(226, 195, 105, 0.3), inset 0 0 18px rgba(226, 195, 105, 0.12) !important;
}

@keyframes card-cast-flight {
  0% { opacity: 0.92; transform: translate(0, 0) rotate(0) scale(1); filter: brightness(1.08); }
  72% { opacity: 0.9; transform: translate(var(--card-dx), var(--card-dy)) rotate(-3deg) scale(1.08); }
  100% { opacity: 0; transform: translate(var(--card-dx), calc(var(--card-dy) - 12px)) rotate(2deg) scale(0.78); filter: brightness(1.45); }
}

/* V0.9.1：移动端横屏试玩版。以下只覆盖视觉表现，不参与战斗数值。 */
.card-phantom {
  --phantom-trail: rgba(226, 195, 105, 0.42);
  --phantom-core: rgba(255, 244, 198, 0.72);
  overflow: visible !important;
  animation: card-cast-flight 300ms cubic-bezier(.15,.82,.22,1) forwards !important;
}

.card-phantom::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 8%;
  top: 50%;
  width: 92%;
  height: 38%;
  border-radius: 999px;
  opacity: 0.78;
  transform: translate(-60%, -50%) rotate(-8deg);
  background: linear-gradient(90deg, transparent, var(--phantom-trail), var(--phantom-core), transparent);
  filter: blur(9px);
  animation: card-phantom-trail 300ms ease-out both;
}

.card-phantom.phantom-blade,
.card-phantom.phantom-attack {
  --phantom-trail: rgba(238, 217, 160, 0.5);
  --phantom-core: rgba(255, 239, 190, 0.82);
}

.card-phantom.phantom-blood {
  --phantom-trail: rgba(197, 47, 40, 0.56);
  --phantom-core: rgba(231, 86, 72, 0.82);
}

.card-phantom.phantom-poison {
  --phantom-trail: rgba(67, 190, 76, 0.55);
  --phantom-core: rgba(142, 238, 126, 0.78);
}

.card-phantom.phantom-armor,
.card-phantom.phantom-defense {
  --phantom-trail: rgba(114, 202, 180, 0.52);
  --phantom-core: rgba(171, 236, 211, 0.78);
}

.card-phantom.phantom-yuan {
  --phantom-trail: rgba(126, 216, 158, 0.5);
  --phantom-core: rgba(229, 205, 105, 0.76);
}

.card-phantom.phantom-fate {
  --phantom-trail: rgba(226, 195, 105, 0.58);
  --phantom-core: rgba(255, 222, 124, 0.84);
}

@keyframes card-cast-flight {
  0% {
    opacity: 0.96;
    transform: translate(0, 0) rotate(0) scale(1);
    filter: brightness(1.08) saturate(1.08);
  }
  72% {
    opacity: 0.92;
    transform: translate(var(--card-dx), var(--card-dy)) rotate(-4deg) scale(1.1);
    filter: brightness(1.22) saturate(1.14);
  }
  100% {
    opacity: 0;
    transform: translate(var(--card-dx), calc(var(--card-dy) - 10px)) rotate(3deg) scale(0.66);
    filter: brightness(1.52) saturate(1.18);
  }
}

@keyframes card-phantom-trail {
  0% { opacity: 0; transform: translate(-74%, -50%) rotate(-8deg) scaleX(0.36); }
  30%, 70% { opacity: 0.82; }
  100% { opacity: 0; transform: translate(-25%, -50%) rotate(-8deg) scaleX(1.45); }
}

.effect-moon-slash-prime {
  width: 190px;
  height: 86px;
  border-top-width: 5px;
  border-top-color: rgba(255, 234, 181, 0.96);
  box-shadow: inset 0 12px 0 rgba(255, 232, 177, 0.05);
  filter: drop-shadow(0 0 18px rgba(247, 221, 155, 0.56));
  animation: effect-slash-prime 430ms ease-out both;
}

.effect-moon-slash-prime::before {
  content: "";
  position: absolute;
  inset: 10px 18px auto;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 242, 198, 0.96), rgba(190, 65, 54, 0.48), transparent);
  filter: blur(0.4px);
}

.effect-armor-crack {
  width: 150px;
  height: 92px;
  background:
    linear-gradient(32deg, transparent 45%, rgba(226, 195, 105, 0.68) 46% 48%, transparent 49%),
    linear-gradient(108deg, transparent 38%, rgba(180, 65, 54, 0.46) 39% 41%, transparent 42%),
    linear-gradient(150deg, transparent 50%, rgba(226, 195, 105, 0.5) 51% 53%, transparent 54%);
  filter: drop-shadow(0 0 14px rgba(226, 195, 105, 0.28));
  animation: effect-armor-crack 520ms ease-out both;
}

.effect-blood-rune-prime {
  width: 150px;
  height: 150px;
  border-color: rgba(228, 72, 60, 0.76);
  box-shadow: inset 0 0 42px rgba(132, 18, 16, 0.42), 0 0 34px rgba(183, 35, 30, 0.42);
  animation: effect-blood-burst 560ms ease-out both;
}

.effect-blood-rune-overflow {
  width: 170px;
  height: 170px;
  border-color: rgba(236, 88, 75, 0.82);
  box-shadow: inset 0 0 54px rgba(132, 18, 16, 0.5), 0 0 42px rgba(183, 35, 30, 0.5);
  animation: effect-blood-burst 620ms ease-out both;
}

.effect-poison-mist-prime {
  width: 196px;
  height: 118px;
  background:
    radial-gradient(circle at 45% 52%, rgba(96, 220, 94, 0.36), rgba(34, 102, 43, 0.18) 46%, transparent 74%),
    radial-gradient(circle at 68% 42%, rgba(149, 240, 120, 0.18), transparent 36%);
  filter: blur(0.8px) drop-shadow(0 0 24px rgba(80, 190, 88, 0.34));
  animation: effect-poison-mist-prime 760ms ease-out both;
}

.effect-bug-shadow-prime {
  width: 172px;
  height: 72px;
  background:
    radial-gradient(ellipse at 12% 55%, rgba(134, 231, 126, 0.82) 0 3px, transparent 4px),
    radial-gradient(ellipse at 24% 34%, rgba(134, 231, 126, 0.68) 0 2px, transparent 3px),
    radial-gradient(ellipse at 38% 62%, rgba(134, 231, 126, 0.82) 0 3px, transparent 4px),
    radial-gradient(ellipse at 52% 28%, rgba(134, 231, 126, 0.72) 0 2px, transparent 3px),
    radial-gradient(ellipse at 66% 58%, rgba(134, 231, 126, 0.78) 0 3px, transparent 4px),
    radial-gradient(ellipse at 82% 38%, rgba(134, 231, 126, 0.62) 0 2px, transparent 3px),
    radial-gradient(ellipse at 92% 62%, rgba(134, 231, 126, 0.7) 0 2px, transparent 3px);
  filter: drop-shadow(0 0 8px rgba(78, 197, 82, 0.28));
  animation: effect-bug-swarm-prime 700ms ease-out both;
}

.effect-poison-corrosion-prime {
  width: 148px;
  height: 148px;
  box-shadow: inset 0 0 44px rgba(87, 213, 91, 0.46), 0 0 34px rgba(87, 213, 91, 0.24);
  animation: effect-corrosion-prime 760ms ease-out both;
}

.effect-poison-burst-prime {
  color: #b8f19d;
  box-shadow: 0 0 28px rgba(81, 207, 78, 0.42), inset 0 0 16px rgba(81, 207, 78, 0.16);
  animation: effect-poison-burst-prime 760ms ease-out both;
}

.effect-armor-guard {
  width: 160px;
  height: 160px;
  border-color: rgba(158, 228, 201, 0.76);
  box-shadow: inset 0 0 32px rgba(92, 152, 130, 0.3), 0 0 28px rgba(92, 152, 130, 0.28);
  animation: effect-armor-close 720ms ease-out both;
}

.armor-guard-pulse {
  animation: armor-guard-pulse 620ms ease both;
}

.effect-yuan-strong {
  width: 154px;
  height: 154px;
  border-color: rgba(159, 226, 172, 0.62);
  box-shadow: inset 0 0 30px rgba(109, 186, 131, 0.18), 0 0 26px rgba(219, 184, 91, 0.18);
  animation: effect-yuan-flow-prime 640ms ease both;
}

.effect-yuan-trigger {
  color: #dceba7;
  border-color: rgba(143, 211, 154, 0.56);
  text-shadow: 0 0 18px rgba(143, 211, 154, 0.32), 0 2px 5px #000;
  animation: effect-center-reveal 720ms ease both;
}

.effect-fate-ring-prime {
  width: 152px;
  height: 152px;
  border-color: rgba(238, 206, 112, 0.66);
  box-shadow: 0 0 34px rgba(221, 184, 83, 0.28), inset 0 0 26px rgba(221, 184, 83, 0.12);
  animation: effect-fate-ring-prime 680ms ease both;
}

.effect-fate-wheel-prime {
  color: #f1d78b;
  text-shadow: 0 0 24px rgba(226, 195, 105, 0.42), 0 2px 5px #000;
}

.effect-fate-wheel-prime::before {
  width: 170px;
  height: 170px;
  margin: -85px 0 0 -85px;
  border-color: rgba(238, 206, 112, 0.62);
  box-shadow: 0 0 42px rgba(221, 184, 83, 0.28), inset 0 0 28px rgba(221, 184, 83, 0.14);
}

.effect-fate-reward {
  top: 54%;
  min-width: min(360px, 62vw);
  padding: 8px 24px;
  color: #dceba7;
  font-size: 16px;
  letter-spacing: 0.12em;
  border-color: rgba(143, 211, 154, 0.38);
  animation: effect-center-reveal 900ms ease both;
}

.effect-utility-prime {
  box-shadow: 0 0 24px rgba(218, 184, 95, 0.18), inset 0 0 18px rgba(218, 184, 95, 0.08);
  animation: effect-center-reveal 600ms ease both;
}

.effect-card-draw-line,
.effect-card-discard-dust {
  min-width: 120px;
  padding: 5px 12px;
  border-radius: 999px;
  font: 700 13px "KaiTi", serif;
  letter-spacing: 0.14em;
  text-align: center;
}

.effect-card-draw-line {
  color: #e6cf85;
  background: linear-gradient(90deg, transparent, rgba(226, 195, 105, 0.18), transparent);
  border: 1px solid rgba(226, 195, 105, 0.34);
  animation: effect-card-draw-line 620ms ease-out both;
}

.effect-card-discard-dust {
  color: #b9ab90;
  background: radial-gradient(circle, rgba(122, 94, 64, 0.22), transparent 70%);
  border: 1px solid rgba(150, 122, 80, 0.28);
  animation: effect-card-discard-dust 620ms ease-out both;
}

.effect-blood-return {
  width: 190px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(182, 42, 36, 0.48), rgba(226, 178, 92, 0.28), transparent);
  filter: blur(0.4px) drop-shadow(0 0 18px rgba(183, 35, 30, 0.3));
  animation: effect-blood-return 720ms ease-out both;
}

.boss-phase-flash-strong {
  animation: boss-phase-flash-strong 1120ms ease both;
}

.portrait-phase-zoom .portrait-image {
  animation: portrait-phase-zoom 1020ms ease both;
}

.effect-boss-title-prime {
  font-size: 28px;
  border-color: rgba(228, 72, 60, 0.66);
  text-shadow: 0 0 28px rgba(201, 51, 42, 0.58), 0 2px 6px #000;
}

.effect-boss-subtitle {
  top: 53%;
  min-width: min(560px, 74vw);
  color: #cda399;
  font-size: 15px;
  letter-spacing: 0.12em;
  border-color: rgba(205, 70, 60, 0.28);
  animation: effect-center-reveal 1120ms ease both;
}

.effect-boss-phase-haze-strong {
  width: min(940px, 86vw);
  height: min(520px, 66vh);
  background:
    radial-gradient(circle at 68% 50%, rgba(166, 34, 29, 0.28), transparent 34%),
    radial-gradient(circle at 42% 52%, rgba(92, 13, 12, 0.24), transparent 46%),
    repeating-radial-gradient(circle at 68% 50%, rgba(183, 43, 37, 0.14) 0 2px, transparent 3px 16px);
  filter: blur(1.2px);
}

.effect-boss-claw-prime {
  width: 190px;
  height: 126px;
  filter: drop-shadow(0 0 20px rgba(197, 47, 40, 0.48));
}

.effect-boss-greenfire-prime {
  width: 210px;
  height: 144px;
  background:
    radial-gradient(circle at 44% 52%, rgba(89, 209, 96, 0.42), transparent 34%),
    radial-gradient(circle at 58% 35%, rgba(143, 45, 38, 0.3), transparent 42%),
    radial-gradient(circle, rgba(39, 92, 45, 0.22), transparent 70%);
  filter: blur(0.6px) drop-shadow(0 0 24px rgba(78, 197, 82, 0.3));
}

.effect-boss-charge-mist {
  box-shadow: 0 0 34px rgba(204, 54, 46, 0.18);
}

.effect-boss-poison-suppression {
  min-width: 94px;
  padding: 7px 14px;
  border: 1px solid rgba(204, 54, 46, 0.54);
  border-radius: 999px;
  color: #d9887c;
  font: 700 16px "KaiTi", serif;
  text-align: center;
  background:
    repeating-radial-gradient(circle, rgba(194, 54, 46, 0.2) 0 2px, transparent 3px 12px),
    rgba(40, 9, 8, 0.68);
  box-shadow: 0 0 24px rgba(190, 42, 36, 0.32);
  animation: effect-boss-poison-suppression 760ms ease-out both;
}

.float-text {
  z-index: 3;
  animation: float-away 980ms ease-out forwards;
}

.float-text.blood-float {
  color: #d95b4f;
  text-shadow: 0 2px 3px #000, 0 0 16px rgba(205, 57, 46, 0.82);
}

.float-text.yuan-float {
  color: #dceba7;
  text-shadow: 0 2px 3px #000, 0 0 14px rgba(122, 216, 148, 0.64);
}

.float-text.fate-float {
  color: #efd386;
  text-shadow: 0 2px 3px #000, 0 0 16px rgba(226, 195, 105, 0.72);
}

@keyframes effect-slash-prime {
  0% { opacity: 0; transform: translate(-68%, -62%) rotate(-30deg) scaleX(0.28); }
  26% { opacity: 1; }
  100% { opacity: 0; transform: translate(-26%, -42%) rotate(-16deg) scaleX(1.35); }
}

@keyframes effect-armor-crack {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.72) rotate(-8deg); }
  22%, 62% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18) rotate(5deg); }
}

@keyframes effect-blood-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.34) rotate(-18deg); }
  24%, 58% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.42) rotate(16deg); }
}

@keyframes effect-poison-mist-prime {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(0.62); }
  30%, 64% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1.38); }
}

@keyframes effect-bug-swarm-prime {
  0% { opacity: 0; transform: translate(-68%, -44%) scale(0.78); }
  32%, 68% { opacity: 1; }
  100% { opacity: 0; transform: translate(-25%, -62%) scale(1.08); }
}

@keyframes effect-corrosion-prime {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.58); filter: hue-rotate(0deg); }
  32%, 62% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.24); filter: hue-rotate(34deg); }
}

@keyframes effect-poison-burst-prime {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.48); }
  18%, 64% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -86%) scale(1.12); }
}

@keyframes effect-armor-close {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.56) rotate(-18deg); clip-path: inset(100% 0 0 0); }
  38% { opacity: 1; clip-path: inset(28% 0 0 0); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1.08) rotate(8deg); clip-path: inset(0 0 0 0); }
}

@keyframes armor-guard-pulse {
  0%, 100% { filter: none; transform: scale(1); }
  42% { filter: drop-shadow(0 0 14px rgba(139, 202, 176, 0.5)); transform: scale(1.08); }
}

@keyframes effect-yuan-flow-prime {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) rotate(-34deg); }
  30%, 62% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.22) rotate(54deg); }
}

@keyframes effect-fate-ring-prime {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.48) rotate(-88deg); }
  30%, 70% { opacity: 0.96; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.26) rotate(118deg); }
}

@keyframes effect-card-draw-line {
  0% { opacity: 0; transform: translate(-50%, 18px) scaleX(0.45); }
  28%, 62% { opacity: 1; transform: translate(-50%, 0) scaleX(1); }
  100% { opacity: 0; transform: translate(-50%, -28px) scaleX(1.08); }
}

@keyframes effect-card-discard-dust {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.8); filter: blur(0); }
  30%, 60% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 20px) scale(1.18); filter: blur(1.4px); }
}

@keyframes effect-blood-return {
  0% { opacity: 0; transform: translate(30%, -50%) scaleX(0.3); }
  28%, 68% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleX(1.08); }
}

@keyframes boss-phase-flash-strong {
  0%, 100% {
    border-color: rgba(217, 62, 49, 0.72);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.72), 0 0 22px rgba(151, 31, 26, 0.18), inset 0 0 42px rgba(150, 28, 24, 0.16);
  }
  18%, 54% {
    border-color: rgba(255, 112, 88, 0.98);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.82), 0 0 44px rgba(212, 54, 43, 0.42), inset 0 0 66px rgba(167, 31, 27, 0.34);
  }
  36% {
    border-color: rgba(120, 24, 20, 0.96);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.78), 0 0 30px rgba(120, 24, 20, 0.38), inset 0 0 58px rgba(120, 24, 20, 0.3);
  }
}

@keyframes portrait-phase-zoom {
  0% { opacity: 0.12; filter: brightness(0.32) saturate(0.7); transform: scale(1.04); }
  42% { opacity: 0.9; filter: brightness(0.94) saturate(1.36) drop-shadow(0 0 24px rgba(211, 47, 38, 0.42)); }
  100% { opacity: 1; filter: drop-shadow(0 0 20px rgba(213, 55, 45, 0.38)) saturate(1.08); transform: scale(1); }
}

@keyframes effect-boss-poison-suppression {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.25) rotate(-8deg); }
  24%, 62% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.72) rotate(12deg); }
}

/* 鍗＄墝绫诲埆浣跨敤棰滆壊銆佺汗鏍蜂笌鏂囧瓧涓夐噸鍖哄垎锛屼笉鍙緷璧栬壊瑙夈€?*/
.card.category-attack { border-left: 3px solid rgba(190, 65, 54, 0.72); }
.card.category-defense { border-left: 3px solid rgba(117, 157, 164, 0.72); }
.card.category-utility { border-left: 3px solid rgba(106, 151, 91, 0.72); }
.card.category-attack .card-type { color: #e6a198; background: rgba(139, 41, 34, 0.16); }
.card.category-defense .card-type { color: #acd0d0; background: rgba(61, 105, 111, 0.16); }
.card.category-utility .card-type { color: #aad09c; background: rgba(63, 109, 56, 0.16); }
.card.fate .card-type { color: #e4c779; border-color: rgba(201, 167, 91, 0.35); }
.card.blood .card-type { color: #f08d80; border-color: rgba(203, 57, 50, 0.35); }
.card.poison .card-type { color: #98d68d; border-color: rgba(95, 174, 111, 0.35); }
.card.lifespan .card-type { color: #e2d4a6; border-color: rgba(203, 189, 146, 0.38); }

/* ===== 绗簩鐗堬細鐐艰泭涓夐€変竴 ===== */

.result-card {
  width: min(760px, 95vw);
}

.result-card.map-result {
  width: min(880px, 95vw);
  max-height: calc(100vh - 38px); /* 老内核 dvh 兜底 */
  max-height: calc(100dvh - 38px);
  overflow-x: hidden;
  overflow-y: auto;
}

.refine-panel {
  margin: 5px 0 18px;
}

.card-reward-panel,
.material-reward-panel {
  margin: 5px 0 16px;
}

.card-reward-choices,
.material-reward-choices,
.furnace-material-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.result-card .reward-card,
.material-choice {
  position: relative;
  min-width: 0;
  min-height: 157px;
  padding: 13px 12px 11px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.27);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  background: linear-gradient(150deg, rgba(24, 36, 28, 0.97), rgba(8, 12, 9, 0.99));
  transition: 160ms ease;
}

.material-choice {
  min-height: 134px;
}

.result-card .reward-card:hover:not(:disabled),
.material-choice:hover:not(:disabled) {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
}

.result-card .reward-card:disabled { cursor: default; opacity: 0.52; }
.material-choice:disabled { cursor: default; opacity: 0.45; }
.result-card .reward-card.selected,
.material-choice.selected { border-color: rgba(108, 177, 131, 0.68); opacity: 1; background: linear-gradient(150deg, rgba(39, 72, 50, 0.92), rgba(9, 18, 12, 0.99)); }
.reward-card-glyph { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border: 1px solid rgba(189, 162, 109, 0.3); border-radius: 50%; color: var(--gold); font: 20px "KaiTi", serif; }
.reward-card strong { display: block; font: 17px "KaiTi", serif; letter-spacing: 0.06em; }
.reward-card small { display: inline-block; margin: 3px 0 8px; padding: 2px 5px; border: 1px solid rgba(189, 162, 109, 0.13); color: #af9f7e; font-size: 8px; }
.reward-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }

.event-panel,
.shop-panel {
  margin: 6px 0 16px;
  text-align: left;
}

/* V0.9.9.2 蛊坊右上角常驻叉号：滚动卡住时也能随时离开蛊坊 */
.shop-close-button {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 30;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 164, 96, 0.5);
  border-radius: 50%;
  background: rgba(20, 16, 12, 0.92);
  color: #e0c777;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.shop-close-button:hover { filter: brightness(1.2); transform: scale(1.08); }
.shop-close-button.hidden { display: none; }

.event-story {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(189, 162, 109, 0.15);
  color: #c5bea6;
  line-height: 1.6;
  white-space: pre-line; /* V0.9.18：司命人开场白与英雄专属台词以 \n 分行；现有事件文案无换行不受影响 */
  background: rgba(255, 255, 255, 0.02);
}

.event-choices,
.shop-card-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.event-choice,
.shop-actions button {
  min-width: 0;
  min-height: 102px;
  padding: 12px;
  border: 1px solid rgba(189, 162, 109, 0.22);
  color: var(--paper);
  cursor: pointer;
  text-align: left;
  background: linear-gradient(145deg, rgba(23, 35, 28, 0.94), rgba(8, 12, 9, 0.99));
  transition: 160ms ease;
}

.event-choice:hover:not(:disabled),
.shop-actions button:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.event-choice:disabled,
.shop-actions button:disabled {
  cursor: default;
  opacity: 0.48;
}

.event-choice strong,
.shop-actions strong {
  display: block;
  margin-bottom: 7px;
  font: 18px "KaiTi", serif;
  color: var(--gold);
}

.event-choice small,
.shop-actions small {
  display: block;
  color: #b8b09a;
  font-size: 12px;
  line-height: 1.5;
}

.event-choice em,
.shop-actions em,
.shop-buy-state {
  display: inline-block;
  margin: 0 0 7px;
  padding: 2px 7px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  color: #bda26d;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.2);
}

.event-choice.risk {
  border-color: rgba(173, 60, 50, 0.46);
  background: linear-gradient(145deg, rgba(54, 18, 18, 0.82), rgba(8, 12, 9, 0.99));
}

.event-choice.risk em {
  border-color: rgba(173, 60, 50, 0.38);
  color: #d68174;
}

.event-choice.steady {
  border-color: rgba(108, 177, 131, 0.34);
}

.event-choice.steady em {
  border-color: rgba(108, 177, 131, 0.28);
  color: #9ac9a6;
}

.event-choice.safe em {
  color: #c0ad7e;
}

.event-result {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(108, 177, 131, 0.32);
  color: #b8d0bb;
  background: rgba(48, 99, 64, 0.12);
  line-height: 1.55;
}

.shop-stone-line {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
}

.shop-stone-line strong {
  color: var(--gold);
  font: 18px "KaiTi", serif;
}

.shop-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.shop-overview span {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(189, 162, 109, 0.14);
  background: rgba(255, 255, 255, 0.018);
}

.shop-overview em {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.shop-overview strong {
  display: block;
  margin-top: 2px;
  color: var(--paper);
  font: 14px "KaiTi", serif;
}

.shop-group-title {
  grid-column: 1 / -1;
  margin: 2px 0 -2px;
  color: var(--gold);
  font: 16px "KaiTi", serif;
  letter-spacing: 0.14em;
}

.shop-card-choices .reward-card {
  min-height: 152px;
}

.shop-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.shop-remove-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  background: rgba(0, 0, 0, 0.2);
}

.shop-remove-panel > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.shop-remove-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  max-height: min(48vh, 360px);
  overflow: auto;
  padding-right: 3px;
}

.shop-remove-choices .deck-list-card {
  cursor: pointer;
}

.shop-remove-confirm {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(173, 60, 50, 0.34);
  background: rgba(65, 18, 17, 0.18);
}

.shop-remove-confirm strong {
  display: block;
  color: #d9b27c;
  font: 17px "KaiTi", serif;
}

.shop-remove-confirm p {
  margin: 6px 0 10px;
  color: #bdb39a;
  font-size: 12px;
  line-height: 1.5;
}

.shop-remove-confirm-actions,
.elite-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  min-width: 0;
}

.shop-remove-confirm-actions button,
.elite-confirm-actions button {
  min-width: 110px;
  padding: 8px 14px;
  border: 1px solid rgba(189, 162, 109, 0.35);
  color: var(--paper);
  cursor: pointer;
  background: linear-gradient(145deg, rgba(62, 42, 20, 0.82), rgba(8, 11, 9, 0.98));
}

.elite-confirm-panel {
  margin: 8px auto 16px;
  max-width: 500px;
  padding: 14px;
  border: 1px solid rgba(173, 60, 50, 0.42);
  text-align: center;
  background: radial-gradient(circle at top, rgba(125, 30, 29, 0.18), transparent 58%), rgba(0, 0, 0, 0.2);
}

.elite-confirm-panel p {
  margin: 0 0 12px;
  color: #c8bda2;
}

.material-glyph {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  border: 1px solid rgba(189, 162, 109, 0.3);
  border-radius: 50%;
  color: var(--gold);
  font: 20px "KaiTi", serif;
}

.material-choice strong { display: block; font: 18px "KaiTi", serif; letter-spacing: 0.08em; }
.material-choice small { display: block; margin: 5px 0 7px; color: #af9f7e; font-size: 9px; line-height: 1.35; }
.material-choice p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.material-blood { border-color: rgba(191, 64, 54, 0.36); }
.material-jade { border-color: rgba(110, 174, 139, 0.36); }
.material-poison { border-color: rgba(99, 177, 88, 0.36); }
.material-gold { border-color: rgba(202, 171, 91, 0.4); }
.material-soul { border-color: rgba(154, 102, 176, 0.4); }

.result-card .reward-skip {
  min-width: 110px;
  margin-top: 10px;
  padding: 7px 15px;
  color: var(--muted);
  background: transparent;
}

.run-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px auto 18px;
  max-width: 520px;
  text-align: left;
}

.run-summary-item {
  padding: 9px 11px;
  border: 1px solid rgba(189, 162, 109, 0.15);
  background: rgba(255, 255, 255, 0.018);
}

.run-summary-item.wide { grid-column: 1 / -1; }
.run-summary-item span { display: block; color: var(--muted); font-size: 9px; letter-spacing: 0.1em; }
.run-summary-item strong { display: block; margin-top: 3px; color: var(--paper); font: 15px "KaiTi", serif; line-height: 1.45; }
.run-summary-item.feedback-line strong { color: #bda26d; font-size: 13px; }

.refine-heading span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.refine-heading h3 {
  margin: 3px 0 10px;
  color: var(--gold);
  font: 22px "KaiTi", serif;
  letter-spacing: 0.16em;
}

.refine-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.result-card .refine-choice {
  position: relative;
  min-height: 126px;
  padding: 12px;
  border: 1px solid rgba(189, 162, 109, 0.22);
  color: var(--paper);
  cursor: pointer;
  background: linear-gradient(145deg, rgba(25, 35, 28, 0.94), rgba(9, 13, 10, 0.98));
  transition: 160ms ease;
}

.result-card .refine-choice:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.result-card .refine-choice > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  margin: 0 auto 7px;
  border: 1px solid rgba(204, 91, 76, 0.5);
  border-radius: 50%;
  color: #df776a;
  font: 19px "KaiTi", serif;
}

.refine-choice strong { display: block; font: 16px "KaiTi", serif; letter-spacing: 0.08em; }
.refine-choice small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.55; }

.refinement-complete {
  grid-column: 1 / -1;
  max-width: 300px;
  margin: 0 auto;
  padding: 13px 25px;
  border: 1px solid rgba(115, 176, 136, 0.35);
  color: var(--paper);
  background: linear-gradient(145deg, rgba(37, 61, 45, 0.5), rgba(9, 16, 11, 0.92));
}

.refinement-complete > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  margin: 0 auto 5px;
  border: 1px solid rgba(115, 176, 136, 0.5);
  border-radius: 50%;
  color: var(--jade-bright);
  font: 20px "KaiTi", serif;
}

.refinement-complete strong { display: block; font: 17px "KaiTi", serif; }
.refinement-complete small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.result-secondary {
  min-width: 120px !important;
  margin-left: 8px;
  color: var(--muted) !important;
  background: transparent !important;
}

.feedback-copy-fallback {
  width: 100%;
  min-height: 120px;
  max-height: 26vh;
  margin: 10px 0;
  padding: 10px;
  overflow: auto;
  resize: vertical;
  border: 1px solid rgba(189, 162, 109, 0.28);
  color: #d6c89f;
  font: 12px/1.6 "Microsoft YaHei", sans-serif;
  background: rgba(0, 0, 0, 0.32);
}

.result-card.refining .result-stats { display: none; }
.result-card.refining > p:nth-of-type(2) { margin-bottom: 10px; }

/* ===== V0.6锛氳泭鍥娿€佹潗鏂欎笌铔婄倝寮傚彉 ===== */

.deck-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background: rgba(2, 4, 3, 0.72);
  backdrop-filter: blur(7px);
}

.deck-card {
  position: relative;
  width: min(980px, 96vw);
  max-height: calc(100vh - 34px); /* 老内核 dvh 兜底 */
  max-height: calc(100dvh - 34px);
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(189, 162, 109, 0.5);
  background:
    radial-gradient(circle at 16% 0, rgba(133, 64, 30, 0.24), transparent 34%),
    linear-gradient(145deg, rgba(17, 24, 19, 0.98), rgba(5, 8, 6, 0.99));
  box-shadow: 0 28px 80px #000, inset 0 0 0 6px rgba(189, 162, 109, 0.035);
}

.balance-overlay,
.stats-overlay,
.trial-settings-overlay,
.settings-overlay {
  position: fixed;
  z-index: 114;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background: rgba(2, 4, 3, 0.76);
  backdrop-filter: blur(7px);
}

.balance-card,
.stats-card,
.trial-settings-card,
.settings-card {
  position: relative;
  width: min(920px, 96vw);
  max-height: calc(100vh - 34px); /* 老内核 dvh 兜底 */
  max-height: calc(100dvh - 34px);
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(189, 162, 109, 0.42);
  background:
    radial-gradient(circle at 18% 0, rgba(117, 65, 28, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(16, 22, 18, 0.98), rgba(5, 8, 6, 0.99));
  box-shadow: 0 28px 80px #000, inset 0 0 0 6px rgba(189, 162, 109, 0.03);
}

.balance-intro {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.settings-intro,
.settings-version {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.trial-mode-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

/* V0.9.8.3 挑战模式选择卡（普通/精英） */
.mode-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 4px;
}
.mode-choice {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(170, 120, 90, 0.28);
  border-radius: 8px;
  color: #c4b59a;
  cursor: pointer;
  text-align: left;
  background: rgba(18, 12, 9, 0.7);
  transition: border-color 0.15s, background 0.15s;
}
.mode-choice strong { display: block; color: #e7c98f; font: 17px "KaiTi", serif; }
.mode-choice small { display: block; margin-top: 5px; color: #9a8f7e; line-height: 1.5; }
.mode-choice.selected { border-color: rgba(214, 170, 92, 0.66); background: rgba(40, 24, 14, 0.78); box-shadow: inset 0 0 0 1px rgba(214, 170, 92, 0.3); }
.mode-choice.is-locked { opacity: 0.55; cursor: not-allowed; }
.mode-choice.is-locked strong { color: #9a8f7e; }
/* V0.9.9 子批6：死劫模式卡——血金凶相；选中时更烈。 */
.mode-choice[data-run-mode="deathtrial"]:not(.is-locked) { border-color: rgba(180, 60, 48, 0.6); }
.mode-choice[data-run-mode="deathtrial"]:not(.is-locked) strong { color: #e9b96b; }
.mode-choice[data-run-mode="deathtrial"].selected { border-color: rgba(220, 90, 70, 0.85); background: rgba(48, 18, 14, 0.82); box-shadow: inset 0 0 0 1px rgba(233, 185, 107, 0.45), 0 0 18px rgba(180, 50, 40, 0.25); }
/* V0.9.9 子批6：死劫通关结算·金身——暗金光晕 + 金边。 */
.result-card.deathtrial-cleared {
  border-color: rgba(233, 185, 107, 0.7);
  box-shadow: 0 0 32px rgba(214, 170, 92, 0.32), inset 0 0 0 1px rgba(233, 185, 107, 0.5);
  background-image: radial-gradient(circle at 50% 0%, rgba(214, 170, 92, 0.14), transparent 60%);
}
.result-card.deathtrial-cleared .result-seal { color: #f0cd80; border-color: rgba(233, 185, 107, 0.7); box-shadow: 0 0 18px rgba(214, 170, 92, 0.4); }

/* ===== V0.9.19 十重天批1：模式卡（紫金天色）+ 重数步进条 ===== */
.mode-choice[data-run-mode="tian"]:not(.is-locked) { border-color: rgba(140, 110, 200, 0.55); }
.mode-choice[data-run-mode="tian"]:not(.is-locked) strong { color: #cdb9f0; }
.mode-choice[data-run-mode="tian"].selected { border-color: rgba(170, 135, 235, 0.85); background: rgba(30, 20, 46, 0.82); box-shadow: inset 0 0 0 1px rgba(205, 185, 240, 0.4), 0 0 18px rgba(120, 90, 200, 0.25); }
.tian-stepper {
  grid-column: 1 / -1; /* 模式行为 2 列网格，步进条独占整行 */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(140, 110, 200, 0.4);
  border-radius: 8px;
  background: rgba(24, 16, 38, 0.72);
}
.tian-stepper button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(170, 135, 235, 0.5);
  border-radius: 6px;
  color: #cdb9f0;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  background: rgba(40, 28, 64, 0.8);
}
.tian-stepper button:disabled { opacity: 0.35; cursor: default; }
.tian-stepper b { color: #e3d6fb; font: 16px "KaiTi", serif; letter-spacing: 0.08em; }
.tian-stepper i { color: #9a8fb8; font-style: normal; font-size: 12px; }
.tian-stepper .tian-mods {
  flex-basis: 100%;
  margin: 4px 0 0;
  color: #b0a3cd;
  font-size: 11px;
  line-height: 1.7;
}

.trial-mode-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(114, 165, 135, 0.24);
  color: #b7c4ac;
  cursor: pointer;
  text-align: left;
  background: rgba(10, 18, 13, 0.68);
}

.trial-mode-card strong,
.trial-mode-card span,
.trial-mode-card small {
  display: block;
}

.trial-mode-card strong {
  color: #e0cf9a;
  font: 18px "KaiTi", serif;
}

.trial-mode-card span {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.trial-mode-card small {
  margin-top: 8px;
  color: #837f70;
  font-size: 11px;
}

.trial-mode-card.selected {
  border-color: rgba(205, 173, 96, 0.72);
  box-shadow: 0 0 18px rgba(189, 162, 109, 0.14), inset 0 0 20px rgba(189, 162, 109, 0.06);
}

.seed-setting-row,
.settings-volume {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #b9b297;
  font-size: 12px;
}

.seed-setting-row input,
.settings-volume input {
  min-width: 0;
}

.seed-setting-row input {
  padding: 8px 10px;
  border: 1px solid rgba(189, 162, 109, 0.25);
  color: #e5d8ab;
  background: rgba(0, 0, 0, 0.28);
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-list button,
.settings-actions button {
  padding: 9px 12px;
  border: 1px solid rgba(189, 162, 109, 0.28);
  color: #d7c58f;
  cursor: pointer;
  background: rgba(9, 15, 11, 0.64);
}

.settings-session-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  background: rgba(189, 162, 109, 0.035);
}

.settings-session-actions button {
  min-height: 38px;
  color: #ead7a2;
}

.settings-session-actions button:first-child {
  border-color: rgba(111, 152, 119, 0.42);
}

.settings-session-actions button:last-child {
  border-color: rgba(168, 62, 52, 0.42);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
}

.stats-intro {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.balance-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.balance-summary section,
.run-stats-summary section {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(189, 162, 109, 0.14);
  background: rgba(255, 255, 255, 0.016);
}

.balance-summary h3,
.run-stats-summary h3 {
  margin: 0 0 6px;
  color: var(--gold);
  font: 15px "KaiTi", serif;
}

.balance-summary p,
.run-stats-summary p {
  margin: 0;
  color: #b2aa93;
  font-size: 11px;
  line-height: 1.65;
}

.balance-summary pre {
  min-width: 0;
  margin: 0;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid rgba(189, 162, 109, 0.14);
  color: #b2aa93;
  font: 11px/1.65 "Microsoft YaHei", sans-serif;
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.016);
}

.run-stats-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.run-stats-summary .wide {
  grid-column: 1 / -1;
}

.stats-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stats-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(189, 162, 109, 0.08);
  color: #b2aa93;
  font-size: 11px;
  line-height: 1.45;
}

.stats-list strong {
  color: #d8c895;
  font-weight: 600;
  text-align: right;
}

.balance-actions,
.stats-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
  text-align: right;
}

.deck-stats-button {
  position: absolute;
  top: 52px;
  right: 112px;
  padding: 6px 10px;
  border: 1px solid rgba(114, 165, 135, 0.35);
  color: #9fceb0;
  font-size: 11px;
  background: rgba(19, 39, 28, 0.62);
}

.recording-mode #balanceOpenButton,
.recording-mode .balance-guide-button,
body:not(.trial-mode-balance) #balanceOpenButton,
.recording-mode .settings-reset-action,
.recording-mode #tutorialResetButton,
.recording-mode #loreResetButton {
  display: none !important;
}

.deck-close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(189, 162, 109, 0.28);
  color: var(--muted);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
}

.deck-eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.deck-card h2 {
  margin: 0 0 14px;
  font: 28px "KaiTi", serif;
  letter-spacing: 0.15em;
}

.deck-summary,
.deck-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.deck-summary span,
.deck-stats span {
  padding: 6px 9px;
  border: 1px solid rgba(189, 162, 109, 0.14);
  color: #bfb295;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.deck-materials,
.deck-relics,
.deck-marks {
  margin: 2px 0 10px;
  padding: 8px;
  border: 1px solid rgba(189, 162, 109, 0.12);
  background: rgba(255, 255, 255, 0.014);
}

.deck-materials h3,
.deck-relics h3,
.deck-marks h3 {
  margin: 0 0 6px;
  color: var(--gold);
  font: 15px "KaiTi", serif;
  letter-spacing: 0.12em;
}

.deck-materials > div,
.deck-relics > div,
.deck-marks > div,
.furnace-material-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 76px;
  overflow-x: hidden;
  overflow-y: auto;
}

.deck-relics > div {
  max-height: 92px;
}

.deck-marks > div {
  max-height: 72px;
}

.material-chip {
  display: inline-flex;
  flex: 1 1 150px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 138px;
  max-width: 190px;
  padding: 5px 7px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  color: #cdbd93;
  font-size: 9px;
  background: rgba(15, 20, 15, 0.7);
}

.material-chip span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.relic-chip {
  display: inline-flex;
  flex: 1 1 190px;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
  max-width: 260px;
  padding: 7px 9px;
  border: 1px solid rgba(189, 162, 109, 0.18);
  color: #d4c39a;
  font-size: 10px;
  background: linear-gradient(145deg, rgba(21, 26, 18, 0.82), rgba(7, 10, 8, 0.92));
}

.relic-chip span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.relic-chip b {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(189, 162, 109, 0.3);
  border-radius: 50%;
  color: var(--gold);
  font: 14px "KaiTi", serif;
}

.relic-chip strong { color: var(--paper); font: 14px "KaiTi", serif; }
.relic-chip em { margin-left: auto; color: #8f8772; font-size: 9px; font-style: normal; }
.relic-chip small { color: var(--muted); line-height: 1.45; }

.curse-chip {
  display: inline-flex;
  flex: 1 1 190px;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
  max-width: 260px;
  padding: 7px 9px;
  border: 1px solid rgba(150, 63, 56, 0.2);
  color: #d2a19a;
  font-size: 10px;
  background: linear-gradient(145deg, rgba(28, 17, 15, 0.78), rgba(7, 10, 8, 0.92));
}

.curse-chip.empty {
  color: #827c6e;
  border-color: rgba(189, 162, 109, 0.12);
}

.curse-chip strong { color: #d9b1aa; font: 13px "KaiTi", serif; }
.curse-chip small { color: #918a78; line-height: 1.45; }
.relic-blood { border-color: rgba(191, 64, 54, 0.34); }
.relic-poison { border-color: rgba(99, 177, 88, 0.34); }
.relic-jade { border-color: rgba(110, 174, 139, 0.34); }
.relic-soul { border-color: rgba(154, 102, 176, 0.34); }

.material-chip b {
  color: var(--gold);
  font-family: "KaiTi", serif;
}

.material-chip strong {
  color: var(--paper);
}

.material-chip small {
  color: var(--muted);
}

.material-chip em {
  display: block;
  color: #897d66;
  font-size: 8px;
  font-style: normal;
  line-height: 1.25;
}

.material-chip.empty {
  opacity: 0.45;
  filter: grayscale(0.5);
}

.deck-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.deck-list-card,
.furnace-choice,
.furnace-compare {
  position: relative;
  min-width: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.18);
  color: var(--paper);
  text-align: left;
  background: linear-gradient(150deg, rgba(18, 27, 21, 0.96), rgba(6, 10, 7, 0.98));
}

.deck-list-card.upgraded,
.furnace-choice.upgraded,
.furnace-compare.upgraded {
  border-color: rgba(222, 174, 85, 0.64);
  box-shadow: inset 0 0 22px rgba(202, 105, 39, 0.08), 0 0 20px rgba(202, 105, 39, 0.08);
}

.deck-list-card.upgrade-2,
.furnace-choice.upgrade-2,
.furnace-compare.upgrade-2 {
  border-color: rgba(239, 198, 101, 0.82);
  box-shadow: inset 0 0 28px rgba(206, 126, 35, 0.13), 0 0 26px rgba(222, 154, 52, 0.14);
}

.deck-list-card strong,
.furnace-choice strong,
.furnace-compare strong {
  display: block;
  padding-right: 72px;
  font: 17px "KaiTi", serif;
}

.deck-list-card small,
.furnace-choice small,
.furnace-compare small {
  display: inline-block;
  margin: 5px 0 8px;
  padding: 2px 6px;
  border: 1px solid rgba(189, 162, 109, 0.14);
  color: #ad9d7d;
  font-size: 8px;
}

.deck-list-card p,
.furnace-choice p,
.furnace-compare p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.deck-list-card {
  padding: 10px;
}

.deck-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.deck-list-card .deck-card-name {
  min-width: 0;
  padding-right: 0;
  color: #ead7a2;
  font: 17px/1.2 "KaiTi", serif;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.deck-primary-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(222, 174, 85, 0.32);
  color: #c6a966;
  font-size: 9px;
  line-height: 1;
  background: rgba(54, 36, 14, 0.42);
}

.deck-primary-badge.badge-unrefined {
  border-color: rgba(189, 162, 109, 0.22);
  color: #9d8a66;
  background: rgba(43, 31, 17, 0.28);
}

.deck-primary-badge.badge-upgrade {
  border-color: rgba(231, 183, 86, 0.62);
  color: #f0cd79;
  background: rgba(105, 61, 16, 0.5);
  box-shadow: 0 0 14px rgba(214, 134, 41, 0.12);
}

.deck-primary-badge.badge-mutated {
  border-color: rgba(220, 105, 64, 0.58);
  color: #eca06f;
  background: rgba(87, 32, 23, 0.5);
}

.deck-primary-badge.badge-damaged {
  border-color: rgba(171, 72, 65, 0.58);
  color: #d58b80;
  background: rgba(67, 25, 22, 0.52);
}

.deck-primary-badge.badge-skewed {
  border-color: rgba(198, 137, 80, 0.58);
  color: #ddb574;
  background: linear-gradient(135deg, rgba(78, 25, 29, 0.55), rgba(72, 46, 16, 0.48));
}

.deck-card-meta,
.deck-card-submeta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-card-meta {
  margin-bottom: 3px;
  color: #b9ab8b;
  font-size: 10px;
}

.deck-card-submeta {
  margin-bottom: 7px;
  color: #776e5d;
  font-size: 8px;
}

.deck-list-card .deck-card-effect {
  color: #afa48b;
  font-size: 10px;
  line-height: 1.48;
}

.deck-list-card .deck-card-effect small {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  color: #907f68;
  font-size: 9px;
}

.upgrade-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 3px 6px;
  border: 1px solid rgba(222, 174, 85, 0.5);
  color: #e5c06b;
  font-size: 9px;
  background: rgba(89, 45, 13, 0.38);
}

.card-upgrade-badge {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(222, 174, 85, 0.66);
  border-radius: 999px;
  color: #f0cc76;
  font: 700 10px Georgia, serif;
  line-height: 1;
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(122, 66, 20, 0.78), rgba(47, 24, 9, 0.82));
  box-shadow: 0 0 10px rgba(214, 146, 46, 0.16), inset 0 0 8px rgba(255, 217, 122, 0.08);
}

.card-state-badges {
  position: relative;
  z-index: 4;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.card-state-badges i,
.deck-state-badges i {
  display: inline-flex;
  padding: 2px 5px;
  border: 1px solid rgba(189, 162, 109, 0.24);
  color: #d7bd7a;
  font-size: 8px;
  font-style: normal;
  line-height: 1;
  background: rgba(42, 24, 9, 0.72);
}

.deck-state-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: -2px 0 7px;
}

.card.is-mutated,
.deck-list-card.is-mutated,
.furnace-choice.is-mutated {
  border-color: rgba(213, 115, 69, 0.58);
  box-shadow: 0 0 24px rgba(191, 77, 44, 0.12), inset 0 0 18px rgba(191, 77, 44, 0.08);
}

.card.is-damaged,
.deck-list-card.is-damaged,
.furnace-choice.is-damaged {
  border-style: dashed;
  filter: saturate(0.9);
}

.card.is-skewed,
.deck-list-card.is-skewed,
.furnace-choice.is-skewed {
  box-shadow: 0 0 24px rgba(129, 67, 161, 0.12), inset 0 0 16px rgba(129, 67, 161, 0.08);
}

.card-cost.discounted {
  color: #9ee5b0;
  border-color: rgba(120, 210, 145, 0.5);
  box-shadow: 0 0 14px rgba(96, 190, 122, 0.22);
}

.card.upgraded-card {
  border-color: rgba(222, 174, 85, 0.5);
  box-shadow: 0 0 24px rgba(214, 123, 41, 0.12), inset 0 0 16px rgba(214, 123, 41, 0.07);
}

.card.upgraded-card::after {
  border-color: rgba(231, 183, 86, 0.24);
  background:
    linear-gradient(135deg, rgba(231, 183, 86, 0.06), transparent 34%),
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(231, 183, 86, 0.035) 11px 12px);
}

.card.upgraded-card.upgrade-2,
.card.upgraded-card.upgrade-3 {
  border-color: rgba(240, 199, 103, 0.76);
  box-shadow: 0 0 30px rgba(225, 150, 49, 0.18), inset 0 0 22px rgba(225, 150, 49, 0.1);
}

.furnace-panel {
  margin: 5px 0 16px;
}

.furnace-material-list {
  justify-content: center;
  margin-bottom: 10px;
}

.furnace-material-choices {
  margin-bottom: 10px;
}

.furnace-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: min(300px, 34vh); /* 老内核 dvh 兜底 */
  max-height: min(300px, 34dvh);
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
}

.furnace-choice {
  min-height: 145px;
  cursor: pointer;
  transition: 160ms ease;
}

.furnace-active {
  background:
    radial-gradient(circle at 50% 18%, rgba(201, 94, 31, 0.28), transparent 38%),
    repeating-radial-gradient(circle at 50% 24%, rgba(231, 163, 67, 0.07) 0 2px, transparent 3px 14px),
    linear-gradient(145deg, #111813, #080b09) !important;
}

.furnace-active .furnace-choice {
  animation: furnace-choice-breathe 1.55s ease-in-out infinite alternate;
}

.furnace-choice:hover:not(:disabled) {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.furnace-confirm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.furnace-route-summary {
  grid-column: 1 / -1;
  padding: 11px;
  border: 1px solid rgba(189, 162, 109, 0.16);
  text-align: left;
  background: rgba(255, 255, 255, 0.018);
}

.route-probability {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
}

.route-probability strong {
  color: #d8c48d;
  font-weight: 500;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.route-grid article {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(189, 162, 109, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.route-grid b {
  color: var(--gold);
  font: 14px "KaiTi", serif;
}

.route-grid p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.furnace-confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.furnace-complete {
  position: relative;
  margin: 0 auto 12px;
  max-width: 420px;
  padding: 20px;
  border: 1px solid rgba(222, 174, 85, 0.6);
  color: #f0d48e;
  background: radial-gradient(circle, rgba(197, 88, 30, 0.26), rgba(10, 12, 8, 0.95) 68%);
  box-shadow: 0 0 38px rgba(205, 107, 36, 0.2), inset 0 0 28px rgba(205, 107, 36, 0.12);
  animation: furnace-seal 820ms ease both;
}

.furnace-complete.furnace-forging {
  animation: furnace-forging 900ms ease both;
}

.furnace-complete.mutation {
  border-color: rgba(197, 86, 61, 0.72);
  color: #f1ba86;
  background:
    radial-gradient(circle at 38% 28%, rgba(86, 180, 83, 0.16), transparent 34%),
    radial-gradient(circle, rgba(170, 47, 38, 0.3), rgba(10, 12, 8, 0.95) 68%);
  box-shadow: 0 0 42px rgba(180, 59, 45, 0.22), inset 0 0 32px rgba(105, 173, 82, 0.08);
}

.furnace-complete.backlash {
  border-color: rgba(199, 61, 50, 0.72);
  color: #e6998d;
  background: radial-gradient(circle, rgba(143, 28, 24, 0.34), rgba(10, 8, 7, 0.97) 68%);
  box-shadow: 0 0 42px rgba(161, 35, 29, 0.24), inset 0 0 32px rgba(161, 35, 29, 0.14);
  animation: furnace-backlash 520ms ease both;
}

.furnace-complete strong {
  display: block;
  font: 24px "KaiTi", serif;
  letter-spacing: 0.12em;
}

.furnace-complete small {
  display: block;
  margin-top: 6px;
  color: #bda26d;
}

@keyframes furnace-seal {
  0% { opacity: 0; transform: scale(0.86); filter: brightness(1.8); }
  55% { opacity: 1; transform: scale(1.03); filter: brightness(1.25); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

@keyframes furnace-choice-breathe {
  to { border-color: rgba(231, 183, 86, 0.46); box-shadow: inset 0 0 18px rgba(206, 105, 34, 0.1), 0 0 18px rgba(206, 105, 34, 0.08); }
}

@keyframes furnace-forging {
  0% { opacity: 0.15; transform: translateY(8px) scale(0.9); filter: brightness(1.8); }
  38% { opacity: 1; transform: translateY(-7px) scale(1.05); box-shadow: 0 0 48px rgba(229, 157, 54, 0.28), inset 0 0 36px rgba(229, 157, 54, 0.18); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes furnace-backlash {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-8px); }
  42% { transform: translateX(7px); }
  66% { transform: translateX(-3px); }
}

@media (max-height: 800px) {
  .start-screen { padding: 12px; }
  .start-content { padding-top: 10px; padding-bottom: 10px; }
  .start-logo { width: 45px; height: 45px; margin-bottom: 4px; }
  .start-logo span { font-size: 23px; }
  .start-content > h1 { font-size: 46px; }
  .start-subtitle { margin: 5px 0 10px; }
  .start-guide-actions { margin-bottom: 8px; }
  .hero-choice { grid-template-columns: 88px 1fr; min-height: 126px; }
  .hero-choice-info strong { font-size: 15px; }
  .hero-choice-stats { margin: 4px 0; }
  .relic-choice { min-height: 68px; }
  .start-deck-note { margin-bottom: 9px; padding-block: 6px; }
  .tutorial-card { padding: 18px 20px 16px; }
  .tutorial-body li { padding-block: 7px; line-height: 1.45; }
  .battle-coach { bottom: 208px; }
  .map-card { padding: 18px; }
  .map-node { min-height: 118px; padding: 11px; }
  .map-heading h2 { font-size: 28px; }
  .map-progress { margin-bottom: 12px; }
  .map-status { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .map-route { gap: 10px; }
  .map-segment { padding: 10px; }
  .event-choice,
  .shop-actions button { min-height: 88px; }
}

@media (max-height: 760px) {
  .game-shell { grid-template-rows: auto minmax(265px, 1fr) auto; }
  .topbar { min-height: 59px; }
  .portrait { height: 136px; }
  .tower-sigil { width: 78px; height: 78px; margin-bottom: 7px; }
  .hand-panel { min-height: 205px; }
  .hand { min-height: 153px; padding-top: 8px; }
  .card { height: 151px; }
  .card-art { height: 35px; margin: 6px 0; }
  .card-effect { font-size: 10px; line-height: 1.35; }
  .resource { min-height: 43px; }
  .log-panel { height: calc(100vh - 88px); max-height: none; }
}

@media (max-width: 980px) {
  .map-heading {
    flex-direction: column;
  }

  .map-actions {
    justify-content: flex-start;
  }

  .map-segment {
    grid-template-columns: 1fr;
  }

  .map-segment-label {
    grid-template-columns: auto 1fr;
    justify-items: start;
  }

  .map-segment-label i {
    width: 100%;
    height: 1px;
  }

  .map-node-row,
  .map-segment:first-child .map-node-row,
  .map-status,
  .shop-overview,
  .event-choices,
  .shop-card-choices,
  .shop-actions,
  .shop-remove-choices {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1240px) {
  .game-shell {
    width: calc(100% - 20px);
    grid-template-columns: 190px minmax(330px, 1fr) 190px 250px;
    gap: 9px;
  }
  .combatant { padding: 13px; }
  .card { min-width: 110px; }
}

@media (max-width: 1420px) {
  .tower-progress { padding-inline: 10px; }
  .tower-link { width: 19px; }
  .tower-floor-label { display: none; }
  .top-relic { margin-right: 10px; padding-right: 10px; }
}

/* ===== 瑙嗗彛楂樺害褰诲簳閿佸畾锛氫粎鏃ュ織涓庤秴楂樺脊绐楀厑璁哥旱鍚戞粴鍔?===== */

html,
body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: 100vh; /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: relative;
}

.game-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: 100vh; /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr) clamp(205px, 28vh, 236px);
  grid-template-rows: auto minmax(0, 1fr) clamp(205px, 28dvh, 236px);
  padding-block: clamp(8px, 1.3vh, 14px);
  overflow: hidden;
}

.game-shell > *,
.topbar > *,
.combatant > *,
.arena-panel > *,
.log-panel > *,
.hand-panel > *,
.battle-copy,
.intent-box > *,
.resource,
.result-card > * {
  min-width: 0;
  min-height: 0;
}

.topbar {
  min-width: 0;
  min-height: 0;
  padding-right: 252px;
  overflow: hidden;
}

.player-panel,
.arena-panel,
.enemy-panel {
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.buff-list {
  max-height: 58px;
  overflow: hidden;
}

.enemy-status-list {
  max-height: 48px;
  overflow: hidden;
}

.battle-copy {
  width: 100%;
}

.battle-message {
  display: -webkit-box;
  height: 42px;
  min-height: 0;
  max-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.log-panel {
  align-self: stretch;
  height: 100%;
  min-height: 0;
  max-height: none;
}

.log-heading,
.log-history-toggle {
  flex: 0 0 auto;
}

.battle-log {
  flex: 1 1 0;
  height: 0;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.hand-panel {
  display: flex;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  flex-direction: column;
}

.hand-heading {
  flex: 0 0 auto;
}

.hand {
  flex: 1 1 0;
  height: 0;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
}

.card {
  height: 100%;
  min-height: 0;
  max-height: 174px;
}

.fx-layer,
.effect-layer {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  contain: strict;
}

.result-overlay {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

.result-card {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; /* V0.9.9.2 iOS 惯性滚动，缓解蛊坊/结算卡片划不动 */
  touch-action: pan-y;
  scrollbar-color: rgba(189, 162, 109, 0.42) transparent;
}

.start-screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.start-content {
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto; /* V0.9.9.2 修：原 overflow:hidden 把超高的起始页内容裁死、够不到「踏入命途塔」；比照 .result-card 改为可滚 */
  overscroll-behavior: contain;
  scrollbar-width: thin; /* V0.9.9.2 细窗暗金滚动条，替掉又粗又亮的默认条 */
  scrollbar-color: rgba(189, 162, 109, 0.38) transparent;
}
.start-content::-webkit-scrollbar { width: 7px; }
.start-content::-webkit-scrollbar-track { background: transparent; }
.start-content::-webkit-scrollbar-thumb { background: rgba(189, 162, 109, 0.28); border-radius: 4px; }
.start-content::-webkit-scrollbar-thumb:hover { background: rgba(189, 162, 109, 0.5); }

/* 闊充箰鎺у埗鐙珛鎮诞锛屼笉鍙備笌椤舵爮鍜屾垬鏂楃綉鏍肩殑灏哄璁＄畻銆?*/
.audio-controls {
  position: fixed;
  z-index: 70;
  top: 16px;
  right: 18px;
  display: grid;
  grid-template-columns: auto 82px;
  align-items: center;
  gap: 4px 9px;
  width: 218px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(189, 162, 109, 0.28);
  color: var(--muted);
  background: linear-gradient(145deg, rgba(15, 22, 17, 0.96), rgba(7, 10, 8, 0.97));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), inset 0 0 0 3px rgba(189, 162, 109, 0.025);
}

.music-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px 6px;
  border: 0;
  color: #c9bd9f;
  cursor: pointer;
  background: transparent;
}

.effect-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid rgba(189, 162, 109, 0.16);
  color: #bda26d;
  cursor: pointer;
  font-size: 9px;
  letter-spacing: 0.08em;
  background: rgba(189, 162, 109, 0.035);
}

.effect-toggle strong {
  color: #8bd0a2;
  font-weight: 600;
}

.effect-toggle.is-off {
  color: #74766d;
  border-color: rgba(130, 130, 120, 0.14);
  background: rgba(255, 255, 255, 0.015);
}

.effect-toggle.is-off strong {
  color: #b7655f;
}

.music-toggle > span {
  color: var(--gold);
  font-size: 17px;
}

.music-toggle strong {
  white-space: nowrap;
  font-size: 10px;
  font-weight: 500;
}

.music-toggle.is-muted {
  color: #756f65;
  filter: grayscale(1);
}

.music-toggle:focus-visible,
.effect-toggle:focus-visible,
.music-volume input:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 2px;
}

.music-volume {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 8px;
}

.music-volume input {
  width: 100%;
  min-width: 0;
  accent-color: var(--jade-bright);
  cursor: pointer;
}

.audio-controls > small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #7f9e87;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-wake-hint {
  color: rgba(189, 162, 109, 0.74) !important;
  font-size: 7px !important;
  letter-spacing: 0.08em !important;
  opacity: 0.82;
}

.music-wake-hint.hidden {
  display: none;
}

@media (max-height: 820px) {
  .game-shell {
    grid-template-rows: auto minmax(0, 1fr) clamp(198px, 28vh, 215px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    grid-template-rows: auto minmax(0, 1fr) clamp(198px, 28dvh, 215px);
    gap: 9px;
    padding-block: 8px;
  }

  .topbar {
    min-height: 58px;
    padding-block: 6px;
  }

  .combatant { padding: 12px; }
  .panel-heading { margin-bottom: 7px; }
  .portrait { height: 132px; margin-bottom: 8px; }
  .vital-block { margin-bottom: 8px; }
  .resource { min-height: 39px; padding: 5px; }
  .buff-list { min-height: 25px; margin-top: 6px; }
  .buff-tag, .empty-buff, .enemy-power { min-height: 24px; padding: 3px 6px; }
  .active-relic-card { margin-top: 6px; padding-block: 5px; }
  .tower-sigil { width: 76px; height: 76px; margin-bottom: 5px; }
  .battle-copy h2 { margin-block: 3px 5px; }
  .battle-message { height: 38px; max-height: 38px; font-size: 12.5px; line-height: 1.5; }
  .pile-status { margin: 8px 0; }
  .hand-heading { padding-block: 7px 6px; }
  .hand { padding: 7px 11px 9px; }
  .card { height: auto; max-height: 156px; padding-top: 9px; }
  .card-art { height: 34px; margin-block: 5px; }
  .card-effect { font-size: 11px; line-height: 1.32; }
  .log-heading { padding-block: 10px 8px; }
  .battle-log { padding-top: 7px; padding-bottom: 9px; }
  .battle-log li { padding-block: 6px 7px; line-height: 1.42; }
  .audio-controls { top: 10px; right: 13px; }
}

/* ===== V0.9.1：手机横屏试玩适配 ===== */
.mobile-orientation-overlay {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: none;
  place-items: center;
  pointer-events: none;
  padding: 24px;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 28%, rgba(77, 126, 91, 0.2), transparent 34%),
    linear-gradient(150deg, rgba(5, 8, 6, 0.98), rgba(14, 20, 16, 0.98));
}

.mobile-orientation-card {
  width: min(360px, 88vw);
  padding: 26px 22px;
  border: 1px solid rgba(189, 162, 109, 0.44);
  text-align: center;
  background: linear-gradient(160deg, rgba(20, 29, 23, 0.96), rgba(6, 9, 7, 0.98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.62), inset 0 0 0 5px rgba(189, 162, 109, 0.035);
}

.mobile-orientation-card > span {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border: 1px solid rgba(189, 162, 109, 0.58);
  border-radius: 50%;
  color: var(--gold);
  font: 700 28px "KaiTi", serif;
  background: rgba(87, 51, 24, 0.28);
}

.mobile-orientation-card h2 {
  margin: 0 0 9px;
  font: 700 24px "KaiTi", serif;
  letter-spacing: 0.08em;
}

.mobile-orientation-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.mobile-log-button {
  position: fixed;
  z-index: 82;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(126px, calc(env(safe-area-inset-bottom) + 126px));
  display: none;
  min-width: 52px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(189, 162, 109, 0.48);
  color: var(--gold);
  cursor: pointer;
  background: linear-gradient(145deg, rgba(42, 28, 17, 0.94), rgba(8, 11, 9, 0.96));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.mobile-audio-toggle {
  position: fixed;
  z-index: 96;
  top: max(6px, env(safe-area-inset-top));
  right: max(6px, env(safe-area-inset-right));
  display: none;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border: 1px solid rgba(189, 162, 109, 0.5);
  color: var(--gold);
  cursor: pointer;
  font: 700 16px "KaiTi", serif;
  background: linear-gradient(145deg, rgba(42, 28, 17, 0.96), rgba(7, 10, 8, 0.98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.52);
}

.mobile-audio-close {
  display: none;
}

.mobile-audio-title {
  display: none;
}

@media (max-width: 900px) and (orientation: portrait) {
  html {
    min-width: 0;
  }

  body {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .mobile-orientation-overlay {
    display: grid;
    pointer-events: auto;
  }
}

@media (max-width: 1024px) and (max-height: 600px) and (orientation: landscape) {
  html {
    min-width: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    touch-action: manipulation;
  }

  body {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
  }

  button,
  .card,
  .map-node,
  .hero-choice,
  .relic-choice,
  .trial-mode-card,
  .deck-list-card {
    min-height: 36px;
    touch-action: manipulation;
  }

  .mist {
    opacity: 0.55;
    filter: blur(42px);
  }

  .start-screen,
  .map-screen {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 8px;
  }

  .start-content {
    width: min(96vw, 860px);
    max-height: calc(100vh - 14px); /* 老内核 dvh 兜底 */
    max-height: calc(100dvh - 14px);
    padding: 10px 12px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .start-logo {
    width: 46px;
    height: 46px;
    margin: 4px auto 6px;
  }

  .start-content h1 {
    font-size: clamp(34px, 7vw, 52px);
    margin: 4px 0;
  }

  .start-kicker,
  .start-subtitle,
  .start-feedback-note {
    font-size: 11px;
  }

  .start-guide-actions {
    gap: 6px;
    margin: 8px 0;
  }

  .start-guide-button,
  .start-reset-button,
  .recording-mode-button {
    min-height: 36px;
    padding: 7px 9px;
  }

  .hero-choices,
  .relic-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-choice,
  .relic-choice {
    min-width: 0;
    padding: 8px;
  }

  .hero-choice img,
  .hero-choice .hero-portrait {
    max-height: 88px;
  }

  .start-deck-note {
    padding: 8px 10px;
    margin: 8px auto;
  }

  .advanced-card-preview {
    max-height: 48px;
    overflow: hidden;
  }

  .start-button {
    min-height: 50px;
    margin-top: 8px;
  }

  .mobile-audio-toggle {
    display: inline-grid;
    place-items: center;
  }

  body.modal-open .mobile-audio-toggle,
  body.modal-open .mobile-log-button,
  body.modal-open .audio-controls {
    display: none !important;
  }

  .audio-controls {
    top: max(42px, calc(env(safe-area-inset-top) + 42px));
    right: auto;
    left: 50%;
    display: none;
    grid-template-columns: minmax(0, 1fr) 34px;
    width: min(218px, calc(100vw - 16px));
    max-width: 240px;
    padding: 6px 8px 7px;
    gap: 5px 8px;
    z-index: 95;
    opacity: 0.98;
    pointer-events: none;
    transform: translateX(-50%);
  }

  body.mobile-audio-open .audio-controls {
    display: grid;
    pointer-events: auto;
  }

  body:not(.mobile-audio-open) .audio-controls,
  body:not(.mobile-log-open) .log-panel {
    display: none;
    pointer-events: none;
  }

  .mobile-audio-close {
    position: static;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-height: 32px;
    border: 1px solid rgba(189, 162, 109, 0.24);
    color: var(--muted);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
  }

  .mobile-audio-title {
    display: flex;
    align-items: center;
    min-height: 32px;
    color: var(--gold);
    font: 700 13px "KaiTi", serif;
    letter-spacing: 0.08em;
  }

  .music-toggle {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 28px;
    padding: 3px 8px;
    border: 1px solid rgba(189, 162, 109, 0.16);
    background: rgba(189, 162, 109, 0.035);
  }

  .music-toggle strong,
  .effect-toggle {
    font-size: 10px;
  }

  .audio-controls > small,
  .music-wake-hint {
    display: none;
  }

  .music-volume {
    grid-column: 1 / -1;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 28px;
    font-size: 10px;
  }

  .music-volume span {
    display: inline;
  }

  .effect-toggle {
    grid-column: 1 / -1;
    min-height: 28px;
    padding: 3px 8px;
  }

  .game-shell {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 5px;
    gap: 5px;
    grid-template-columns: 162px minmax(210px, 1fr) 184px;
    grid-template-rows: 32px minmax(0, 1fr) clamp(124px, 34vh, 142px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    grid-template-rows: 32px minmax(0, 1fr) clamp(124px, 34dvh, 142px);
  }

  .topbar {
    min-height: 0;
    height: 32px;
    padding: 3px 48px 3px 6px;
    gap: 6px;
    overflow: hidden;
  }

  .brand-mark {
    display: none;
  }

  .title-group h1 {
    font-size: 15px;
    white-space: nowrap;
  }

  .eyebrow,
  .title-group .eyebrow {
    max-width: 132px;
    margin: 0;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tower-progress {
    margin-left: 4px;
    padding: 0 4px;
  }

  .tower-node {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .tower-link {
    width: 14px;
  }

  .tower-floor-label {
    display: none;
  }

  .top-gu-stone,
  .top-relic {
    padding: 3px 5px;
    font-size: 8px;
  }

  .top-relic p,
  .deck-view-button {
    display: none;
  }

  .turn-plaque {
    gap: 4px;
    margin-left: 2px;
    padding-left: 6px;
    font-size: 8px;
  }

  .turn-plaque strong {
    font-size: 19px;
  }

  .combatant {
    min-width: 0;
    min-height: 0;
    padding: 6px;
    overflow: hidden;
  }

  .player-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .enemy-panel {
    grid-column: 3;
    grid-row: 2;
  }

  .panel-heading {
    margin-bottom: 4px;
  }

  .panel-heading h2 {
    font-size: 15px;
    line-height: 1.1;
  }

  .side-label {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .portrait {
    height: clamp(50px, 16vh, 64px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    height: clamp(50px, 16dvh, 64px);
    margin-bottom: 5px;
  }

  .player-panel .portrait {
    height: clamp(46px, 14vh, 58px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    height: clamp(46px, 14dvh, 58px);
  }

  .portrait-caption,
  .active-relic-card p small,
  .active-relic-card p strong {
    display: none;
  }

  .vital-block,
  .buff-list,
  .active-relic-card {
    margin-bottom: 5px;
  }

  .stat-line {
    font-size: 9px;
  }

  .bar {
    height: 7px;
  }

  .resource-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }

  .resource {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 5px;
    min-height: 28px;
    padding: 4px 5px;
    font-size: 9px;
    overflow: hidden;
  }

  .resource-icon {
    display: none;
  }

  .resource span:not(.resource-icon) {
    min-width: 0;
    overflow: hidden;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
    text-overflow: clip;
  }

  .resource strong {
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }

  .buff-list {
    max-height: 36px;
    overflow-y: auto;
  }

  .buff-tag,
  .empty-buff,
  .enemy-power,
  .enemy-status-list span {
    min-height: 22px;
    padding: 3px 5px;
    font-size: 8px;
  }

  .active-relic-card {
    display: none;
  }

  .arena-panel {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    padding: 6px;
    overflow: hidden;
  }

  .tower-sigil {
    display: none;
  }

  .sigil-character {
    font-size: 26px;
  }

  .battle-copy h2 {
    margin: 0 0 2px;
    font-size: clamp(13px, 2.5vw, 17px);
    letter-spacing: 0.08em;
    line-height: 1.15;
  }

  .arena-kicker,
  .battle-message {
    font-size: 9.5px;
  }

  .battle-message {
    height: 23px;
    max-height: 23px;
    overflow: hidden;
    line-height: 1.25;
  }

  .pile-status {
    margin: 4px 0;
    font-size: 9px;
  }

  .end-turn-button {
    min-width: 112px;
    min-height: 42px;
    padding: 6px 13px;
  }

  .end-turn-button span {
    font-size: 15px;
  }

  .end-turn-button small,
  .end-turn-tip {
    font-size: 8px;
  }

  .enemy-heading h2 {
    font-size: 16px;
  }

  .enemy-panel .portrait {
    height: clamp(48px, 15vh, 62px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    height: clamp(48px, 15dvh, 62px);
  }
  /* V0.9.8.3：窄横屏下敌人立绘单独放高 + contain 顶部对齐，避免只剩一条黑缝。 */
  .enemy-panel .enemy-portrait {
    height: clamp(64px, 20vh, 96px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    height: clamp(64px, 20dvh, 96px);
  }
  .enemy-panel .enemy-portrait .portrait-image {
    object-fit: contain;
    object-position: center top;
  }

  .intent-box {
    min-height: 56px;
    padding: 5px;
    gap: 5px;
  }

  .intent-icon {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .intent-box strong {
    font-size: 12px;
    line-height: 1.12;
  }

  .intent-box p {
    display: -webkit-box;
    max-height: 34px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 9px;
    line-height: 1.25;
  }

  .enemy-status-list {
    max-height: 38px;
    overflow-y: auto;
  }

  .log-panel {
    position: fixed;
    z-index: 90;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    display: none;
    width: min(360px, 46vw);
    height: auto;
    max-height: calc(100vh - 16px); /* 老内核 dvh 兜底 */
    max-height: calc(100dvh - 16px);
    min-height: 0;
    grid-column: auto;
    grid-row: auto;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68);
    pointer-events: none;
  }

  body.mobile-log-open .log-panel {
    display: flex;
    pointer-events: auto;
  }

  .mobile-log-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    right: max(4px, env(safe-area-inset-right));
    bottom: max(4px, env(safe-area-inset-bottom));
    min-width: 38px;
    min-height: 36px;
    padding: 5px 7px;
    font-size: 11px;
  }

  body.mobile-log-open .mobile-log-button {
    border-color: var(--gold);
    color: var(--paper);
  }

  .log-heading {
    padding: 8px;
  }

  .log-heading h2 {
    font-size: 15px;
  }

  .log-tabs {
    padding: 0 8px 6px;
  }

  .log-tabs button {
    min-height: 34px;
    font-size: 9px;
  }

  .battle-log {
    padding: 6px 12px 10px 24px;
  }

  .battle-log li {
    padding: 5px 0;
    font-size: 10px;
    line-height: 1.45;
  }

  .hand-panel {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 0;
    height: 100%;
  }

  .hand-heading {
    min-height: 26px;
    padding: 4px 8px 2px;
  }

  .hand-heading h2 {
    font-size: 16px;
  }

  .hand-heading p {
    font-size: 8px;
  }

  .hand {
    box-sizing: border-box;
    height: calc(100% - 26px);
    min-height: 0;
    padding: 5px 54px 8px 8px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .card {
    flex: 0 0 154px;
    width: 154px;
    min-width: 154px;
    height: 102px;
    max-height: 102px;
    padding: 6px 8px;
  }

  .card:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
  }

  .card-title-row {
    align-items: flex-start;
    min-height: 24px;
    gap: 5px;
  }

  .card-title-row h3 {
    font-size: 14.5px;
    line-height: 1.1;
    max-width: none; /* V0.9.8.9：撤掉旧 154px 卡片遗留的上限，横屏窄卡不再把卡名饿成单字 */
  }

  .card-cost {
    width: 23px;
    height: 23px;
    font-size: 12px;
  }

  .card-top-marks {
    gap: 2px;
    max-width: 50px;
  }

  .card-type {
    max-width: 96px;
    padding: 2px 4px;
    font-size: 8.5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .card-art {
    display: none;
  }

  .card-effect {
    margin-top: 4px;
    min-height: 31px;
    max-height: 34px;
    font-size: 10.2px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }

  .card-state-badges {
    gap: 2px;
    max-height: 16px;
    overflow: hidden;
  }

  .card-state-badges i {
    padding: 1px 3px;
    font-size: 8px;
  }

  .map-card {
    width: min(96vw, 840px);
    max-height: 90vh; /* 老内核(无 dvh)兜底 */
    max-height: 90dvh;
    padding: 10px;
    overflow-y: auto;
  }

  .map-heading {
    gap: 8px;
    margin-bottom: 8px;
  }

  .map-heading h2 {
    font-size: 21px;
  }

  .map-heading p,
  .map-hint {
    font-size: 10px;
  }

  .map-progress {
    margin: 2px 0 8px;
  }

  .map-progress span {
    width: 40px;
    height: 30px;
    font-size: 14px;
  }

  .map-status {
    gap: 6px;
    margin-bottom: 8px;
  }

  .map-status span {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .map-route {
    gap: 8px;
  }

  .map-segment {
    padding: 6px;
  }

  .map-segment-label {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .map-node-row {
    gap: 7px;
  }

  .map-node {
    min-height: 66px;
    padding: 7px;
  }

  .map-node-icon {
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  .map-node strong {
    font-size: 14px;
  }

  .map-node small,
  .map-node p {
    font-size: 9px;
    line-height: 1.35;
  }

  .result-overlay,
  .deck-overlay,
  .stats-overlay,
  .settings-overlay,
  .trial-settings-overlay,
  .tutorial-overlay,
  .prologue-overlay,
  .lore-overlay,
  .balance-overlay {
    padding: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
  }

  .result-card,
  .deck-card,
  .stats-card,
  .settings-card,
  .trial-settings-card,
  .tutorial-card,
  .prologue-card,
  .lore-card,
  .balance-card {
    width: min(94vw, 760px);
    max-width: 94vw;
    max-height: 90vh; /* 老内核 dvh 兜底 */
    max-height: 90dvh;
    padding: 12px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .deck-close-button,
  .tutorial-close-button,
  .prologue-close-button,
  .lore-close-button {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .result-card h2,
  .deck-card h2,
  .stats-card h2,
  .settings-card h2,
  .trial-settings-card h2,
  .tutorial-card h2,
  .prologue-card h2,
  .lore-card h2,
  .balance-card h2 {
    font-size: 22px;
  }

  .result-mini-actions,
  .settings-actions,
  .stats-actions,
  .balance-actions,
  .tutorial-actions,
  .furnace-confirm-actions,
  .shop-remove-confirm-actions,
  .elite-confirm-actions {
    flex-wrap: wrap;
    gap: 7px;
  }

  .result-card button,
  .deck-mini-button,
  .settings-list button,
  .settings-actions button,
  .stats-actions button,
  .balance-actions button,
  .tutorial-actions button,
  .trial-mode-card,
  .event-choice,
  .shop-actions button,
  .reward-skip {
    min-height: 36px;
  }

  .settings-session-actions {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px;
  }

  .card-reward-choices,
  .material-reward-choices,
  .refine-choices,
  .furnace-choices,
  .event-choices,
  .shop-card-choices,
  .shop-actions,
  .shop-remove-choices {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    max-height: 43vh; /* 老内核 dvh 兜底 */
    max-height: 43dvh;
    overflow-y: auto;
  }

  .result-mini-actions button {
    flex: 1 1 128px;
    max-width: 230px;
  }

  .deck-list {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
  }

  .deck-materials > div,
  .deck-relics > div,
  .deck-marks > div {
    max-height: 96px;
  }

  .lore-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .turn-banner,
  .cast-display {
    max-width: 86vw;
  }

  .turn-banner.show {
    transform: translate(-50%, -50%) scale(0.88);
  }

  .battle-effect.center-effect {
    max-width: 82vw;
    min-width: 0;
    padding: 7px 14px;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: 0.1em;
  }

  .effect-boss-title-prime {
    font-size: 18px;
  }

  .effect-boss-subtitle {
    top: 55%;
    max-width: 78vw;
    padding: 5px 12px;
    font-size: 10px;
    line-height: 1.25;
  }
}

@media (max-width: 720px) and (max-height: 600px) and (orientation: landscape) {
  .game-shell {
    grid-template-columns: 108px minmax(190px, 1fr) 124px;
    grid-template-rows: 38px minmax(0, 1fr) 118px;
    gap: 4px;
    padding: 4px;
  }

  .topbar {
    height: 38px;
    padding-right: 46px;
  }

  .audio-controls {
    width: min(218px, calc(100vw - 14px));
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .title-group h1 {
    font-size: 15px;
  }

  .portrait {
    height: clamp(54px, 18vh, 68px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    height: clamp(54px, 18dvh, 68px);
  }

  .resource-grid {
    gap: 3px;
  }

  .resource {
    min-height: 29px;
  }

  .card {
    flex-basis: 122px;
    width: 122px;
    min-width: 122px;
    height: 82px;
    max-height: 82px;
  }

  .card-title-row h3 {
    font-size: 13px;
  }

  .card-effect {
    font-size: 8px;
  }

  .map-node {
    min-height: 64px;
  }
}

/* ============================================================
   V0.9.2.8 手机横屏战斗 HUD 重构（mobile-combat-safe）
   仅在 body.mobile-combat-safe 时生效（横屏手机 + 战斗中）。
   三层 HUD：顶部信息条 / 中央舞台 / 底部手牌 Dock；
   立绘卡 object-fit:cover 去黑、铭刻图标化、减边框、--app-height、防外层滚动。
   全部选择器带 body.mobile-combat-safe 前缀，桌面/竖屏零影响。
   ============================================================ */
/* 防止安卓浏览器自动放大正文字体，导致卡名被挤成单字 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* 1) 外层无滚动 + 用真实可视高度排版。
      用 documentElement 加类锁高（兼容不支持 :has() 的国产/X5/微信内核），
      同时保留 :has 作为支持环境下的双保险；100vh 在前作老内核回退。 */
body.mobile-combat-safe {
  overflow: hidden;
  height: var(--app-height, 100vh);
  height: var(--app-height, 100dvh);
}
html.combat-lock-html {
  overflow: hidden;
  height: var(--app-height, 100vh);
  height: var(--app-height, 100dvh);
}
html:has(body.mobile-combat-safe) {
  overflow: hidden;
  height: var(--app-height, 100vh); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  height: var(--app-height, 100dvh);
}

/* 战斗主网格：顶部信息条 / 中部三栏 / 底部手牌 Dock */
body.mobile-combat-safe .game-shell {
  display: grid;
  grid-template-columns: clamp(108px, 22vw, 150px) minmax(0, 1fr) clamp(108px, 22vw, 150px);
  grid-template-rows: clamp(54px, 11vh, 70px) minmax(0, 1fr) auto; /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  grid-template-rows: clamp(54px, 11dvh, 70px) minmax(0, 1fr) auto;
  grid-template-areas:
    "topbar topbar topbar"
    "player arena enemy"
    "hand hand hand";
  height: var(--app-height, 100vh); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100vh); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: var(--app-height, 100dvh);
  width: 100vw;
  gap: 4px;
  padding: 4px 6px;
  overflow: hidden;
}
body.mobile-combat-safe .topbar { grid-area: topbar; min-width: 0; min-height: 0; overflow: hidden; }
body.mobile-combat-safe .player-panel { grid-area: player; min-width: 0; min-height: 0; overflow: hidden; }
body.mobile-combat-safe .arena-panel { grid-area: arena; min-width: 0; min-height: 0; overflow: hidden; }
body.mobile-combat-safe .enemy-panel { grid-area: enemy; min-width: 0; min-height: 0; overflow: hidden; }
body.mobile-combat-safe .hand-panel { grid-area: hand; min-width: 0; min-height: 0; overflow: hidden; }

/* 2) 顶部信息条（54~70px，左短标题 / 中战况 / 右控件留位） */
body.mobile-combat-safe .topbar {
  height: clamp(54px, 11vh, 70px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  height: clamp(54px, 11dvh, 70px);
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  padding-right: calc(152px + env(safe-area-inset-right)); /* 给右上 音/铭刻/手牌 三个浮钮预留 */
  overflow: hidden;
}
body.mobile-combat-safe .topbar h1,
body.mobile-combat-safe .brand-mark,
body.mobile-combat-safe .tower-progress,
body.mobile-combat-safe .top-relic {
  display: none;
}
body.mobile-combat-safe #floorEyebrow.eyebrow {
  order: 0;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38vw;
  flex-shrink: 1;
}
body.mobile-combat-safe .turn-plaque {
  order: 1;
  margin-left: auto;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  flex-shrink: 0;
}
body.mobile-combat-safe .turn-plaque strong { font-size: 15px; }
body.mobile-combat-safe .top-gu-stone {
  order: 2;
  font-size: 11px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
body.mobile-combat-safe .deck-view-button {
  order: 3;
  font-size: 11px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 3) 左右立绘卡：放大 + cover + 去黑（核心修复）。
      立绘高度选择器特意提一档特异性(.player-panel .player-portrait = 0,3,0)，
      稳压既有媒体查询 .player-panel .portrait(0,2,0)，不靠源序。 */
body.mobile-combat-safe .player-panel,
body.mobile-combat-safe .enemy-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 5px;
  gap: 4px;
  overflow: hidden;
  font-size: 11px;
  border: 1px solid rgba(189, 162, 109, 0.14);
  border-radius: 10px;
}
/* 立绘垫底（order 末位）、可压缩、永不消失（min 40px）；
   HP/真元/防御/状态固定占位且排在立绘之上——空间不足时被裁的永远是立绘，状态永远在安全区 */
body.mobile-combat-safe .player-panel .player-portrait,
body.mobile-combat-safe .enemy-panel .enemy-portrait {
  order: 5;
  flex: 1 1 auto;
  display: block;
  width: 100%;
  height: auto;
  min-height: 52px;
  max-height: clamp(72px, 17vh, 120px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: clamp(72px, 17dvh, 120px);
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(189, 162, 109, 0.18);
}
body.mobile-combat-safe .player-panel > :not(.portrait),
body.mobile-combat-safe .enemy-panel > :not(.portrait) { flex: 0 0 auto; }
body.mobile-combat-safe .player-panel .player-portrait { background: #11160f; }
body.mobile-combat-safe .enemy-panel .enemy-portrait { background: #15100d; }
/* 去黑核心：覆盖基础 object-fit:contain，并杀掉 image-loaded 的 drop-shadow */
body.mobile-combat-safe .portrait .portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.mobile-combat-safe .player-portrait .portrait-image { object-position: center 20%; }
/* V0.9.8.3：敌人立绘改 contain 完整展示主体（含头部），不再被扁框 cover 狠裁成横条；放高容器 + 红雾径向底贴合主体弱化黑边。玩家立绘保持 cover 解耦。 */
body.mobile-combat-safe .enemy-portrait .portrait-image { object-fit: contain; object-position: center top; }
body.mobile-combat-safe .enemy-panel .enemy-portrait {
  max-height: clamp(92px, 22vh, 150px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: clamp(92px, 22dvh, 150px);
  background: radial-gradient(ellipse at 50% 35%, rgba(135, 39, 34, 0.16), transparent 60%), #15100d;
}
/* 四段 Boss（尸盘）立绘更大、并上移露出头部，不只露胸口（普通敌人不变） */
body.mobile-combat-safe .enemy-corpsepuppet .portrait-image { object-position: center 10%; }
body.mobile-combat-safe .enemy-panel .enemy-portrait.enemy-corpsepuppet { max-height: clamp(96px, 24vh, 170px); } /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
body.mobile-combat-safe .enemy-panel .enemy-portrait.enemy-corpsepuppet { max-height: clamp(96px, 24dvh, 170px); }
body.mobile-combat-safe .player-portrait.image-loaded .portrait-image,
body.mobile-combat-safe .enemy-portrait.image-loaded .portrait-image { filter: none; }
/* 小立绘上的压暗层减弱，避免发黑 */
body.mobile-combat-safe .portrait-image-shade {
  background: none;
  box-shadow: none;
  opacity: 0.28;
}
body.mobile-combat-safe .portrait .portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
body.mobile-combat-safe .portrait .portrait-fallback svg { width: 82%; height: 82%; }
/* 卡底铭牌 + 数值 */
body.mobile-combat-safe .panel-heading h2 {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
body.mobile-combat-safe .resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  font-size: 10px;
  padding: 0;
}
body.mobile-combat-safe .resource-grid strong { font-size: 13px; }
/* 资源格压紧，腾出竖向空间让玩家立绘和敌人对称 */
body.mobile-combat-safe .resource { padding: 2px 5px; min-height: 0; }
body.mobile-combat-safe .bar { height: 12px; }
/* 可扩展状态 chip 区：自动换行 + 超出滚动，任何新状态自动成 chip，不用重排布局 */
body.mobile-combat-safe .buff-list,
body.mobile-combat-safe .enemy-status-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 3px;
  font-size: 11px;
  max-height: clamp(34px, 8vh, 60px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: clamp(34px, 8dvh, 60px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
body.mobile-combat-safe .buff-list::-webkit-scrollbar,
body.mobile-combat-safe .enemy-status-list::-webkit-scrollbar { display: none; }
/* 状态 chip 药丸样式：紧凑、可读、暗黑东方 */
body.mobile-combat-safe .buff-tag,
body.mobile-combat-safe .enemy-status,
body.mobile-combat-safe #enemyPower {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 1px 7px;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid rgba(189, 162, 109, 0.28);
  border-radius: 999px;
  background: rgba(20, 26, 18, 0.7);
}
body.mobile-combat-safe .buff-tag strong,
body.mobile-combat-safe .enemy-status strong { font-size: 12px; }
/* 手机端收起冗长的“被动”说明 chip，状态区聚焦动态数值（命势/血煞/毒/护甲/蓄势等） */
body.mobile-combat-safe .buff-tag.passive-status,
body.mobile-combat-safe .buff-tag.poison-passive-status,
body.mobile-combat-safe .empty-buff { display: none; }
body.mobile-combat-safe .enemy-status.enemy-boss-phase,
body.mobile-combat-safe .enemy-status.enemy-boss-passive { border-color: rgba(215, 65, 53, 0.5); }
/* 隐藏卡上噪音 */
body.mobile-combat-safe .panel-heading .side-label,
body.mobile-combat-safe .portrait-caption,
body.mobile-combat-safe .active-relic-card {
  display: none;
}

/* 4) 中列舞台：意图在上 + 按钮在下，竖排零叠字（JS 把 #intentBox 搬入 .arena-panel） */
/* 中列改 grid：按钮独占 auto 行永远完整可见；意图占 1fr 行、过高只裁自己，绝不裁按钮 */
body.mobile-combat-safe .arena-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 6px;
  padding: 4px 4px 8px;
  background: radial-gradient(ellipse at 50% 46%, rgba(74, 104, 84, 0.13), rgba(7, 10, 8, 0) 66%);
}
body.mobile-combat-safe .arena-panel > * { margin: 0; position: static; transform: none; }
/* 隐藏中列氛围装饰，杜绝叠字与抢焦点 */
body.mobile-combat-safe .battle-copy,
body.mobile-combat-safe .battle-coach,
body.mobile-combat-safe .tower-sigil,
body.mobile-combat-safe #castDisplay,
body.mobile-combat-safe .end-turn-tip {
  display: none;
}
/* V0.9.12.2 HUD止血：牌堆/弃牌计数复活为舞台右下角迷你徽记（此前整体隐藏＝手机上看不到牌循环）。
   绝对定位脱离舞台网格流：不新增网格行、不挤压意图条与结束回合按钮（覆盖 7365 的 position:static）。 */
body.mobile-combat-safe .arena-panel .pile-status {
  display: flex;
  position: absolute;
  right: 4px;
  bottom: 58px; /* 抬到空腰右缘：底部 ~52px 是居中结束回合按钮带，窄屏(667px级)按钮会盖住右下角 */
  gap: 6px;
  margin: 0;
}
body.mobile-combat-safe .pile-status div { font-size: 9px; gap: 3px; }
body.mobile-combat-safe .pile-status strong { font-size: 12px; }
body.mobile-combat-safe .pile-status i { height: 10px; }
/* 意图压成顶部紧凑条：图标 · 意图名 · 数值，一行横排，不再占满中央 */
body.mobile-combat-safe .arena-panel #intentBox {
  grid-row: 1;
  align-self: start;
  justify-self: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 8px;
  padding: 4px 12px;
  width: auto;
  max-width: 96%;
  margin-top: 2px;
  border: 1px solid rgba(215, 65, 53, 0.45);
  border-radius: 999px;
  background: rgba(40, 12, 10, 0.4);
}
body.mobile-combat-safe .arena-panel #intentBox > div:last-child {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 8px;
}
body.mobile-combat-safe .arena-panel #intentBox > div > span { display: none; }
body.mobile-combat-safe #intentBox #intentIcon { width: 26px; height: 26px; font-size: 13px; flex: 0 0 auto; }
body.mobile-combat-safe #intentBox #intentName { font-size: 13px; }
body.mobile-combat-safe #intentBox #intentDescription { font-size: 11px; margin: 0; }
body.mobile-combat-safe #enemyPower { font-size: 10px; }
body.mobile-combat-safe #endTurnButton {
  grid-row: 3;
  align-self: end;
  width: 100%;
  max-width: 200px;
  min-height: 44px;
  margin: 0 auto;
  padding: 9px 12px;
  position: relative;
  z-index: 3;
}
body.mobile-combat-safe #endTurnButton span { font-size: 15px; }
body.mobile-combat-safe #endTurnHint { font-size: 9px; }

/* 5) 底部手牌 Dock：横滑、卡宽 168px、短名 + 费用 + 类型 + 两行效果省略 */
body.mobile-combat-safe .hand-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 2px 6px calc(4px + env(safe-area-inset-bottom));
  overflow: hidden;
  border-top: 1px solid rgba(189, 162, 109, 0.14);
}
body.mobile-combat-safe .hand-heading { display: none; }
body.mobile-combat-safe .hand {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 7px;
  padding: 2px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
body.mobile-combat-safe .hand::-webkit-scrollbar { display: none; }
body.mobile-combat-safe .hand .card {
  /* V0.9.8.7c：原写死 168px+不收缩 → 5 张牌横屏放不下、末张被裁需横滑。改弹性收缩：N 张牌自动缩到刚好铺满一屏（上限168、下限104，牌特别多才滚动）。 */
  flex: 1 1 0;
  width: auto;
  min-width: 104px;
  max-width: 168px;
  height: auto;
  min-height: 0;
  max-height: none; /* 重置既有媒体查询 .card{max-height:82/102px} 的高度封顶，防裁切 */
  padding: 6px 9px; /* 轻微降高，给中央结束回合按钮留空间 */
  scroll-snap-align: start;
  border-radius: 8px;
  font-size: 11px;
  border: 1px solid rgba(189, 162, 109, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
body.mobile-combat-safe .card:active { transform: translateY(-3px); }

/* 手牌可收纳：点收纳把手降下手牌、露出完整战场（立绘与状态全程不消失） */
body.mobile-combat-safe .hand-panel { position: relative; }
/* 收纳按钮放进顶栏右上（与 音/铭刻 同排）：固定位置、不压牌、不压状态、大小恒定好按 */
/* V0.9.8.9：桌面/默认隐藏手牌收纳按钮，避免露出浏览器默认白条；仅手机横屏战斗由下方 mobile-combat-safe 规则显示 */
.hand-collapse-toggle { display: none; }
body.mobile-combat-safe .hand-collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: fixed;
  top: calc((clamp(54px, 11vh, 70px) - 38px) / 2 + max(0px, env(safe-area-inset-top))); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  top: calc((clamp(54px, 11dvh, 70px) - 38px) / 2 + max(0px, env(safe-area-inset-top)));
  right: max(96px, calc(env(safe-area-inset-right) + 96px));
  bottom: auto;
  left: auto;
  z-index: 96;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
  border: 1px solid rgba(189, 162, 109, 0.4);
  border-radius: 8px;
  background: rgba(20, 26, 18, 0.92);
  color: #cbb27a;
}
body.mobile-combat-safe .hand-collapse-toggle::after { content: "▾"; }
body.mobile-combat-safe.hand-collapsed .hand-collapse-toggle::after { content: "▴"; }
body.mobile-combat-safe.hand-collapsed .hand { display: none; }
body.mobile-combat-safe.hand-collapsed .hand-panel { min-height: 0; padding-top: 2px; padding-bottom: 2px; }

/* 发牌特效：每局开战时手牌依次滑入淡入（桌面/手机通用，仅开战 0.9s 窗口） */
@keyframes nimingDealIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
body.hand-dealing .hand .card { animation: nimingDealIn 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
body.hand-dealing .hand .card:nth-child(1) { animation-delay: 0.02s; }
body.hand-dealing .hand .card:nth-child(2) { animation-delay: 0.07s; }
body.hand-dealing .hand .card:nth-child(3) { animation-delay: 0.12s; }
body.hand-dealing .hand .card:nth-child(4) { animation-delay: 0.17s; }
body.hand-dealing .hand .card:nth-child(5) { animation-delay: 0.22s; }
body.hand-dealing .hand .card:nth-child(6) { animation-delay: 0.27s; }
body.hand-dealing .hand .card:nth-child(7) { animation-delay: 0.32s; }
body.hand-dealing .hand .card:nth-child(8) { animation-delay: 0.37s; }
@media (prefers-reduced-motion: reduce) { body.hand-dealing .hand .card { animation: none; } }
/* 隐藏大幅卡面装饰字，腾出空间 */
body.mobile-combat-safe .card .card-art { display: none; }
body.mobile-combat-safe .card .card-title-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
body.mobile-combat-safe .card .card-title-row h3 {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none; /* V0.9.8.9：覆盖上方 @media 的 max-width 上限，卡名按 flex 占满标题行剩余宽，根治"只剩首字" */
  font-size: 13px; /* V0.9.8.8b：略降字号，让 3 字完整蛊名在更窄卡片(多张手牌)下也放得下 */
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.mobile-combat-safe .card .card-top-marks { flex: 0 0 auto; }
body.mobile-combat-safe .card .card-meta-row { font-size: 10px; }
body.mobile-combat-safe .card .card-effect {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.8em;
  font-size: 11px;
  line-height: 1.3;
}

/* 6) 减边框碎裂：统一关闭装饰伪元素框，仅保留各区单层细框 */
body.mobile-combat-safe .combatant::before,
body.mobile-combat-safe .arena-panel::before,
body.mobile-combat-safe .log-panel::before,
body.mobile-combat-safe .hand-panel::before,
body.mobile-combat-safe .portrait::before,
body.mobile-combat-safe .portrait::after,
body.mobile-combat-safe .card::before,
body.mobile-combat-safe .card::after {
  display: none;
}

/* 7) 铭刻 / 音 浮钮重定位（≤44px，收进顶条高度内，不压手牌/按钮/意图） */
body.mobile-combat-safe .mobile-audio-toggle {
  top: calc((clamp(54px, 11vh, 70px) - 38px) / 2 + max(0px, env(safe-area-inset-top))); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  top: calc((clamp(54px, 11dvh, 70px) - 38px) / 2 + max(0px, env(safe-area-inset-top)));
  right: max(10px, calc(env(safe-area-inset-right) + 10px));
  bottom: auto;
  left: auto;
  z-index: 96;
}
body.mobile-combat-safe .mobile-log-button {
  top: calc((clamp(54px, 11vh, 70px) - 38px) / 2 + max(0px, env(safe-area-inset-top))); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  top: calc((clamp(54px, 11dvh, 70px) - 38px) / 2 + max(0px, env(safe-area-inset-top)));
  right: max(52px, calc(env(safe-area-inset-right) + 52px));
  bottom: auto;
  left: auto;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  border-radius: 8px;
  z-index: 84;
}
/* 日志面板：点开才显，从顶部下拉，绝不压底部手牌/中列按钮/意图 */
body.mobile-combat-safe .log-panel { display: none; }
body.mobile-combat-safe.mobile-log-open .log-panel {
  display: flex;
  position: fixed;
  left: 8px;
  right: 8px;
  top: calc(clamp(54px, 11vh, 70px) + 6px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  top: calc(clamp(54px, 11dvh, 70px) + 6px);
  max-height: min(58%, calc(var(--app-height, 100vh) * 0.58)); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: min(58%, calc(var(--app-height, 100dvh) * 0.58));
  overflow-y: auto;
  z-index: 90;
}

/* 8) 回合横幅：短暂出现，不挡按钮 */
body.mobile-combat-safe .turn-banner {
  top: clamp(54px, 11vh, 70px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  top: clamp(54px, 11dvh, 70px);
  font-size: 12px;
  max-width: 82vw;
  pointer-events: none;
}

/* 9) 弹窗在横屏下限高 + 内部滚动，避免裁切关闭/底部按钮（不改弹窗内容逻辑） */
body.mobile-landscape [role="dialog"] {
  max-height: var(--app-height, 100vh); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
}
body.mobile-landscape [role="dialog"] > * {
  max-height: calc(var(--app-height, 100vh) * 0.9); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: calc(var(--app-height, 100dvh) * 0.9);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 10) 极矮屏（innerHeight<=430）再压一档氛围，先压装饰不压功能 */
body.mobile-combat-safe.compact-low-height .game-shell {
  grid-template-rows: clamp(48px, 12vh, 60px) minmax(0, 1fr) auto; /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  grid-template-rows: clamp(48px, 12dvh, 60px) minmax(0, 1fr) auto;
}
body.mobile-combat-safe.compact-low-height .topbar {
  height: clamp(48px, 12vh, 60px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  height: clamp(48px, 12dvh, 60px);
  min-height: 48px;
}
body.mobile-combat-safe.compact-low-height .player-panel .player-portrait,
body.mobile-combat-safe.compact-low-height .enemy-panel .enemy-portrait {
  height: clamp(52px, 13vh, 80px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  height: clamp(52px, 13dvh, 80px);
}
/* 极矮屏：状态绝不消失，只把 chip 区压成更矮的滚动条 */
body.mobile-combat-safe.compact-low-height .buff-list,
body.mobile-combat-safe.compact-low-height .enemy-status-list { max-height: clamp(28px, 7vh, 44px); } /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
body.mobile-combat-safe.compact-low-height .enemy-status-list { max-height: clamp(28px, 7dvh, 44px); }

/* 全屏按钮（华为等无法装 PWA 时的可靠方案）：调用浏览器全屏 API，地址栏/状态栏全隐。
   只要不在全屏就显示（含战斗中退出全屏的情况），全屏时由 JS 隐藏——保证随时能一键重进全屏。 */
/* 手机端点牌放大预览弹层（仅 JS 在 mobile-combat-safe 下触发） */
.card-preview-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.card-preview-overlay.hidden { display: none; }
.card-preview-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); }
.card-preview-panel { position: relative; z-index: 1; width: min(86vw, 360px); max-height: 82%; overflow-y: auto; -webkit-overflow-scrolling: touch; background: radial-gradient(ellipse at 50% 0%, rgba(74, 104, 84, 0.16), rgba(17, 22, 15, 0) 62%), repeating-linear-gradient(135deg, rgba(189, 162, 109, 0.045) 0 2px, transparent 2px 10px), #11160f; border: 1px solid #bda26d; border-radius: 14px; padding: 18px; color: #e8e2d0; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.card-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-preview-head h3 { font-size: 22px; margin: 0; }
#cardPreviewCost { flex: 0 0 auto; font-size: 14px; color: #cbb27a; border: 1px solid rgba(189, 162, 109, 0.4); border-radius: 999px; padding: 2px 12px; white-space: nowrap; }
.card-preview-type { font-size: 13px; color: #8fae6e; margin: 8px 0; }
.card-preview-effect { font-size: 16px; line-height: 1.6; margin: 8px 0 18px; }
.card-preview-effect em { color: #d8c79a; font-style: normal; font-weight: 500; }
.card-preview-flavor { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid rgba(189, 162, 109, 0.2); font-family: "KaiTi", "STKaiti", serif; font-size: 13.5px; font-style: italic; color: #9b8f68; text-align: center; letter-spacing: 0.1em; }
/* V0.9.13 关键词直查：可点按术语的虚线标识 + 预览浮层的术语解释区 */
.kw-term { border-bottom: 1px dashed rgba(196, 164, 96, 0.55); cursor: help; }
.card-preview-keywords { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px; padding-top: 8px; border-top: 1px solid rgba(189, 162, 109, 0.16); }
.card-preview-keywords.hidden { display: none; }
.card-preview-keywords span { font-size: 11.5px; line-height: 1.45; color: #a89e7e; text-align: left; }
.card-preview-actions { display: flex; gap: 10px; justify-content: flex-end; }
.card-preview-actions button { padding: 9px 20px; font-size: 15px; border-radius: 8px; border: 1px solid #bda26d; background: rgba(20, 26, 18, 0.92); color: #d8c79a; }
#cardPreviewPlay { background: rgba(120, 30, 28, 0.62); border-color: #d74135; color: #f3e6e4; }

/* ===== 战斗手感：意图威胁 + 净伤宣示（仅展示，不改布局尺寸；桌面/手机一致安全） ===== */
.intent-net-damage { margin: 6px 0 0; font: 700 14px "KaiTi", "STKaiti", serif; color: #d8c6a0; letter-spacing: 0.5px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.intent-net-damage.is-high-threat { color: #ff6f5e; text-shadow: 0 1px 2px #000, 0 0 10px rgba(214, 52, 39, 0.6); }
.intent-box.intent-threat-high { animation: intent-threat-pulse 1.05s ease-in-out infinite; border-color: rgba(214, 52, 39, 0.7); }
@keyframes intent-threat-pulse { 0% { box-shadow: 0 0 0 rgba(214, 52, 39, 0); } 50% { box-shadow: 0 0 14px 2px rgba(214, 52, 39, 0.55); } 100% { box-shadow: 0 0 0 rgba(214, 52, 39, 0); } }
@media (prefers-reduced-motion: reduce) { .intent-box.intent-threat-high { animation: none; } }

/* ===== 更新公告弹窗 ===== */
/* 纯块级滚动容器（最稳）：整层 overflow:scroll + touch-action:pan-y，避免 flex+margin:auto 在部分手机浏览器不触发触摸滚动；面板块级顶对齐、横向居中 */
.update-log-overlay { position: fixed; inset: 0; z-index: 220; overflow-y: scroll; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding: 14px 12px; box-sizing: border-box; }
.update-log-overlay.hidden { display: none; }
.update-log-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.66); }
.update-log-panel { position: relative; z-index: 1; margin: 0 auto; width: 100%; max-width: 460px; background: radial-gradient(ellipse at 50% 0%, rgba(74, 104, 84, 0.14), rgba(17, 22, 15, 0) 60%), repeating-linear-gradient(135deg, rgba(189, 162, 109, 0.04) 0 2px, transparent 2px 10px), #11160f; border: 1px solid #bda26d; border-radius: 14px; padding: 18px 20px; color: #e8e2d0; box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55); }
.update-log-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.update-log-head h2 { margin: 0; font-size: 20px; color: #d8c79a; }
#updateLogClose { width: 32px; height: 32px; font-size: 20px; line-height: 1; border: 1px solid rgba(189, 162, 109, 0.4); border-radius: 8px; background: rgba(20, 26, 18, 0.9); color: #cbb27a; }
.update-log-entry { padding: 10px 0; border-top: 1px solid rgba(189, 162, 109, 0.16); }
.update-log-entry:first-child { border-top: none; padding-top: 2px; }
.update-log-ver { margin: 0 0 6px; font: 700 15px "KaiTi", "STKaiti", serif; color: #cbb27a; letter-spacing: 0.04em; }
.update-log-body ul { margin: 0; padding-left: 18px; }
.update-log-body li { margin: 4px 0; font-size: 14px; line-height: 1.6; color: #c8c2b0; }

.pwa-fs-button {
  position: fixed;
  left: 10px;
  top: 8px;
  bottom: auto;
  z-index: 9999;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid #bda26d;
  border-radius: 8px;
  background: rgba(20, 26, 18, 0.9);
  color: #d8c79a;
  opacity: 0.8;
}
.pwa-fs-button:hover { opacity: 1; }
/* V0.9.8.7：触屏/窄屏一律隐藏全屏按钮（与 index.html 创建门控双保险，确保任何情况下不压住手牌）。 */
@media (pointer: coarse), (max-width: 820px) {
  .pwa-fs-button { display: none !important; }
}

/* V0.9.8.7 自动续局：开始界面「继续上一局」入口 */
.resume-run-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 4px auto 16px;
  padding: 11px 32px;
  border: 1px solid #9d8a52;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(60, 46, 24, 0.94), rgba(34, 24, 16, 0.97));
  color: #f0dca8;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(157, 71, 42, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.resume-run-button:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(157, 71, 42, 0.42); }
.resume-run-main { font-size: 17px; letter-spacing: 0.1em; font-weight: 600; }
.resume-run-sub { font-size: 12px; color: #bca675; letter-spacing: 0.02em; }

/* V0.9.8.7 自动续局：新开一局覆盖确认弹窗 */
.overwrite-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 9, 7, 0.8);
}
.overwrite-confirm-card {
  max-width: 420px;
  width: 100%;
  padding: 26px 26px 22px;
  border: 1px solid #7c6a3e;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(48, 36, 22, 0.98), rgba(20, 16, 12, 0.98));
  color: #e8d6a8;
  text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}
.overwrite-confirm-card h3 { margin: 0 0 12px; font-size: 20px; color: #f0dca8; letter-spacing: 0.06em; }
.overwrite-confirm-card p { margin: 0 0 22px; font-size: 14px; line-height: 1.7; color: #cbb588; }
.overwrite-confirm-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.overwrite-confirm-actions button {
  padding: 9px 20px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #7c6a3e;
  background: rgba(28, 22, 14, 0.92);
  color: #d8c79a;
  transition: filter 0.15s ease;
}
#overwriteConfirmOk {
  border-color: #9d4f2a;
  background: linear-gradient(180deg, rgba(120, 40, 28, 0.92), rgba(70, 24, 18, 0.96));
  color: #f3d9b0;
}
.overwrite-confirm-actions button:hover { filter: brightness(1.15); }

/* V0.9.9.2 遗物抉择弹窗：回图时弹出，玩家收取/舍弃 */
.relic-offer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 9, 7, 0.82);
}
.relic-offer-card {
  max-width: 400px;
  width: 100%;
  padding: 24px 26px 22px;
  border: 1px solid #7c6a3e;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(48, 36, 22, 0.98), rgba(20, 16, 12, 0.98));
  color: #e8d6a8;
  text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  animation: relic-offer-reveal 360ms ease-out;
}
@keyframes relic-offer-reveal {
  0% { opacity: 0; transform: translateY(14px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.relic-offer-source { margin: 0 0 14px; font-size: 12px; letter-spacing: 0.14em; color: #a89463; }
.relic-offer-chip {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 164, 96, 0.6);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(52, 42, 24, 0.9), rgba(24, 18, 12, 0.7));
  box-shadow: 0 0 22px rgba(228, 196, 112, 0.35);
}
.relic-offer-chip b { font: 30px "KaiTi", serif; color: #f0d68a; line-height: 1; }
.relic-offer-chip.relic-blood { border-color: rgba(191, 64, 54, 0.7); box-shadow: 0 0 22px rgba(191, 64, 54, 0.4); }
.relic-offer-chip.relic-poison { border-color: rgba(99, 177, 88, 0.7); box-shadow: 0 0 22px rgba(99, 177, 88, 0.4); }
.relic-offer-chip.relic-jade { border-color: rgba(110, 174, 139, 0.7); box-shadow: 0 0 22px rgba(110, 174, 139, 0.4); }
.relic-offer-chip.relic-soul { border-color: rgba(154, 102, 176, 0.7); box-shadow: 0 0 22px rgba(154, 102, 176, 0.4); }
.relic-offer-card h3 { margin: 0 0 10px; font-size: 21px; color: #f0dca8; letter-spacing: 0.06em; }
.relic-offer-desc { margin: 0 0 22px; font-size: 14px; line-height: 1.7; color: #cbb588; }
.relic-offer-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.relic-offer-actions button {
  padding: 9px 22px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #7c6a3e;
  background: rgba(28, 22, 14, 0.92);
  color: #d8c79a;
  transition: filter 0.15s ease;
}
#relicOfferAccept {
  border-color: #b98a3c;
  background: linear-gradient(180deg, rgba(150, 110, 46, 0.95), rgba(90, 64, 24, 0.96));
  color: #f7e6bf;
}
.relic-offer-actions button:hover { filter: brightness(1.15); }

/* V0.9.8.8 游戏内更新闸：检测到线上新版本时阻断开始界面，z-index 高于 boot-loader(100000) 确保最上层 */
.update-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 28%, rgba(40, 30, 18, 0.96), rgba(6, 9, 7, 0.99));
}
.update-gate-card {
  max-width: 440px;
  width: 100%;
  padding: 30px 28px 24px;
  border: 1px solid #9d8a52;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 0%, rgba(52, 40, 24, 0.98), rgba(18, 14, 10, 0.99));
  color: #ecdbac;
  text-align: center;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.7);
}
.update-gate-seal {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border: 1px solid #bda26d;
  border-radius: 50%;
  font-size: 26px; color: #f0dca8;
  font-family: "STKaiti", "KaiTi", serif;
  background: rgba(157, 71, 42, 0.18);
  box-shadow: 0 0 22px rgba(157, 71, 42, 0.3);
}
.update-gate-card h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: 0.08em; color: #f3deac; }
.update-gate-card p { margin: 0 0 22px; font-size: 14px; line-height: 1.8; color: #cbb588; }
.update-gate-card button {
  display: block;
  width: 100%;
  margin: 0 auto 10px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 16px;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: 1px solid #9d4f2a;
  background: linear-gradient(180deg, rgba(122, 42, 28, 0.95), rgba(72, 26, 18, 0.97));
  color: #f5dcb2;
  transition: filter 0.15s ease, transform 0.15s ease;
}
#updateGateButton:hover { filter: brightness(1.15); transform: translateY(-1px); }
.update-gate-continue {
  border-color: #6f5f38 !important;
  background: rgba(28, 22, 14, 0.92) !important;
  color: #b9a373 !important;
  font-size: 13px !important;
}
.update-gate-hint { display: block; margin-top: 6px; font-size: 11px; color: #8a7a52; letter-spacing: 0.02em; }

/* PWA 一键安装按钮：浏览器支持安装时由 JS 显示，点一下弹原生安装框 */
.pwa-install-button {
  display: none;
  position: fixed;
  left: 12px;
  bottom: 58px;
  z-index: 9999;
  padding: 9px 16px;
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid #bda26d;
  border-radius: 8px;
  background: rgba(20, 26, 18, 0.96);
  color: #d8c79a;
}

/* ===================== 万蛊录（图鉴）===================== */
/* 整层块级滚动容器：与更新公告同款稳滚动，顶对齐、横向居中，避免 flex+margin:auto 在部分手机不触发触摸滚动 */
.wangulu-overlay { position: fixed; inset: 0; z-index: 230; display: flex; align-items: center; justify-content: center; padding: 16px 12px; box-sizing: border-box; }
.wangulu-overlay.hidden { display: none; }
.wangulu-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); }
.wangulu-panel { position: relative; z-index: 1; margin: 0 auto; width: 100%; max-width: 760px; max-height: 88vh; max-height: 88dvh; background: radial-gradient(ellipse at 50% 0%, rgba(74, 104, 84, 0.15), rgba(10, 13, 10, 0) 62%), repeating-linear-gradient(135deg, rgba(189, 162, 109, 0.045) 0 2px, transparent 2px 11px), #0d110b; border: 1px solid #bda26d; border-radius: 14px; padding: 0; color: #e8e2d0; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; overflow: hidden; }
.wangulu-head { flex: 0 0 auto; position: relative; z-index: 3; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 16px 18px 10px; border-bottom: 1px solid rgba(189, 162, 109, 0.22); background: #0d110b; border-radius: 14px 14px 0 0; }
.wangulu-head h2 { margin: 0; font: 700 24px "KaiTi", "STKaiti", serif; color: #cbb27a; letter-spacing: 0.12em; }
.wangulu-sub { font-family: "KaiTi", "STKaiti", serif; font-size: 13px; color: #8a8064; letter-spacing: 0.06em; }
.wangulu-close { position: absolute; right: 16px; top: 13px; width: 34px; height: 34px; font-size: 22px; line-height: 1; border: 1px solid rgba(189, 162, 109, 0.4); border-radius: 8px; background: rgba(20, 26, 18, 0.92); color: #cbb27a; cursor: pointer; }

/* 分类 tab */
.wangulu-tabs { flex: 0 0 auto; position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 8px; background: #0d110b; border-bottom: 1px solid rgba(189, 162, 109, 0.12); }
.wangulu-tab { position: relative; padding: 7px 14px; font: 600 14px "KaiTi", "STKaiti", serif; letter-spacing: 0.06em; border: 1px solid rgba(189, 162, 109, 0.4); border-radius: 8px; background: rgba(20, 26, 18, 0.85); color: #b9b099; cursor: pointer; }
.wangulu-tab.is-active { background: rgba(111, 143, 95, 0.22); border-color: #8fae6e; color: #e8e2d0; box-shadow: inset 0 0 12px rgba(143, 174, 110, 0.18); }
.wangulu-tab.is-soon { color: #6f6a58; cursor: default; }
.wangulu-soon { display: inline-block; margin-left: 6px; font-style: normal; font-size: 10px; color: #9a7d3f; border: 1px solid rgba(189, 162, 109, 0.35); border-radius: 6px; padding: 0 4px; letter-spacing: 0.04em; }

.wangulu-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding: 12px 18px 22px; }
.wangulu-empty { padding: 48px 16px; text-align: center; font-family: "KaiTi", "STKaiti", serif; font-size: 16px; line-height: 2; color: #8a8064; }
.wangulu-empty span { font-size: 13px; color: #6f6a58; }

/* 筛选条 */
.wangulu-filterbar { margin-bottom: 8px; }
.wangulu-filter-toggle { display: none; padding: 7px 14px; font: 600 13px "KaiTi", "STKaiti", serif; border: 1px solid rgba(189, 162, 109, 0.4); border-radius: 8px; background: rgba(20, 26, 18, 0.9); color: #cbb27a; cursor: pointer; }
.wangulu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wangulu-chip { padding: 5px 11px; font-size: 12.5px; border: 1px solid rgba(189, 162, 109, 0.32); border-radius: 999px; background: rgba(17, 22, 15, 0.8); color: #aaa088; cursor: pointer; }
.wangulu-chip.is-active { background: rgba(143, 174, 110, 0.2); border-color: #8fae6e; color: #e8e2d0; }
.wangulu-counter { margin: 6px 2px 10px; font: 600 12.5px "KaiTi", "STKaiti", serif; color: #8a8064; letter-spacing: 0.05em; }

/* 蛊虫网格 */
.wangulu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.wangulu-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 10px; border: 1px solid rgba(189, 162, 109, 0.32); border-radius: 12px; background: radial-gradient(ellipse at 50% 18%, rgba(74, 104, 84, 0.16), rgba(13, 17, 11, 0) 70%), #11160f; color: #e8e2d0; cursor: pointer; transition: border-color 0.18s, transform 0.18s; }
.wangulu-item:hover { border-color: #bda26d; transform: translateY(-2px); }
.wangulu-item-glyph { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; font: 700 30px "KaiTi", "STKaiti", serif; color: #d8c79a; border: 1px solid rgba(189, 162, 109, 0.5); border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(143, 174, 110, 0.18), rgba(10, 13, 10, 0) 72%); box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.5); }
.wangulu-item-name { font: 600 14px "KaiTi", "STKaiti", serif; letter-spacing: 0.05em; color: #d8d2c0; }
.wangulu-item-rarity { font-size: 11px; color: #8a8064; letter-spacing: 0.04em; }
/* 未解锁：黑影剪影 + ??? */
.wangulu-item.is-locked { cursor: default; background: #0b0e0a; border-color: rgba(120, 120, 110, 0.18); }
.wangulu-item.is-locked:hover { transform: none; border-color: rgba(120, 120, 110, 0.18); }
.wangulu-item.is-locked .wangulu-item-name { color: #5b5648; }
.wangulu-silhouette { color: #1c211a !important; background: #141a12 !important; border-color: rgba(90, 90, 82, 0.3) !important; text-shadow: 0 0 8px rgba(0, 0, 0, 0.8); box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.8); }

/* 品阶配色 */
.wangulu-r-凡蛊 { color: #9aa088; }
.wangulu-r-灵蛊 { color: #8fae6e; }
.wangulu-r-异蛊 { color: #cbb27a; }
.wangulu-r-王蛊 { color: #d74135; }

/* 详情 */
.wangulu-back { margin: 2px 0 12px; padding: 7px 14px; font: 600 14px "KaiTi", "STKaiti", serif; border: 1px solid rgba(189, 162, 109, 0.4); border-radius: 8px; background: rgba(20, 26, 18, 0.9); color: #cbb27a; cursor: pointer; }
.wangulu-detail-head h3 { margin: 0; font: 700 24px "KaiTi", "STKaiti", serif; color: #d8c79a; letter-spacing: 0.1em; }
.wangulu-detail-alias { margin: 4px 0 8px; font-family: "KaiTi", "STKaiti", serif; font-size: 14px; color: #8a8064; letter-spacing: 0.08em; }
.wangulu-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wangulu-tags span { font-size: 12px; padding: 3px 10px; border: 1px solid rgba(189, 162, 109, 0.3); border-radius: 999px; background: rgba(17, 22, 15, 0.8); color: #b9b099; }
.wangulu-sec { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(189, 162, 109, 0.16); }
.wangulu-sec h4 { margin: 0 0 8px; font: 700 15px "KaiTi", "STKaiti", serif; color: #8fae6e; letter-spacing: 0.1em; }
.wangulu-row { display: flex; gap: 10px; padding: 4px 0; font-size: 14px; line-height: 1.6; }
.wangulu-row-k { flex: 0 0 56px; color: #8a8064; font-family: "KaiTi", "STKaiti", serif; }
.wangulu-row-v { flex: 1; color: #d0caba; }
.wangulu-effect { margin: 0 0 6px; font-size: 15px; line-height: 1.7; color: #d8c79a; }
.wangulu-short { margin: 0; font-size: 13.5px; color: #9a9078; }
.wangulu-lore { margin: 0 0 8px; font-family: "KaiTi", "STKaiti", serif; font-size: 15px; line-height: 1.9; color: #c8c2b0; letter-spacing: 0.02em; }
/* 立绘框（暂用 glyph 单字） */
.wangulu-art { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; border: 1px solid rgba(189, 162, 109, 0.35); border-radius: 12px; background: radial-gradient(ellipse at 50% 30%, rgba(74, 104, 84, 0.2), rgba(10, 13, 10, 0) 72%), repeating-linear-gradient(135deg, rgba(189, 162, 109, 0.05) 0 2px, transparent 2px 12px), #0d110b; }
.wangulu-art-glyph { font: 700 88px "KaiTi", "STKaiti", serif; color: #d8c79a; text-shadow: 0 0 24px rgba(143, 174, 110, 0.3), 0 2px 6px rgba(0, 0, 0, 0.7); }
.wangulu-art-img {
  /* V0.9.8.3：统一 3:4 画框 + contain 完整居中 + 暗底兜底，宽图竖图都装框成"成品卡"，不再过高/过小留白。 */
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  background: radial-gradient(ellipse at 50% 30%, rgba(74, 104, 84, 0.12), #0b0f0a 72%);
}
.wangulu-art-stage { font-style: normal; font-family: "KaiTi", "STKaiti", serif; font-size: 13px; color: #8a8064; letter-spacing: 0.1em; }

/* 手机横屏：详情上下排布、立绘优先完整、文本不挤、筛选可折叠 */
@media (max-width: 920px), (max-height: 520px) {
  .wangulu-panel { max-width: 100%; max-height: 92vh; max-height: 92dvh; }
  .wangulu-head { padding: 12px 14px 8px; }
  .wangulu-tabs { padding: 10px 14px 6px; }
  .wangulu-content { padding: 10px 14px 18px; }
  .wangulu-close { top: 10px; right: 12px; }
  .wangulu-head h2 { font-size: 21px; }
  .wangulu-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .wangulu-item-glyph { width: 48px; height: 48px; font-size: 26px; }
  .wangulu-filter-toggle { display: inline-flex; }
  .wangulu-filterbar .wangulu-chips { display: none; }
  .wangulu-filterbar.is-open .wangulu-chips { display: flex; margin-top: 8px; }
  .wangulu-art-glyph { font-size: 64px; }
  .wangulu-art-img { max-width: 200px; }
  .wangulu-row { flex-direction: column; gap: 2px; }
  .wangulu-row-k { flex: none; }
}

/* 命蛊残卷（收进万蛊录的标签） */
.wangulu-lore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 4px; }
.wangulu-lore-detail { margin-top: 6px; }
@media (max-width: 920px), (max-height: 520px) { .wangulu-lore-grid { grid-template-columns: 1fr; } }

/* 生态·未实装 + 列表缩略立绘 */
.wangulu-item-thumb { padding: 0 !important; overflow: hidden; }
.wangulu-item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.wangulu-eco-badge { color: #9a7d3f !important; border: 1px solid rgba(189, 162, 109, 0.4); border-radius: 6px; padding: 0 6px; letter-spacing: 0.04em; }
.wangulu-item.is-eco .wangulu-item-glyph { border-color: rgba(154, 125, 63, 0.6); }
.wangulu-unimpl { color: #9a7d3f !important; font-style: normal; }

/* 待补立绘占位标记(无图的战斗蛊) */
.wangulu-glyph-pending { position: relative; }
.wangulu-pending-corner { position: absolute; right: -2px; bottom: -2px; font-style: normal; font-size: 9px; line-height: 1; padding: 2px 4px; border-radius: 6px; background: rgba(20, 26, 18, 0.95); border: 1px solid rgba(189, 162, 109, 0.45); color: #9a7d3f; }
.wangulu-art-pending { display: inline-block; margin-top: 8px; font-size: 12px; letter-spacing: 0.12em; color: #9a7d3f; border: 1px dashed rgba(189, 162, 109, 0.5); border-radius: 6px; padding: 3px 12px; }

/* ===================== 图鉴任务预埋（V0.9.5.2）纯展示样式 ===================== */
/* 总览 · 蛊道进境 */
.codex-progress { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 4px; }
.codex-progress-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 12px; border: 1px solid rgba(189, 162, 109, 0.3); border-radius: 12px; background: radial-gradient(ellipse at 50% 16%, rgba(74, 104, 84, 0.14), rgba(13, 17, 11, 0) 70%), #11160f; }
.codex-progress-num { font: 700 22px "KaiTi", "STKaiti", serif; color: #d8c79a; letter-spacing: 0.04em; }
.codex-progress-k { font: 600 12.5px "KaiTi", "STKaiti", serif; color: #8a8064; letter-spacing: 0.06em; }
.codex-overview-verse { margin: 18px 2px 4px; font: 600 14.5px "KaiTi", "STKaiti", serif; line-height: 1.9; color: #9a7d3f; letter-spacing: 0.08em; text-align: center; }

/* 图鉴任务卡 */
.codex-task-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.codex-task-card { padding: 14px 16px 16px; border: 1px solid rgba(189, 162, 109, 0.28); border-radius: 12px; background: linear-gradient(180deg, rgba(17, 22, 15, 0.95), rgba(13, 17, 11, 0.92)); }
.codex-task-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.codex-task-head h4 { margin: 0; font: 700 17px "KaiTi", "STKaiti", serif; color: #d8c79a; letter-spacing: 0.08em; }
.codex-seed-badge { font: 600 11.5px "KaiTi", "STKaiti", serif; color: #9a7d3f; border: 1px solid rgba(189, 162, 109, 0.45); border-radius: 6px; padding: 2px 8px; letter-spacing: 0.06em; white-space: nowrap; }
.codex-task-cond, .codex-task-reward { margin: 9px 0 0; font: 600 13.5px "KaiTi", "STKaiti", serif; line-height: 1.7; color: #c8c2af; }
.codex-task-k { display: inline-block; margin-right: 8px; color: #8fae6e; letter-spacing: 0.1em; }
.codex-task-bar { margin: 11px 0 6px; height: 7px; border-radius: 5px; background: rgba(20, 26, 18, 0.9); border: 1px solid rgba(189, 162, 109, 0.2); overflow: hidden; }
.codex-task-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, rgba(143, 174, 110, 0.55), rgba(189, 162, 109, 0.65)); transition: width 0.3s; }
.codex-task-prog { margin: 0; font: 600 12px "KaiTi", "STKaiti", serif; color: #8a8064; letter-spacing: 0.05em; }

/* 初始卡组变体预告 */
.codex-variant-note { margin-top: 16px; padding: 14px 16px; border: 1px dashed rgba(189, 162, 109, 0.45); border-radius: 12px; background: rgba(13, 17, 11, 0.55); }
.codex-variant-note h4 { margin: 0 0 8px; font: 700 15px "KaiTi", "STKaiti", serif; color: #8fae6e; letter-spacing: 0.1em; }
.codex-variant-note p { margin: 6px 0; font: 600 13px "KaiTi", "STKaiti", serif; line-height: 1.7; color: #b9b099; }
.codex-variant-note ul { margin: 6px 0; padding-left: 20px; }
.codex-variant-note li { font: 600 13px "KaiTi", "STKaiti", serif; line-height: 1.8; color: #c8c2af; }
.codex-variant-warn { color: #9a7d3f !important; }

/* 详情 · 相关图鉴任务 */
.wangulu-task-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; margin-top: 6px; border: 1px solid rgba(189, 162, 109, 0.25); border-radius: 9px; background: rgba(17, 22, 15, 0.7); }
.wangulu-task-name { font: 600 14px "KaiTi", "STKaiti", serif; color: #d8c79a; letter-spacing: 0.06em; }
.wangulu-task-state { font: 600 12px "KaiTi", "STKaiti", serif; color: #9a7d3f; border: 1px solid rgba(189, 162, 109, 0.4); border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.wangulu-task-foot { margin: 8px 2px 0; font: 600 11.5px "KaiTi", "STKaiti", serif; color: #6f6a58; letter-spacing: 0.05em; }

/* 手机横屏断点：文字可读不挤 */
@media (max-width: 920px), (max-height: 520px) {
  .codex-progress { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
  .codex-progress-cell { padding: 12px 6px 10px; }
  .codex-progress-num { font-size: 19px; }
  .codex-overview-verse { font-size: 13px; line-height: 1.8; }
  .codex-task-card { padding: 12px 13px 13px; }
  .codex-task-head h4 { font-size: 16px; }
  .codex-task-cond, .codex-task-reward { font-size: 12.5px; }
  .wangulu-task-link { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ===================== V0.9.6 第二层 生态关卡样式（沿用 .map-result/.wangulu-* 暗黑东方质感） ===================== */
.result-card.unfinished-path-result,
.result-card.layer2-route-result,
.result-card.layer2-branch-result {
  border-color: rgba(120, 180, 120, 0.28);
  box-shadow: 0 0 38px rgba(40, 70, 45, 0.4), inset 0 0 60px rgba(20, 30, 22, 0.5);
}
.result-card.unfinished-path-result .result-seal { background: radial-gradient(circle at 50% 40%, #2c5038, #10180f); }

/* 路线选择 */
.layer2-route-grid { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.layer2-route-card {
  flex: 1 1 240px; max-width: 320px; text-align: left;
  background: linear-gradient(160deg, rgba(22, 28, 24, 0.92), rgba(12, 14, 13, 0.96));
  border: 1px solid rgba(120, 150, 110, 0.32); border-radius: 14px;
  padding: 16px 16px 18px; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  color: #d8e2d4;
}
.layer2-route-card:hover { transform: translateY(-3px); border-color: rgba(170, 210, 150, 0.6); box-shadow: 0 10px 26px rgba(20, 40, 24, 0.5); }
.layer2-route-icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; font-size: 22px; border-radius: 10px; background: rgba(40, 60, 42, 0.7); border: 1px solid rgba(140, 180, 130, 0.4); margin-bottom: 8px; }
.layer2-route-name { display: block; font-size: 19px; letter-spacing: 2px; color: #eaf3e4; margin-bottom: 8px; }
.layer2-route-intro { font-size: 13px; line-height: 1.6; color: #b9c6b2; margin: 0 0 10px; }
.layer2-route-line { font-size: 12.5px; line-height: 1.5; margin: 3px 0; padding-left: 10px; position: relative; }
.layer2-route-line::before { content: ""; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: rgba(160, 200, 140, 0.7); }
.layer2-route-rec { color: #9fd49a; }
.layer2-route-risk { color: #d8a98a; }
.layer2-route-risk::before { background: rgba(210, 140, 110, 0.8); }
.layer2-route-foes { color: #9aa6b0; }
.layer2-route-foes::before { background: rgba(150, 170, 190, 0.7); }

/* 血沼路线卡专属偏红（第二张） */
.layer2-route-card[data-layer2-route="bloodmarsh"] { border-color: rgba(170, 90, 90, 0.34); }
.layer2-route-card[data-layer2-route="bloodmarsh"]:hover { border-color: rgba(220, 110, 110, 0.62); box-shadow: 0 10px 26px rgba(50, 18, 18, 0.5); }
.layer2-route-card[data-layer2-route="bloodmarsh"] .layer2-route-icon { background: rgba(64, 30, 30, 0.72); border-color: rgba(190, 110, 110, 0.42); }

/* 三选一分岔 */
.layer2-branch-grid { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.layer2-branch-card {
  flex: 1 1 150px; max-width: 200px; cursor: pointer; text-align: center;
  background: linear-gradient(160deg, rgba(24, 26, 30, 0.92), rgba(12, 13, 16, 0.96));
  border: 1px solid rgba(130, 140, 160, 0.3); border-radius: 12px; padding: 16px 12px; color: #d6dae2;
  transition: transform .15s ease, border-color .15s ease;
}
.layer2-branch-card:hover { transform: translateY(-3px); border-color: rgba(180, 190, 220, 0.6); }
.layer2-branch-card strong { display: block; font-size: 16px; letter-spacing: 1px; margin-bottom: 6px; color: #eef0f6; }
.layer2-branch-card small { font-size: 12px; color: #9aa0ac; line-height: 1.5; }

/* 第二层结算块 */
.layer2-summary-block strong { color: #cfe0c6; }

/* 万蛊录 · 敌怪/首领暗色占位单字框 */
.wangulu-item-glyph.wangulu-glyph-foe {
  background: radial-gradient(circle at 50% 35%, rgba(60, 40, 44, 0.9), rgba(16, 14, 16, 0.96));
  border: 1px solid rgba(140, 90, 90, 0.4); color: #d8b9b9;
}

/* ===== 手机断点（与现有 mobile 战斗/弹窗一致，窄屏纵向堆叠） ===== */
@media (max-width: 720px) {
  .layer2-route-grid { flex-direction: column; align-items: stretch; }
  .layer2-route-card { max-width: none; }
  .layer2-branch-grid { gap: 8px; }
  .layer2-branch-card { flex: 1 1 30%; padding: 12px 8px; }
  .layer2-branch-card strong { font-size: 14px; }
  .layer2-branch-card small { font-size: 11px; }
}
@media (max-width: 480px) {
  .layer2-route-card { padding: 13px; }
  .layer2-route-name { font-size: 17px; }
  .layer2-route-intro { font-size: 12px; }
}
/* ===== V0.9.6.1 第二层地图化 + 敌人状态 tooltip 暗黑东方样式 ===== */

/* ===================== V0.9.8 第三层主题样式（加性，仅 .layer3-*，骨塔骨白冷调 / 蜂窟蜂蜜暗金；不改一二层） ===================== */
.result-card.layer3-route-result,
.result-card.layer3-branch-result {
  border-color: rgba(190, 190, 180, 0.30);
  box-shadow: 0 0 38px rgba(60, 60, 56, 0.4), inset 0 0 60px rgba(18, 18, 16, 0.5);
}
.result-card.command-path-result .result-seal { background: radial-gradient(circle at 50% 40%, #4a463a, #14120d); }

/* 第三层路线卡：骨塔（首张）骨白冷调 */
.layer3-route-card { border-color: rgba(190, 190, 180, 0.30); }
.layer3-route-card:hover { border-color: rgba(214, 214, 200, 0.60); box-shadow: 0 10px 26px rgba(46, 46, 42, 0.5); }
.layer3-route-card .layer2-route-icon { background: rgba(54, 54, 50, 0.72); border-color: rgba(190, 190, 176, 0.42); }
/* 蜂窟路线卡（data-layer3-route="beehive"）蜂蜜暗金 */
.layer3-route-card[data-layer3-route="beehive"] { border-color: rgba(210, 170, 90, 0.34); }
.layer3-route-card[data-layer3-route="beehive"]:hover { border-color: rgba(232, 190, 104, 0.62); box-shadow: 0 10px 26px rgba(58, 44, 14, 0.5); }
.layer3-route-card[data-layer3-route="beehive"] .layer2-route-icon { background: rgba(66, 50, 18, 0.72); border-color: rgba(214, 176, 96, 0.46); }

/* 第三层分岔卡：冷骨白基调 */
.layer3-branch-card { border-color: rgba(170, 172, 168, 0.30); }
.layer3-branch-card:hover { border-color: rgba(206, 208, 200, 0.60); }

/* 第三层结算块（镜像 layer2-summary-block） */
.layer3-summary-block strong { color: #ddd9cc; }

/* 第三层敌人长状态标签：窄屏允许换行/缩字，避免溢出（仅作用于第三层新机制标签，不改既有 .enemy-status 默认） */
.enemy-status.enemy-charge-status { white-space: normal; line-height: 1.25; max-width: 100%; word-break: break-word; }
@media (max-width: 480px) {
  .enemy-status.enemy-charge-status { font-size: 11px; letter-spacing: 0; }
  body.mobile-combat-safe .enemy-status.enemy-charge-status { font-size: 10.5px; }
}

/* 第三层结算路线染色：骨塔骨白冷调 / 蜂窟蜂蜜暗金（镜像 run-sec-miasma / run-sec-bloodmarsh） */
.run-sec-brief.run-sec-bone { border-left-color: #9a988c; background: rgba(154, 152, 140, 0.06); }
.run-sec-brief.run-sec-beehive { border-left-color: #b88a32; background: rgba(184, 138, 50, 0.06); }


/* 第二层残卷节点：复用 .map-node，给生态偏色（一层无 reward 节点，不影响一层） */
.map-node.reward {
  border-color: rgba(150, 122, 64, 0.45);
  background: linear-gradient(160deg, rgba(40, 30, 14, 0.55), rgba(14, 10, 6, 0.85));
}
.map-node.reward .map-node-icon {
  color: var(--gold, #c8a85a);
}
.map-node.reward.available {
  box-shadow: 0 0 0 1px rgba(189, 162, 109, 0.4), 0 8px 22px rgba(0, 0, 0, 0.5);
}

/* 第二层 Boss 节点末端危险感（二层 boss icon=瘴/血，一层 boss icon=盘 视感不变） */
.map-node.boss .map-node-icon {
  text-shadow: 0 0 10px rgba(120, 40, 40, 0.55);
}
.map-segment.segment-step-4 .map-segment-label span {
  letter-spacing: 0.12em;
}

/* 敌人状态可交互态：复用 .enemy-status，加点击/聚焦反馈 + 手型 */
.enemy-status[data-keyword] {
  cursor: help;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.enemy-status[data-keyword]:hover,
.enemy-status[data-keyword]:focus-visible,
.enemy-status[data-keyword]:active {
  border-color: rgba(189, 162, 109, 0.6);
  box-shadow: 0 0 0 1px rgba(189, 162, 109, 0.35);
}

/* 第二层敌人狂怒状态条（红） */
.enemy-status.enemy-enrage-status {
  border-color: rgba(165, 64, 58, 0.5);
  color: #d28a82;
  background: rgba(96, 34, 30, 0.18);
}

/* tooltip 不遮挡战斗按钮：#keywordTooltip 已 pointer-events:none + z-index:120，
 * 这里仅约束移动端最大宽度，避免横屏溢出。 */
@media (max-width: 820px) {
  .keyword-tooltip {
    max-width: min(220px, calc(100vw - 24px));
    font-size: 11px;
  }
  .map-node.reward .map-node-icon {
    font-size: 1.1em;
  }
}
@media (max-width: 560px) {
  .keyword-tooltip {
    max-width: calc(100vw - 28px);
  }
}
/* ===================== DEV MODE 开发者测试面板 · V0.9.6.2 ===================== */
/* 仅在 body.dev-mode-on 下出现（initDevMode 注入 class）；与游戏 UI 视觉区分、暗黑东方基调。 */
body:not(.dev-mode-on) .dev-mode-button,
body:not(.dev-mode-on) .dev-panel,
body:not(.dev-mode-on) .dev-mode-badge { display: none !important; }

.dev-mode-badge {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 99998;
  font-size: 10px;
  letter-spacing: 2px;
  color: #c8923b;
  background: rgba(10, 13, 10, 0.78);
  border: 1px solid rgba(200, 146, 59, 0.45);
  border-radius: 4px;
  padding: 2px 7px;
  pointer-events: none;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  text-shadow: 0 0 6px rgba(200, 146, 59, 0.5);
}

.dev-mode-button {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 99999;
  min-width: 56px;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f3e6c8;
  background: linear-gradient(160deg, #3a2614, #1a1108);
  border: 1px solid #c8923b;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(200, 146, 59, 0.25);
  cursor: pointer;
  font-family: "Noto Serif SC", "Noto Sans SC", serif;
}
.dev-mode-button:hover { background: linear-gradient(160deg, #4a3018, #221608); }
.dev-mode-button:active { transform: translateY(1px); }

.dev-panel {
  position: fixed;
  right: 12px;
  bottom: 64px;
  z-index: 99999;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(8, 11, 9, 0.96);
  border: 1px solid #c8923b;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  color: #d9d2c0;
  font-family: "Noto Sans SC", system-ui, sans-serif;
}
.dev-panel.hidden { display: none !important; }

.dev-panel-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(200, 146, 59, 0.35);
  background: linear-gradient(180deg, rgba(58, 38, 20, 0.6), rgba(8, 11, 9, 0));
  flex: 0 0 auto;
}
.dev-panel-titles { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.dev-panel-title { color: #f3c873; font-size: 15px; letter-spacing: 1px; }
.dev-panel-sub { color: #9a9484; font-size: 11px; line-height: 1.45; }
.dev-panel-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 1;
  color: #d9d2c0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(200, 146, 59, 0.4);
  border-radius: 6px;
  cursor: pointer;
}
.dev-panel-close:hover { background: rgba(255, 255, 255, 0.12); }

.dev-panel-body {
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.dev-group { margin-bottom: 8px; border: 1px solid rgba(200, 146, 59, 0.18); border-radius: 8px; overflow: hidden; }
.dev-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 700;
  color: #e6c98a;
  background: rgba(200, 146, 59, 0.1);
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.dev-group-caret { font-style: normal; transition: transform 0.15s ease; }
.dev-group.collapsed .dev-group-caret { transform: rotate(-90deg); }
.dev-group.collapsed .dev-group-grid { display: none; }

.dev-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
}
.dev-action-btn {
  min-height: 44px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.2;
  color: #e8e1cf;
  background: linear-gradient(160deg, #232a22, #141810);
  border: 1px solid rgba(200, 146, 59, 0.35);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  word-break: break-all;
}
.dev-action-btn:hover { background: linear-gradient(160deg, #2e362c, #1a2014); border-color: #c8923b; }
.dev-action-btn:active { transform: translateY(1px); }

/* —— 手机横屏战斗：不挡结束回合/手牌区，面板更窄、贴右上避让底部手牌 —— */
@media (max-width: 920px) and (orientation: landscape) {
  .dev-panel {
    width: 280px;
    max-height: 86vh;
    top: 8px;
    bottom: auto;
    right: 8px;
  }
  .dev-mode-button { top: 38px; left: 8px; right: auto; bottom: auto; }
  .dev-mode-badge { left: 6px; top: 6px; bottom: auto; }
}
@media (max-width: 560px) {
  .dev-panel { width: calc(100vw - 16px); right: 8px; }
  .dev-group-grid { grid-template-columns: 1fr 1fr; }
}
/* =================== /DEV MODE =================== */

/* ===================== V0.9.6.3 二层机制状态/浮字配色（加性，缺失则回退默认） ===================== */
.vulnerable-status { color: #f3b0b0; border-color: rgba(208, 72, 72, 0.55); background: rgba(110, 28, 28, 0.30); }
.enemy-status.enemy-boss-phase {
  color: #ffd9ad;
  border-color: rgba(214, 116, 54, 0.78);
  background: linear-gradient(160deg, rgba(120, 42, 18, 0.5), rgba(38, 12, 8, 0.42));
  text-shadow: 0 0 8px rgba(232, 122, 50, 0.6);
}
.enemy-status.enemy-charge-status { color: #ffe2a0; border-color: rgba(200, 160, 60, 0.6); }
.heal-float { color: #8fe6a8; text-shadow: 0 0 8px rgba(74, 200, 120, 0.6); }

/* ===================== V0.9.6.4 启动加载界面 boot-loader（加性，暗黑东方·墨绿瘴气/暗红符纹/金褐字/虫影古籍） ===================== */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 100000; /* 高于 .dev-panel(99999)、.start-screen(50)、所有弹窗；淡出后才露出主菜单与 DEV 按钮 */
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 22%, rgba(75, 119, 88, 0.10), transparent 42%),
    radial-gradient(circle at 18% 82%, rgba(157, 47, 42, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(10, 14, 11, 0.99), rgba(6, 8, 6, 0.99)),
    #080b09;
  color: var(--gold, #bda26d);
  font-family: "STKaiti", "KaiTi", serif;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.boot-loader.boot-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
body.boot-active { overflow: hidden; }

/* 瘴气雾层（CSS 轻动画，无 canvas/复杂粒子） */
.boot-loader-fog {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 30%, rgba(73, 125, 98, 0.16), transparent 45%),
    radial-gradient(circle at 72% 64%, rgba(73, 125, 98, 0.12), transparent 50%);
  filter: blur(6px);
  opacity: 0.8;
  animation: boot-fog-drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes boot-fog-drift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1.02); }
  100% { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

/* 暗红符纹环（缓慢旋转，古籍感） */
.boot-loader-runes {
  position: absolute;
  width: min(70vmin, 460px);
  height: min(70vmin, 460px);
  border: 1px solid rgba(157, 47, 42, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(157, 47, 42, 0.10) inset, 0 0 30px rgba(189, 162, 109, 0.06);
  opacity: 0.55;
  animation: boot-runes-spin 38s linear infinite;
  pointer-events: none;
}
.boot-loader-runes::before {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px dashed rgba(189, 162, 109, 0.14);
  border-radius: 50%;
  animation: boot-runes-spin 26s linear infinite reverse;
}
@keyframes boot-runes-spin {
  to { transform: rotate(360deg); }
}

.boot-loader-content {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-width: 100%;
  text-align: center;
}

/* 蛊印（虫影呼吸） */
.boot-loader-seal {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(189, 162, 109, 0.34);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(73, 125, 98, 0.22), rgba(20, 14, 12, 0.7));
  box-shadow: 0 0 22px rgba(73, 125, 98, 0.22), inset 0 0 14px rgba(0, 0, 0, 0.5);
  animation: boot-seal-pulse 3.6s ease-in-out infinite;
}
.boot-loader-seal span {
  font-size: 34px;
  color: var(--gold, #bda26d);
  text-shadow: 0 0 12px rgba(189, 162, 109, 0.5);
}
@keyframes boot-seal-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(73, 125, 98, 0.18), inset 0 0 14px rgba(0, 0, 0, 0.5); transform: scale(1); }
  50% { box-shadow: 0 0 30px rgba(73, 125, 98, 0.34), inset 0 0 14px rgba(0, 0, 0, 0.5); transform: scale(1.04); }
}

.boot-loader-title {
  margin: 0 0 8px;
  color: var(--gold, #bda26d);
  font: 700 clamp(34px, 8vw, 54px) "STKaiti", "KaiTi", serif;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 22px rgba(189, 162, 109, 0.22);
}
.boot-loader-subtitle {
  margin: 0 0 30px;
  min-height: 34px;
  color: var(--jade-bright, #86b798);
  font-size: clamp(12px, 2.4vw, 14px);
  line-height: 1.6;
  letter-spacing: 0.08em;
  opacity: 0.86;
  transition: opacity 0.4s ease;
}

.boot-loader-progress { margin: 0 auto 18px; width: min(320px, 86vw); }
.boot-loader-bar {
  height: 6px;
  border: 1px solid rgba(189, 162, 109, 0.30);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.36);
  overflow: hidden;
}
.boot-loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--jade-bright, #86b798), var(--gold, #bda26d));
  box-shadow: 0 0 10px rgba(134, 183, 152, 0.5);
  border-radius: 2px;
  transition: width 0.28s ease-out;
}
.boot-loader-percent {
  margin-top: 8px;
  font: 700 12px Georgia, "STKaiti", serif;
  letter-spacing: 0.06em;
  color: var(--gold, #bda26d);
}

.boot-loader-status {
  margin: 0 0 22px;
  min-height: 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(189, 162, 109, 0.74);
}

.boot-loader-start {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 200px;
  padding: 12px 34px;
  border: 1px solid rgba(189, 162, 109, 0.5);
  border-radius: 2px;
  color: var(--paper, #ded5bd);
  cursor: pointer;
  background: linear-gradient(135deg, rgba(91, 28, 25, 0.7), rgba(42, 20, 17, 0.86));
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.05);
  transition: filter 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
  animation: boot-start-in 0.5s ease both;
}
.boot-loader-start-main { font: 700 16px "STKaiti", "KaiTi", serif; letter-spacing: 0.12em; }
.boot-loader-start-sub { font-size: 10px; letter-spacing: 0.16em; color: rgba(222, 213, 189, 0.62); }
.boot-loader-start:hover:not(:disabled) {
  border-color: var(--gold, #bda26d);
  filter: brightness(1.16);
  transform: translateY(-2px);
}
.boot-loader-start:disabled { opacity: 0.62; cursor: wait; }
.boot-loader-start.hidden { display: none !important; }
@keyframes boot-start-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 安全区避让（刘海/异形屏） */
@supports (padding: max(0px)) {
  .boot-loader {
    padding:
      max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  }
}

/* 手机横屏 / 窄屏适配 */
@media (max-width: 768px) {
  .boot-loader { padding: 16px; }
  .boot-loader-seal { width: 60px; height: 60px; margin-bottom: 10px; }
  .boot-loader-seal span { font-size: 28px; }
  .boot-loader-title { font-size: clamp(28px, 7vw, 42px); letter-spacing: 0.1em; }
  .boot-loader-subtitle { margin-bottom: 22px; min-height: 30px; }
  .boot-loader-progress { width: min(280px, 82vw); }
  .boot-loader-start { min-width: 168px; padding: 11px 26px; }
}

/* 横屏矮屏（手机横置）：纵向紧凑，标题不被地址栏挤 */
@media (orientation: landscape) and (max-height: 520px) {
  .boot-loader-seal { width: 46px; height: 46px; margin-bottom: 6px; }
  .boot-loader-seal span { font-size: 22px; }
  .boot-loader-title { font-size: clamp(24px, 6vh, 36px); margin-bottom: 4px; }
  .boot-loader-subtitle { margin-bottom: 14px; min-height: 24px; font-size: 11px; }
  .boot-loader-progress { margin-bottom: 12px; }
  .boot-loader-status { margin-bottom: 12px; }
  .boot-loader-start { padding: 9px 24px; }
  .boot-loader-runes { width: min(54vmin, 320px); height: min(54vmin, 320px); }
}

/* 超小屏 */
@media (max-width: 380px) {
  .boot-loader-title { font-size: 26px; }
  .boot-loader-progress { width: 86vw; }
}

/* 尊重无障碍：降低动画 */
@media (prefers-reduced-motion: reduce) {
  .boot-loader-fog, .boot-loader-runes, .boot-loader-runes::before, .boot-loader-seal, .boot-loader-start { animation: none !important; }
}
/* ===================== /V0.9.6.4 boot-loader ===================== */


/* ===== V0.9.7 结算反馈：7 分区卡片化 + 配色 + 手机可滚 ===== */
.run-summary {
  display: block;
  max-width: 540px;
  margin: 0 auto;
}
.run-summary-section {
  display: block;
  margin: 0 0 12px;
  padding: 13px 15px 14px;
  border: 1px solid rgba(189, 162, 109, 0.2);
  border-left: 3px solid rgba(189, 162, 109, 0.42);
  background: rgba(255, 255, 255, 0.022);
  border-radius: 2px;
  text-align: left;
}
.run-summary-section h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font: 11px "KaiTi", serif;
  letter-spacing: 0.22em;
  font-weight: normal;
}
.run-summary-section p { margin: 0 0 4px; }
.run-summary-section .run-sec-text {
  color: var(--paper);
  font: 14px "KaiTi", serif;
  line-height: 1.55;
}
.run-sec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
}
.run-sec-grid > div.wide { grid-column: 1 / -1; }
.run-sec-grid span { display: block; color: var(--muted); font-size: 9px; letter-spacing: 0.1em; }
.run-sec-grid strong { display: block; margin-top: 2px; color: var(--paper); font: 14px "KaiTi", serif; line-height: 1.4; }

/* 结果分区：死亡暗红 / 通关暗金 */
.run-sec-result-text { font: 18px "KaiTi", serif; letter-spacing: 0.1em; }
.run-sec-result.run-sec-clear { border-left-color: #c9a24a; background: rgba(201, 162, 74, 0.06); }
.run-sec-result.run-sec-clear .run-sec-result-text { color: #d8b864; }
.run-sec-result.run-sec-death { border-left-color: #97352f; background: rgba(151, 53, 47, 0.06); }
.run-sec-result.run-sec-death .run-sec-result-text { color: #d1857c; }
.run-sec-sub { color: var(--muted); font: 12px "KaiTi", serif; line-height: 1.5; }

/* 称号：金褐醒目 */
.run-sec-title { border-left-color: #bda26d; background: rgba(189, 162, 109, 0.07); }
.run-sec-title-name {
  color: #cba96a;
  font: 22px "KaiTi", serif;
  letter-spacing: 0.18em;
  text-shadow: 0 0 12px rgba(189, 162, 109, 0.28);
}
.run-sec-title-sub { color: #a7926a; font: 12.5px "KaiTi", serif; line-height: 1.55; margin-top: 5px; }

/* 路线染色：瘴林墨绿 / 血沼暗红 */
.run-sec-brief.run-sec-miasma { border-left-color: #4a7a4f; background: rgba(74, 122, 79, 0.06); }
.run-sec-brief.run-sec-bloodmarsh { border-left-color: #97352f; background: rgba(151, 53, 47, 0.05); }

/* 死因分析 / 通关评语 */
.run-sec-deathcause { border-left-color: #97352f; background: rgba(151, 53, 47, 0.05); }
.run-sec-cause-title { color: #d1857c; font: 15px "KaiTi", serif; letter-spacing: 0.08em; }
.run-sec-detail { color: var(--muted); font: 11.5px "KaiTi", serif; line-height: 1.5; }
.run-sec-commentary { border-left-color: #c9a24a; background: rgba(201, 162, 74, 0.05); }
.run-sec-commentary .run-sec-text { color: #cbb47e; }

/* 关键数据折叠 */
.run-sec-more { margin-top: 9px; }
.run-sec-more summary {
  cursor: pointer;
  color: var(--muted);
  font: 11px "KaiTi", serif;
  letter-spacing: 0.16em;
  padding: 3px 0;
}
.run-sec-more summary:hover { color: #bda26d; }
.run-sec-more .run-sec-grid { margin-top: 8px; }

/* 流派条 */
.run-sec-faction-head { color: var(--paper); font: 14px "KaiTi", serif; letter-spacing: 0.08em; }
.faction-bars { margin-top: 8px; }
.faction-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.faction-bar-row > span { width: 34px; flex: 0 0 34px; color: var(--muted); font-size: 11px; }
.faction-bar-track { flex: 1; height: 7px; background: rgba(255, 255, 255, 0.05); border-radius: 4px; overflow: hidden; }
.faction-bar-track > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(189, 162, 109, 0.55), rgba(201, 162, 74, 0.85));
  border-radius: 4px;
}
.faction-bar-row > em { width: 36px; flex: 0 0 36px; text-align: right; color: #bda26d; font-style: normal; font-size: 11px; }
.faction-fallback { color: var(--muted); font: 12.5px "KaiTi", serif; }
.run-sec-bestiary { margin-top: 8px; color: var(--muted); font: 12px "KaiTi", serif; }

/* 推荐下一步 */
.run-sec-next { border-left-color: #8a7a4a; }
.run-sec-next .run-sec-text { color: #c5b486; }

/* 反馈分区 */
.run-sec-feedback .run-sec-text { color: #bda26d; font-size: 13px; }

/* 二层 prepend 块对齐分区卡片视觉体系（保留旧 className，仅在 .run-summary 容器内覆盖样式） */
.run-summary .layer2-summary-block {
  display: block;
  grid-column: auto;
  margin: 0 0 12px;
  padding: 11px 14px;
  border: 1px solid rgba(74, 122, 79, 0.3);
  border-left: 3px solid #4a7a4f;
  background: rgba(74, 122, 79, 0.06);
  border-radius: 2px;
  text-align: left;
}
.run-summary .layer2-summary-block span { display: block; color: var(--muted); font-size: 9px; letter-spacing: 0.1em; }
.run-summary .layer2-summary-block strong { display: block; margin-top: 3px; color: var(--paper); font: 14px "KaiTi", serif; line-height: 1.45; }

/* 手机可滚：结算遮罩内容溢出时纵向滚动（.result-card 用于结算页，原仅 .map-result 有 overflow，这里补结算页本体） */
.result-overlay { overflow-y: auto; }
.result-card:not(.map-result) {
  max-height: calc(100vh - 40px); /* 老内核 dvh 兜底 */
  max-height: calc(100dvh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
}
@media (max-width: 720px) {
  .run-summary { max-width: 100%; }
  .run-sec-title-name { font-size: 19px; }
  .run-sec-grid { gap: 6px 10px; }
  .result-card:not(.map-result) { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
}

/* V0.9.9.5 局内 UI 收口：手机横屏下重新排布双方信息，避免玩家立绘被手牌压住。 */
body.mobile-combat-safe .player-panel,
body.mobile-combat-safe .enemy-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  gap: 4px;
}

body.mobile-combat-safe .player-panel .panel-heading,
body.mobile-combat-safe .enemy-panel .enemy-heading {
  order: 0;
  margin-bottom: 0;
}

body.mobile-combat-safe .player-panel .vital-block,
body.mobile-combat-safe .enemy-panel .vital-block {
  order: 1;
  margin: 0;
}

body.mobile-combat-safe .player-panel .resource-grid {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0;
  min-height: 0;
}

body.mobile-combat-safe .player-panel .resource {
  flex: 1 1 calc(50% - 3px);
  min-width: 0;
  min-height: 22px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border-color: rgba(189, 162, 109, 0.18);
  background: rgba(8, 18, 13, 0.68);
}

body.mobile-combat-safe .player-panel .resource-icon {
  display: none;
}

body.mobile-combat-safe .player-panel .resource span:not(.resource-icon) {
  flex: 0 1 auto;
  min-width: 0;
  color: #a7926a;
  font-size: clamp(9px, 1.9vh, 11px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  font-size: clamp(9px, 1.9dvh, 11px);
  line-height: 1;
  white-space: nowrap;
}

body.mobile-combat-safe .player-panel .resource strong {
  margin-left: auto;
  color: var(--paper);
  font-size: clamp(12px, 2.6vh, 15px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  font-size: clamp(12px, 2.6dvh, 15px);
  line-height: 1;
  white-space: nowrap;
}

body.mobile-combat-safe .player-panel .player-portrait {
  order: 3;
  flex: 1 1 auto;
  min-height: clamp(68px, 18vh, 96px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  min-height: clamp(68px, 18dvh, 96px);
  max-height: clamp(82px, 24vh, 132px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: clamp(82px, 24dvh, 132px);
  margin: 2px 0 0;
}

body.mobile-combat-safe .enemy-panel .enemy-portrait {
  order: 2;
  flex: 1 1 auto;
  min-height: clamp(72px, 19vh, 104px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  min-height: clamp(72px, 19dvh, 104px);
  max-height: clamp(88px, 25vh, 138px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: clamp(88px, 25dvh, 138px);
  margin: 2px 0 0;
}

body.mobile-combat-safe .player-panel #buffList {
  order: 4;
  margin: 0;
  max-height: clamp(24px, 7vh, 44px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: clamp(24px, 7dvh, 44px);
  overflow: auto;
}

body.mobile-combat-safe .player-panel #combatRelicStrip {
  order: 5;
  margin: 0;
  /* V0.9.12.2 HUD止血：单行横滑——此前 max-height 22.5px 小于芯片 26px 恒裁底边，第二行起完全不可见，
     遗物越拿越多越看不见；改单行横向滚动后遗物再多也不撑高左列，触发脉冲也不再被裁。 */
  min-height: 28px;
  max-height: 30px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
body.mobile-combat-safe .player-panel #combatRelicStrip::-webkit-scrollbar { display: none; }

body.mobile-combat-safe .enemy-panel #enemyPower {
  /* V0.9.12.2 HUD止血：蓄势信息与意图条"蓄势已计入"双份占位，手机上省一行（桌面保留） */
  display: none;
}

body.mobile-combat-safe .enemy-panel #enemyStatusList {
  order: 4;
  max-height: clamp(24px, 7vh, 44px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  max-height: clamp(24px, 7dvh, 44px);
  margin: 0;
  overflow: auto;
}

body.mobile-combat-safe .player-panel .stat-line,
body.mobile-combat-safe .enemy-panel .stat-line {
  font-size: clamp(9px, 1.9vh, 11px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  font-size: clamp(9px, 1.9dvh, 11px);
  line-height: 1.15;
  margin-bottom: 2px;
}

body.mobile-combat-safe .player-panel .stat-line strong,
body.mobile-combat-safe .enemy-panel .stat-line strong {
  font-size: clamp(12px, 2.5vh, 15px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  font-size: clamp(12px, 2.5dvh, 15px);
}

body.mobile-combat-safe .player-panel .bar,
body.mobile-combat-safe .enemy-panel .bar {
  height: clamp(6px, 1.7vh, 9px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  height: clamp(6px, 1.7dvh, 9px);
}

body.mobile-combat-safe .combat-relic-strip {
  display: flex;
  flex-wrap: nowrap; /* V0.9.12.2 配合单行横滑 */
  gap: 3px;
}
body.mobile-combat-safe .combat-relic-chip {
  flex: 0 0 auto; /* V0.9.12.2 横滑时芯片不被压缩 */
}

body.mobile-combat-safe .combat-relic-chip {
  min-width: 0;
  padding: 2px 5px;
  font-size: 9px;
  line-height: 1.1;
}

body.mobile-combat-safe .buff-tag,
body.mobile-combat-safe .enemy-status-list .buff-tag {
  padding: 2px 5px;
  font-size: clamp(9px, 1.8vh, 10.5px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
  font-size: clamp(9px, 1.8dvh, 10.5px);
  line-height: 1.1;
  max-width: 100%;
}

@media (max-width: 960px) and (max-height: 440px) and (orientation: landscape) {
  body.mobile-combat-safe .game-shell {
    grid-template-columns: clamp(116px, 22vw, 154px) minmax(0, 1fr) clamp(112px, 21vw, 150px);
  }

  body.mobile-combat-safe .player-panel,
  body.mobile-combat-safe .enemy-panel {
    padding: 5px;
  }

  body.mobile-combat-safe .player-panel .player-portrait {
    min-height: clamp(62px, 17vh, 88px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    min-height: clamp(62px, 17dvh, 88px);
    max-height: clamp(76px, 23vh, 116px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    max-height: clamp(76px, 23dvh, 116px);
  }

  body.mobile-combat-safe .enemy-panel .enemy-portrait {
    min-height: clamp(66px, 18vh, 92px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    min-height: clamp(66px, 18dvh, 92px);
    max-height: clamp(78px, 24vh, 120px); /* 老内核 dvh 兜底(v0.9.20.3 全量清扫) */
    max-height: clamp(78px, 24dvh, 120px);
  }

  body.mobile-combat-safe .player-panel #buffList,
  body.mobile-combat-safe .enemy-panel #enemyStatusList {
    max-height: 30px;
  }
}

/* ===================== 万蛊录任务转正（V0.9.12）===================== */
.codex-task-card.is-done { border-color: rgba(176, 139, 76, 0.45); }
.codex-task-card.is-claimable { box-shadow: 0 0 18px rgba(176, 139, 76, 0.16), inset 0 0 16px rgba(176, 139, 76, 0.08); }
.codex-task-card.is-claimed {
  border-color: rgba(111, 176, 127, 0.42);
  background: linear-gradient(145deg, rgba(21, 39, 27, 0.92), rgba(8, 13, 10, 0.94));
}
.codex-task-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 3px 8px;
  border: 1px solid rgba(176, 139, 76, 0.42);
  border-radius: 999px;
  color: #e4c27a;
  background: rgba(176, 139, 76, 0.08);
  font: 600 12px "KaiTi", "STKaiti", serif;
  white-space: nowrap;
}
.codex-task-card.is-claimed .codex-task-stamp {
  color: #9fd29e;
  border-color: rgba(111, 176, 127, 0.46);
  background: rgba(77, 132, 82, 0.12);
}
.codex-task-note {
  margin: 0 0 10px;
  color: rgba(213, 199, 163, 0.78);
  font: 600 13px "KaiTi", "STKaiti", serif;
}
.codex-task-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.codex-task-claim {
  min-height: 32px;
  padding: 6px 13px;
  border: 1px solid rgba(176, 139, 76, 0.36);
  color: rgba(224, 210, 178, 0.74);
  background: rgba(20, 24, 18, 0.74);
  font: 700 13px "KaiTi", "STKaiti", serif;
  cursor: default;
}
.codex-task-claim.is-ready {
  cursor: pointer;
  color: #f1d48a;
  border-color: rgba(213, 168, 75, 0.72);
  background: linear-gradient(135deg, rgba(102, 48, 28, 0.76), rgba(31, 45, 27, 0.86));
  box-shadow: 0 0 14px rgba(213, 168, 75, 0.16);
}
.codex-task-claim.is-ready:hover {
  color: #fff2bd;
  border-color: rgba(238, 196, 91, 0.9);
  transform: translateY(-1px);
}
.codex-task-claim:disabled { opacity: 0.72; }

@media (max-width: 1024px) and (max-height: 600px) and (orientation: landscape) {
  .codex-task-actions { justify-content: stretch; }
  .codex-task-claim { width: 100%; min-height: 36px; }
}

/* ===================== 蛊修印录（V0.9.14）===================== */
/* 角标放左上：右上被 .hero-choice.selected::after「已选择」戳占用（z-index:5），放右上必叠字 */
.hero-seal-badge { position: absolute; top: 6px; left: 6px; z-index: 4; font-size: 10px; padding: 2px 8px; border-radius: 999px; border: 1px solid; letter-spacing: 0.08em; pointer-events: none; } /* V0.9.20.1：z 提到 4——立绘暗角遮罩(::after z3)此前盖住印记角标 */
/* 印阶配色对齐命名：铜印(普通)/银印(精英)/金印(死劫，与既有"死劫金印"设定一致) */
.seal-normal { color: #dcae85; border-color: rgba(190, 130, 80, 0.55); background: rgba(78, 50, 30, 0.5); }
.seal-elite { color: #ccd2dc; border-color: rgba(185, 193, 206, 0.6); background: rgba(62, 68, 78, 0.5); }
.seal-deathtrial { color: #efcb84; border-color: rgba(215, 158, 60, 0.7); background: rgba(96, 58, 20, 0.5); }
.seal-matrix { display: flex; flex-direction: column; gap: 8px; }
.seal-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); background: rgba(20, 16, 12, 0.4); }
.seal-hero-name { font-family: "KaiTi", "STKaiti", serif; font-size: 15px; color: var(--paper); }
.seal-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.seal-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--line); opacity: 0.45; }
.seal-chip.is-earned { border-style: solid; opacity: 1; }
.seal-chip i { font-style: normal; margin-left: 2px; font-size: 10px; }
.seal-chips-detail { padding: 2px 0 4px; }
.seal-title-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.seal-title-card { border: 1px solid var(--line); padding: 8px 10px; background: rgba(20, 16, 12, 0.4); }
.seal-title-card strong { display: block; font-family: "KaiTi", "STKaiti", serif; font-size: 14px; color: var(--gold); margin-bottom: 3px; }
.seal-title-card p { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.seal-title-card.is-locked { opacity: 0.62; }
.seal-title-card.is-locked strong { color: var(--muted); letter-spacing: 0.2em; }
.seal-title-count { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; }

/* ===================== 叙事补全（V0.9.15）：选人卡"所求"一行 ===================== */
.hero-choice-quest { margin: 4px 0 0; font-family: "KaiTi", "STKaiti", serif; font-size: 11.5px; font-style: italic; line-height: 1.4; color: var(--muted); }

/* ===================== 蛊囊（V0.9.16）：战斗消耗品条 ===================== */
.satchel-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0; }
.satchel-strip.hidden { display: none; }
.satchel-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid rgba(154, 176, 122, 0.55); border-radius: 999px; background: linear-gradient(160deg, rgba(38, 46, 28, 0.85), rgba(18, 22, 14, 0.7)); color: var(--paper); cursor: pointer; transition: border-color 140ms ease, transform 120ms ease; }
.satchel-chip b { font: 16px "KaiTi", "STKaiti", serif; line-height: 1; color: #b8d08e; }
.satchel-chip span { font-size: 12px; letter-spacing: 0.04em; }
.satchel-chip:hover { border-color: rgba(196, 214, 150, 0.85); }
.satchel-chip:active { transform: scale(0.96); }
/* 手机横屏：蛊囊条落在中列空腰（grid row 2）——HUD 改造时预留的扩展槽，不与意图条/结束回合按钮抢位 */
body.mobile-combat-safe .arena-panel #satchelStrip { grid-row: 2; align-self: center; justify-self: center; margin: 0; max-width: 96%; }
body.mobile-combat-safe .satchel-chip { padding: 4px 10px; min-height: 30px; }
body.mobile-combat-safe .satchel-chip span { font-size: 11px; }

/* ============================================================
 * V0.9.19 十重天：仪式弹窗（Boss对峙/登塔明示）+ 序章花纹特效拉满
 * 共用件：ornate-corner 四角雕饰 / ember-field 余烬粒子
 * ============================================================ */

/* —— 四角雕饰：双线回纹角 + 内点，金色 —— */
.ornate-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
  opacity: 0.85;
}
.ornate-corner::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid rgba(214, 170, 92, 0.75);
}
.ornate-corner::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 0 solid rgba(214, 170, 92, 0.4);
}
.ornate-corner.c-tl { top: 7px; left: 7px; }
.ornate-corner.c-tr { top: 7px; right: 7px; }
.ornate-corner.c-bl { bottom: 7px; left: 7px; }
.ornate-corner.c-br { bottom: 7px; right: 7px; }
.ornate-corner.c-tl::before { border-top-width: 2px; border-left-width: 2px; }
.ornate-corner.c-tr::before { border-top-width: 2px; border-right-width: 2px; }
.ornate-corner.c-bl::before { border-bottom-width: 2px; border-left-width: 2px; }
.ornate-corner.c-br::before { border-bottom-width: 2px; border-right-width: 2px; }
.ornate-corner.c-tl::after { top: 6px; left: 6px; border-top-width: 1px; border-left-width: 1px; }
.ornate-corner.c-tr::after { top: 6px; right: 6px; border-top-width: 1px; border-right-width: 1px; }
.ornate-corner.c-bl::after { bottom: 6px; left: 6px; border-bottom-width: 1px; border-left-width: 1px; }
.ornate-corner.c-br::after { bottom: 6px; right: 6px; border-bottom-width: 1px; border-right-width: 1px; }

/* —— 余烬粒子：两层错峰上升的火星 —— */
.ember-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.ember-field::before,
.ember-field::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: transparent;
  will-change: transform; /* V0.9.20.2：提升为独立合成层，避免整屏逐帧重绘 */
  box-shadow:
    8vw 0 0 rgba(230, 150, 80, 0.55), 22vw 14vh 1px rgba(214, 170, 92, 0.4),
    35vw 4vh 0 rgba(200, 90, 60, 0.5), 48vw 20vh 1px rgba(230, 170, 100, 0.35),
    61vw 9vh 0 rgba(214, 170, 92, 0.5), 74vw 16vh 1px rgba(200, 90, 60, 0.4),
    87vw 2vh 0 rgba(230, 150, 80, 0.45), 94vw 22vh 1px rgba(214, 170, 92, 0.3);
  animation: emberRise 11s linear infinite;
}
.ember-field::after {
  width: 2px;
  height: 2px;
  box-shadow:
    14vw 8vh 0 rgba(214, 170, 92, 0.35), 29vw 24vh 1px rgba(230, 150, 80, 0.3),
    42vw 12vh 0 rgba(200, 90, 60, 0.35), 55vw 28vh 1px rgba(214, 170, 92, 0.28),
    68vw 6vh 0 rgba(230, 170, 100, 0.32), 81vw 18vh 1px rgba(200, 90, 60, 0.3),
    91vw 30vh 0 rgba(214, 170, 92, 0.26);
  animation-duration: 16s;
  animation-delay: -6s;
}
@keyframes emberRise {
  0% { transform: translateY(12vh); opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 0.85; }
  100% { transform: translateY(-104vh); opacity: 0; }
}

/* —— 仪式弹窗：全屏压迫感演出（点击任意处散场） —— */
.rite-overlay {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  cursor: pointer;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.93) 78%),
    rgba(2, 2, 3, 0.66);
  /* V0.9.20.2：去掉 backdrop-filter——压在动态战斗界面上老内核闪屏（同序章），暗场加深补足氛围。 */
  animation: riteFlash 0.55s ease both;
}
.rite-overlay.hidden { display: none; }
.rite-card {
  position: relative;
  width: min(560px, 92vw);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  padding: 34px 34px 26px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(189, 162, 109, 0.5);
  outline: 1px solid rgba(189, 162, 109, 0.16);
  outline-offset: 5px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.014) 0 2px, transparent 2px 11px),
    radial-gradient(circle at 50% -12%, rgba(118, 40, 33, 0.3), transparent 48%),
    linear-gradient(165deg, rgba(16, 13, 15, 0.99), rgba(4, 3, 5, 0.99));
  box-shadow: 0 34px 100px #000, inset 0 0 60px rgba(0, 0, 0, 0.6);
  animation: riteSlam 0.5s cubic-bezier(0.18, 1.15, 0.4, 1) both;
}
.rite-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  color: rgba(214, 170, 92, 0.05);
  font: 260px/1 "KaiTi", serif;
  pointer-events: none;
  user-select: none;
}
.rite-eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.46em;
  opacity: 0.75;
  animation: riteFadeUp 0.5s 0.18s ease both;
}
.rite-seal {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 16px;
  border: 2px solid rgba(200, 90, 70, 0.75);
  border-radius: 50%;
  color: #e06a55;
  font: 46px "KaiTi", serif;
  text-shadow: 0 0 18px rgba(200, 90, 60, 0.5);
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.5), inset 0 0 22px rgba(120, 30, 20, 0.5), 0 0 26px rgba(150, 40, 30, 0.35);
  background: radial-gradient(circle at 50% 38%, rgba(90, 22, 16, 0.55), rgba(20, 6, 5, 0.9));
  animation: riteStamp 0.55s 0.1s cubic-bezier(0.2, 1.4, 0.42, 1) both;
}
.rite-card h2 {
  margin: 0 0 14px;
  color: var(--paper);
  font: 36px "KaiTi", serif;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-shadow: 0 0 26px rgba(200, 90, 60, 0.4);
  animation: riteFadeUp 0.5s 0.26s ease both;
}
.rite-text {
  min-height: 40px;
  margin: 0 auto 18px;
  max-width: 30em;
  color: #d5c9ae;
  font: 16px/2 "KaiTi", serif;
  letter-spacing: 0.04em;
  white-space: pre-line;
  animation: riteFadeUp 0.55s 0.4s ease both;
}
.rite-hint {
  margin: 0;
  color: #8f8877;
  font-size: 11px;
  letter-spacing: 0.3em;
  animation: riteHintBlink 2.2s 1s ease-in-out infinite;
}
@keyframes riteFlash { from { opacity: 0; } to { opacity: 1; } }
@keyframes riteSlam {
  0% { transform: scale(1.14); opacity: 0; }
  60% { transform: scale(0.985); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes riteStamp {
  0% { transform: scale(2.6) rotate(-12deg); opacity: 0; }
  55% { transform: scale(0.92) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes riteFadeUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes riteHintBlink { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }

/* 血劫 tone（Boss 对峙）：暗红压迫 + 开场震颤 */
.rite-blood .rite-card { animation: riteSlam 0.5s cubic-bezier(0.18, 1.15, 0.4, 1) both, riteQuake 0.34s 0.46s linear 1; }
@keyframes riteQuake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
}

/* 天梯 tone（十重天登塔）：紫金天色 */
.rite-tian { background: radial-gradient(ellipse at 50% 46%, rgba(24, 14, 42, 0.2), rgba(2, 1, 6, 0.92) 78%), rgba(3, 2, 8, 0.6); }
.rite-tian .rite-card {
  border-color: rgba(150, 120, 220, 0.55);
  outline-color: rgba(150, 120, 220, 0.18);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.014) 0 2px, transparent 2px 11px),
    radial-gradient(circle at 50% -12%, rgba(70, 44, 130, 0.35), transparent 50%),
    linear-gradient(165deg, rgba(15, 11, 24, 0.99), rgba(4, 3, 8, 0.99));
}
.rite-tian .rite-seal {
  border-color: rgba(170, 135, 235, 0.75);
  color: #cdb9f0;
  text-shadow: 0 0 18px rgba(150, 110, 230, 0.55);
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.5), inset 0 0 22px rgba(60, 36, 110, 0.55), 0 0 26px rgba(110, 80, 200, 0.4);
  background: radial-gradient(circle at 50% 38%, rgba(46, 28, 88, 0.6), rgba(10, 6, 20, 0.9));
}
.rite-tian .rite-card h2 { text-shadow: 0 0 26px rgba(140, 100, 220, 0.5); }
.rite-tian .rite-watermark { color: rgba(170, 135, 235, 0.05); }
.rite-tian .ember-field::before,
.rite-tian .ember-field::after { filter: hue-rotate(230deg) saturate(0.8); }
.rite-tian .ornate-corner::before, .rite-tian .ornate-corner::after { border-color: rgba(170, 135, 235, 0.6); }

/* —— 序章弹窗：花纹特效拉满（覆盖 V0.9.18 基础版） —— */
.prologue-overlay {
  /* V0.9.20.2：撤 repeating-conic 花纹——老 GPU 渲染锥形渐变带状闪烁，且 0.012 透明度本就近不可见（纯风险零收益）。 */
  background: radial-gradient(circle at 50% 34%, rgba(20, 8, 6, 0.78), rgba(1, 2, 2, 0.97) 72%);
}
.prologue-card {
  outline: 1px solid rgba(189, 162, 109, 0.18);
  outline-offset: 6px;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 12px),
    radial-gradient(circle at 50% -8%, rgba(118, 40, 33, 0.3), transparent 46%),
    radial-gradient(circle at 50% 112%, rgba(60, 90, 66, 0.12), transparent 44%),
    linear-gradient(160deg, rgba(14, 14, 16, 0.99), rgba(4, 4, 6, 0.99));
  box-shadow: 0 30px 90px #000, inset 0 0 70px rgba(0, 0, 0, 0.55);
}
.prologue-card::before,
.prologue-card::after {
  content: "❖";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(214, 170, 92, 0.4);
  font-size: 11px;
  pointer-events: none;
}
.prologue-card::before { top: 6px; }
.prologue-card::after { bottom: 6px; }
.prologue-watermark {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(214, 170, 92, 0.045);
  font: 300px/1 "KaiTi", serif;
  pointer-events: none;
  user-select: none;
  /* V0.9.20.2：撤呼吸动画——300px 字形持续 scale 在老内核每帧重栅格化导致抖闪，改静态。 */
}
.prologue-card h2 { text-shadow: 0 0 24px rgba(118, 40, 33, 0.6), 0 0 60px rgba(214, 170, 92, 0.14); }
.prologue-card h2::after { animation: prologueUnderline 0.8s 0.15s ease both; }
@keyframes prologueUnderline { from { width: 0; opacity: 0; } to { width: 44px; opacity: 1; } }
.page-in { animation: prologuePageIn 0.6s ease both; }
@keyframes prologuePageIn {
  from { transform: translateY(12px); opacity: 0; filter: blur(5px); }
  to { transform: translateY(0); opacity: 1; filter: blur(0); }
}

/* —— 天印徽记：选人卡角标 + 印录芯片（紫金） —— */
.hero-seal-badge.seal-tian,
.seal-chip.seal-tian {
  border-color: rgba(170, 135, 235, 0.7);
  color: #cdb9f0;
  background: rgba(40, 28, 64, 0.82);
  text-shadow: 0 0 10px rgba(150, 110, 230, 0.5);
}
.seal-chip.seal-tian:not(.is-earned) { opacity: 0.45; text-shadow: none; }

/* 八重孤行：被锁的本命遗物 */
.relic-choice.is-locked { opacity: 0.5; cursor: not-allowed; }
.relic-choice.is-locked strong { color: #9a8f7e; }

/* 手机窄屏与减弱动效 */
@media (max-width: 480px) {
  .rite-card { padding: 26px 20px 20px; }
  .rite-card h2 { font-size: 28px; }
  .rite-seal { width: 70px; height: 70px; font-size: 38px; }
  .rite-text { font-size: 14px; line-height: 1.9; }
  .rite-watermark { font-size: 190px; }
  .prologue-watermark { font-size: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .rite-overlay, .rite-card, .rite-seal, .rite-eyebrow, .rite-card h2, .rite-text, .rite-hint,
  .prologue-watermark, .page-in, .prologue-card h2::after,
  .ember-field::before, .ember-field::after { animation: none; }
}

/* ============================================================
 * V0.9.20 本命蛊：选人卡养成行 / 万蛊录本命页 / 蜕变仪式金色 tone
 * ============================================================ */

/* 选人卡：本命蛊一行（形态+道行进度） */
.hero-benming-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  padding: 4px 8px;
  border: 1px dashed rgba(189, 162, 109, 0.22);
  border-radius: 6px;
  color: #8f8877;
  font-size: 10px;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.18);
}
.hero-benming-line b {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(189, 162, 109, 0.35);
  border-radius: 50%;
  color: #cbb88a;
  font: 10px "KaiTi", serif;
}
.hero-benming-line i { margin-left: auto; font-style: normal; color: #7d7666; }
.hero-benming-line.is-awake { border-style: solid; border-color: rgba(120, 190, 130, 0.32); color: #a9c3a1; }
.hero-benming-line.is-awake b { border-color: rgba(120, 190, 130, 0.55); color: #9fd8a8; box-shadow: 0 0 8px rgba(90, 170, 110, 0.25); }
.hero-benming-line.is-awake i { color: #8fae89; }

/* 万蛊录·本命页 */
.benming-grid { display: grid; gap: 14px; }
.benming-card {
  padding: 14px 16px;
  border: 1px solid rgba(189, 162, 109, 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 0, rgba(118, 40, 33, 0.14), transparent 40%),
    rgba(10, 12, 10, 0.72);
}
.benming-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.benming-card header b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(189, 162, 109, 0.5);
  border-radius: 50%;
  color: #e7c98f;
  font: 20px "KaiTi", serif;
  background: radial-gradient(circle at 50% 36%, rgba(60, 40, 20, 0.6), rgba(8, 6, 4, 0.9));
}
.benming-card header strong { display: block; color: #e7c98f; font: 17px "KaiTi", serif; letter-spacing: 0.1em; }
.benming-card header span { display: block; color: #94886f; font-size: 11px; margin-top: 2px; }
.benming-lore { margin: 0 0 10px; color: #a89c82; font-size: 12px; font-style: italic; line-height: 1.6; }
.benming-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.benming-stage {
  padding: 8px 8px 9px;
  border: 1px solid rgba(189, 162, 109, 0.16);
  border-radius: 8px;
  text-align: center;
  background: rgba(0, 0, 0, 0.22);
}
.benming-stage strong { display: block; margin-top: 6px; color: #cbb88a; font: 13px "KaiTi", serif; letter-spacing: 0.12em; }
.benming-stage small { display: block; margin-top: 4px; color: #94886f; font-size: 10px; line-height: 1.55; }
.benming-stage-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.14);
  border-radius: 6px;
  background: radial-gradient(circle at 50% 42%, rgba(30, 26, 18, 0.9), rgba(4, 4, 5, 0.98));
}
.benming-stage-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.benming-stage-fallback { color: rgba(203, 184, 138, 0.5); font: 30px "KaiTi", serif; }
.benming-stage.is-locked { opacity: 0.55; }
.benming-stage.is-locked .benming-stage-fallback { color: rgba(140, 132, 112, 0.45); }
.benming-stage.is-current { border-color: rgba(120, 190, 130, 0.5); box-shadow: inset 0 0 0 1px rgba(120, 190, 130, 0.25), 0 0 14px rgba(90, 170, 110, 0.14); }
.benming-stage.is-current strong { color: #9fd8a8; }
@media (max-width: 640px) { .benming-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 蜕变仪式：金绿 tone（本命蛊破形） */
.rite-gold { background: radial-gradient(ellipse at 50% 46%, rgba(34, 30, 12, 0.22), rgba(3, 3, 1, 0.92) 78%), rgba(4, 4, 1, 0.6); }
.rite-gold .rite-card {
  border-color: rgba(214, 170, 92, 0.6);
  outline-color: rgba(214, 170, 92, 0.2);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.014) 0 2px, transparent 2px 11px),
    radial-gradient(circle at 50% -12%, rgba(110, 84, 30, 0.32), transparent 50%),
    linear-gradient(165deg, rgba(18, 16, 10, 0.99), rgba(5, 4, 2, 0.99));
}
.rite-gold .rite-seal {
  border-color: rgba(214, 170, 92, 0.8);
  color: #e7c98f;
  text-shadow: 0 0 18px rgba(214, 170, 92, 0.6);
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.5), inset 0 0 22px rgba(96, 72, 28, 0.55), 0 0 26px rgba(190, 150, 70, 0.4);
  background: radial-gradient(circle at 50% 38%, rgba(78, 58, 22, 0.6), rgba(16, 12, 4, 0.9));
}
.rite-gold .rite-card h2 { text-shadow: 0 0 26px rgba(214, 170, 92, 0.5); }
.rite-gold .rite-watermark { color: rgba(214, 170, 92, 0.055); }
.rite-gold .ornate-corner::before, .rite-gold .ornate-corner::after { border-color: rgba(214, 170, 92, 0.65); }

/* ============================================================
 * V0.9.21 选人舞台：印章栏 + 立绘舞台（替代四张大卡）
 * 流派色由 tone-* 变量驱动；特效全走 transform/opacity（老内核安全清单）
 * ============================================================ */
.hero-choices { display: block; max-width: 920px; }

/* —— 印章栏 —— */
.hero-seal-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 2px auto 12px;
}
.hero-seal-avatar {
  --tone: rgba(189, 162, 109, 0.6);
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 84px;
  padding: 8px 4px 6px;
  border: 1px solid rgba(189, 162, 109, 0.22);
  border-radius: 10px;
  cursor: pointer;
  color: #9a8f7e;
  background: rgba(12, 14, 11, 0.72);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.hero-seal-avatar.tone-fate { --tone: rgba(214, 170, 92, 0.8); }
.hero-seal-avatar.tone-blood { --tone: rgba(192, 74, 58, 0.8); }
.hero-seal-avatar.tone-poison { --tone: rgba(103, 160, 89, 0.8); }
.hero-seal-avatar.tone-longevity { --tone: rgba(224, 160, 80, 0.8); }
.hero-seal-avatar:hover { transform: translateY(-2px); border-color: var(--tone); }
.hero-seal-avatar.selected {
  border-color: var(--tone);
  color: #e4d7b8;
  box-shadow: 0 0 0 1px var(--tone), 0 0 18px 0 var(--tone), inset 0 0 12px rgba(0, 0, 0, 0.5);
  background: rgba(22, 20, 14, 0.9);
  animation: sealStampIn 0.28s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
@keyframes sealStampIn {
  0% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.hero-seal-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.3);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, rgba(40, 34, 22, 0.9), rgba(6, 6, 5, 0.98));
}
.hero-seal-thumb i { font: 22px "KaiTi", serif; font-style: normal; color: rgba(203, 184, 138, 0.6); }
.hero-seal-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}
.hero-seal-avatar.selected .hero-seal-thumb { border-color: var(--tone); }
.hero-seal-avatar small { font-size: 11px; letter-spacing: 0.04em; line-height: 1.2; }
.hero-seal-mark {
  position: absolute;
  top: -7px;
  left: -6px;
  z-index: 2;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 9px;
  font-weight: normal;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.hero-benming-mark {
  position: absolute;
  right: -5px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(120, 190, 130, 0.55);
  border-radius: 50%;
  font: 10px "KaiTi", serif;
  font-style: normal;
  color: #9fd8a8;
  background: rgba(14, 24, 16, 0.92);
  pointer-events: none;
}

/* —— 立绘舞台 —— */
.hero-stage {
  --tone: rgba(214, 170, 92, 0.55);
  --tone-soft: rgba(214, 170, 92, 0.14);
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 236px) minmax(0, 1fr);
  gap: 16px;
  margin: 0 auto;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--tone);
  outline: 1px solid rgba(189, 162, 109, 0.14);
  outline-offset: 4px;
  border-radius: 10px;
  text-align: left;
  background:
    radial-gradient(circle at 14% 0%, var(--tone-soft), transparent 46%),
    linear-gradient(155deg, rgba(14, 15, 12, 0.96), rgba(6, 7, 6, 0.99));
}
.hero-stage.tone-fate { --tone: rgba(214, 170, 92, 0.6); --tone-soft: rgba(214, 170, 92, 0.15); }
.hero-stage.tone-blood { --tone: rgba(192, 74, 58, 0.62); --tone-soft: rgba(150, 48, 38, 0.17); }
.hero-stage.tone-poison { --tone: rgba(103, 160, 89, 0.6); --tone-soft: rgba(76, 132, 91, 0.16); }
.hero-stage.tone-longevity { --tone: rgba(224, 160, 80, 0.62); --tone-soft: rgba(190, 120, 50, 0.16); }
/* 入场光波：一次性扫过（transform-only，安全） */
.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 34%, var(--tone-soft) 50%, transparent 66%);
  transform: translateX(-130%);
  animation: stageSweep 0.85s 0.1s ease-out forwards;
}
@keyframes stageSweep { to { transform: translateX(130%); } }
.stage-embers { opacity: 0.55; }
.hero-stage.tone-blood .stage-embers { filter: hue-rotate(-18deg) saturate(1.2); }
.hero-stage.tone-poison .stage-embers { filter: hue-rotate(75deg) saturate(0.85); }
.hero-stage.tone-fate .stage-embers { filter: saturate(0.9); }

.hero-stage-portrait {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.2);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 30%, var(--tone-soft), transparent 70%), #070907;
}
.hero-stage-fallback { font: 700 54px "KaiTi", serif; color: rgba(126, 177, 141, 0.4); }
.hero-stage-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  opacity: 0;
}
.hero-stage-portrait.image-loaded .hero-stage-image { opacity: 1; animation: stagePortraitIn 0.5s ease both; }
.hero-stage-portrait.image-loaded .hero-stage-fallback { opacity: 0; }
@keyframes stagePortraitIn {
  from { opacity: 0; transform: translateX(-10px) scale(1.02); }
  to { opacity: 1; transform: none; }
}
.hero-stage-caption {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(228, 215, 184, 0.82);
  text-shadow: 0 1px 6px #000, 0 0 12px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.hero-stage-info { display: grid; align-content: start; gap: 7px; min-width: 0; animation: stageInfoIn 0.45s 0.08s ease both; }
@keyframes stageInfoIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.hero-stage-role { font-size: 11px; letter-spacing: 0.22em; color: #94886f; }
.hero-stage-name { margin: 0; font: 26px "KaiTi", serif; letter-spacing: 0.16em; color: #e7c98f; text-shadow: 0 0 18px var(--tone-soft); }
.hero-stage-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-stage-stats span {
  padding: 3px 9px;
  border: 1px solid rgba(189, 162, 109, 0.24);
  border-radius: 999px;
  font-size: 11px;
  color: #b7ad95;
  background: rgba(0, 0, 0, 0.24);
}
.hero-stage-passive { margin: 0; font-size: 12px; line-height: 1.7; color: #b7ad95; }
.hero-stage-passive em { font-style: normal; color: #cbb88a; }
.hero-stage-quest { margin: 0; font-size: 11.5px; line-height: 1.65; color: #8fae89; font-style: italic; }
.hero-stage .hero-benming-line { max-width: 380px; }

/* 手机窄屏：舞台改上下叠放，立绘限高 */
@media (max-width: 700px) {
  .hero-stage { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .hero-stage-portrait { aspect-ratio: auto; height: min(300px, 44vh); }
  .hero-seal-avatar { width: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-seal-avatar.selected, .hero-stage::after,
  .hero-stage-portrait.image-loaded .hero-stage-image, .hero-stage-info { animation: none; }
  .hero-stage::after { display: none; }
}

/* ============================================================
 * V0.9.22 蛊庐（批1）：局外养蛊面板
 * ============================================================ */
.gulu-overlay {
  position: fixed;
  z-index: 114;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: hidden;
  background: rgba(2, 4, 3, 0.82);
}
.gulu-card {
  position: relative;
  width: min(720px, 96vw);
  max-height: calc(100vh - 28px);
  padding: 20px 22px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(189, 162, 109, 0.45);
  outline: 1px solid rgba(189, 162, 109, 0.14);
  outline-offset: 4px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 12px),
    radial-gradient(circle at 16% 0, rgba(76, 132, 91, 0.16), transparent 40%),
    linear-gradient(150deg, rgba(15, 18, 14, 0.98), rgba(5, 7, 5, 0.99));
  box-shadow: 0 26px 80px #000;
}
.gulu-card h2 { margin: 0 0 10px; color: var(--paper); font: 26px "KaiTi", serif; letter-spacing: 0.16em; }
.gulu-notice {
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid rgba(120, 190, 130, 0.35);
  border-radius: 8px;
  color: #a9d3a1;
  font-size: 12px;
  line-height: 1.6;
  background: rgba(24, 40, 26, 0.5);
}
.gulu-sec { margin: 0 0 14px; }
.gulu-sec h3 { margin: 0 0 8px; color: #cbb88a; font: 15px "KaiTi", serif; letter-spacing: 0.12em; }
.gulu-sec h3 small { margin-left: 8px; color: #8f8877; font-size: 10px; letter-spacing: 0.04em; }
.gulu-mats { display: flex; flex-wrap: wrap; gap: 8px; }
.gulu-mat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid rgba(189, 162, 109, 0.25);
  border-radius: 999px;
  font-size: 11px;
  color: #b7ad95;
  background: rgba(0, 0, 0, 0.28);
}
.gulu-mat b { font: 12px "KaiTi", serif; color: #cbb88a; }
.gulu-mat i { font-style: normal; color: #94886f; }
.gulu-mat.tone-boss { border-color: rgba(192, 74, 58, 0.5); }
.gulu-mat.tone-boss b { color: #e06a55; }
.gulu-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gulu-slot {
  padding: 10px 11px;
  border: 1px solid rgba(189, 162, 109, 0.2);
  border-radius: 10px;
  background: rgba(8, 10, 8, 0.6);
  min-height: 132px;
}
.gulu-slot h4 { margin: 0 0 8px; color: #cbb88a; font-size: 12px; letter-spacing: 0.06em; font-weight: normal; }
.gulu-slot.is-empty { border-style: dashed; }
.gulu-grades { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.gulu-grade {
  padding: 6px 4px;
  border: 1px solid rgba(189, 162, 109, 0.3);
  border-radius: 7px;
  color: #cbb88a;
  cursor: pointer;
  font: 12px "KaiTi", serif;
  background: rgba(14, 16, 12, 0.8);
}
.gulu-grade small { display: block; margin-top: 2px; font-size: 9px; color: #8f8877; }
.gulu-grade:disabled { opacity: 0.4; cursor: default; }
.gulu-grade.grade-ling { border-color: rgba(103, 160, 89, 0.45); }
.gulu-grade.grade-xuan { border-color: rgba(150, 120, 220, 0.45); }
.gulu-grade.grade-tian { border-color: rgba(192, 74, 58, 0.5); }
.gulu-slot.is-egg { text-align: center; }
.gulu-egg-glyph {
  margin: 6px auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 60px;
  border: 1px solid rgba(189, 162, 109, 0.4);
  border-radius: 50% 50% 46% 46%;
  color: #cbb88a;
  font: 22px "KaiTi", serif;
  background: radial-gradient(circle at 50% 36%, rgba(60, 48, 26, 0.7), rgba(10, 8, 5, 0.95));
  animation: guluEggPulse 2.6s ease-in-out infinite;
}
@keyframes guluEggPulse { 0%, 100% { box-shadow: 0 0 6px rgba(214, 170, 92, 0.15); } 50% { box-shadow: 0 0 16px rgba(214, 170, 92, 0.4); } }
.gulu-remain { margin: 0; color: #94886f; font-size: 11px; }
.gulu-slot.is-gu.grade-ling { border-color: rgba(103, 160, 89, 0.4); }
.gulu-slot.is-gu.grade-xuan { border-color: rgba(150, 120, 220, 0.4); }
.gulu-slot.is-gu.grade-tian { border-color: rgba(192, 74, 58, 0.48); box-shadow: 0 0 14px rgba(150, 40, 30, 0.18); }
.gulu-gu-desc { margin: 0 0 8px; color: #9a8f7e; font-size: 10.5px; line-height: 1.55; min-height: 32px; }
.gulu-slot-actions { display: grid; gap: 5px; }
.gulu-slot-actions button {
  padding: 5px 8px;
  border: 1px solid rgba(189, 162, 109, 0.3);
  border-radius: 7px;
  color: #cbb88a;
  cursor: pointer;
  font-size: 11px;
  background: rgba(14, 16, 12, 0.8);
}
.gulu-slot-actions button.is-on { border-color: rgba(120, 190, 130, 0.55); color: #9fd8a8; }
.gulu-slot-actions button:disabled { opacity: 0.4; cursor: default; }
.gulu-benming { margin: 0 0 6px; color: #b7ad95; font-size: 12px; }
.gulu-benming b { display: block; margin-top: 4px; color: #e0a050; font-weight: normal; font-size: 11px; }
.gulu-benming.is-injured { color: #c9927e; }
.gulu-tip { margin: 0; color: #8f8877; font-size: 10px; line-height: 1.6; }
.gulu-events { margin: 0; padding: 0 0 0 16px; color: #94886f; font-size: 11px; line-height: 1.8; }
@media (max-width: 640px) {
  .gulu-slots { grid-template-columns: 1fr; }
  .gulu-slot { min-height: 0; }
  .gulu-card { padding: 16px 14px 12px; }
}
@media (prefers-reduced-motion: reduce) { .gulu-egg-glyph { animation: none; } }

/* ============================================================
 * V0.9.23 蛊庐批2：弹窗升格全屏场景 + 祭坛 + 卡图地块 + 第二主按钮 + 灵品仪式色
 * （后置覆盖批1样式）
 * ============================================================ */
/* 开始界面双主按钮 */
.start-main-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.gulu-enter-button {
  border-color: rgba(103, 160, 89, 0.5);
  background:
    radial-gradient(circle at 50% 0%, rgba(76, 132, 91, 0.22), transparent 60%),
    rgba(10, 16, 11, 0.86);
}
.gulu-enter-button:hover { border-color: rgba(130, 190, 120, 0.75); }
.gulu-enter-button span { color: #a9d3a1; }

/* 全屏场景（覆盖批1的居中弹窗式样） */
.gulu-overlay {
  place-items: stretch;
  padding: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(76, 132, 91, 0.13), transparent 42%),
    radial-gradient(circle at 84% 92%, rgba(118, 40, 33, 0.1), transparent 46%),
    linear-gradient(165deg, #0a0d0a, #050705);
}
.gulu-embers { opacity: 0.5; }
.gulu-embers::before, .gulu-embers::after { filter: hue-rotate(60deg) saturate(0.6); }
.gulu-card {
  width: 100%;
  max-height: none;
  height: 100%;
  border: none;
  outline: none;
  border-radius: 0;
  padding: 22px clamp(16px, 5vw, 56px) 26px;
  background: transparent;
  box-shadow: none;
}
.gulu-card > .ornate-corner { position: fixed; z-index: 2; }
.gulu-card h2 { font-size: 30px; letter-spacing: 0.3em; }
.gulu-card .deck-eyebrow { letter-spacing: 0.4em; }

/* 双栏布局：左主区 + 右祭坛 */
.gulu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.gulu-main { min-width: 0; }

/* 蛊圃地块化 */
.gulu-slot {
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 108%, rgba(70, 56, 30, 0.24), transparent 55%),
    rgba(8, 10, 8, 0.66);
}
.gulu-slot.is-empty {
  background:
    repeating-linear-gradient(90deg, rgba(120, 100, 60, 0.05) 0 6px, transparent 6px 14px),
    rgba(8, 10, 8, 0.5);
}
.gulu-gu-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid rgba(189, 162, 109, 0.22);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 40%, rgba(36, 30, 18, 0.9), rgba(5, 5, 4, 0.98));
}
.gulu-gu-art i { font: 30px "KaiTi", serif; font-style: normal; color: rgba(203, 184, 138, 0.5); }
.gulu-gu-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gulu-carry-flag {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  padding: 2px 8px;
  border: 1px solid rgba(120, 190, 130, 0.6);
  border-radius: 999px;
  font-size: 10px;
  color: #9fd8a8;
  background: rgba(10, 20, 12, 0.88);
}
.gulu-slot.is-egg .gulu-egg-glyph { width: 62px; height: 72px; font-size: 26px; }
.gulu-slot.is-egg.grade-ling .gulu-egg-glyph { border-color: rgba(103, 160, 89, 0.55); }
.gulu-slot.is-egg.grade-xuan .gulu-egg-glyph { border-color: rgba(150, 120, 220, 0.55); }
.gulu-slot.is-egg.grade-tian .gulu-egg-glyph { border-color: rgba(192, 74, 58, 0.6); box-shadow: 0 0 18px rgba(150, 40, 30, 0.35); }

/* 本命蛊祭坛 */
.gulu-altar {
  position: sticky;
  top: 0;
  align-self: start;
  padding: 14px 15px 12px;
  border: 1px solid rgba(214, 170, 92, 0.35);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% -10%, rgba(110, 84, 30, 0.24), transparent 50%),
    rgba(10, 9, 6, 0.78);
}
.gulu-altar.is-injured { border-color: rgba(192, 74, 58, 0.45); }
.gulu-altar h3 { margin: 0 0 10px; color: #e7c98f; font: 15px "KaiTi", serif; letter-spacing: 0.2em; }
.gulu-altar-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(214, 170, 92, 0.3);
  border-radius: 10px;
  margin-bottom: 8px;
  background: radial-gradient(circle at 50% 40%, rgba(40, 32, 16, 0.9), rgba(6, 5, 3, 0.98));
}
.gulu-altar-art i { font: 44px "KaiTi", serif; font-style: normal; color: rgba(214, 170, 92, 0.4); }
.gulu-altar-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gulu-altar-name { display: block; color: #e7c98f; font: 16px "KaiTi", serif; letter-spacing: 0.1em; margin-bottom: 4px; }
.gulu-altar-dao { margin: 0 0 6px; color: #b7ad95; font-size: 11px; }
.gulu-altar-dao b { display: block; margin-top: 3px; color: #e0a050; font-weight: normal; font-size: 10.5px; }
.gulu-altar-lore { margin: 0 0 8px; color: #a89c82; font-size: 11px; font-style: italic; line-height: 1.6; }
.gulu-altar-stages { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 5px; }
.gulu-altar-stages li {
  padding: 5px 8px;
  border: 1px solid rgba(189, 162, 109, 0.14);
  border-radius: 7px;
  font-size: 10px;
  color: #7d7666;
  background: rgba(0, 0, 0, 0.22);
}
.gulu-altar-stages li b { color: #94886f; font-weight: normal; margin-right: 6px; font-family: "KaiTi", serif; }
.gulu-altar-stages li.is-reached { color: #a9a08a; }
.gulu-altar-stages li.is-reached b { color: #cbb88a; }
.gulu-altar-stages li.is-current { border-color: rgba(120, 190, 130, 0.45); box-shadow: inset 0 0 0 1px rgba(120, 190, 130, 0.2); }

/* 灵品破壳仪式：青碧 tone */
.rite-jade { background: radial-gradient(ellipse at 50% 46%, rgba(14, 34, 18, 0.24), rgba(1, 5, 2, 0.92) 78%), rgba(2, 6, 3, 0.6); }
.rite-jade .rite-card {
  border-color: rgba(103, 160, 89, 0.55);
  outline-color: rgba(103, 160, 89, 0.18);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.014) 0 2px, transparent 2px 11px),
    radial-gradient(circle at 50% -12%, rgba(46, 96, 54, 0.32), transparent 50%),
    linear-gradient(165deg, rgba(11, 18, 12, 0.99), rgba(3, 6, 4, 0.99));
}
.rite-jade .rite-seal {
  border-color: rgba(130, 190, 120, 0.75);
  color: #9fd8a8;
  text-shadow: 0 0 18px rgba(90, 170, 110, 0.55);
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.5), inset 0 0 22px rgba(30, 70, 38, 0.55), 0 0 26px rgba(70, 150, 90, 0.4);
  background: radial-gradient(circle at 50% 38%, rgba(24, 56, 30, 0.6), rgba(5, 12, 7, 0.9));
}
.rite-jade .rite-card h2 { text-shadow: 0 0 26px rgba(90, 170, 110, 0.5); }
.rite-jade .rite-watermark { color: rgba(130, 190, 120, 0.05); }
.rite-jade .ornate-corner::before, .rite-jade .ornate-corner::after { border-color: rgba(130, 190, 120, 0.6); }
.rite-jade .ember-field::before, .rite-jade .ember-field::after { filter: hue-rotate(75deg) saturate(0.8); }

/* V0.9.24.1：横屏手机按「高度」补口径（大屏手机横屏宽 900~930px，只看宽会漏）——与游戏 mobile 判定一致 */
@media (max-width: 860px), (max-width: 1100px) and (max-height: 650px) {
  .gulu-layout { grid-template-columns: 1fr; }
  .gulu-altar { position: static; }
  .gulu-card { padding: 16px 14px 20px; }
}
@media (max-width: 860px) {
  .start-main-actions { flex-direction: column; align-items: stretch; }
}

/* ===== V0.9.23.1 手机端蛊庐修正：祭坛/卡图在窄屏失控放大（V0.9.24.1 断点补高度口径） ===== */
/* 窄屏祭坛：立绘缩为 92px 头像位，信息横排——不再是一屏装不下的巨方块 */
@media (max-width: 860px), (max-width: 1100px) and (max-height: 650px) {
  .gulu-altar { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 12px; align-items: start; }
  .gulu-altar h3 { grid-column: 1 / -1; margin-bottom: 8px; }
  .gulu-altar-art { grid-column: 1; grid-row: 2 / 5; width: 92px; margin-bottom: 0; }
  .gulu-altar-art i { font-size: 26px; }
  .gulu-altar-name { grid-column: 2; margin: 0; }
  .gulu-altar-dao { grid-column: 2; margin: 0 0 2px; }
  .gulu-altar-lore { grid-column: 2; margin: 0; }
  .gulu-altar-stages { grid-column: 1 / -1; margin-top: 8px; }
  .gulu-altar .gulu-tip { grid-column: 1 / -1; }
}
/* 窄屏单列蛊圃：卡图定高裁切，不随全宽等比放大 */
@media (max-width: 640px) {
  .gulu-gu-art { aspect-ratio: auto; height: 124px; }
}
