/* 《猜拳竞技塔》Setsuna × 2.5D 无黑底融合视觉样式表 */
:root {
  --bg: #06070a;
  --surface: rgba(12, 16, 22, 0.78);
  --surface-alt: rgba(16, 22, 30, 0.72);
  --surface-hover: rgba(26, 35, 48, 0.86);
  --text: #f3f8f6;
  --text-muted: #bdd0cb;
  --text-faint: #849692;
  --jade: #3ed6b4;
  --amber: #f1a45d;
  --sky: #72bdf4;
  --violet: #c89eff;
  --crimson: #ee6460;
  --stroke: rgba(255, 255, 255, 0.16);
  --stroke-strong: rgba(255, 255, 255, 0.30);
  --highlight: rgba(255, 255, 255, 0.18);
  --radius: 10px;
  --radius-sm: 7px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

button, input, select { font: inherit; color: inherit; touch-action: manipulation; }

/* ===== 全局通透融入式清晰按钮（Glassmorphic Diegetic UI） ===== */
button {
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(18, 24, 38, 0.45);
  color: #f8fafc;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.88);
  padding: 8px 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 16px rgba(0, 0, 0, 0.34);
  backdrop-filter: var(--tower-glass, blur(8px));
  -webkit-backdrop-filter: var(--tower-glass, blur(8px));
  transition: transform 0.2s cubic-bezier(.22,1,.36,1), border-color 0.18s ease, background 0.18s ease, box-shadow 0.2s ease, color 0.18s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:hover:not(:disabled) {
  transform: translateY(-2.5px);
  background: rgba(24, 34, 52, 0.62);
  border-color: rgba(120, 232, 206, 0.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), 0 8px 22px rgba(0,0,0,0.48), 0 0 18px rgba(62,214,180,0.28);
}
button:active:not(:disabled) { transform: translateY(0px) scale(0.98); }
button:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }

button.primary-btn {
  background: linear-gradient(135deg, rgba(241, 164, 93, 0.34), rgba(168, 92, 34, 0.44));
  border-color: rgba(255, 206, 126, 0.88);
  color: #fffaf0;
}
button.primary-btn:hover:not(:disabled) {
  border-color: #ffe2ad;
  background: linear-gradient(135deg, rgba(241, 164, 93, 0.46), rgba(186, 102, 38, 0.56));
  box-shadow: inset 0 1px 0 rgba(255,244,220,0.42), 0 8px 24px rgba(0,0,0,0.52), 0 0 24px rgba(241,164,93,0.42);
}
button.accent-btn {
  background: linear-gradient(135deg, rgba(62, 214, 180, 0.26), rgba(28, 118, 108, 0.38));
  border-color: rgba(98, 236, 206, 0.85);
  color: #f0fffb;
}
button.accent-btn:hover:not(:disabled) {
  border-color: #9bfce6;
  background: linear-gradient(135deg, rgba(62, 214, 180, 0.40), rgba(32, 134, 122, 0.50));
  box-shadow: inset 0 1px 0 rgba(232,255,249,0.42), 0 8px 24px rgba(0,0,0,0.52), 0 0 24px rgba(62,214,180,0.40);
}
button.active {
  background: linear-gradient(135deg, rgba(62, 214, 180, 0.34), rgba(114, 189, 244, 0.30));
  border-color: #7df5d8; color: #ffffff;
}
button.danger-btn {
  background: rgba(238, 100, 96, 0.24); border-color: rgba(255, 136, 132, 0.72); color: #ffe0de;
}
button.danger-btn:hover:not(:disabled) {
  background: rgba(238, 100, 96, 0.42); border-color: #ff9e9b; color: #ffffff;
}

.uicon { width: 16px; height: 16px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.uicon.lg { width: 22px; height: 22px; }
.uicon.xl { width: 28px; height: 28px; }

/* 世界奇遇：插画与正文独立分层，小屏滚动仅发生在抉择区域内。 */
.adventure-scene{
  position:relative;isolation:isolate;width:100%;height:100%;overflow:hidden;
  display:grid;align-items:center;justify-items:center;padding:clamp(12px,4vh,40px) clamp(12px,4vw,64px);
  color:#fcf4e2;
}
.adventure-landscape{position:absolute;z-index:-1;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none}
.adventure-panel,.adventure-forge{
  background:rgba(14,19,26,.56);backdrop-filter:var(--tower-glass, blur(10px));-webkit-backdrop-filter:var(--tower-glass, blur(10px));
  border:1px solid #b4965e;border-radius:14px;color:#fff6e6;box-shadow:0 12px 44px #08090752;
}
.adventure-panel{width:min(850px,100%);max-height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;padding:clamp(15px,3vw,34px);text-shadow:0 1px 4px #080b0e}
.adventure-panel header{border-bottom:1px solid #dcb97855;padding-bottom:12px}
.adventure-tag,.adventure-resources,.adventure-forge header small{font-size:12px;color:#f0d5a1}
.adventure-tag{display:inline-block;border:1px solid #bb9c6477;border-radius:4px;padding:3px 8px}
.adventure-panel h2,.adventure-forge h2{margin:7px 0;font:700 clamp(23px,3.3vw,38px)/1.16 "Kaiti SC","KaiTi","STKaiti",serif;color:#ffe7af}
.adventure-panel p{margin:0;color:#f7f2e8;line-height:1.5}
.adventure-resources{display:flex;gap:18px;align-items:center;margin:10px 0}
.adventure-resources span{display:inline-flex;align-items:center;gap:5px}
.adventure-options,.adventure-slots{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:10px}
.adventure-choice,.adventure-slot{display:grid;align-content:start;justify-items:start;gap:6px;text-align:left;min-width:0;
  padding:12px;border:1px solid #bcaa8050;border-inline-start:3px solid var(--tone);background:#1018208c;
  color:#fff6e9;text-shadow:0 1px 2px #101318;box-shadow:none;overflow-wrap:anywhere}
.adventure-choice.tone-danger{--tone:#ee8c7c;--tag-bg:#602a2d}
.adventure-choice.tone-gold{--tone:#f1c477;--tag-bg:#5d411e}
.adventure-choice.tone-safe{--tone:#9edac8;--tag-bg:#25483e}
.adventure-choice strong{font-size:clamp(15px,1.5vw,19px)}
.adventure-price,.adventure-gain{display:block;font-size:12px;line-height:1.4}
.adventure-price{padding:2px 7px;background:var(--tag-bg);color:#fff4dc;border-radius:4px}
.adventure-gain{color:#ffdf9c}
.adventure-choice small,.adventure-slot small{font-size:11px;line-height:1.35;color:#eae1d2}
.adventure-choice .adventure-warning{color:#ffb9aa}
.adventure-choice:disabled,.adventure-slot:disabled{opacity:.79;filter:saturate(.4);cursor:default}
.adventure-choice:focus-visible,.adventure-slot:focus-visible,.adventure-forge button:focus-visible{outline:2px solid #ffe29e;outline-offset:2px}
@media(hover:hover){
  .adventure-choice:not(:disabled):hover,.adventure-slot:not(:disabled):hover{transform:translateY(-2px);box-shadow:0 2px 12px #deae5738}
}
.adventure-forge{position:fixed;inset:0;margin:auto;width:min(720px,94vw);max-height:90vh;max-height:90dvh;overflow:auto;overscroll-behavior:contain;padding:16px}
.adventure-forge::backdrop{background:#11202c60}
.adventure-forge header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.adventure-forge h2{font-size:23px}
.adventure-slots{grid-auto-flow:row;grid-template-columns:repeat(4,minmax(0,1fr))}
.adventure-slot{border:1px solid #d0a953;border-top:3px solid var(--rarity);padding:9px}
.adventure-slot:disabled{border-color:#8d8b876b;border-top-color:var(--rarity)}
.adventure-slot img,.adventure-result img,.adventure-relic-flight img{width:34px;height:34px;object-fit:contain}
.adventure-compensate{margin:12px 0 0;color:#ffe4a5}
.cloud-relic-bar{display:block;color:#ebcb8b}
#cloudSoloPanel:has(.adventure-scene){height:min(67vh,540px);min-height:0}
#cloudSoloPanel .adventure-scene{border-radius:8px;padding:10px}
#cloudSoloPanel .adventure-panel{padding:14px}
.adventure-result{position:fixed;z-index:150;left:50%;bottom:max(16%,var(--safe-b));transform:translateX(-50%);width:max-content;max-width:min(88vw,620px);display:flex;align-items:center;gap:10px;
  border:1px solid #d7b87b;border-radius:8px;background:#18212be0;padding:10px 16px;color:#fff2d8;pointer-events:none}
.adventure-result span,.adventure-result strong{display:block;line-height:1.45}
.adventure-result span{font-size:13px}
.adventure-result.is-animated[data-outcome="forge"]{overflow:hidden}
.adventure-result.is-animated[data-outcome="forge"]::after{content:"";position:absolute;inset:0;background:linear-gradient(115deg,transparent 35%,#fff3c46b,transparent 65%);animation:adventure-sheen .65s ease-out both}
.adventure-result.is-animated[data-outcome="blood"]>div{animation:adventure-quake .19s ease-out}
.adventure-fx{position:fixed;z-index:151;inset:0;pointer-events:none;overflow:hidden}
.adventure-fx[data-outcome="blood"]::before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse,transparent 50%,#95292682);animation:adventure-veil .55s ease-out both}
.adventure-fx i,.adventure-relic-flight{position:absolute;animation:adventure-fly .62s var(--motion-steps) both}
.adventure-fx i{width:3px;height:7px;background:#ffd186;border-radius:70%}
.adventure-fx[data-outcome="gamble_win"] i{width:7px;border-radius:50%;border:1px solid #fff1ab}
.adventure-relic-flight{display:grid;place-items:center;border-radius:50%;background:#463723;border:1px solid #eabf70;color:#ffe0a1;padding:3px}
@keyframes adventure-fly{to{transform:translate(var(--dx),var(--dy)) scale(.55);opacity:0}}
@keyframes adventure-quake{25%{transform:translateX(2px)}70%{transform:translateX(-2px)}}
@keyframes adventure-veil{0%{opacity:0}25%{opacity:1}100%{opacity:0}}
@keyframes adventure-sheen{from{transform:translateX(-110%)}to{transform:translateX(110%)}}
@media(max-width:600px) and (orientation:portrait){
  .adventure-scene{align-items:center;padding:min(50vw,26vh) max(12px,var(--safe-r)) max(12px,var(--safe-b)) max(12px,var(--safe-l));background:#1c2429}
  .adventure-scene::before{content:"";position:absolute;z-index:-2;inset:-18px;background:linear-gradient(#18202966,#18202999),var(--quest-art) center bottom / cover;filter:blur(18px)}
  .adventure-landscape{height:auto;object-fit:contain;object-position:top;mask-image:linear-gradient(#000 76%,transparent)}
  .adventure-options .adventure-choice{grid-template-columns:minmax(0,1fr) auto;justify-content:stretch;align-items:center;padding:12px}
  .adventure-choice .adventure-price{justify-self:end}
  .adventure-choice .adventure-gain,.adventure-choice small{grid-column:1/-1}
  .adventure-panel{max-height:100%;padding:14px}
  .adventure-options{grid-auto-flow:row;grid-template-columns:1fr}
  .adventure-choice{gap:4px}
  .adventure-slots{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(orientation:landscape) and (max-height:490px){
  .adventure-scene{padding:8px max(14px,var(--safe-r)) 8px max(14px,var(--safe-l))}
  .adventure-panel{padding:12px 16px}.adventure-panel header{padding-bottom:6px}
  .adventure-panel h2{margin:4px 0;font-size:23px}.adventure-resources{margin:6px 0}
  .adventure-forge{padding:10px}.adventure-slot{gap:3px}.adventure-forge header{margin-bottom:6px}
}
@media(prefers-reduced-motion:reduce){
  .adventure-scene button,.adventure-forge button{transition:none;transform:none}
  .adventure-result *,.adventure-result::after,.adventure-fx *,.adventure-fx::before{animation:none!important}
}

/* ===== 全设备零黑边视口 + Windows 桌面专属顶部提拉栏 ===== */
.shell {
  position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden;
  background: var(--bg); display: flex; flex-direction: column;
}
.win-drag-bar {
  flex: 0 0 32px; height: 32px; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 144px 0 12px; /* 右侧 144px 留给 Windows 原生最小化/缩放/关闭按钮，绝不遮挡画面 */
  background: linear-gradient(90deg, #0b111c 0%, #101928 50%, #0a0f18 100%);
  border-bottom: 1px solid rgba(114, 189, 244, 0.24);
  color: #e6f2ef; font-size: 12px; z-index: 95;
  -webkit-app-region: drag;
  user-select: none;
}
.win-drag-bar[hidden] { display: none; }
.win-drag-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.win-drag-icon { width: 16px; height: 16px; border-radius: 4px; flex: 0 0 16px; }
.win-drag-title { font-weight: 900; letter-spacing: 0.08em; color: #f6efe0; white-space: nowrap; }
.win-drag-tip { font-size: 11px; color: rgba(189, 208, 203, 0.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-drag-actions { display: flex; align-items: center; gap: 6px; -webkit-app-region: no-drag; }
.win-bar-btn {
  padding: 2px 10px; height: 22px; font-size: 11px; font-weight: 700; border-radius: 4px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e4f2ef; backdrop-filter: none; box-shadow: none;
}
.win-bar-btn:hover:not(:disabled) { transform: none; background: rgba(62, 214, 180, 0.24); border-color: var(--jade); color: #ffffff; }

.viewport { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; overflow: hidden; background: var(--bg); }
.stage-frame {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background-color: var(--bg); background-position: center center; background-size: cover; background-repeat: no-repeat;
}
.stage-content {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  opacity: 1;
}
.stage-content.dissolving,
.stage-content.coalescing { opacity: 1; }

.stage-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center center; pointer-events: none;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.stage-bg.citadel-bg {
  object-position: center 44%;
  transform: translate3d(0, 0, 0);
  animation: citadelBreathe 16s ease-in-out infinite alternate;
}
/* ④ 二级界面：底层精美背景清晰可见 + 极慢镜头呼吸缩放（绝不用不透明死黑遮盖） */
.stage-bg.menu-blur {
  filter: blur(2.5px) brightness(0.88) saturate(1.08);
  animation: citadelBreathe 18s ease-in-out infinite alternate;
}
@keyframes citadelBreathe { from { transform: scale(1.00) translateZ(0); } to { transform: scale(1.03) translateZ(0); } }

.stage-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 10, 16, 0.34) 0%, rgba(6, 10, 16, 0.04) 22%, rgba(6, 10, 16, 0.04) 78%, rgba(6, 10, 16, 0.34) 100%),
    linear-gradient(180deg, rgba(6, 10, 16, 0.28) 0%, rgba(6, 10, 16, 0.02) 28%, rgba(6, 10, 16, 0.04) 74%, rgba(6, 10, 16, 0.32) 100%);
}
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 48; }

.toast-bar {
  position: absolute; top: calc(var(--safe-t) + 122px); left: 50%; transform: translateX(-50%);
  padding: 6px 16px; border-radius: 999px;
  background: rgba(10, 15, 22, 0.84);
  border: 1px solid rgba(62, 214, 180, 0.75);
  color: #ebfff9; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  z-index: 55; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  backdrop-filter: var(--tower-glass, blur(10px)); pointer-events: none; white-space: nowrap;
}
.toast-bar[hidden] { display: none; }

/* ========================================================================
   ⑤ Setsuna 主页（加粗凸显标题 + 导引球内平稳上浮防 Windows 跳动 + 无冗余介绍）
   ======================================================================== */
.setsuna-home { position: relative; width: 100%; height: 100%; overflow: hidden; --div-angle: 8deg; }

.setsuna-field-tint { position: absolute; inset: 0; pointer-events: none; z-index: 3; transition: opacity 0.28s ease; }
.setsuna-field-tint.left-tint {
  clip-path: polygon(0 0, 56% 0, 44% 100%, 0 100%);
  background: linear-gradient(105deg, rgba(62, 214, 180, 0.14) 0%, rgba(62, 214, 180, 0.04) 68%, transparent 100%);
  opacity: 0.55;
}
.setsuna-field-tint.right-tint {
  clip-path: polygon(56% 0, 100% 0, 100% 100%, 44% 100%);
  background: linear-gradient(255deg, rgba(241, 164, 93, 0.16) 0%, rgba(241, 164, 93, 0.04) 68%, transparent 100%);
  opacity: 0.55;
}
.setsuna-home.hover-left .setsuna-field-tint.left-tint { opacity: 1; }
.setsuna-home.hover-right .setsuna-field-tint.right-tint { opacity: 1; }

.setsuna-divider {
  position: absolute; left: 50%; top: 50%; width: 2px; height: 220vmax;
  transform: translate(-50%, -50%) rotate(var(--div-angle)); pointer-events: none; z-index: 8;
}
.setsuna-divider::before, .setsuna-divider::after {
  content: ''; position: absolute; left: 50%; width: 1.5px; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.88), rgba(255,255,255,0.08));
  box-shadow: 0 0 10px rgba(255,255,255,0.35);
  transition: top 0.34s cubic-bezier(.22,1,.36,1), bottom 0.34s cubic-bezier(.22,1,.36,1);
}
.setsuna-divider::before { top: 0; bottom: calc(50% + 42px); }
.setsuna-divider::after  { top: calc(50% + 42px); bottom: 0; }
.setsuna-home.orb-open .setsuna-divider::before { bottom: calc(50% + clamp(128px, 28vmin, 168px)); }
.setsuna-home.orb-open .setsuna-divider::after  { top: calc(50% + clamp(128px, 28vmin, 168px)); }

.setsuna-home-hud {
  position: absolute; top: calc(var(--safe-t) + 14px); left: calc(var(--safe-l) + 20px); right: calc(var(--safe-r) + 20px);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  z-index: 26; pointer-events: none;
}
.setsuna-brand { pointer-events: auto; }
/* ⑤ 左上角标题加粗凸显 */
.setsuna-brand-name {
  font-size: clamp(22px, 2.9vw, 33px);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.08;
  background: linear-gradient(180deg, #ffffff 0%, #f5ecdc 58%, #d7c099 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 rgba(5, 8, 12, 0.92)) drop-shadow(0 0 18px rgba(241, 164, 93, 0.36));
  white-space: nowrap;
}
.setsuna-brand-ver {
  margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em;
  color: rgba(230, 240, 237, 0.86); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.88);
  display: flex; align-items: center; gap: 6px;
}
.dawn-title-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,210,107,0.34), rgba(241,164,93,0.22));
  border: 1px solid rgba(255,216,120,0.85); color: #fff0c2; font-size: 10px; font-weight: 900;
  letter-spacing: 0.08em;
}
.setsuna-hud-right { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.pill-stat {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; background: rgba(10, 14, 20, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #edf6f4; font-size: 12px; font-weight: 700; white-space: nowrap;
  backdrop-filter: var(--tower-glass, blur(10px));
}
.pill-stat.coins { border-color: rgba(241, 164, 93, 0.62); color: #ffe8bf; }
.net-dot { width: 7px; height: 7px; border-radius: 50%; background: #7f8c8a; display: inline-block; }
.net-dot.ok { background: var(--jade); box-shadow: 0 0 8px var(--jade); }
.net-dot.wait { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* 左右双主入口 */
.setsuna-field-btn {
  position: absolute; top: 50%; z-index: 16;
  width: clamp(190px, 27vw, 304px);
  padding: clamp(16px, 2.6vh, 26px) clamp(18px, 2.2vw, 28px);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: var(--tower-glass, blur(10px));
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.52);
  transition: transform 0.26s cubic-bezier(.22,1,.36,1), background 0.22s ease, border-color 0.22s ease, box-shadow 0.26s ease;
}
.setsuna-field-btn::before, .setsuna-field-btn::after {
  content: ''; position: absolute; left: 12%; right: 12%; height: 1.5px; opacity: 0.55;
  transition: left 0.26s ease, right 0.26s ease, opacity 0.22s ease;
}
.setsuna-field-btn::before { top: 0; }
.setsuna-field-btn::after  { bottom: 0; }
.setsuna-field-btn.left-classic { left: clamp(14px, 6.8vw, 104px); transform: translateY(-50%); border-color: rgba(62, 214, 180, 0.52); }
.setsuna-field-btn.left-classic::before, .setsuna-field-btn.left-classic::after { background: linear-gradient(90deg, transparent, var(--jade), transparent); }
.setsuna-field-btn.left-classic:hover {
  transform: translateY(calc(-50% - 6px));
  background: rgba(10, 24, 26, 0.78); border-color: var(--jade);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62), 0 0 32px rgba(62, 214, 180, 0.28);
}
.setsuna-field-btn.left-classic:hover::before, .setsuna-field-btn.left-classic:hover::after { left: 2%; right: 2%; opacity: 1; }

.setsuna-field-btn.right-card { right: clamp(14px, 6.8vw, 104px); transform: translateY(-50%); border-color: rgba(241, 164, 93, 0.54); }
.setsuna-field-btn.right-card::before, .setsuna-field-btn.right-card::after { background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.setsuna-field-btn.right-card:hover {
  transform: translateY(calc(-50% - 6px));
  background: rgba(24, 17, 12, 0.78); border-color: var(--amber);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62), 0 0 32px rgba(241, 164, 93, 0.30);
}
.setsuna-field-btn.right-card:hover::before, .setsuna-field-btn.right-card:hover::after { left: 2%; right: 2%; opacity: 1; }

.setsuna-field-en { font-size: 10px; font-weight: 800; letter-spacing: 0.28em; text-transform: uppercase; opacity: 0.82; }
.left-classic .setsuna-field-en { color: var(--jade); }
.right-card .setsuna-field-en   { color: var(--amber); }
.setsuna-field-title { font-size: clamp(20px, 2.7vw, 30px); font-weight: 900; letter-spacing: 0.12em; color: #ffffff; line-height: 1.15; text-shadow: 0 2px 14px rgba(0,0,0,0.85); }
.setsuna-field-sub { font-size: clamp(11px, 1.2vw, 13px); color: #d6e4e1; font-weight: 500; line-height: 1.4; }
.setsuna-field-bar { width: 44px; height: 2px; border-radius: 2px; margin-top: 4px; transition: width 0.26s ease, opacity 0.24s ease; opacity: 0.78; }
.left-classic .setsuna-field-bar { background: var(--jade); box-shadow: 0 0 10px var(--jade); }
.right-card .setsuna-field-bar   { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.setsuna-field-btn:hover .setsuna-field-bar { width: 96px; opacity: 1; }

/* ⑤ 正中央交互导引球（内部安全区防溢出 + 静止命中槽防 Windows 跳动） */
.setsuna-orb-wrap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 24; display: flex; align-items: center; justify-content: center; }
.setsuna-orb-core-btn {
  position: relative; width: 64px; height: 64px; border-radius: 50%; padding: 0;
  background: radial-gradient(circle at 38% 34%, #ffffff 0%, #d9f3ec 45%, rgba(120, 198, 210, 0.35) 100%);
  border: 2px solid rgba(255, 255, 255, 0.94); color: #0b1116;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.62), 0 0 54px rgba(62, 214, 180, 0.38);
  animation: orbFloat 3.4s ease-in-out infinite; z-index: 26;
}
@keyframes orbFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.04); } }
.setsuna-orb-core-btn:hover { transform: scale(1.09); box-shadow: 0 0 36px rgba(255, 255, 255, 0.85), 0 0 64px rgba(62, 214, 180, 0.52); }

.setsuna-orb-ring {
  position: relative;
  width: clamp(262px, 56vmin, 342px);
  height: clamp(262px, 56vmin, 342px);
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, rgba(10, 16, 24, 0.84) 0%, rgba(8, 12, 18, 0.72) 70%, rgba(16, 24, 34, 0.84) 100%);
  border: 2px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 42px rgba(0, 0, 0, 0.72), 0 0 28px rgba(255, 255, 255, 0.22), inset 0 0 26px rgba(62, 214, 180, 0.16);
  backdrop-filter: var(--tower-glass, blur(14px));
  -webkit-backdrop-filter: var(--tower-glass, blur(14px));
  animation: orbExpand 0.26s cubic-bezier(.22,1,.36,1) both;
}
@keyframes orbExpand { from { opacity: 0; transform: scale(0.36); } to { opacity: 1; transform: scale(1); } }
.orb-spokes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* 静止命中容器：悬停绝不位移，根治 Windows 端鼠标边界跳动 Bug */
.orb-node-slot {
  position: absolute;
  left: calc(50% + var(--ox));
  top: calc(50% + var(--oy));
  transform: translate(-50%, -50%);
  width: clamp(68px, 14vmin, 86px);
  height: clamp(48px, 9.6vmin, 58px);
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.orb-node-slot:hover, .orb-node-slot:active {
  transform: translate(-50%, -50%) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.orb-node-inner {
  width: 100%; height: 100%;
  padding: 5px 4px;
  border-radius: 9px;
  background: rgba(12, 17, 26, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: clamp(11px, 1.45vmin, 12.5px); font-weight: 800; letter-spacing: 0.04em;
  color: #eef6f4;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(.22,1,.36,1), border-color 0.18s ease, box-shadow 0.2s ease, background 0.18s ease;
  pointer-events: none;
}
/* 仅视觉层在圆框内部轻轻上浮，绝不拉出圆环 */
.orb-node-slot:hover .orb-node-inner {
  transform: translateY(-4px);
  background: rgba(20, 29, 42, 0.94);
  color: #ffffff;
}
.orb-node-inner .orb-bar { width: 18px; height: 2px; border-radius: 2px; transition: width 0.2s ease; }
.orb-node-slot:hover .orb-bar { width: 34px; }
.tone-violet .orb-node-inner { border-color: rgba(200,158,255,0.48); }
.tone-violet:hover .orb-node-inner { border-color: var(--violet); box-shadow: 0 6px 18px rgba(200,158,255,0.34); }
.tone-violet .orb-bar { background: var(--violet); }
.tone-sky .orb-node-inner { border-color: rgba(114,189,244,0.48); }
.tone-sky:hover .orb-node-inner { border-color: var(--sky); box-shadow: 0 6px 18px rgba(114,189,244,0.34); }
.tone-sky .orb-bar { background: var(--sky); }
.tone-amber .orb-node-inner { border-color: rgba(241,164,93,0.52); }
.tone-amber:hover .orb-node-inner { border-color: var(--amber); box-shadow: 0 6px 18px rgba(241,164,93,0.36); }
.tone-amber .orb-bar { background: var(--amber); }
.tone-jade .orb-node-inner { border-color: rgba(62,214,180,0.48); }
.tone-jade:hover .orb-node-inner { border-color: var(--jade); box-shadow: 0 6px 18px rgba(62,214,180,0.34); }
.tone-jade .orb-bar { background: var(--jade); }
.tone-crimson .orb-node-inner { border-color: rgba(238,100,96,0.52); color: #ffd4d2; }
.tone-crimson:hover .orb-node-inner { border-color: var(--crimson); box-shadow: 0 6px 18px rgba(238,100,96,0.38); }
.tone-crimson .orb-bar { background: var(--crimson); }

.orb-center-switch {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; padding: 0;
  background: rgba(242, 246, 245, 0.94); color: #0b1014; border: 1.5px solid #ffffff;
  font-size: 16px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}
.orb-center-switch:hover { transform: translate(-50%, -50%) scale(1.1); background: var(--jade); color: #081210; }

/* ========================================================================
   ③ 纯黑屏起手过场动画（无静音字幕按钮，只保留跳过）
   ======================================================================== */
.prologue-wrap { position: absolute; inset: 0; background: #000000; z-index: 30; }
.prologue-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.prologue-bg.visible { opacity: 0.85; }
.prologue-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.06) 52%, rgba(0,0,0,0.86) 100%); pointer-events: none; }
.prologue-caption { position: absolute; left: 6%; right: 6%; bottom: clamp(46px, 14vh, 110px); text-align: center; z-index: 54; pointer-events: none; }
.prologue-pixel {
  display: inline-block; padding: 12px 26px;
  background: rgba(6, 10, 16, 0.72); border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px; backdrop-filter: var(--tower-glass, blur(8px));
  font-family: "Songti SC", "SimSun", "PingFang SC", serif;
  font-size: clamp(20px, 3vw, 33px); font-weight: 800; letter-spacing: 0.16em; color: #f4f8f7;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.76); transition: opacity 0.2s ease;
}
.prologue-pixel:empty { opacity: 0; border-color: transparent; background: transparent; box-shadow: none; }
.prologue-pixel b { color: var(--amber); font-size: 1.18em; text-shadow: 0 0 18px rgba(241, 164, 93, 0.85); }
.prologue-tools { position: absolute; top: calc(var(--safe-t) + 14px); right: calc(var(--safe-r) + 16px); display: flex; gap: 8px; z-index: 56; }
.prologue-skip-hint {
  position: absolute; bottom: calc(var(--safe-b) + 14px); left: 50%; transform: translateX(-50%);
  z-index: 56; font-size: 12px; letter-spacing: 0.14em; color: rgba(232, 242, 240, 0.84);
  text-shadow: 0 2px 8px #000; white-space: nowrap; pointer-events: none;
}

/* ========================================================================
   ④ 二级模式场景：取消黑框黑底，让模糊景深背景透出并凸显通透选项
   ======================================================================== */
.panel-scene {
  position: relative; z-index: 12; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 10px) calc(var(--safe-r) + clamp(16px, 2.8vw, 32px)) calc(var(--safe-b) + 12px) calc(var(--safe-l) + clamp(16px, 2.8vw, 32px));
}
.scene-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 4px 10px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.scene-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.scene-head h2 {
  margin: 0; font-size: clamp(16px, 2.2vw, 22px); font-weight: 900; letter-spacing: 0.08em;
  color: #ffffff; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.88);
}
.breadcrumb {
  font-size: 11.5px; color: #dbe8e5; letter-spacing: 0.08em; font-weight: 600;
  padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.28); white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0,0,0,0.85);
}
.scene-head-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; flex: 0 0 auto; }
.scene-head-actions button { white-space: nowrap; flex: 0 0 auto; }
.scene-foot-bar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding-top: 8px; margin-top: 6px;
  border-top: 1px solid rgba(241, 192, 112, 0.24);
}
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }

/* 彻底取消大黑框，仅作透明弹性布局区 */
.scene-body {
  flex: 1 1 auto; min-height: 0; overflow: auto; margin-top: 10px;
  padding: clamp(6px, 1.4vh, 14px) 2px;
  background: transparent;
  border: none;
  display: flex; flex-direction: column;
}
.scene-body.centered { justify-content: center; gap: 16px; }

.tier-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 26px); max-width: 980px; width: 100%; margin: 0 auto; }
.tier-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); max-width: 1080px; width: 100%; margin: 0 auto; }
.tier-card {
  position: relative; width: 100%; text-align: left;
  min-height: clamp(134px, 31vh, 214px);
  padding: clamp(16px, 2.4vh, 24px) clamp(18px, 2vw, 24px);
  border-radius: var(--radius);
  background: rgba(16, 22, 36, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: var(--tower-glass, blur(9px));
  -webkit-backdrop-filter: var(--tower-glass, blur(9px));
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24), 0 12px 32px rgba(0, 0, 0, 0.42);
}
.tier-card::before {
  content: ''; position: absolute; left: 0; top: 14%; bottom: 14%; width: 3px; border-radius: 3px;
  background: var(--jade); opacity: 0.85; transition: top 0.22s ease, bottom 0.22s ease;
}
.tier-card.theme-amber::before { background: var(--amber); }
.tier-card.theme-sky::before   { background: var(--sky); }
.tier-card:hover { transform: translateY(-5px); border-color: var(--jade); background: rgba(20, 32, 44, 0.76); }
.tier-card.theme-amber:hover { border-color: var(--amber); }
.tier-card.theme-sky:hover   { border-color: var(--sky); }
.tier-card:hover::before { top: 6%; bottom: 6%; }
.tier-card-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.1); color: var(--jade); }
.tier-card.theme-amber .tier-card-tag { color: var(--amber); }
.tier-card.theme-sky .tier-card-tag   { color: var(--sky); }
.tier-card h3 { margin: 0; font-size: clamp(18px, 2.2vw, 23px); font-weight: 900; color: #ffffff; letter-spacing: 0.04em; text-shadow: 0 2px 10px rgba(0,0,0,0.7); }
.tier-card p  { margin: 0; font-size: clamp(12px, 1.3vw, 13.5px); color: #d6e4e1; line-height: 1.5; font-weight: 500; }
.tier-card-cta { font-size: 12.5px; font-weight: 800; color: var(--jade); display: inline-flex; align-items: center; gap: 5px; }
.tier-card.theme-amber .tier-card-cta { color: var(--amber); }
.tier-card.theme-sky .tier-card-cta   { color: var(--sky); }

.sub-action-strip { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; max-width: 980px; width: 100%; margin: 4px auto 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.card-box {
  background: rgba(16, 22, 36, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius-sm);
  padding: 12px; display: flex; flex-direction: column; gap: 6px;
  backdrop-filter: var(--tower-glass, blur(8px));
  -webkit-backdrop-filter: var(--tower-glass, blur(8px));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
  backdrop-filter: var(--tower-glass, blur(12px));
  box-shadow: inset 0 1px 0 var(--highlight), 0 8px 24px rgba(0,0,0,0.34);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card-box.sel { border-color: var(--jade); box-shadow: 0 0 18px rgba(62, 214, 180, 0.28); }
.card-box h4 { margin: 0; font-size: 14px; color: #ffffff; letter-spacing: 0.03em; }
.card-box p  { margin: 0; font-size: 12px; color: #d0dfdc; line-height: 1.48; }

.kbd-hint { display: inline-block; padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28); font-size: 10px; font-weight: 800; color: #ffffff; margin-right: 3px; }

/* ⑥ 经典暗金珐琅手势皮肤 & 皇家火漆印章真实样式 */
.classic-skin-enamel button.move-skin-btn {
  background: linear-gradient(155deg, rgba(84, 58, 22, 0.88), rgba(28, 20, 14, 0.92));
  border: 1.5px solid #ffd26b;
  color: #fff2cc;
  box-shadow: inset 0 1px 0 rgba(255,235,176,0.5), 0 0 14px rgba(255,210,107,0.3);
}
.classic-skin-enamel button.move-skin-btn.active {
  background: linear-gradient(155deg, #c9862e, #6e3d12);
  border-color: #fff0b8;
  box-shadow: 0 0 22px rgba(255,210,107,0.65);
}
.royal-wax-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ff6b57, #9c1a1c);
  border: 2px solid #ffd26b; color: #fff4d1; font-weight: 900; font-size: 12px;
  box-shadow: 0 0 20px rgba(238, 100, 96, 0.6);
  animation: stampDrop 0.42s cubic-bezier(.22,1,.36,1) both;
}
@keyframes stampDrop { from { opacity: 0; transform: scale(2.1) rotate(-14deg); } to { opacity: 1; transform: scale(1) rotate(-3deg); } }

/* 商店商品缩略卡 */
.shop-item-card { display: flex; flex-direction: column; gap: 8px; }
.shop-thumb-row { display: flex; gap: 10px; align-items: center; }
.shop-thumb { width: 64px; height: 48px; border-radius: 6px; object-fit: cover; border: 1px solid rgba(255,255,255,0.22); flex: 0 0 64px; background: rgba(10,14,20,0.6); }

/* 挑选角色舞台（Phase 3：全 9 位英雄 3×3 选人网格 + 右侧大型 rAF 动态试演舞台） */
.hero-select-layout { display: grid; grid-template-columns: 1.18fr 0.96fr; gap: 14px; height: 100%; min-height: 0; align-items: stretch; }
.hero-roster-col { min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.hero-roster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; align-content: start; }
.hero-tile-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 3px;
  padding: 8px 6px 7px; width: 100%; min-height: 118px;
  background: linear-gradient(160deg, rgba(16, 22, 34, 0.78), rgba(10, 14, 24, 0.72));
  border: 1.5px solid rgba(255,255,255,0.18); border-radius: var(--radius);
  text-align: center; backdrop-filter: var(--tower-glass, blur(10px));
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.hero-tile-card:hover {
  transform: translateY(-2px);
  border-color: var(--hero-accent, var(--amber));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42), 0 0 14px color-mix(in srgb, var(--hero-accent, #f59e42) 34%, transparent);
}
.hero-tile-card.sel {
  border-color: var(--hero-accent, var(--amber));
  background: linear-gradient(160deg, color-mix(in srgb, var(--hero-accent, #f59e42) 22%, rgba(22, 26, 38, 0.9)), rgba(14, 18, 28, 0.88));
  box-shadow: 0 0 22px color-mix(in srgb, var(--hero-accent, #f59e42) 42%, transparent), inset 0 0 12px color-mix(in srgb, var(--hero-accent, #f59e42) 16%, transparent);
}
.hero-tile-world {
  font-size: 9.5px; line-height: 1.2; padding: 1px 6px; border-radius: 999px;
  background: rgba(8, 12, 20, 0.68); border: 1px solid color-mix(in srgb, var(--hero-accent, #f59e42) 55%, rgba(255,255,255,0.2));
  color: #e6eef4; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-tile-thumb { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,0.65)); }
.hero-tile-name { font-size: 12.5px; color: #ffffff; letter-spacing: 0.02em; line-height: 1.2; }
.hero-tile-style { font-size: 10px; color: #b7ccd0; line-height: 1.15; }
.hero-stage-col {
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 6px; min-height: 0;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--hero-accent, #3ed6b4) 20%, transparent), rgba(10, 15, 24, 0.62) 72%);
  border: 1.5px solid color-mix(in srgb, var(--hero-accent, #72bdf4) 48%, rgba(255,255,255,0.22)); border-radius: var(--radius); padding: 10px 12px; backdrop-filter: var(--tower-glass, blur(8px));
}
.hero-stage-head { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hero-stage-title-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-stage-name { color: #ffffff; font-size: 15px; line-height: 1.2; }
.hero-stage-world { color: #cbe0e6; font-size: 11px; }
.hero-stage-preview { flex: 1 1 auto; min-height: 110px; display: flex; align-items: flex-end; justify-content: center; width: 100%; position: relative; overflow: visible; }
.hero-stage-pedestal {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: min(210px, 68%); height: 22px; border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--hero-accent, #38d9f5) 45%, transparent) 0%, rgba(0, 0, 0, 0.55) 62%, transparent 100%);
  pointer-events: none; z-index: 1;
}
.hero-stage-preview img {
  position: relative; z-index: 2; max-height: min(192px, 34vh); max-width: 88%; object-fit: contain;
  transform-origin: 50% 92%; animation: idleBreath 2.6s ease-in-out infinite;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,0.68));
}
.hero-stage-preview img.preview-hit-flash {
  animation: previewHitFlash 0.36s ease;
}
@keyframes previewHitFlash {
  0%, 100% { filter: drop-shadow(0 12px 16px rgba(0,0,0,0.68)); }
  25% { filter: brightness(2.8) contrast(1.15) saturate(0.15) drop-shadow(0 0 18px rgba(255,255,255,0.92)); }
}
.pose-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pose-tabs button { font-size: 11px; padding: 4px 10px; }
.hero-detail-box {
  width: 100%; padding: 7px 10px; border-radius: 9px;
  background: rgba(8, 12, 20, 0.58); border: 1px solid rgba(255,255,255,0.14);
  display: flex; flex-direction: column; gap: 5px;
}
.hero-story-line { margin: 0; font-size: 11px; color: #dbe9ee; line-height: 1.38; }
.hero-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.hero-stat-item { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #c7d8df; }
.hero-stat-item span { flex: 0 0 26px; }
.hero-stat-bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; }
.hero-stat-bar i { display: block; height: 100%; border-radius: 999px; box-shadow: 0 0 8px currentColor; }
.hero-rec-line { font-size: 10.5px; color: var(--jade); line-height: 1.3; }
.hero-confirm-bar { display: flex; gap: 8px; width: 100%; margin-top: 2px; }
.hero-confirm-bar button { flex: 1; }

/* ========================================================================
   ⑦ + 方向 1：2.5D HD-2D 四层景深战斗舞台（纯 2D 零 3D 裁剪、零 mix-blend-mode 黑屏）
   ======================================================================== */
.battle-camera {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  --floor-baseline: clamp(72px, 16dvh, 132px);
  background-color: #090d14;
  background-position: center 46%; background-size: cover; background-repeat: no-repeat;
}
/* 2.5D 舞台独立相机层：仅使用纯 2D 缩放平移（无 3D perspective / 无 filter），全屏独占下 100% 稳定不丢纹理 */
.battle-world-stage {
  position: absolute; inset: 0; overflow: hidden;
  background-position: center 46%; background-size: cover; background-repeat: no-repeat;
  transition: transform 0.22s cubic-bezier(.22,1,.36,1);
  transform-origin: center 54%;
  transform: translate3d(0, 0, 0);
}
.battle-camera.cam-windup .battle-world-stage      { transform: translate3d(0, 0, 0) scale(1.016); }
.battle-camera.cam-lunge-right .battle-world-stage { transform: translate3d(-1.8%, -0.8%, 0) scale(1.052); }
.battle-camera.cam-lunge-left .battle-world-stage  { transform: translate3d(1.8%, -0.8%, 0) scale(1.052); }
.battle-camera.cam-clash-zoom .battle-world-stage  { transform: translate3d(0, -0.5%, 0) scale(1.04); }
.battle-camera.cam-sky-zoom .battle-world-stage    { transform: translate3d(0, 1.4%, 0) scale(0.968); }

/* 第 1 层：远景稳固背景图（去掉冲突动画与 filter，彻底消除 Windows 全屏下 GPU 丢纹理黑屏） */
.battle-bg-layer {
  position: absolute; inset: -3%; width: 106%; height: 106%;
  object-fit: cover; object-position: center 46%; pointer-events: none; z-index: 1;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}

/* 第 2 层：2.5D 地面光池（绑定统一地面基线 --floor-baseline，避免人物与地面脱节） */
.battle-ground-plane {
  position: absolute; left: 4%; right: 4%; bottom: calc(var(--floor-baseline, 16dvh) - 24px); height: clamp(86px, 18dvh, 156px); z-index: 3;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--ground-glow, rgba(96, 224, 174, 0.24)) 0%, rgba(0, 0, 0, 0) 70%);
  opacity: 0.72;
}
.battle-camera[data-world="1"] { --ground-glow: rgba(98, 226, 152, 0.26); --godray-tint: rgba(188, 255, 206, 0.16); }
.battle-camera[data-world="2"] { --ground-glow: rgba(255, 148, 72, 0.30); --godray-tint: rgba(255, 198, 128, 0.18); }
.battle-camera[data-world="3"] { --ground-glow: rgba(78, 214, 245, 0.28); --godray-tint: rgba(164, 242, 255, 0.16); }
.battle-camera[data-world="4"] { --ground-glow: rgba(248, 196, 102, 0.28); --godray-tint: rgba(255, 226, 162, 0.16); }
.battle-camera[data-world="5"] { --ground-glow: rgba(232, 86, 206, 0.28); --godray-tint: rgba(132, 238, 255, 0.16); }
.battle-camera[data-world="6"] { --ground-glow: rgba(160, 186, 255, 0.28); --godray-tint: rgba(232, 218, 255, 0.16); }
.battle-camera[data-world="7"] { --ground-glow: rgba(118, 162, 255, 0.30); --godray-tint: rgba(182, 206, 255, 0.18); }

/* 第 4 层：柔和体积光罩 + 丁达尔神光（彻底移除 mix-blend-mode: screen 与 filter，杜绝 D3D11 全屏吃背景 Bug） */
.battle-light-mask {
  position: absolute; inset: 0; pointer-events: none; z-index: 12;
  background: radial-gradient(ellipse 64% 52% at 50% 45%, rgba(255, 250, 235, 0.08) 0%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0.28) 100%);
}
.battle-godrays {
  position: absolute; inset: 0; pointer-events: none; z-index: 13;
  background: linear-gradient(122deg, rgba(255, 255, 255, 0) 14%, var(--godray-tint, rgba(220, 250, 230, 0.14)) 32%, rgba(255, 255, 255, 0) 48%, var(--godray-tint, rgba(220, 250, 230, 0.10)) 64%, rgba(255, 255, 255, 0) 80%);
  opacity: 0.65;
  animation: godrayPulse 8s ease-in-out infinite alternate;
}
@keyframes godrayPulse {
  from { opacity: 0.42; }
  to   { opacity: 0.78; }
}

/* 顶部完全取消黑底与模糊透明框：直融背景 + 高对比文字描边与清晰发光血条；右侧为独立大红退出按钮预留安全区 */
.hud-top-row {
  position: absolute; top: calc(var(--safe-t) + 10px); left: calc(var(--safe-l) + 14px); right: calc(var(--safe-r) + 102px);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; z-index: 18;
  pointer-events: none;
}
.fighter-hud {
  width: min(35%, 336px);
  display: flex; flex-direction: column;
  background: transparent;
  border: none;
  padding: 2px 4px;
  pointer-events: auto;
}
/* ⑥ 异界烫银名牌战框皮肤（无黑底，纯精细烫银角标与顶底银线） */
.fighter-hud.skin-silver-frame {
  border-top: 1.5px solid rgba(220, 238, 255, 0.85);
  border-bottom: 1.5px solid rgba(220, 238, 255, 0.55);
  padding: 5px 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 18px rgba(170,218,255,0.28);
}
.fighter-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13.5px; font-weight: 900; margin-bottom: 4px; color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.95), 0 0 10px rgba(0,0,0,0.85);
}
.hp-track {
  position: relative; height: 16px;
  background: linear-gradient(180deg, rgba(8, 10, 16, 0.84), rgba(18, 16, 24, 0.72));
  border: 1.5px solid rgba(241, 196, 114, 0.76);
  border-radius: 4px;
  transform: skewX(-12deg);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 232, 178, 0.28), 0 3px 12px rgba(0, 0, 0, 0.72), 0 0 12px rgba(241, 164, 93, 0.18);
}
/* 血条缓降残影底层（扣血瞬间停顿 250ms 后平滑缩减，强化掉血痛感） */
.hp-delay-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(255, 242, 214, 0.92), rgba(255, 112, 102, 0.94));
  transition: width 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
  z-index: 1;
}
.hp-fill {
  position: relative; z-index: 2;
  height: 100%; background: linear-gradient(90deg, #b8292b 0%, #e05232 58%, #f4a44a 100%);
  transition: width 0.16s ease-out;
  box-shadow: inset 0 2px 4px rgba(255,244,210,0.42);
}
.hp-num {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
  transform: skewX(12deg);
  font-size: 11px; font-weight: 900; color: #fff8ea;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
}
/* 血条下方 1 秒简明伤害来源标签（如：剪刀克制 -16 / 烈焰反伤 -6） */
.hp-damage-source {
  margin-top: 3px; min-height: 16px;
  font-size: 11px; font-weight: 900; letter-spacing: 0.04em; color: #ffe2a8;
  text-shadow: 0 1px 4px #000, 0 0 10px rgba(255, 140, 66, 0.75);
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.hp-damage-source.show { opacity: 1; transform: translateY(0); }
.hud-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px;
  font-size: 12px; font-weight: 800; color: #f6eedc;
  text-shadow: 0 2px 4px rgba(0,0,0,0.95);
}
/* 敌方血条下方护甲靠右对称排布，彻底释放中央战报浮字呼吸区 */
.hud-top-row > .fighter-hud:last-child .hud-row { justify-content: flex-end; }
.hud-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 999px;
  background: rgba(12, 14, 22, 0.52);
  border: 1px solid rgba(241, 192, 112, 0.44);
  box-shadow: 0 0 10px rgba(241, 164, 93, 0.14);
}
.hud-badge img { width: 15px; height: 15px; filter: drop-shadow(0 1px 3px #000); }
.stamina-pips {
  display: inline-flex; gap: 3px; align-items: center;
  padding: 1px 7px; border-radius: 999px;
  background: rgba(12, 14, 22, 0.46);
  border: 1px solid rgba(241, 192, 112, 0.36);
}
.pip { width: 13px; height: 13px; background: url('/assets/tower/icons/hud-stamina.svg') center/contain no-repeat; filter: drop-shadow(0 0 4px rgba(255, 206, 108, 0.65)); }
.pip.empty { opacity: 0.24; filter: grayscale(1); }
/* 极简 Debuff 微型图标栏：位于护甲/体力栏下方的独立 Flexbox 横排容器，彻底杜绝遮挡饰品与卡槽 */
.debuff-mini-bar {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  margin-top: 4px; margin-bottom: 2px; min-height: 24px;
  position: relative; z-index: 2;
  pointer-events: auto;
}
.debuff-mini-bar.is-enemy { justify-content: flex-end; }
.debuff-badge {
  position: relative;
  width: 24px; height: 24px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(16, 20, 32, 0.82);
  border: 1.5px solid rgba(255, 206, 120, 0.82);
  font-size: 12px; line-height: 1; padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.debuff-badge:hover,
.debuff-badge.is-open {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(255, 224, 140, 0.92), 0 4px 12px rgba(0, 0, 0, 0.78);
}
.debuff-badge.tone-crimson { border-color: rgba(242, 104, 98, 0.92); background: rgba(72, 16, 20, 0.86); }
.debuff-badge.tone-jade    { border-color: rgba(74, 224, 172, 0.92); background: rgba(16, 54, 42, 0.86); }
.debuff-badge.tone-violet  { border-color: rgba(196, 152, 255, 0.92); background: rgba(44, 22, 74, 0.86); }
.debuff-badge.tone-amber   { border-color: rgba(246, 184, 92, 0.92); background: rgba(68, 42, 14, 0.86); }
.debuff-badge.tone-gold    { border-color: rgba(255, 224, 118, 0.95); background: rgba(76, 52, 12, 0.88); }
.debuff-badge.tone-sky     { border-color: rgba(118, 202, 255, 0.92); background: rgba(18, 44, 70, 0.86); }
.debuff-badge.has-label {
  width: auto; padding: 1px 6px; gap: 3px;
  font-size: 11px; font-weight: 800; color: #fff4dd; white-space: nowrap;
}
.debuff-badge.has-label .debuff-count {
  position: static; min-width: 0; height: auto; padding: 0; border: 0;
  background: transparent; font-size: inherit; color: #ffe1a5;
}
.debuff-count {
  position: absolute; right: -4px; bottom: -4px;
  min-width: 13px; height: 13px; padding: 0 2px; border-radius: 999px;
  background: #10141f; border: 1px solid rgba(255, 255, 255, 0.76);
  color: #fff6dc; font-size: 8.5px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* 顶层独立 Debuff 详情浮层（挂于舞台最顶层 z-index，带右上角 × 关闭键，绝不遮挡且点击空白/再次点图标/切回合均关闭） */
.debuff-popover-layer {
  position: absolute; inset: 0; z-index: 66;
  pointer-events: none;
}
.debuff-popover-card {
  position: absolute;
  width: min(300px, calc(100% - 24px));
  padding: 9px 12px 10px;
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(14, 18, 30, 0.96), rgba(9, 12, 22, 0.97));
  border: 1.5px solid rgba(246, 202, 124, 0.86);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.82), 0 0 18px rgba(246, 184, 92, 0.22);
  color: #f8fafc;
  pointer-events: auto;
  animation: debuffPopIn 0.14s ease-out both;
}
@keyframes debuffPopIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.debuff-popover-card.tone-crimson { border-color: rgba(242, 104, 98, 0.92); }
.debuff-popover-card.tone-jade    { border-color: rgba(74, 224, 172, 0.92); }
.debuff-popover-card.tone-violet  { border-color: rgba(196, 152, 255, 0.92); }
.debuff-popover-card.tone-amber   { border-color: rgba(246, 184, 92, 0.92); }
.debuff-popover-card.tone-gold    { border-color: rgba(255, 224, 118, 0.95); }
.debuff-popover-card.tone-sky     { border-color: rgba(118, 202, 255, 0.92); }
.debuff-popover-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 5px; padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.debuff-popover-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 900; color: #fff6dc;
}
.debuff-popover-meta {
  font-size: 10.5px; font-weight: 800; color: #ffd48a;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(255, 210, 128, 0.16);
  border: 1px solid rgba(255, 210, 128, 0.42);
}
.debuff-popover-close {
  flex: 0 0 auto;
  width: 26px; height: 26px; min-width: 26px; min-height: 26px; padding: 0;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #ffffff; font-size: 15px; font-weight: 900; line-height: 1;
  cursor: pointer;
}
.debuff-popover-close:hover {
  background: rgba(235, 56, 56, 0.85);
  border-color: #ffd4d4;
}
.debuff-popover-desc {
  margin: 0; font-size: 11.5px; line-height: 1.48; color: #e8f0f8; font-weight: 700;
}

/* 卡牌 Debuff 极简视觉遮罩：致盲迷雾 / 流沙锁定 / 琥珀粘滞 */
.cc-blind-badge {
  width: 17px; height: 17px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(132, 82, 212, 0.88); border: 1px solid #e6d4ff;
  color: #fff; font-size: 10px; font-weight: 900;
}
.cc-lock-mask {
  position: absolute !important; inset: 0; z-index: 6 !important; border-radius: 8px;
  background: linear-gradient(180deg, rgba(46, 30, 14, 0.76), rgba(20, 14, 8, 0.86));
  border: 1.5px dashed rgba(241, 178, 92, 0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10px; font-weight: 900; color: #ffe0a8; text-shadow: 0 1px 4px #000;
}
.cc-sticky-pill {
  position: absolute !important; left: 50%; bottom: 23px; transform: translateX(-50%); z-index: 5 !important;
  padding: 0 5px; border-radius: 4px; background: rgba(232, 142, 32, 0.94); color: #1b0c02;
  border: 1px solid #ffe49c; font-size: 8.5px; font-weight: 900; white-space: nowrap;
}

/* 中央顶部清爽两行 HUD：上行层数与世界名，下行纯轮次+塔币+紧凑环境词缀 */
.battle-center-banner {
  flex: 0 1 auto; text-align: center; background: transparent; border: none; padding: 2px 6px;
  pointer-events: auto;
}
.battle-center-banner strong {
  display: block; font-size: clamp(13px, 1.65vw, 16px); font-weight: 900; letter-spacing: 0.06em; color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 0 14px rgba(0,0,0,0.8);
  white-space: nowrap;
}
.battle-subline {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: nowrap;
  margin-top: 3px; font-size: 11.5px; font-weight: 800; color: #ffe5b3;
  text-shadow: 0 1px 5px rgba(0,0,0,0.95);
  white-space: nowrap;
}
.battle-center-banner small {
  display: block; font-size: 11px; font-weight: 800; color: #ffe5b3; margin-top: 2px;
  text-shadow: 0 1px 5px rgba(0,0,0,0.95);
}
/* 战斗右上角独立高对比度正红渐变「退出」按钮（最小 76x36px，永不与血条/词缀拥挤） */
.btn-battle-exit-red {
  position: absolute;
  top: calc(var(--safe-t) + 10px);
  right: calc(var(--safe-r) + 12px);
  z-index: 32;
  min-width: 78px; min-height: 36px;
  padding: 6px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f04141 0%, #cc1b20 56%, #990f15 100%);
  border: 1.5px solid #ffb5b0;
  color: #ffffff;
  font-size: 13.5px; font-weight: 900; letter-spacing: 0.1em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  box-shadow: 0 6px 18px rgba(176, 16, 22, 0.56), inset 0 1px 0 rgba(255, 220, 216, 0.45);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; pointer-events: auto;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}
.btn-battle-exit-red:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(220, 24, 30, 0.68), inset 0 1px 0 rgba(255, 232, 228, 0.62);
}
.btn-battle-exit-red:active {
  transform: scale(0.95);
}
.battle-exit-ghost {
  margin-top: 4px; padding: 2px 10px; font-size: 11px; font-weight: 800;
  background: transparent; border: 1px solid rgba(255,255,255,0.34); border-radius: 999px;
  color: rgba(255,255,255,0.88); backdrop-filter: none; box-shadow: none;
  text-shadow: 0 1px 4px #000;
}
.battle-exit-ghost:hover { border-color: var(--amber); color: #ffffff; background: rgba(255,255,255,0.1); }

/* 第 3 层：2.5D Standee 角色与怪物 + 统一地面基线锚点（.arena-floor-anchor）+ 脚底透明留白微调（.actor-ground-pad） */
.arena-actors,
.arena-actors.arena-floor-anchor {
  position: absolute; inset: 0; pointer-events: none; z-index: 10;
}
.actor-slot {
  position: absolute;
  bottom: var(--floor-baseline, 16dvh);
  width: clamp(160px, 27vw, 330px);
  height: clamp(165px, 50dvh, 355px);
  display: flex; align-items: flex-end; justify-content: center;
  transition: transform 0.18s cubic-bezier(.22,1,.36,1), filter 0.14s ease;
  will-change: transform, filter;
}
.actor-left { left: clamp(22px, 6.5vw, 110px); }
.actor-right { right: clamp(22px, 6.5vw, 110px); }
.actor-left-back { left: 2%; bottom: calc(var(--floor-baseline, 16dvh) + 24px); width: 22%; height: 42dvh; opacity: 0.92; }
.actor-right-back { right: 2%; bottom: calc(var(--floor-baseline, 16dvh) + 24px); width: 22%; height: 42dvh; opacity: 0.92; }
/* 独立脚底落地微调层：按 sprite-registry.js 实测 groundOffsetY 精准抵消底部透明留白，与内部呼吸动画零冲突 */
.actor-ground-pad {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: flex-end; justify-content: center;
  transform: translateY(calc(var(--ground-offset-y, 0) * 1%));
  z-index: 2;
}
.actor-slot::after {
  content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 68%; height: 20px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.74) 0%, rgba(0,0,0,0.28) 58%, transparent 100%);
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none; z-index: 1;
}
/* 蓄力聚能脚底光环 */
.actor-slot.act-windup-r::after,
.actor-slot.act-windup-l::after {
  background: radial-gradient(ellipse at center, rgba(255, 208, 108, 0.78) 0%, rgba(62, 214, 180, 0.34) 58%, transparent 100%);
  transform: translateX(-50%) scale(1.22, 1.3);
}
/* 冲锋残影层 */
.actor-afterimage {
  position: absolute; bottom: 0; left: 50%; width: 100%; height: 100%; max-height: 100%; max-width: 100%;
  object-fit: contain; object-position: center bottom;
  transform: translateX(-50%); opacity: 0; pointer-events: none; z-index: 1;
  filter: brightness(1.7) hue-rotate(-14deg) blur(1.5px);
}
.actor-slot.act-lunge-r .actor-afterimage { animation: ghostTrailR 0.34s ease-out both; }
.actor-slot.act-lunge-l .actor-afterimage { animation: ghostTrailL 0.34s ease-out both; }
@keyframes ghostTrailR { 0% { opacity: 0.62; transform: translateX(-50%) translateX(-18px) scale(0.98); } 100% { opacity: 0; transform: translateX(-50%) translateX(-64px) scale(0.92); } }
@keyframes ghostTrailL { 0% { opacity: 0.62; transform: translateX(-50%) translateX(18px) scale(0.98); }  100% { opacity: 0; transform: translateX(-50%) translateX(64px) scale(0.92); } }

/* ⑥ 华丽升级：蒸汽白铜战装动态光环（旋转白铜齿轮法阵 + 炽金日轮背光 + 上升流金光柱 + 鎏金星尘 + 角色双层金边） */
.boiler-aura-fx {
  position: absolute; inset: -12% -16% -8% -16%; pointer-events: none; z-index: 1;
}
.boiler-ring-floor {
  position: absolute; left: 50%; bottom: -22px; width: 102%; aspect-ratio: 1 / 1;
  transform: translateX(-50%) scaleY(0.30); transform-origin: center bottom;
  opacity: 0.98;
}
.boiler-ring-floor::before, .boiler-ring-floor::after {
  content: ''; position: absolute; inset: 0;
  background: url('/assets/tower/icons/boiler-aura-ring.svg') center/contain no-repeat;
}
.boiler-ring-floor::before {
  animation: boilerSpinCW 14s linear infinite;
  filter: drop-shadow(0 0 18px rgba(255, 206, 102, 0.98));
}
.boiler-ring-floor::after {
  inset: 14%; opacity: 0.85;
  animation: boilerSpinCCW 9s linear infinite;
  filter: drop-shadow(0 0 12px rgba(255, 240, 190, 0.92));
}
.boiler-back-halo {
  position: absolute; left: 50%; top: 46%; width: 82%; aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 246, 214, 0.44) 0%, rgba(255, 198, 96, 0.28) 38%, rgba(214, 134, 48, 0.10) 64%, transparent 78%);
  animation: boilerHaloPulse 2.6s ease-in-out infinite alternate;
}
.boiler-back-halo::before {
  content: ''; position: absolute; inset: 8%;
  background: url('/assets/tower/icons/boiler-aura-ring.svg') center/contain no-repeat;
  opacity: 0.44; animation: boilerSpinCW 22s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 210, 120, 0.65));
}
.boiler-pillars {
  position: absolute; left: 16%; right: 16%; bottom: 4%; top: 6%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 224, 140, 0.24) 45%, rgba(255, 196, 94, 0.46) 100%) 16% 0 / 10% 100% no-repeat,
    linear-gradient(180deg, transparent 0%, rgba(255, 244, 204, 0.28) 38%, rgba(255, 210, 112, 0.52) 100%) 50% 0 / 16% 100% no-repeat,
    linear-gradient(180deg, transparent 0%, rgba(255, 224, 140, 0.24) 45%, rgba(255, 196, 94, 0.46) 100%) 84% 0 / 10% 100% no-repeat;
  opacity: 0.78;
  animation: boilerPillarLift 3.2s ease-in-out infinite alternate;
}
.boiler-sparks { position: absolute; inset: 0; }
.boiler-sparks i {
  position: absolute; bottom: 8%; width: 5px; height: 5px; border-radius: 50%;
  background: #fff7d6;
  box-shadow: 0 0 10px 3px rgba(255, 196, 86, 0.95);
  animation: boilerSparkRise 2.4s ease-out infinite;
}
.boiler-sparks i:nth-child(1) { left: 22%; animation-delay: 0s; }
.boiler-sparks i:nth-child(2) { left: 38%; animation-delay: 0.55s; width: 6px; height: 6px; }
.boiler-sparks i:nth-child(3) { left: 54%; animation-delay: 1.1s; }
.boiler-sparks i:nth-child(4) { left: 68%; animation-delay: 1.65s; width: 4px; height: 4px; }
.boiler-sparks i:nth-child(5) { left: 80%; animation-delay: 2.0s; }

@keyframes boilerSpinCW    { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes boilerSpinCCW   { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes boilerHaloPulse { from { transform: translate(-50%, -50%) scale(0.95); opacity: 0.78; } to { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } }
@keyframes boilerPillarLift{ from { opacity: 0.55; transform: translateY(4px); } to { opacity: 0.92; transform: translateY(-6px); } }
@keyframes boilerSparkRise {
  0%   { transform: translateY(0) scale(0.5); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 0.85; }
  100% { transform: translateY(-135px) scale(1.2); opacity: 0; }
}

.actor-slot.skin-boiler-aura::after {
  background: radial-gradient(ellipse at center, rgba(255, 224, 134, 0.95) 0%, rgba(235, 154, 52, 0.55) 48%, rgba(214, 128, 40, 0) 100%);
  height: 28px; width: 92%;
}
.actor-slot.skin-boiler-aura .actor-sprite,
.hero-stage-preview.skin-boiler-aura > img {
  filter: drop-shadow(0 0 18px rgba(255, 206, 108, 0.96)) drop-shadow(0 0 7px rgba(255, 246, 208, 0.88)) drop-shadow(0 12px 16px rgba(0,0,0,0.65)) saturate(1.14) contrast(1.06);
}
.hero-stage-preview.skin-boiler-aura { overflow: visible; }
.hero-stage-preview.skin-boiler-aura .boiler-aura-fx { inset: 0 12% 0 12%; }
.hero-stage-preview.skin-boiler-aura > img { position: relative; z-index: 2; }
.actor-slot.dead {
  animation: monsterDefeatFade 0.55s cubic-bezier(.22, 1, .36, 1) forwards;
}
.actor-slot.dead .actor-sprite { animation: none !important; }
@keyframes monsterDefeatFade {
  0%   { filter: brightness(2.4) saturate(0.2); transform: translateX(0) scale(1); opacity: 1; }
  38%  { filter: grayscale(0.75) brightness(0.95); transform: translateX(26px) rotate(6deg) scale(0.96); opacity: 0.72; }
  100% { filter: grayscale(1) brightness(0.75); transform: translate(34px, 12px) rotate(8deg) scale(0.9); opacity: 0.34; }
}
.actor-slot.flip-x { transform: scaleX(-1); }

/* 动作/蓄力/受击/入场瞬间暂停待机循环动画，确保招式切图与原型位移干脆利落零抖动 */
.actor-slot.act-windup-l .actor-sprite,
.actor-slot.act-windup-r .actor-sprite,
.actor-slot.act-lunge-l  .actor-sprite,
.actor-slot.act-lunge-r  .actor-sprite,
.actor-slot.act-guard-l  .actor-sprite,
.actor-slot.act-guard-r  .actor-sprite,
.actor-slot.act-hit-l    .actor-sprite,
.actor-slot.act-hit-r    .actor-sprite,
.actor-slot.act-intro    .actor-sprite { animation: none !important; }

/* 四阶段演法姿态动画（蓄力 -> 冲锋突进 / 举盾稳守 -> 受击白闪击退） */
.actor-slot.act-windup-r { transform: translateX(-22px) scale(0.96, 1.03) rotate(-3deg); }
.actor-slot.act-windup-l { transform: translateX(22px) scale(0.96, 1.03) rotate(3deg); }
.actor-slot.act-lunge-r  { transform: translateX(68px) scale(1.08, 0.97) rotate(2.5deg); }
.actor-slot.act-lunge-l  { transform: translateX(-68px) scale(1.08, 0.97) rotate(-2.5deg); }
.actor-slot.act-guard-r  { transform: translateX(14px) scale(1.03, 0.98); filter: drop-shadow(0 0 18px rgba(114, 189, 244, 0.85)); }
.actor-slot.act-guard-l  { transform: translateX(-14px) scale(1.03, 0.98); filter: drop-shadow(0 0 18px rgba(114, 189, 244, 0.85)); }
.actor-slot.act-hit-r    { animation: hitFlashRecoilR 0.34s cubic-bezier(.22,1,.36,1); }
.actor-slot.act-hit-l    { animation: hitFlashRecoilL 0.34s cubic-bezier(.22,1,.36,1); }
.actor-slot.act-attack-r { animation: lungeRight 0.34s cubic-bezier(.22,1,.36,1); }
.actor-slot.act-attack-l { animation: lungeLeft 0.34s cubic-bezier(.22,1,.36,1); }
.actor-slot.act-hit      { animation: hitFlashRecoilR 0.32s ease; }
/* 模块 B：纯 2D 安全受击白闪 + 弹性后退（黄金三要素） */
.actor-slot.hit-flash-white .actor-sprite {
  filter: brightness(3.2) contrast(1.15) saturate(0.12) drop-shadow(0 0 18px rgba(255, 255, 255, 0.95)) !important;
}

@keyframes lungeRight      { 0% { transform: translateX(0); } 28% { transform: translateX(-18px) scale(0.96); } 58% { transform: translateX(62px) scale(1.08); } 100% { transform: translateX(0); } }
@keyframes lungeLeft       { 0% { transform: translateX(0); } 28% { transform: translateX(18px) scale(0.96); }  58% { transform: translateX(-62px) scale(1.08); } 100% { transform: translateX(0); } }
@keyframes hitFlashRecoilR { 0%, 100% { filter: none; transform: translateX(0); } 20% { filter: brightness(3.0) contrast(1.2) saturate(0.1); transform: translateX(22px) rotate(4deg); } 58% { filter: brightness(1.55) sepia(0.35) hue-rotate(-25deg); transform: translateX(-6px) rotate(-1.5deg); } }
@keyframes hitFlashRecoilL { 0%, 100% { filter: none; transform: translateX(0); } 20% { filter: brightness(3.0) contrast(1.2) saturate(0.1); transform: translateX(-22px) rotate(-4deg); } 58% { filter: brightness(1.55) sepia(0.35) hue-rotate(-25deg); transform: translateX(6px) rotate(1.5deg); } }

.actor-sprite {
  position: relative; z-index: 2; width: 100%; height: 100%; max-height: 100%; max-width: 100%;
  object-fit: contain; object-position: center bottom;
  transform-origin: 50% 94%; animation: idleBreath 2.6s ease-in-out infinite;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.65));
}
/* Phase 3：9 位英雄交由 rAF 纯 GPU transform 驱动差异化呼吸/蓄力/冲刺/弹性击退，暂停 CSS idleBreath 杜绝叠加冲突 */
.actor-sprite[data-raf-motion="1"],
#heroPreviewSprite[data-raf-motion="1"] {
  animation: none !important;
  will-change: transform;
}
.actor-sprite.is-totem {
  animation: totemHover 2.8s ease-in-out infinite;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 16px var(--ground-glow, rgba(160,190,255,0.45)));
}
@keyframes idleBreath { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-4px) scale(1.015, 0.985); } }
@keyframes totemHover { 0%, 100% { transform: translateY(-4px) scale(1); } 50% { transform: translateY(-13px) scale(1.025); } }

/* ===== W1 1~15 层 5 套怪物差异化入场 / 待机 / 蓄力 / 攻击动画原型（纯 2D 安全 Transform） ===== */
/* 1. bounce（史莱姆/菇灵）：弹性砸落入场 + 压扁拉长呼吸 + 压扁蓄力 + 高抛跃起砸向玩家 */
.actor-slot.archetype-bounce .actor-sprite { animation: idleBounceSquash 1.95s ease-in-out infinite; }
.actor-slot.archetype-bounce.act-intro     { animation: introBounceDrop 0.48s cubic-bezier(.22,.88,.32,1) both; }
.actor-slot.archetype-bounce.act-windup-l  { transform: translate(12px, 6px) scale(1.14, 0.84); }
.actor-slot.archetype-bounce.act-lunge-l   { animation: atkBounceLeapL 0.44s cubic-bezier(.22,.88,.32,1) both; }
@keyframes introBounceDrop {
  0%   { transform: translate(42px, -58px) scale(0.86, 1.18); opacity: 0; }
  62%  { transform: translate(-4px, 6px) scale(1.16, 0.84); opacity: 1; }
  82%  { transform: translate(0, -10px) scale(0.95, 1.06); }
  100% { transform: translate(0, 0) scale(1, 1); opacity: 1; }
}
@keyframes idleBounceSquash {
  0%, 100% { transform: translateY(0) scale(1.06, 0.93); }
  45%      { transform: translateY(-12px) scale(0.93, 1.09); }
  75%      { transform: translateY(2px) scale(1.09, 0.90); }
}
@keyframes atkBounceLeapL {
  0%   { transform: translate(0, 0) scale(1.12, 0.86); }
  42%  { transform: translate(-48px, -44px) scale(0.92, 1.12) rotate(-8deg); }
  76%  { transform: translate(-88px, 4px) scale(1.16, 0.84) rotate(-3deg); }
  100% { transform: translate(-64px, 0) scale(1, 1); }
}

/* 2. hover（夜蝠/毒蛾/巨蜂/鬼火）：空中掠入悬停 + 正弦波悬浮漂移 + 振翼拉高蓄力 + 高速斜向俯冲穿刺 */
.actor-slot.archetype-hover .actor-sprite { animation: idleHoverWave 2.1s ease-in-out infinite; }
.actor-slot.archetype-hover.act-intro     { animation: introHoverSwoop 0.46s cubic-bezier(.18,.9,.28,1) both; }
.actor-slot.archetype-hover.act-windup-l  { transform: translate(24px, -22px) rotate(6deg) scale(0.96, 1.04); }
.actor-slot.archetype-hover.act-lunge-l   { animation: atkHoverDiveL 0.38s cubic-bezier(.18,.9,.28,1) both; }
@keyframes introHoverSwoop {
  0%   { transform: translate(78px, -46px) rotate(-10deg) scale(0.9); opacity: 0; }
  68%  { transform: translate(-8px, -6px) rotate(3deg) scale(1.03); opacity: 1; }
  100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
}
@keyframes idleHoverWave {
  0%, 100% { transform: translate(0, -8px) rotate(-1.5deg); }
  33%      { transform: translate(5px, -18px) rotate(2deg); }
  66%      { transform: translate(-5px, -12px) rotate(-2deg); }
}
@keyframes atkHoverDiveL {
  0%   { transform: translate(16px, -22px) rotate(6deg) scale(0.96); }
  55%  { transform: translate(-92px, 6px) rotate(-12deg) scale(1.1, 0.94); }
  100% { transform: translate(-68px, -6px) rotate(-4deg) scale(1.02); }
}

/* 3. heavy（独角仙/林熊/树精/母熊）：沉重踏地入场 + 低频沉重呼吸 + 蓄力后撤重踏震屏 */
.actor-slot.archetype-heavy .actor-sprite { animation: idleHeavyBreath 3.2s ease-in-out infinite; }
.actor-slot.archetype-heavy.act-intro     { animation: introHeavyStomp 0.50s cubic-bezier(.28,.04,.22,1) both; }
.actor-slot.archetype-heavy.act-windup-l  { transform: translate(26px, 2px) scale(0.95, 1.05) rotate(3.5deg); }
.actor-slot.archetype-heavy.act-lunge-l   { animation: atkHeavyStompL 0.46s cubic-bezier(.3,0,.2,1) both; }
@keyframes introHeavyStomp {
  0%   { transform: translate(58px, -18px) scale(1.04); opacity: 0; }
  64%  { transform: translate(-2px, 6px) scale(1.08, 0.92); opacity: 1; }
  100% { transform: translate(0, 0) scale(1, 1); opacity: 1; }
}
@keyframes idleHeavyBreath {
  0%, 100% { transform: translateY(0) scale(1.02, 0.985); }
  50%      { transform: translateY(-3px) scale(1.04, 1.02); }
}
@keyframes atkHeavyStompL {
  0%   { transform: translate(26px, 0) scale(0.95, 1.06) rotate(4deg); }
  45%  { transform: translate(-18px, -14px) scale(1.06, 1.04) rotate(-2deg); }
  75%  { transform: translate(-78px, 5px) scale(1.14, 0.91) rotate(-5deg); }
  100% { transform: translate(-64px, 0) scale(1.04, 0.98); }
}

/* 4. agile（哥布林/影狼/棘鹿）：疾步闪现入场 + 轻快微倾蓄势 + 双段残影瞬移突进 */
.actor-slot.archetype-agile .actor-sprite { animation: idleAgilePoise 1.65s ease-in-out infinite; }
.actor-slot.archetype-agile.act-intro     { animation: introAgileBlink 0.38s cubic-bezier(.15,.95,.25,1) both; }
.actor-slot.archetype-agile.act-windup-l  { transform: translate(18px, 3px) skewX(7deg) scale(0.96, 1.02); }
.actor-slot.archetype-agile.act-lunge-l   { animation: atkAgileDashL 0.34s cubic-bezier(.15,.95,.25,1) both; }
@keyframes introAgileBlink {
  0%   { transform: translate(86px, 0) skewX(-12deg) scale(0.94); opacity: 0; }
  68%  { transform: translate(-10px, 0) skewX(5deg) scale(1.04); opacity: 1; }
  100% { transform: translate(0, 0) skewX(0deg) scale(1); opacity: 1; }
}
@keyframes idleAgilePoise {
  0%, 100% { transform: translate(0, 0) skewX(-2deg) scale(1); }
  50%      { transform: translate(-4px, -5px) skewX(2.5deg) scale(1.025, 0.98); }
}
@keyframes atkAgileDashL {
  0%   { transform: translate(14px, 0) skewX(8deg); }
  38%  { transform: translate(-52px, -8px) skewX(-10deg) scale(1.08, 0.95); }
  70%  { transform: translate(-98px, 0) skewX(-6deg) scale(1.12, 0.96); }
  100% { transform: translate(-72px, 0) skewX(0deg); }
}

/* 5. burrow（蚁狮/织蛛）：破土/垂丝现身入场 + 潜伏微震摆动 + 压低蓄势 + 突袭破土/落网 */
.actor-slot.archetype-burrow .actor-sprite { animation: idleBurrowTremor 2.4s ease-in-out infinite; }
.actor-slot.archetype-burrow.act-intro     { animation: introBurrowEmerge 0.48s cubic-bezier(.22,.9,.28,1) both; }
.actor-slot.archetype-burrow.act-windup-l  { transform: translate(10px, 12px) scale(1.08, 0.86); }
.actor-slot.archetype-burrow.act-lunge-l   { animation: atkBurrowStrikeL 0.42s cubic-bezier(.22,.9,.28,1) both; }
@keyframes introBurrowEmerge {
  0%   { transform: translate(0, 44px) scale(0.86, 0.72); opacity: 0; }
  66%  { transform: translate(-4px, -10px) scale(1.06, 1.06); opacity: 1; }
  100% { transform: translate(0, 0) scale(1, 1); opacity: 1; }
}
@keyframes idleBurrowTremor {
  0%, 100% { transform: translate(0, 2px) rotate(-1.8deg); }
  25%      { transform: translate(-3px, -2px) rotate(1.8deg); }
  50%      { transform: translate(2px, 3px) rotate(-1.2deg); }
  75%      { transform: translate(-2px, -3px) rotate(2.2deg); }
}
@keyframes atkBurrowStrikeL {
  0%   { transform: translate(0, 16px) scale(1.08, 0.82); }
  45%  { transform: translate(-42px, 22px) scale(0.9, 0.78); }
  78%  { transform: translate(-84px, -12px) scale(1.12, 1.06) rotate(-5deg); }
  100% { transform: translate(-64px, 0) scale(1); }
}

/* GPT 分批放图兜底姿态变形（仅放了 idle.webp 时仍呈现差异化招式动势） */
.actor-sprite.pose-fallback-rock     { transform: scale(1.08, 0.94) rotate(-5deg) !important; }
.actor-sprite.pose-fallback-scissors { transform: skewX(-7deg) scale(1.06, 0.98) !important; }
.actor-sprite.pose-fallback-paper    { transform: scale(1.04, 1.04); filter: drop-shadow(0 0 16px rgba(176, 144, 255, 0.85)) drop-shadow(0 12px 16px rgba(0,0,0,0.65)); }
.actor-sprite.pose-fallback-hit      { filter: brightness(2.6) contrast(1.15) saturate(0.2) !important; }

/* 无黑底战报浮字（位于清爽两行中央 HUD 下方居中空旷区，绝不触碰左右 Debuff 图标） */
.battle-float-log {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 64px); transform: translateX(-50%);
  max-width: 48%; overflow: hidden; text-overflow: ellipsis;
  font-size: 11.5px; font-weight: 900; letter-spacing: 0.04em; color: #fff6df; z-index: 16;
  text-shadow: 0 2px 6px #000, 0 0 12px rgba(0,0,0,0.92); white-space: nowrap; pointer-events: none;
}

/* 顶部紧凑阶梯预告 + 5 层环境词缀徽章 */
.battle-meta-pills {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
  margin-top: 3px;
}
.theme-affix-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 999px;
  background: rgba(14, 13, 22, 0.66);
  border: 1px solid rgba(241, 192, 112, 0.56);
  font-size: 10px; font-weight: 800; color: #ffe7b8;
  text-shadow: 0 1px 3px #000;
}
.next-node-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 999px;
  background: rgba(18, 22, 34, 0.66);
  border: 1px solid rgba(138, 196, 255, 0.45);
  font-size: 10px; font-weight: 800; color: #d6ecff;
  text-shadow: 0 1px 3px #000;
}
.xray-reveal-banner {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 126px); transform: translateX(-50%);
  z-index: 20; padding: 4px 14px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(46, 22, 74, 0.88), rgba(16, 22, 42, 0.9));
  border: 1.5px solid #c89eff; color: #f6eaff; font-size: 12px; font-weight: 900;
  box-shadow: 0 0 22px rgba(200, 158, 255, 0.6); pointer-events: none;
}

/* ===== ① 牌堆左下收纳 + 屏幕右下角暗金大「出招」按钮 + 右下角上方加注与透视镜条 ===== */
.battle-bottom-hud {
  position: absolute; left: calc(var(--safe-l) + 14px); right: calc(var(--safe-r) + 14px); bottom: calc(var(--safe-b) + 10px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  z-index: 24; pointer-events: none;
}

.battle-left-controls {
  display: flex; align-items: flex-end; gap: 12px; pointer-events: auto;
}

.battle-right-controls {
  margin-left: auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: auto; flex: 0 0 auto;
}

/* 加注筹码 & 透视镜快捷条（位于右下角「出招」正上方） */
.battle-tactic-bar {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end;
  padding: 4px 7px; border-radius: 10px;
  background: rgba(10, 11, 18, 0.74);
  border: 1px solid rgba(241, 192, 112, 0.48);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}
.battle-tactic-bar .tactic-label {
  font-size: 10px; font-weight: 900; color: #f4d394; letter-spacing: 0.04em;
}
.wager-chip {
  padding: 2px 7px; font-size: 10.5px; font-weight: 900; border-radius: 999px;
  background: rgba(24, 22, 34, 0.85); border: 1px solid rgba(241, 184, 96, 0.45);
  color: #f6e4be; backdrop-filter: none; box-shadow: none;
}
.wager-chip.active {
  background: linear-gradient(135deg, #f3b552, #b8641c);
  border-color: #fff0c2; color: #1a0d04;
  box-shadow: 0 0 12px rgba(243, 181, 82, 0.65);
}
.xray-btn {
  padding: 2px 8px; font-size: 10.5px; font-weight: 900; border-radius: 999px;
  background: linear-gradient(135deg, rgba(136, 86, 224, 0.5), rgba(46, 30, 88, 0.88));
  border: 1px solid rgba(208, 170, 255, 0.8); color: #f6eaff; backdrop-filter: none; box-shadow: none;
}

/* 屏幕右下角大而清晰的暗金黑曜石「出招」按钮 */
.btn-cast-move {
  min-width: clamp(108px, 13.5vw, 144px);
  height: clamp(56px, 11vh, 70px);
  padding: 6px 18px;
  border-radius: 12px;
  border: 2px solid rgba(255, 214, 128, 0.94);
  background: linear-gradient(155deg, rgba(218, 128, 42, 0.94) 0%, rgba(126, 46, 18, 0.96) 56%, rgba(46, 18, 12, 0.98) 100%);
  color: #fff9eb;
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 900;
  letter-spacing: 0.14em;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.55), 0 8px 26px rgba(0, 0, 0, 0.72), 0 0 24px rgba(241, 164, 93, 0.45);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.88);
  backdrop-filter: none;
}
.btn-cast-move small {
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em; color: #ffecc4; line-height: 1;
}
.btn-cast-move:not(:disabled) { animation: castReadyPulse 2s ease-in-out infinite; }
@keyframes castReadyPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,240,198,0.5), 0 6px 22px rgba(0,0,0,0.68), 0 0 20px rgba(241,164,93,0.45); }
  50%      { box-shadow: inset 0 1px 0 rgba(255,246,216,0.75), 0 8px 28px rgba(0,0,0,0.75), 0 0 34px rgba(255,212,118,0.85); }
}
.btn-cast-move:disabled {
  opacity: 0.88;
  background: linear-gradient(155deg, rgba(28, 30, 44, 0.84), rgba(12, 13, 22, 0.92));
  border-color: rgba(241, 196, 114, 0.52);
  color: #f4ecd9;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.16), 0 4px 16px rgba(0, 0, 0, 0.6);
  animation: none;
}

/* ⑦ 收纳态：左下方扇形扑克牌堆（只露出耗体+系列+名称+图案，无黑底） */
.poker-fan-stack {
  position: relative; width: 174px; height: 124px; cursor: pointer;
  pointer-events: auto; touch-action: none;
}
.poker-stack-card {
  position: absolute; left: 26px; bottom: 4px;
  width: 82px; height: 112px; border-radius: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.46);
  background: linear-gradient(168deg, #273244, #141a26);
  padding: 5px; display: flex; flex-direction: column; justify-content: space-between;
  transform-origin: 50% 118%;
  transform: rotate(var(--fan-rot, 0deg)) translateX(var(--fan-x, 0px));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.72);
  transition: transform 0.22s cubic-bezier(.22,1,.36,1), filter 0.2s ease;
}
.poker-fan-stack:hover .poker-stack-card {
  transform: rotate(calc(var(--fan-rot, 0deg) * 1.28)) translateX(calc(var(--fan-x, 0px) * 1.18)) translateY(-6px);
}
.poker-stack-card.suit-rock     { border-color: rgba(238, 100, 96, 0.85); background: linear-gradient(168deg, #3c1e22, #1b1015); }
.poker-stack-card.suit-scissors { border-color: rgba(62, 214, 180, 0.85); background: linear-gradient(168deg, #17343a, #0e1920); }
.poker-stack-card.suit-paper    { border-color: rgba(200, 158, 255, 0.85); background: linear-gradient(168deg, #2c2044, #141022); }
.poker-stack-card.chosen        { border-color: #ffd670; box-shadow: 0 0 18px rgba(255, 214, 112, 0.85), 0 8px 18px rgba(0,0,0,0.8); }
.poker-stack-tip {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 900; color: #fff6de; white-space: nowrap;
  text-shadow: 0 1px 4px #000, 0 0 8px #000; pointer-events: none; z-index: 12;
}

/* 6~8 技能全出牌：520ms 阻尼慢展 + 倒序 25ms 错峰 360ms 弧线收回 + 动态适配 6/7/8 槽不遮挡舞台 */
.battle-left-controls > [hidden] { display: none; }
.hand-reopen:not([hidden]) {
  position: relative; min-height: 44px;
  padding: 6px 12px; color: #ffe5b1; background: #282019; border: 1px solid #b69254; border-radius: 8px;
}
.hand-expanded-tray {
  will-change: transform, opacity;
  contain: layout style;
  flex: 1 1 0; min-width: 0;
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  pointer-events: auto; touch-action: pan-x; scrollbar-width: none;
  perspective: 960px;
  animation: trayBookSlowOpen 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hand-expanded-tray.is-retracting {
  pointer-events: none;
  animation: none;
}
.hand-expanded-tray::-webkit-scrollbar { display: none; }
.hand-track {
  width: max-content; min-width: 100%;
  display: flex; justify-content: center; align-items: flex-end; gap: 10px;
  padding: 48px 16px 7px;
}
.hand-track .clean-card { flex: none; touch-action: pan-x; }
.hand-track img { -webkit-user-drag: none; }
.hand-expanded-tray + .battle-right-controls { max-width: clamp(112px, 24vw, 240px); }
.battle-left-controls:has(.hand-fold-btn) { flex: none; }

.hand-expanded-tray.is-retracting .clean-card {
  animation: bookPageRetract calc(0.34s - var(--retract-delay, 0ms)) cubic-bezier(0.55, 0.08, 0.68, 0.53) var(--retract-delay, 0ms) forwards !important;
}
@keyframes bookPageRetract {
  0%   { opacity: 1; transform: translate(0, 0) rotateY(0deg) rotate(var(--tilt, 0deg)) scale(1); }
  55%  { opacity: 0.78; transform: translate(calc(var(--retract-dx, -180px) * 0.55), -18px) rotateY(30deg) scale(0.84); }
  100% { opacity: 0; transform: translate(var(--retract-dx, -260px), 16px) rotateY(54deg) scale(0.58); }
}
@keyframes trayBookSlowOpen {
  from { opacity: 0; transform: translate(-24%, 22px) scale(0.78); }
  to   { opacity: 1; transform: translate(0, 0) scale(1); }
}
.hand-expanded-tray .clean-card.book-page-in {
  animation: bookPageUnfold 0.48s cubic-bezier(0.22, 1, 0.36, 1) var(--book-delay, 0ms) both;
}
@keyframes bookPageUnfold {
  0%   { opacity: 0; transform: translateX(-34px) translateY(14px) rotateY(-46deg) scale(0.84); }
  65%  { opacity: 1; transform: translateX(3px) translateY(-4px) rotateY(7deg) scale(1.02); }
  100% { opacity: 1; transform: translateX(0) translateY(0) rotateY(0deg) rotate(var(--tilt, 0deg)) scale(1); }
}
/* 6~8 等权技能槽动态排布（自动压缩宽度确保手机横屏与桌面均不遮挡与溢出） */
.slots5-row {
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(5px, 1vw, 11px);
  max-width: 100%;
}
.slots5-row.slots-6 .clean-card { width: 84px; height: 118px; }
.slots5-row.slots-7 { gap: clamp(4px, 0.75vw, 8px); }
.slots5-row.slots-7 .clean-card { width: 76px; height: 110px; }
.slots5-row.slots-8 { gap: clamp(3px, 0.55vw, 6px); }
.slots5-row.slots-8 .clean-card { width: 70px; height: 104px; }
.slots5-row.slots-9 { gap: clamp(4px, 0.55vw, 7px); }
.slots5-row.slots-9 .clean-card {
  flex: 0 0 auto;
  width: clamp(76px, 8.8vw, 90px);
  height: clamp(94px, 10.6vw, 108px);
}

/* 顶部极简饰品图标栏（位于我方血条下方，悬浮/点击查看详情） */
.relic-mini-bar {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 3px;
  pointer-events: auto;
}
.relic-mini-chip {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px;
  background: rgba(18, 24, 38, 0.56); border: 1px solid rgba(255, 212, 128, 0.58);
  color: #fff2cc; font-size: 10px; font-weight: 800; line-height: 1.15;
  backdrop-filter: var(--tower-glass, blur(6px)); cursor: pointer; text-shadow: 0 1px 3px #000;
}
.relic-mini-chip.is-exp { border-color: rgba(114, 240, 212, 0.85); color: #b8fff0; background: rgba(16, 42, 46, 0.62); }
.relic-mini-chip img { width: 13px; height: 13px; object-fit: contain; }
.relic-slot-cap-tag {
  font-size: 10px; font-weight: 900; padding: 1px 7px; border-radius: 999px;
  background: rgba(241, 164, 93, 0.24); border: 1px solid rgba(241, 192, 112, 0.62);
  color: #ffe8b8; text-shadow: 0 1px 2px #000;
}

/* 世界开局 3 选 1 初始 6 卡组征召面板 */
@media (orientation: landscape) and (max-width: 900px) {
  .draft-scene .scene-head h2 { display: block; white-space: normal; font-size: clamp(12px, 1.9vw, 16px); letter-spacing: .035em; line-height: 1.2; }
  .draft-scene .scene-head h2 svg { vertical-align: middle; }
  .draft-scene .scene-head .breadcrumb { display: none; }
}
.draft-body { gap: clamp(6px, 1.8vh, 16px); }
.draft-body > * { flex: none; }
.draft-body > :first-child { margin-top: auto; }
.draft-body > :last-child { margin-bottom: auto; }
.draft-instructions { margin: 0; text-align: center; font-size: 13px; line-height: 1.45; font-weight: 800; color: #fff6de; text-shadow: 0 2px 6px #000; }
.draft-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.draft-pack-card {
  position: relative; padding: 12px; border-radius: 11px;
  background: rgba(16, 22, 36, 0.54); border: 1.5px solid rgba(255, 214, 128, 0.44);
  backdrop-filter: var(--tower-glass, blur(10px)); display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.22s ease, border-color 0.2s ease, box-shadow 0.22s ease;
}
.draft-pack-card:hover {
  transform: translateY(-4px); border-color: #ffe194;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.58), 0 0 24px rgba(241, 184, 96, 0.32);
}
.draft-cards-mini {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px;
}
.draft-mini-item {
  display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 6px;
  background: rgba(12, 16, 28, 0.62); border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 10.5px; color: #f4f8fc; min-width: 0;
}
.draft-mini-item img { width: 18px; height: 18px; flex: 0 0 18px; }
.draft-mini-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.draft-mini-item.rar-gold   { border-color: rgba(243, 181, 82, 0.72); }
.draft-mini-item.rar-red    { border-color: rgba(230, 82, 69, 0.78); }
.draft-mini-item.rar-purple { border-color: rgba(184, 130, 255, 0.68); }
.draft-mini-item.rar-blue   { border-color: rgba(95, 208, 238, 0.58); }
.world-reset-banner {
  padding: 9px 14px; border-radius: 9px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(241, 164, 93, 0.24), rgba(114, 189, 244, 0.18));
  border: 1px solid rgba(255, 214, 128, 0.72); color: #fff4da;
  font-size: 12px; font-weight: 800; text-align: center; text-shadow: 0 1px 3px #000;
}
/* 开局三选一底部刷新操作栏与洗牌翻牌动效 */
.draft-footer-bar {
  flex: 0 0 auto; margin-top: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.btn-draft-refresh {
  min-width: 248px; min-height: 40px; padding: 8px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(244, 182, 86, 0.28), rgba(154, 90, 26, 0.42));
  border: 1.5px solid rgba(255, 214, 128, 0.84);
  color: #fff6de; font-size: 13px; font-weight: 900; letter-spacing: 0.04em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 236, 188, 0.34);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}
.btn-draft-refresh:hover:not(:disabled) {
  filter: brightness(1.12); transform: translateY(-1px);
}
.btn-draft-refresh:disabled {
  opacity: 0.44; filter: grayscale(0.72); cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(24, 28, 38, 0.62);
}
.draft-footer-hint {
  font-size: 11px; color: rgba(242, 236, 224, 0.82); text-shadow: 0 1px 3px #000;
}
@media (orientation: landscape) and (max-height: 480px) {
  .draft-scene .draft-body { margin-top: 2px; padding-block: 3px; gap: 4px; }
  .draft-scene .draft-instructions { font-size: 12px; line-height: 1.25; }
  .draft-scene .draft-grid-3 { gap: 6px; }
  .draft-scene .draft-pack-card { padding: 5px 7px; gap: 3px; }
  .draft-scene .draft-cards-mini { gap: 3px; }
  .draft-scene .draft-mini-item { padding: 2px 4px; }
  .draft-scene .draft-pack-card .primary-btn { min-height: 32px; padding: 3px 4px; font-size: 13px; }
  .draft-scene .draft-footer-bar { margin: 2px 0 0; }
  .draft-scene .draft-footer-hint { display: none; }
  .draft-scene .btn-draft-refresh { max-width: 100%; min-height: 42px; padding: 5px 14px; }
}
.draft-pack-card.is-shuffling {
  animation: draftCardShuffle 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.draft-pack-card.is-shuffling:nth-child(2) { animation-delay: 0.05s; }
.draft-pack-card.is-shuffling:nth-child(3) { animation-delay: 0.10s; }
@keyframes draftCardShuffle {
  0%   { opacity: 0.25; transform: perspective(700px) rotateY(-58deg) translateY(10px) scale(0.92); }
  55%  { opacity: 0.92; transform: perspective(700px) rotateY(10deg) translateY(-3px) scale(1.02); }
  100% { opacity: 1;    transform: perspective(700px) rotateY(0deg) translateY(0) scale(1); }
}

/* ========================================================================
   Phase 2 需求 ⑤：卡面严格解耦（系列纯色区分 vs 5 档品质差异化动效）+ 泛光徽章
   - 系列纯色（石头=暖琥珀 #f59e42 / 剪刀=冷青蓝 #38d9f5 / 布=秘翠紫 #b87cff）仅作用于系列角标与微细分割线
   - 5 档品质（白/蓝/紫/金/红）掌管左上角品质角标、边框辉光与专属动效，绝不与系列花纹重叠导致眼花
   ======================================================================== */
.clean-card.suit-rock::before,
.clean-card.suit-scissors::before,
.clean-card.suit-paper::before {
  background-image: linear-gradient(172deg, rgba(24, 30, 44, 0.94), rgba(11, 15, 24, 0.97)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
.codex-framed-card.suit-rock,
.codex-framed-card.suit-scissors,
.codex-framed-card.suit-paper {
  background-image: linear-gradient(172deg, rgba(22, 28, 42, 0.94), rgba(11, 15, 24, 0.97)) !important;
}

/* 卡面纯净系列微细分割线与系列色标（严控范围，不染底色不叠花纹） */
.cc-suit-divider {
  width: 100%; height: 1.5px; border-radius: 999px; margin: 1px 0 2px; flex-shrink: 0;
  opacity: 0.9;
}
.cc-suit-divider.suit-rock     { background: linear-gradient(90deg, transparent, #f59e42 22%, #f59e42 78%, transparent); }
.cc-suit-divider.suit-scissors { background: linear-gradient(90deg, transparent, #38d9f5 22%, #38d9f5 78%, transparent); }
.cc-suit-divider.suit-paper    { background: linear-gradient(90deg, transparent, #b87cff 22%, #b87cff 78%, transparent); }

.cc-series-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 999px; padding: 2px;
  border: 1.2px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 14, 24, 0.72);
  flex-shrink: 0;
}
.cc-series-dot.suit-rock     { border-color: #f59e42; box-shadow: 0 0 6px rgba(245, 158, 66, 0.42); }
.cc-series-dot.suit-scissors { border-color: #38d9f5; box-shadow: 0 0 6px rgba(56, 217, 245, 0.42); }
.cc-series-dot.suit-paper    { border-color: #b87cff; box-shadow: 0 0 6px rgba(184, 124, 255, 0.42); }
.cc-series-dot img { width: 13px; height: 13px; object-fit: contain; display: block; }

/* 左上角统一精致品质角标（同步局内卡面、图鉴列表与卡背） */
.cc-rarity-badge {
  position: absolute !important; top: 3px; left: 4px; z-index: 6 !important;
  padding: 0 4.5px; height: 14px; line-height: 13px; border-radius: 4px;
  font-size: 8.5px; font-weight: 900; letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none; white-space: nowrap;
}
.cc-rarity-badge.rar-white  { background: rgba(74, 82, 98, 0.9);   border-color: #cbd5e1; color: #f1f5f9; }
.cc-rarity-badge.rar-blue   { background: rgba(18, 84, 124, 0.94); border-color: #7ee3ff; color: #e2f8ff; box-shadow: 0 0 6px rgba(95, 208, 238, 0.48); }
.cc-rarity-badge.rar-purple { background: rgba(84, 34, 138, 0.94); border-color: #d6b2ff; color: #f4e8ff; box-shadow: 0 0 7px rgba(184, 130, 255, 0.56); }
.cc-rarity-badge.rar-gold   { background: linear-gradient(135deg, #c98618, #8c520a); border-color: #ffe494; color: #fff8de; box-shadow: 0 0 8px rgba(255, 212, 102, 0.68); }
.cc-rarity-badge.rar-red    { background: linear-gradient(135deg, #c8222a, #7d1118); border-color: #ff9c8a; color: #fff1ee; box-shadow: 0 0 9px rgba(238, 82, 69, 0.78); }
.codex-framed-card > .cc-rarity-badge { top: 6px; left: 6px; height: 16px; line-height: 14px; font-size: 9.5px; padding: 0 6px; }

/* 5 档品质差异化视觉（纯 2D + GPU transform 安全动画，图鉴未入视口自动暂停防卡顿） */
/* 1) 白（普通）：素雅磨砂灰边，静态清晰 */
.clean-card.rarity-white,
.codex-framed-card.rarity-white {
  border: 1.5px solid rgba(186, 196, 210, 0.64) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.58), inset 0 0 0 1px rgba(226, 232, 240, 0.16);
}
/* 2) 蓝（精良）：冷蓝光泽边 + 慢速斜向反光扫过 */
.clean-card.rarity-blue,
.codex-framed-card.rarity-blue {
  border: 1.6px solid rgba(95, 208, 238, 0.86) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.62), 0 0 11px rgba(95, 208, 238, 0.28), inset 0 0 10px rgba(95, 208, 238, 0.14);
}
.clean-card.rarity-blue::after,
.codex-framed-card.rarity-blue.in-view::after {
  content: ''; position: absolute; inset: 2px; border-radius: 7px; pointer-events: none; z-index: 3;
  background: linear-gradient(118deg, transparent 28%, rgba(130, 230, 255, 0.22) 48%, rgba(226, 250, 255, 0.34) 51%, transparent 72%);
  background-size: 260% 100%;
  animation: rarBlueSweep 4.6s ease-in-out infinite;
}
@keyframes rarBlueSweep {
  0%   { background-position: 150% 0; }
  45%  { background-position: -50% 0; }
  100% { background-position: -50% 0; }
}
/* 3) 紫（史诗）：深紫边缘柔和呼吸辉光 + 稀疏微尘光点 */
.clean-card.rarity-purple,
.codex-framed-card.rarity-purple {
  border: 1.7px solid rgba(192, 138, 255, 0.92) !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.68), 0 0 14px rgba(176, 118, 255, 0.44), inset 0 0 12px rgba(168, 108, 255, 0.2);
}
.clean-card.rarity-purple,
.codex-framed-card.rarity-purple.in-view {
  animation: rarPurpleBreath 3.2s ease-in-out infinite;
}
.clean-card.rarity-purple::after,
.codex-framed-card.rarity-purple.in-view::after {
  content: ''; position: absolute; inset: 3px; border-radius: 7px; pointer-events: none; z-index: 3;
  background-image:
    radial-gradient(circle at 18% 26%, rgba(236, 212, 255, 0.72) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 78% 34%, rgba(196, 146, 255, 0.68) 0 1.6px, transparent 2.8px),
    radial-gradient(circle at 34% 76%, rgba(226, 198, 255, 0.62) 0 1.3px, transparent 2.4px),
    radial-gradient(circle at 82% 72%, rgba(244, 224, 255, 0.7) 0 1.5px, transparent 2.6px);
  animation: rarPurpleMotes 2.8s ease-in-out infinite alternate;
}
@keyframes rarPurpleBreath {
  0%, 100% { box-shadow: 0 7px 18px rgba(0, 0, 0, 0.68), 0 0 10px rgba(176, 118, 255, 0.34), inset 0 0 10px rgba(168, 108, 255, 0.16); }
  50%      { box-shadow: 0 7px 20px rgba(0, 0, 0, 0.72), 0 0 20px rgba(196, 144, 255, 0.68), inset 0 0 16px rgba(188, 128, 255, 0.28); }
}
@keyframes rarPurpleMotes {
  0%   { opacity: 0.32; transform: translateY(2px); }
  100% { opacity: 0.92; transform: translateY(-2px); }
}
/* 4) 金（传说）：暖金外溢流光 + 周期性锐利白闪星芒 */
.clean-card.rarity-gold,
.codex-framed-card.rarity-gold {
  border: 1.9px solid #ffd56b !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.72), 0 0 16px rgba(255, 206, 92, 0.56), inset 0 0 14px rgba(255, 208, 104, 0.24);
}
.clean-card.rarity-gold::after,
.codex-framed-card.rarity-gold.in-view::after {
  content: ''; position: absolute; inset: 2px; border-radius: 7px; pointer-events: none; z-index: 3;
  background-image:
    linear-gradient(115deg, transparent 34%, rgba(255, 228, 146, 0.24) 46%, rgba(255, 255, 255, 0.82) 50%, rgba(255, 224, 134, 0.24) 54%, transparent 66%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.95) 0 1.4px, rgba(255, 222, 120, 0.55) 3.2px, transparent 7px);
  background-size: 250% 100%, 100% 100%;
  animation: rarGoldFlash 3.1s cubic-bezier(0.32, 0.08, 0.24, 1) infinite;
}
@keyframes rarGoldFlash {
  0%   { background-position: 145% 0, 0 0; opacity: 0.85; }
  36%  { background-position: -55% 0, 0 0; opacity: 1; }
  100% { background-position: -55% 0, 0 0; opacity: 0.65; }
}
/* 5) 红（神话）：猩红火焰/能量边缘外溢 + 红金渐变流光 + 极轻微 GPU transform 悬浮微晃 */
.clean-card.rarity-red,
.codex-framed-card.rarity-red {
  border: 2px solid #ff5a4f !important;
  box-shadow:
    0 9px 22px rgba(0, 0, 0, 0.78),
    0 0 18px rgba(242, 66, 56, 0.72),
    0 0 30px rgba(255, 168, 72, 0.36),
    inset 0 0 16px rgba(242, 72, 56, 0.34);
}
.clean-card.rarity-red:not(.chosen):not(.is-disabled):not(.book-page-in) {
  animation: rarRedFloatBattle 2.8s ease-in-out infinite;
}
.codex-framed-card.rarity-red.in-view {
  animation: rarRedFloatCodex 2.9s ease-in-out infinite;
}
.clean-card.rarity-red::after,
.codex-framed-card.rarity-red.in-view::after {
  content: ''; position: absolute; inset: 2px; border-radius: 7px; pointer-events: none; z-index: 3;
  background-image:
    linear-gradient(112deg, transparent 24%, rgba(255, 92, 68, 0.32) 44%, rgba(255, 224, 142, 0.72) 50%, rgba(255, 86, 66, 0.32) 56%, transparent 76%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 78, 48, 0.36) 0%, transparent 62%);
  background-size: 240% 100%, 100% 100%;
  animation: rarRedSweep 2.4s ease-in-out infinite;
}
@keyframes rarRedFloatBattle {
  0%, 100% { transform: rotate(var(--tilt, 0deg)) translate3d(0, 0, 0); }
  50%      { transform: rotate(calc(var(--tilt, 0deg) + 0.75deg)) translate3d(0, -2.2px, 0); }
}
@keyframes rarRedFloatCodex {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.45deg); }
  50%      { transform: translate3d(0, -2px, 0) rotate(0.45deg); }
}
@keyframes rarRedSweep {
  0%   { background-position: 140% 0, 0 0; }
  48%  { background-position: -45% 0, 0 0; }
  100% { background-position: -45% 0, 0 0; }
}
/* 覆盖旧版 .clean-card.frame-card 去 border 的规则，确保 5 档品质边框和微动效在战场上始终完整清晰 */
.clean-card.frame-card {
  padding: 9px 7px 8px;
  background-color: rgba(14, 18, 28, 0.94);
  background-size: cover;
  filter: none;
}
.clean-card.frame-card::before {
  inset: 3px;
  border-radius: 7px;
}
.clean-card.frame-card .cc-head { padding-left: 18px; }
.clean-card.is-used {
  opacity: 0.36 !important;
  filter: grayscale(0.75) !important;
  cursor: not-allowed !important;
  animation: none !important;
}
.cc-used-mask {
  position: absolute !important; inset: 0; z-index: 7 !important; border-radius: 8px;
  background: rgba(8, 10, 16, 0.62);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; letter-spacing: 0.14em; color: #cbd5e1;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}

/* 图鉴与局内卡背：结构化两行「微泛光胶囊徽章」系统 */
.card-glow-head {
  display: flex; flex-direction: column; gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding-bottom: 8px; margin-bottom: 6px;
}
.card-glow-badges {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
}
.gbadge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; line-height: 1.25;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(14, 20, 34, 0.72);
  color: #f4f8fc; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.gbadge img { width: 12px; height: 12px; object-fit: contain; }
.gbadge-suit-rock     { border-color: #f59e42; background: rgba(245, 158, 66, 0.18); color: #ffd9a8; box-shadow: 0 0 8px rgba(245, 158, 66, 0.28); }
.gbadge-suit-scissors { border-color: #38d9f5; background: rgba(56, 217, 245, 0.18); color: #ccf6ff; box-shadow: 0 0 8px rgba(56, 217, 245, 0.28); }
.gbadge-suit-paper    { border-color: #b87cff; background: rgba(184, 124, 255, 0.18); color: #ecd8ff; box-shadow: 0 0 8px rgba(184, 124, 255, 0.28); }
.gbadge-rar-white     { border-color: #cbd5e1; background: rgba(148, 163, 184, 0.18); color: #f1f5f9; }
.gbadge-rar-blue      { border-color: #5fd0ee; background: rgba(95, 208, 238, 0.18); color: #d6f7ff; box-shadow: 0 0 8px rgba(95, 208, 238, 0.3); }
.gbadge-rar-purple    { border-color: #c28eff; background: rgba(184, 130, 255, 0.2); color: #f2e2ff; box-shadow: 0 0 9px rgba(184, 130, 255, 0.36); }
.gbadge-rar-gold      { border-color: #ffd56b; background: rgba(243, 181, 82, 0.22); color: #fff2c4; box-shadow: 0 0 10px rgba(255, 212, 102, 0.42); }
.gbadge-rar-red       { border-color: #ff6256; background: rgba(230, 62, 54, 0.26); color: #ffe4e0; box-shadow: 0 0 11px rgba(240, 74, 62, 0.5); }
.gbadge-role-atk      { border-color: rgba(255, 110, 102, 0.85); color: #ffd0cc; background: rgba(196, 42, 38, 0.30); }
.gbadge-role-def      { border-color: rgba(102, 201, 255, 0.85); color: #d6f2ff; background: rgba(26, 98, 168, 0.30); }
.gbadge-role-heal     { border-color: rgba(77, 238, 166, 0.85);  color: #d2ffec; background: rgba(22, 134, 88, 0.30); }
.gbadge-role-ctrl     { border-color: rgba(207, 154, 255, 0.85); color: #f0ddff; background: rgba(108, 48, 176, 0.30); }
.gbadge-role-sup      { border-color: rgba(99, 242, 182, 0.85);  color: #d8ffef; background: rgba(24, 128, 92, 0.30); }
.gbadge-weight        { border-color: rgba(212, 222, 238, 0.45); color: #e2e8f0; background: rgba(30, 41, 59, 0.58); }
.gbadge-cost          { border-color: rgba(255, 206, 112, 0.78); color: #ffe8ad; background: rgba(180, 102, 18, 0.28); }
.gbadge-active        { border-color: #3ed6b4; color: #ccfff4; background: rgba(22, 118, 96, 0.36); }
.codex-framed-card .card-glow-badges { gap: 4px; margin-top: 2px; }
.codex-framed-card .gbadge { padding: 1px 6px; font-size: 9.5px; }

/* ========================================================================
   方案一 ① ⑥ ⑦：联机 1 分钟倒计时 + 对方明牌居中安全空域（桌面 5+4 / 手机 3×3）+ 唯一“上局”徽章
   ======================================================================== */
/* 联机顶部中央 1 分钟倒计时胶囊（置于回合 HUD 下方、居中明牌上方，绝不遮挡血条与明牌） */
.pvp-timer-slot {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 52px); transform: translateX(-50%);
  z-index: 21; pointer-events: none;
}
.pvp-turn-timer {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: 999px;
  background: rgba(10, 14, 26, 0.82);
  border: 1.5px solid rgba(114, 189, 244, 0.62);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.62);
  color: #e6f4ff; font-size: 11.5px; font-weight: 800; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.pvp-timer-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4deea6; box-shadow: 0 0 8px rgba(77, 238, 166, 0.9);
}
.pvp-timer-label { color: rgba(226, 238, 250, 0.86); font-size: 10.5px; }
.pvp-timer-num { color: #fff6dc; font-size: 13px; font-weight: 900; letter-spacing: 0.04em; }
.pvp-turn-timer.is-urgent {
  background: linear-gradient(135deg, rgba(168, 22, 28, 0.92), rgba(92, 12, 18, 0.95));
  border-color: #ff6e66;
  color: #fff2f0;
  box-shadow: 0 0 18px rgba(240, 62, 58, 0.72), 0 4px 14px rgba(0, 0, 0, 0.72);
  animation: pvpTimerUrgentPulse 0.85s ease-in-out infinite;
}
.pvp-turn-timer.is-urgent .pvp-timer-dot {
  background: #ff6e66; box-shadow: 0 0 10px #ff5c57;
}
.pvp-turn-timer.is-urgent .pvp-timer-num { color: #ffffff; }
@keyframes pvpTimerUrgentPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(240, 62, 58, 0.62), 0 4px 12px rgba(0, 0, 0, 0.72); }
  50%      { transform: scale(1.06); box-shadow: 0 0 26px rgba(255, 86, 78, 0.96), 0 6px 16px rgba(0, 0, 0, 0.78); }
}

/* 联机上轮战报浮字安全错位（避开顶部倒计时与居中明牌） */
.battle-float-log.is-1v1-log { top: calc(var(--safe-t) + 82px); }
.battle-float-log.is-2v2-log { top: calc(var(--safe-t) + 112px); }

/* 舞台中上部安全空域对方明牌容器（同位置紧凑 1×9 单行一长条，通透轻盈，完整露出舞台背景与左右角色） */
.multi-opp-open-zone {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 104px); transform: translateX(-50%);
  z-index: 19; pointer-events: none;
  width: clamp(468px, 48vw, 620px);
  max-width: 60vw;
  display: flex; flex-direction: column; align-items: center;
  transition: top 0.2s ease, transform 0.2s ease;
}
.multi-opp-open-zone.hand-is-open { top: calc(var(--safe-t) + 98px); }
/* 全端统一：单行 1×9 细长通透明牌条 */
.opp-open-hand-bar {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); align-items: stretch;
  gap: 4px; padding: 4px 6px 11px; border-radius: 10px;
  background: rgba(10, 14, 24, 0.30);
  border: 1px solid rgba(255, 224, 152, 0.26);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
  pointer-events: auto; width: 100%; overflow: visible;
}
.opp-mini-card-wrap {
  position: relative;
  width: 100%; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
}
.opp-mini-card {
  position: relative; width: 100%;
  height: clamp(48px, 5.4vw, 58px); border-radius: 6px; padding: 3px 2px 3px;
  background: linear-gradient(172deg, rgba(20, 26, 42, 0.86), rgba(10, 14, 24, 0.90));
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1px;
  cursor: pointer; transition: transform 0.14s ease, opacity 0.14s ease, box-shadow 0.14s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.58);
}
.opp-mini-card:hover { transform: translateY(-3px) scale(1.06); z-index: 4; }
.opp-mini-card.rar-white  { border-color: #cbd5e1; }
.opp-mini-card.rar-blue   { border-color: #5fd0ee; }
.opp-mini-card.rar-purple { border-color: #c28eff; }
.opp-mini-card.rar-gold   { border-color: #ffd56b; box-shadow: 0 0 8px rgba(255, 212, 102, 0.5); }
.opp-mini-card.rar-red    { border-color: #ff5a4f; box-shadow: 0 0 9px rgba(242, 68, 56, 0.62); }
.opp-mini-card.is-last-played {
  border-color: #ffe07d !important;
  box-shadow: 0 0 12px rgba(255, 212, 92, 0.85), 0 4px 10px rgba(0, 0, 0, 0.72) !important;
}
.opp-mini-suitbar { width: 88%; height: 2px; border-radius: 2px; flex-shrink: 0; }
.opp-mini-suitbar.suit-rock     { background: #f59e42; }
.opp-mini-suitbar.suit-scissors { background: #38d9f5; }
.opp-mini-suitbar.suit-paper    { background: #b87cff; }
.opp-mini-card img { width: clamp(18px, 1.9vw, 23px); height: clamp(18px, 1.9vw, 23px); object-fit: contain; }
.opp-mini-name {
  font-size: clamp(8.5px, 0.78vw, 9.5px); font-weight: 800; color: #f8fafc; line-height: 1.2;
  max-width: 100%; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 3px #000;
}
.opp-mini-card.is-used {
  opacity: 0.42; filter: grayscale(0.75);
}
.opp-mini-card.is-last-played.is-used {
  opacity: 0.78; filter: grayscale(0.25);
}
.opp-mini-used-tag {
  position: absolute; inset: 0; border-radius: 5px;
  background: rgba(8, 10, 16, 0.58);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900; color: #e2e8f0;
  pointer-events: none;
}
/* 唯一“上局”徽章（仅挂载于 opponentLastPlayedUid 对应牌正下方） */
.opp-last-played-badge {
  position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); z-index: 6;
  padding: 0 5px; border-radius: 999px;
  background: linear-gradient(135deg, #ff7a3d, #d92638);
  border: 1px solid #ffe49c;
  color: #fff9ec; font-size: 8.5px; font-weight: 900; letter-spacing: 0.05em;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 2px 8px rgba(217, 38, 56, 0.72);
}
.opp-open-hand-bar.is-reshuffling .opp-mini-card,
.slots5-row.is-reshuffling .clean-card {
  animation: pvpReshuffleFly 0.48s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
@keyframes pvpReshuffleFly {
  0%   { opacity: 0; transform: translateY(18px) scale(0.74) rotate(-8deg); }
  65%  { opacity: 1; transform: translateY(-4px) scale(1.04) rotate(2deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(var(--tilt, 0deg)); }
}

/* 2v2 准备大厅：队伍 1 / 队伍 2 席位卡片 + 强制重新选角面板 */
.team2v2-lobby-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px;
}
.team-slot-card {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(14, 20, 34, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex; flex-direction: column; gap: 6px;
}
.team-slot-card.team-0 { border-color: rgba(245, 158, 66, 0.72); }
.team-slot-card.team-1 { border-color: rgba(56, 217, 245, 0.72); }
.team-slot-card.is-my-team { box-shadow: 0 0 16px rgba(241, 184, 96, 0.24); }
.team-slot-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.team-slot-head h5 { margin: 0; font-size: 13px; font-weight: 900; color: #fff6dc; }
.team-member-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 7px;
  background: rgba(8, 12, 22, 0.65); border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px; color: #f1f5f9;
}
.team-member-row img { width: 26px; height: 26px; object-fit: contain; border-radius: 5px; background: rgba(255,255,255,0.06); }
.team-member-empty {
  padding: 7px 8px; border-radius: 7px; border: 1px dashed rgba(255, 255, 255, 0.22);
  font-size: 11px; color: rgba(203, 213, 225, 0.65); text-align: center;
}
.hero-pick-panel {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(16, 22, 38, 0.74);
  border: 1.5px solid rgba(255, 206, 112, 0.56);
}
.hero-pick-panel.needs-pick {
  border-color: #ff7c70;
  box-shadow: 0 0 16px rgba(238, 86, 76, 0.34);
}
.hero-pick-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  margin-top: 8px; max-height: min(200px, 32vh); overflow-y: auto; padding-right: 3px;
}
.hero-pick-btn {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 5px 8px; border-radius: 9px; text-align: left;
  background: rgba(10, 14, 24, 0.72); border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc; cursor: pointer;
}
.hero-pick-btn img { width: 34px; height: 34px; object-fit: contain; flex: 0 0 34px; }
.hero-pick-btn small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-pick-btn.picked {
  border-color: #ffd56b; background: rgba(241, 168, 82, 0.24);
  box-shadow: 0 0 12px rgba(255, 210, 108, 0.42);
}

/* 2v2 开局随机分配角色大号华丽横幅 */
.team-assign-banner {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  z-index: 64; width: min(560px, 90vw);
  padding: 14px 20px; border-radius: 14px;
  background: linear-gradient(155deg, rgba(16, 20, 36, 0.96), rgba(9, 12, 22, 0.97));
  border: 2px solid #ffd56b;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.85), 0 0 34px rgba(255, 204, 92, 0.42);
  text-align: center; cursor: pointer;
  animation: assignBannerIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes assignBannerIn {
  from { opacity: 0; transform: translate(-50%, -56%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.team-assign-banner-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: clamp(14px, 2vw, 18px); font-weight: 900; letter-spacing: 0.05em;
  color: #fff6dc; text-shadow: 0 2px 8px #000;
  padding: 4px 0;
}
.team-assign-banner-row.t0 { color: #ffd48a; }
.team-assign-banner-row.t1 { color: #8eeeff; }
.team-assign-banner-row img { width: 34px; height: 34px; object-fit: contain; }

/* 2v2 出牌顺位轮转指引条（置于倒计时下方，玩家1 -> 玩家3 -> 玩家2 -> 玩家4） */
.pvp-turn-order-bar {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 84px); transform: translateX(-50%);
  z-index: 20; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(10, 14, 24, 0.78);
  border: 1px solid rgba(255, 212, 128, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.62);
  pointer-events: none; white-space: nowrap;
}
.turn-order-node {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; color: rgba(226, 232, 240, 0.72);
  border: 1px solid transparent;
}
.turn-order-node.t0 { color: #f8d29c; }
.turn-order-node.t1 { color: #9deeff; }
.turn-order-node.is-active {
  background: linear-gradient(135deg, rgba(245, 178, 66, 0.36), rgba(190, 102, 22, 0.48));
  border-color: #ffd872; color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 214, 110, 0.65);
}
.turn-order-arrow { font-size: 10px; color: rgba(255, 220, 140, 0.65); font-weight: 900; }

/* 联机结算浮层：胜方显著 +30 金币奖励徽章与战绩卡 */
.multi-victory-card {
  width: 100%; padding: 14px 18px; border-radius: 13px;
  background: linear-gradient(160deg, rgba(16, 20, 34, 0.94), rgba(10, 12, 22, 0.96));
  border: 1.8px solid rgba(255, 214, 120, 0.82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.85), 0 0 28px rgba(241, 178, 86, 0.3);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.multi-victory-card.is-lose { border-color: rgba(238, 100, 96, 0.76); }
.pvp-coin-reward-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 16px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 214, 96, 0.28), rgba(192, 114, 20, 0.44));
  border: 1.8px solid #ffe07d;
  color: #fff6cc; font-size: 17px; font-weight: 900; letter-spacing: 0.06em;
  box-shadow: 0 0 22px rgba(255, 208, 92, 0.62);
  animation: coinBadgePop 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes coinBadgePop {
  0%   { opacity: 0; transform: scale(0.55) translateY(14px); }
  65%  { opacity: 1; transform: scale(1.1) translateY(-3px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 图鉴—卡背统一详情区（自适应字号 + 内部细滚动条，绝不截断不溢出） */
.card-detail-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 4px;
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  scrollbar-width: thin; scrollbar-color: rgba(241, 192, 112, 0.55) transparent;
}
.card-detail-scroll::-webkit-scrollbar { width: 4px; }
.card-detail-scroll::-webkit-scrollbar-thumb { background: rgba(241, 192, 112, 0.55); border-radius: 4px; }
.card-detail-lines {
  font-size: clamp(11.5px, 1.35vw, 13.5px); font-weight: 700; line-height: 1.52;
  color: #f4f9fc; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.92); white-space: pre-line;
}
.card-flavor-quote {
  font-size: clamp(10.5px, 1.15vw, 12px); font-style: italic; font-weight: 600;
  color: #ffe2a8; padding: 5px 8px; border-left: 2px solid rgba(255, 214, 128, 0.72);
  background: rgba(10, 14, 24, 0.36); border-radius: 0 5px 5px 0;
  text-shadow: 0 1px 3px #000;
}
.codex-framed-card { cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease; overflow: hidden; }
.codex-framed-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.68), 0 0 18px rgba(241, 192, 112, 0.34); }

/* 四色职能角标（红=攻、蓝=防、绿=疗/辅、紫=控）+ 冷却/借刃徽标（已彻底清理底层槽位文本 .slot5-tag） */
.cc-role-badge {
  position: absolute !important; top: -6px; right: -4px; z-index: 5 !important;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: #ffffff;
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 2px 6px rgba(0,0,0,0.75);
  background: #d9534f;
}
.cc-role-badge[style*="position:static"] { position: static !important; top: auto; right: auto; }
.cc-role-badge.role-atk  { background: linear-gradient(145deg, #f0524c, #aa2020); }
.cc-role-badge.role-def  { background: linear-gradient(145deg, #4ba8f5, #1b5fa8); }
.cc-role-badge.role-heal { background: linear-gradient(145deg, #32d699, #15825b); }
.cc-role-badge.role-ctrl { background: linear-gradient(145deg, #a672ff, #5c2cb0); }
.cc-role-badge.role-sup  { background: linear-gradient(145deg, #3bd69e, #1a8866); }
.cc-cd-mask {
  position: absolute !important; inset: 0; z-index: 6 !important; border-radius: 8px;
  background: rgba(8, 10, 18, 0.74);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #ffcca8; letter-spacing: 0.06em;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}
.cc-loan-pill {
  position: absolute !important; left: 50%; bottom: 23px; transform: translateX(-50%); z-index: 5 !important;
  padding: 0 5px; border-radius: 4px; background: rgba(243, 181, 82, 0.94); color: #1b0e04;
  font-size: 8.5px; font-weight: 900; white-space: nowrap;
}

/* 88 技能 3 层分类筛选（一级 4 系 Tab + 二级品质排序 + 三级职能角标） */
.codex-tabs-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}
.codex-tab-btn, .codex-suit-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; font-size: 11.5px; font-weight: 800; line-height: 1.2;
}
.codex-tab-btn img, .codex-suit-tab img {
  width: 16px; height: 16px; flex: 0 0 16px; object-fit: contain;
}
.codex-role-filters, .codex-sub-filter {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px; padding: 6px 10px; border-radius: 8px;
  background: rgba(12, 14, 22, 0.76); border: 1px solid rgba(241, 192, 112, 0.34);
}
.codex-role-chip, .role-chip-btn {
  padding: 3px 10px; font-size: 11px; font-weight: 800; border-radius: 999px;
}
.codex-framed-card {
  position: relative; padding: 10px 10px 9px; border-radius: 8px;
  background-color: rgba(14, 16, 26, 0.92); background-size: 100% 100%; background-repeat: no-repeat;
  display: flex; flex-direction: column; gap: 4px; min-height: 108px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.62);
}
.codex-framed-card > .cc-role-badge { top: 6px; right: 6px; }

/* 换牌置换交互面板与 6~8 槽自适应高亮/置灰平衡锁 */
.weight-meter {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: rgba(14, 18, 30, 0.62); border: 1px solid rgba(241, 192, 112, 0.62);
  font-size: 11.5px; font-weight: 800; color: #ffe6b2; backdrop-filter: var(--tower-glass, blur(6px));
}
.replace-slots-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; margin-top: 8px;
}
.replace-slot-card {
  position: relative; padding: 9px 7px; border-radius: 9px;
  background: rgba(16, 22, 36, 0.58); border: 1.5px solid rgba(241, 192, 112, 0.62);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  backdrop-filter: var(--tower-glass, blur(8px));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.replace-slot-card.valid:hover {
  transform: translateY(-4px); border-color: #ffe28c;
  box-shadow: 0 0 22px rgba(241, 184, 96, 0.55);
}
.replace-slot-card.illegal {
  opacity: 0.44; filter: grayscale(0.75); cursor: not-allowed;
  border-color: rgba(238, 100, 96, 0.45);
}
.replace-slot-reason {
  font-size: 9.5px; color: #ff9c96; font-weight: 800; line-height: 1.25;
}
.replace-slot-refund {
  font-size: 10px; color: #7ef5d8; font-weight: 800;
}
.series-group {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.series-group-label {
  font-size: 10.5px; font-weight: 900; letter-spacing: 0.14em;
  text-shadow: 0 1px 4px #000, 0 0 8px #000;
  pointer-events: none;
}
.series-group-label.rock     { color: #ff9c8a; }
.series-group-label.scissors { color: #7ff5db; }
.series-group-label.paper    { color: #dfc2ff; }
.series-cards-row { display: flex; align-items: flex-end; gap: 6px; }

/* 纯净正面扑克风格卡牌（无黑底、无文字堆积：只留体力+系列+名称+干净画面图案） */
.clean-card {
  position: relative; width: 92px; height: 128px; border-radius: 10px;
  border: 1.8px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(168deg, rgba(36, 46, 62, 0.94), rgba(16, 22, 32, 0.96));
  padding: 6px 6px 7px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: stretch;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.72);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.18s cubic-bezier(.22,1,.36,1), box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  backdrop-filter: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* 方案一 ②：冷却中 / 体力不足 / 锁定卡牌严禁 pointer-events:none，仅视觉置灰并拦截出牌，确保双击/长按翻背 100% 畅通 */
.clean-card.is-unplayable,
.clean-card.is-disabled {
  opacity: 0.52;
  filter: saturate(0.42);
  pointer-events: auto !important;
  cursor: pointer !important;
}
.clean-card.is-locked-choice {
  z-index: 19;
  border-color: #ffe07d !important;
  transform: translateY(-16px) scale(1.06);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.84), 0 0 24px rgba(255, 198, 72, 0.9) !important;
}
/* 方案一 ⑦：己方当前锁定牌正上方高对比度“锁定”胶囊文字框（收回牌堆或结算完成瞬间销毁） */
.cc-locked-pill {
  position: absolute !important; top: -22px; left: 50%; transform: translateX(-50%); z-index: 10 !important;
  padding: 2px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #ff5d47, #d91c2b);
  border: 1.5px solid #ffe8a3;
  color: #ffffff; font-size: 10.5px; font-weight: 900; letter-spacing: 0.1em;
  white-space: nowrap; pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  box-shadow: 0 3px 12px rgba(217, 28, 43, 0.78), 0 0 10px rgba(255, 224, 130, 0.55);
  animation: lockedPillPop 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes lockedPillPop {
  from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.82); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
/* 覆盖旧版：系列不再大面积染底色，严格由 5 档品质控制卡框光效，系列色仅用于色标与微细分割线 */
.clean-card.frame-card {
  padding: 9px 7px 8px;
  background-color: rgba(14, 18, 28, 0.94); background-repeat: no-repeat; background-position: center; background-size: 100% 100%;
}
.clean-card.frame-card::before {
  content: ''; position: absolute; inset: 3px; border-radius: 7px; z-index: 0;
  background: linear-gradient(172deg, rgba(24, 30, 44, 0.94), rgba(11, 15, 24, 0.97));
}
.clean-card.frame-card > * { position: relative; z-index: 1; }

/* 滑动经过 / 桌面悬停 / 选中：稳定上浮不乱跳，触屏命中率 100% */
@media (hover: hover) and (pointer: fine) {
  .clean-card:hover:not(.is-disabled):not(.chosen) {
    z-index: 14;
    border-color: #ffffff;
    transform: translateY(-14px) scale(1.05);
    box-shadow: 0 16px 26px rgba(0, 0, 0, 0.78), 0 0 22px rgba(114, 189, 244, 0.55);
  }
}
.clean-card.chosen {
  z-index: 18;
  border-color: #ffd670;
  transform: translateY(-16px) scale(1.06);
  animation: cardFloatBreath 1.8s ease-in-out infinite;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.82), 0 0 26px rgba(255, 214, 112, 0.85);
}
.clean-card.frame-card.chosen {
  filter: drop-shadow(0 0 12px rgba(255, 212, 108, 0.96)) drop-shadow(0 12px 10px rgba(0,0,0,0.88));
}
.clean-card.is-inspecting-origin { opacity: 0.14; }

@keyframes cardFloatBreath {
  0%, 100% { transform: translateY(-14px) scale(1.05); }
  50%      { transform: translateY(-18px) scale(1.07); }
}

.cc-head { display: flex; justify-content: space-between; align-items: center; gap: 3px; }
.cc-cost {
  font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 999px;
  background: rgba(241, 164, 93, 0.28); border: 1px solid rgba(255, 212, 130, 0.85); color: #fff0c7;
  white-space: nowrap; flex-shrink: 0; line-height: 1.15;
}
.cc-series { width: 17px; height: 17px; }
.cc-art {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0;
}
.cc-art img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.65)); }
.cc-name {
  text-align: center; font-size: 11px; font-weight: 900; color: #ffffff; line-height: 1.15;
  text-shadow: 0 1px 4px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cc-selected-dot {
  position: absolute !important; top: -12px; left: 50%; transform: translateX(-50%); z-index: 6 !important;
  padding: 1px 7px; border-radius: 999px; background: #ffd670; color: #1a1106;
  font-size: 9px; font-weight: 900; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.hand-fold-btn {
  min-height: 40px; white-space: nowrap;
  padding: 6px 10px; font-size: 11px; font-weight: 800; border-radius: 999px;
  background: rgba(12, 18, 28, 0.48); border: 1px solid rgba(255,255,255,0.34); color: #eef6f4;
  align-self: flex-end; margin-bottom: 4px; pointer-events: auto;
}

/* ⑦ 选中后再点击 -> 拖曳划曳 + 3D 翻转 + 竖转横至屏幕中央展示半透明技能背面 */
.card-inspect-overlay {
  position: absolute; inset: 0; z-index: 62;
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
  background: transparent;
}
.card-inspect-overlay.is-closing { pointer-events: none; }
.inspect-card-3d {
  position: relative;
  width: min(410px, 84vw); height: min(236px, 58vh);
  transform-style: preserve-3d;
  cursor: pointer;
  will-change: transform;
  transform: translate3d(var(--from-x, 0px), var(--from-y, 160px), 0) scale(var(--from-sx, 0.24), var(--from-sy, 0.56)) rotateY(0deg);
  transition: transform 0.42s cubic-bezier(.22, .9, .28, 1);
}
.inspect-card-3d.is-open {
  transform: translate3d(0, 0, 0) scale(1, 1) rotateY(180deg);
}
.inspect-face {
  position: absolute; inset: 0; border-radius: 14px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.inspect-face-front {
  transform: translateZ(1px);
  background: linear-gradient(168deg, #2b384d, #121824);
  border: 2px solid #ffd670;
  padding: 12px; align-items: center;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.78);
}
.inspect-face-back {
  transform: rotateY(180deg) translateZ(1px);
  padding: 18px 24px;
  /* 默认半透明卡面背景；装备典藏牌背时由 cb-obsidian / cb-gilded 满幅无缝贴合，杜绝黑缝与双框 */
  background-color: rgba(14, 20, 30, 0.78);
  background-image: linear-gradient(145deg, rgba(97, 74, 41, .58), rgba(18, 23, 32, .84) 46%, rgba(70, 48, 29, .55));
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border: 2px solid rgba(255, 220, 145, 0.76);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.74), 0 0 34px rgba(241, 164, 93, 0.3);
}
.inspect-face-back::before {
  content: ''; position: absolute; inset: 7px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16); pointer-events: none; z-index: 0;
}
.inspect-face-back > * { position: relative; z-index: 1; }

/* 典藏牌背①：星蚀黑曜石牌背（满幅无缝适配任意宽高比，幻彩紫青星蚀描边） */
.inspect-face-back.cb-obsidian {
  background-color: rgba(14, 11, 28, 0.82);
  border: 2px solid #9e8bff;
  box-shadow:
    inset 0 0 28px rgba(114, 228, 255, 0.22),
    0 24px 62px rgba(5, 4, 14, 0.84),
    0 0 38px rgba(148, 112, 255, 0.52);
}
.inspect-face-back.cb-obsidian::before {
  border-color: rgba(126, 232, 255, 0.38);
  box-shadow: inset 0 0 12px rgba(176, 136, 255, 0.22);
}
.inspect-face-back.cb-obsidian .inspect-back-head { border-bottom-color: rgba(176, 148, 255, 0.34); }
.inspect-face-back.cb-obsidian .inspect-back-foot { color: #d6c8ff; }

/* 典藏牌背②：黎明金箔圣印牌背（满幅无缝适配任意宽高比，锻金日冕暖光描边） */
.inspect-face-back.cb-gilded {
  background-color: rgba(30, 18, 9, 0.82);
  border: 2px solid #ffd87d;
  box-shadow:
    inset 0 0 30px rgba(255, 214, 120, 0.26),
    0 24px 62px rgba(14, 8, 4, 0.84),
    0 0 40px rgba(241, 164, 93, 0.56);
}
.inspect-face-back.cb-gilded::before {
  border-color: rgba(255, 226, 152, 0.48);
  box-shadow: inset 0 0 14px rgba(255, 200, 96, 0.22);
}
.inspect-face-back.cb-gilded .inspect-back-head { border-bottom-color: rgba(255, 216, 134, 0.36); }
.inspect-face-back.cb-gilded .inspect-back-foot { color: #ffe7b2; }

/* 金币内购版专属流金徽章与直充条 */
.vip-edition-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #ffd46b, #e88424);
  color: #1c0f04; font-size: 10px; font-weight: 900; letter-spacing: 0.08em;
  box-shadow: 0 0 14px rgba(255, 208, 96, 0.65);
}
.vip-topup-bar {
  background: linear-gradient(135deg, rgba(84, 52, 16, 0.72), rgba(40, 24, 12, 0.78));
  border: 1.5px solid rgba(255, 214, 112, 0.82);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
}
.inspect-back-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 8px;
}
.inspect-back-title {
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(17px, 2.2vw, 22px); font-weight: 900; color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}
.inspect-back-title img { width: 32px; height: 32px; filter: drop-shadow(0 2px 6px #000); }
.inspect-back-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: #ffe7b5;
}
.inspect-back-desc {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: clamp(14px, 1.8vw, 17px); font-weight: 700; line-height: 1.65; color: #f6fbfa;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9); padding: 8px 4px;
}
.inspect-back-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: rgba(230, 240, 238, 0.78); font-weight: 700;
}

.battle-finish-float {
  position: absolute; left: 50%; bottom: calc(var(--safe-b) + 18px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 30;
  width: min(540px, 92vw);
}
/* 模块 C：暗金黑曜石胜利/战败逐项跳数字结算账单 */
.victory-ledger {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(16, 15, 26, 0.92), rgba(9, 10, 18, 0.95));
  border: 1.5px solid rgba(241, 192, 112, 0.78);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.82), 0 0 26px rgba(241, 164, 93, 0.25), inset 0 1px 0 rgba(255, 234, 184, 0.22);
}
.victory-ledger-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-bottom: 1px solid rgba(241, 192, 112, 0.26); padding-bottom: 7px; margin-bottom: 8px;
}
.victory-ledger-head strong { font-size: 15px; color: #ffe7b3; letter-spacing: 0.06em; }
.victory-ledger-rows {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px;
  font-size: 12px; color: #e4ded0; margin-bottom: 8px;
}
.victory-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.victory-row b { color: #ffd470; font-variant-numeric: tabular-nums; }
.victory-row b.neg { color: #ff8c86; }
.victory-ledger-total {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding-top: 7px; border-top: 1px dashed rgba(241, 192, 112, 0.34);
  font-size: 13px; color: #fff4d8;
}
.victory-ledger-total .total-num {
  font-size: 19px; font-weight: 900; color: #ffd66b; text-shadow: 0 0 14px rgba(255, 208, 96, 0.65);
  font-variant-numeric: tabular-nums;
}
.victory-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* 模块 A：横向线性阶梯进度条（已过打钩 / 当前高亮 / 未来锁定+首领皇冠） */
.tower-step-rail {
  flex: 0 0 auto;
  display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 7px 10px;
  margin-bottom: 10px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(13, 14, 24, 0.86), rgba(9, 10, 18, 0.9));
  border: 1px solid rgba(241, 192, 112, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.14), 0 8px 24px rgba(0, 0, 0, 0.45);
}
.step-node {
  flex: 1 0 86px; padding: 5px 8px; border-radius: 8px; text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(20, 22, 34, 0.64);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10.5px; color: #9caab8; line-height: 1.2;
}
.step-node.done {
  opacity: 0.66; background: rgba(18, 28, 28, 0.64); border-color: rgba(62, 214, 180, 0.38); color: #9ae8d6;
}
.step-node.current {
  background: linear-gradient(155deg, rgba(84, 54, 18, 0.9), rgba(26, 20, 32, 0.94));
  border: 1.5px solid #ffd46b; color: #fff5d8;
  box-shadow: 0 0 18px rgba(241, 164, 93, 0.45);
}
.step-node.locked { opacity: 0.78; border-style: dashed; border-color: rgba(180, 190, 210, 0.25); }
.step-node.is-boss { border-color: rgba(238, 100, 96, 0.72); color: #ffd4d2; }
.step-node strong { font-size: 12px; }
.step-arrow { color: rgba(241, 192, 112, 0.55); font-weight: 900; flex: 0 0 auto; }

.battle-aux-float {
  position: absolute; right: calc(var(--safe-r) + 14px); bottom: calc(var(--safe-b) + 128px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; z-index: 26;
}
.cand-box {
  background: rgba(12, 14, 24, 0.82); border: 1px solid rgba(241, 192, 112, 0.55); border-radius: 8px;
  padding: 5px 8px; font-size: 11px; backdrop-filter: var(--tower-glass, blur(8px));
}

/* 全局通透毛玻璃弹窗（遮罩严格控制在 0.42，透出后方动态背景） */
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 22, 0.42); backdrop-filter: var(--tower-glass, blur(5px)); -webkit-backdrop-filter: var(--tower-glass, blur(5px)); display: none; align-items: center; justify-content: center; z-index: 70; padding: 14px; }
.modal-backdrop.open { display: flex; animation: modalIn 0.18s ease both; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  width: min(96%, 920px); max-height: 90%; overflow: auto;
  background: linear-gradient(165deg, rgba(16, 22, 36, 0.64), rgba(10, 14, 26, 0.72));
  border: 1.5px solid rgba(241, 192, 112, 0.56);
  border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 232, 184, 0.28), 0 0 26px rgba(241, 164, 93, 0.16);
  backdrop-filter: var(--tower-glass, blur(12px));
  -webkit-backdrop-filter: var(--tower-glass, blur(12px));
}
/* 低端机 FPS < 30 自动降级 + 手机端自动 60fps 轻量化渲染档 + 用户自选「流畅」档（全面消除毛玻璃与动态阴影开销） */
body.perf-degraded:not(.mobile-webview-opt) *:not(.gong-ring-panel .glass,.gong-ring-panel .classic-bubble), body.perf-degraded:not(.mobile-webview-opt) *::before, body.perf-degraded:not(.mobile-webview-opt) *::after,
body.gfx-smooth *:not(.gong-ring-panel .glass,.gong-ring-panel .classic-bubble), body.gfx-smooth *::before, body.gfx-smooth *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.perf-degraded .battle-godrays,
body.gfx-smooth .battle-godrays,
body.mobile-perf .battle-godrays { display: none !important; }
body.gfx-smooth .modal-box,
body.gfx-smooth .card-box,
body.gfx-smooth .setsuna-field-btn,
body.gfx-smooth .battle-tactic-bar,
body.gfx-smooth .toast-bar {
  background: rgba(13, 19, 32, 0.84);
}
/* 移动端动画角色/卡牌移除每帧实时高斯 drop-shadow（底部保留地面光池投影，受击保留纯亮度白闪），大幅降低 GPU/Skia 帧耗时 */
body.gfx-smooth .actor-slot,
body.gfx-smooth .actor-sprite,
body.gfx-smooth .clean-card,
body.mobile-webview-opt .actor-slot,
body.mobile-webview-opt .actor-sprite,
body.mobile-webview-opt .clean-card {
  will-change: transform;
}
body.gfx-smooth .actor-sprite,
body.mobile-webview-opt .actor-sprite {
  filter: none !important;
}
body.gfx-smooth .actor-slot.hit-flash-white .actor-sprite,
body.mobile-webview-opt .actor-slot.hit-flash-white .actor-sprite {
  filter: brightness(2.6) contrast(1.1) saturate(0.2) !important;
}
body.gfx-smooth .boiler-ring-floor,
body.gfx-smooth .boiler-ring-inner,
body.gfx-smooth .boiler-halo-back,
body.gfx-smooth .clean-card.frame-card,
body.gfx-smooth .cc-art img,
body.gfx-smooth .setsuna-brand-name,
body.mobile-webview-opt .boiler-ring-floor,
body.mobile-webview-opt .boiler-ring-inner,
body.mobile-webview-opt .boiler-halo-back,
body.mobile-webview-opt .clean-card.frame-card,
body.mobile-webview-opt .cc-art img,
body.mobile-perf .setsuna-brand-name {
  filter: none !important;
}
body.gfx-smooth .clean-card.frame-card.chosen,
body.mobile-webview-opt .clean-card.frame-card.chosen {
  filter: none !important;
  box-shadow: 0 0 0 2px #ffd87a, 0 8px 18px rgba(0, 0, 0, 0.72) !important;
}

/* 大厅设置：画面清晰度与帧率分段选择器 */
.perf-setting-row {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px;
}
.perf-setting-row:last-child { margin-bottom: 0; }
.perf-setting-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; font-weight: 900; color: #fff4d8;
}
.perf-setting-label small { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.perf-seg-group {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
}
.perf-seg-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 7px 6px; border-radius: 8px;
  background: rgba(12, 18, 30, 0.64);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #dce6f2; font-size: 12px; font-weight: 800; line-height: 1.25;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.perf-seg-btn small {
  font-size: 10px; font-weight: 700; color: rgba(214, 224, 238, 0.76);
}
.perf-seg-btn:hover { border-color: rgba(241, 192, 112, 0.72); color: #ffffff; }
.perf-seg-btn.active {
  background: linear-gradient(180deg, rgba(241, 168, 86, 0.34), rgba(144, 78, 22, 0.44));
  border-color: #ffd482;
  color: #fff9e6;
  box-shadow: 0 0 0 1px rgba(255, 218, 138, 0.52), 0 4px 12px rgba(0, 0, 0, 0.45);
}
.perf-seg-btn.active small { color: #ffe8b8; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.14); }
.modal-head h3 { margin: 0; color: #ffffff; font-size: 15px; letter-spacing: 0.06em; }
.input-field { width: 100%; border: 1px solid var(--stroke-strong); border-radius: var(--radius-sm); padding: 8px 10px; background: rgba(8, 12, 18, 0.76); color: #ffffff; font-weight: 700; user-select: text; -webkit-user-select: text; }
.input-field:focus { outline: none; border-color: var(--jade); }
.qr-wrap svg { background: #fff; border-radius: 8px; padding: 4px; width: 100px; height: 100px; }
.wax-seal { display: inline-flex; align-items: center; justify-content: center; padding: 4px 11px; border-radius: 999px; background: rgba(241, 164, 93, 0.24); border: 1px solid var(--amber); color: #ffe4b5; font-weight: 800; font-size: 11px; }

/* ========================================================================
   多设备自适应（手机横屏 / 手机竖屏 / 平板 / 宽屏桌面）
   ======================================================================== */
@media (max-height: 500px) {
  .setsuna-home-hud { top: calc(var(--safe-t) + 8px); left: calc(var(--safe-l) + 14px); right: calc(var(--safe-r) + 14px); }
  .setsuna-brand-name { font-size: 20px; }
  .setsuna-field-btn { width: clamp(168px, 27vw, 240px); padding: 12px 14px; gap: 5px; }
  .setsuna-field-btn.left-classic { left: calc(var(--safe-l) + 18px); }
  .setsuna-field-btn.right-card   { right: calc(var(--safe-r) + 18px); }
  .setsuna-field-title { font-size: 19px; }
  .setsuna-field-sub { font-size: 10.5px; }
  .setsuna-orb-core-btn { width: 54px; height: 54px; }
  .setsuna-orb-ring { width: 248px; height: 248px; }
  .orb-node-slot { width: 66px; height: 42px; }
  .orb-node-inner { font-size: 10.5px; }

  .panel-scene { padding: 6px calc(var(--safe-r) + 14px) 8px calc(var(--safe-l) + 14px); }
  .scene-head { padding: 4px 2px 6px; }
  .scene-head h2 { font-size: 15px; }
  .scene-head .breadcrumb { display: none; }
  .scene-head-actions button { padding: 4px 9px; font-size: 11px; }
  .scene-foot-bar { padding-top: 6px; gap: 6px; }
  .scene-foot-bar button { padding: 5px 10px; font-size: 11.5px; }
  .card-box { padding: 8px 10px; gap: 4px; }
  .tier-card { min-height: 116px; padding: 12px 14px; gap: 6px; }
  .tier-card h3 { font-size: 16px; }
  .tier-card p { font-size: 11px; }
  .hero-select-layout { gap: 10px; }
  .hero-roster-grid { gap: 6px; }
  .hero-tile-card { min-height: 82px; padding: 5px 4px; gap: 2px; }
  .hero-tile-world { font-size: 8.5px; padding: 0 5px; }
  .hero-tile-thumb { width: 42px; height: 42px; }
  .hero-tile-name { font-size: 11px; }
  .hero-tile-style { display: none; }
  .hero-stage-col { padding: 7px 10px; gap: 4px; }
  .hero-stage-name { font-size: 13.5px; }
  .hero-stage-preview { min-height: 84px; }
  .hero-stage-preview img { max-height: 112px; }
  .hero-detail-box { padding: 5px 8px; gap: 3px; }
  .hero-story-line { font-size: 10px; }
  .hero-rec-line { display: none; }
  .pose-tabs button { font-size: 10px; padding: 3px 8px; }

  .toast-bar { top: auto; bottom: calc(var(--safe-b) + 132px); padding: 4px 12px; font-size: 11px; }
  .battle-camera { --floor-baseline: clamp(50px, 14dvh, 72px); }
  .actor-slot {
    width: clamp(128px, 24vw, 220px);
    height: clamp(144px, 55dvh, 228px);
  }
  .actor-left  { left: clamp(8px, 3vw, 38px); }
  .actor-right { right: clamp(8px, 3vw, 38px); }
  .hud-top-row { top: 6px; left: 10px; right: 94px; gap: 6px; }
  .btn-battle-exit-red { top: 6px; right: 8px; min-width: 76px; min-height: 36px; padding: 5px 12px; font-size: 13px; }
  .pvp-timer-slot { top: calc(var(--safe-t) + 42px); }
  .pvp-turn-timer { padding: 2px 9px; font-size: 10px; }
  .pvp-timer-num { font-size: 11px; }
  .pvp-turn-order-bar { top: calc(var(--safe-t) + 66px); padding: 2px 8px; }
  .battle-float-log.is-1v1-log { top: calc(var(--safe-t) + 66px); font-size: 10px; }
  .battle-float-log.is-2v2-log { top: calc(var(--safe-t) + 92px); font-size: 10px; }
  /* 手机横屏：对方明牌同位置紧凑 1×9 一长条，留出顶部呼吸间隙、完整显示卡名并透出背景与左右角色 */
  .multi-opp-open-zone,
  .multi-opp-open-zone.hand-is-open {
    top: calc(var(--safe-t) + 86px);
    width: clamp(360px, 54vw, 488px);
    max-width: 60vw;
  }
  .opp-open-hand-bar {
    display: grid; grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 3px; padding: 3px 4px 10px; border-radius: 9px;
  }
  .opp-mini-card-wrap { width: 100%; min-width: 0; }
  .opp-mini-card { height: clamp(42px, 11.2dvh, 46px); padding: 2.5px 1.5px 3px; border-radius: 5px; gap: 1px; }
  .opp-mini-card img { width: 15px; height: 15px; flex-shrink: 0; }
  .opp-mini-name { font-size: 7.5px; line-height: 1.22; }
  .opp-mini-used-tag { font-size: 8px; }
  .opp-last-played-badge { bottom: -10px; font-size: 7.5px; padding: 0 4px; }
  .battle-subline { font-size: 10.5px; gap: 4px; }
  .fighter-head { font-size: 12px; }
  .hp-track { height: 13px; }
  .battle-bottom-hud { bottom: calc(var(--safe-b) + 6px); left: calc(var(--safe-l) + 10px); right: calc(var(--safe-r) + 10px); gap: 8px; }
  .btn-cast-move { min-width: 88px; height: 50px; font-size: 19px; padding: 4px 10px; }
  .poker-fan-stack { width: 146px; height: 102px; }
  .poker-stack-card { width: 68px; height: 92px; left: 20px; }
  .clean-card { width: 72px; height: 102px; padding: 4px 4px 5px; }
  .slots5-row.slots-6 .clean-card { width: 68px; height: 98px; }
  .slots5-row.slots-7 .clean-card { width: 62px; height: 92px; }
  .slots5-row.slots-8 .clean-card { width: 70px; height: 88px; }
  .slots5-row.slots-9 .clean-card { width: 76px; height: 92px; }
  .slots5-row.slots-9 .cc-cost { font-size: 8.5px; padding: 1px 4px; }
  .slots5-row.slots-9 .cc-series { width: 13px; height: 13px; }
  .clean-card.frame-card { padding: 8px 6px 7px; }
  .clean-card.frame-card::before { inset: 7px 6px 6px; }
  .cc-art img { width: 32px; height: 32px; }
  .cc-name { font-size: 9px; }

  .draft-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .draft-pack-card { padding: 8px; gap: 5px; }
}

@media (max-width: 640px) and (orientation: portrait) {
  .toast-bar { top: auto; bottom: calc(var(--safe-b) + 152px); font-size: 11px; padding: 5px 12px; }
  /* 手机竖屏顶部清爽双行 Grid：首行标题左侧留白避让右上大红退出键，次行左右血条对称等宽零挤压 */
  .hud-top-row {
    top: calc(var(--safe-t) + 8px);
    left: calc(var(--safe-l) + 10px);
    right: calc(var(--safe-r) + 10px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 6px;
    column-gap: 8px;
    align-items: start;
  }
  .hud-top-row > .battle-center-banner {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: left;
    padding: 0 86px 0 2px;
  }
  .hud-top-row > .battle-center-banner strong { font-size: 13px; }
  .hud-top-row > .battle-center-banner .battle-subline { justify-content: flex-start; font-size: 10.5px; }
  .hud-top-row > .fighter-hud:first-child { grid-column: 1; grid-row: 2; width: 100%; }
  .hud-top-row > .fighter-hud:last-child  { grid-column: 2; grid-row: 2; width: 100%; }
  .btn-battle-exit-red { top: calc(var(--safe-t) + 6px); right: calc(var(--safe-r) + 8px); min-width: 76px; min-height: 36px; padding: 5px 12px; font-size: 13px; }
  .fighter-head { font-size: 11.5px; margin-bottom: 3px; }
  .hp-track { height: 14px; }
  .hud-row { gap: 4px; font-size: 10.5px; flex-wrap: wrap; }
  .stamina-pips { gap: 2px; padding: 1px 5px; }
  .stamina-pips .pip { width: 10px; height: 10px; }
  .pvp-timer-slot { top: calc(var(--safe-t) + 122px); }
  .pvp-turn-order-bar { top: calc(var(--safe-t) + 152px); max-width: 94vw; flex-wrap: wrap; justify-content: center; }
  .battle-float-log.is-1v1-log { top: calc(var(--safe-t) + 152px); font-size: 10.5px; max-width: 92vw; text-align: center; }
  .battle-float-log.is-2v2-log { top: calc(var(--safe-t) + 188px); font-size: 10.5px; max-width: 92vw; text-align: center; }
  .battle-camera { --floor-baseline: clamp(128px, 21dvh, 176px); }
  .actor-slot {
    width: clamp(118px, 33vw, 174px);
    height: clamp(166px, 31dvh, 240px);
  }
  .actor-left  { left: 1.5%; }
  .actor-right { right: 1.5%; }
  /* 手机竖屏：对方明牌同位置细长 1×9 一长条，彻底释放下方玫瑰花窗与双人舞台背景 */
  .multi-opp-open-zone {
    top: calc(var(--safe-t) + 174px);
    width: calc(100vw - 14px);
    max-width: 97vw;
  }
  .multi-opp-open-zone.hand-is-open { top: calc(var(--safe-t) + 168px); }
  .opp-open-hand-bar {
    display: grid; grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 2.5px; padding: 3px 4px 10px; border-radius: 9px;
  }
  .opp-mini-card-wrap { width: 100%; min-width: 0; }
  .opp-mini-card { height: 44px; padding: 2.5px 1px 2px; border-radius: 5px; }
  .opp-mini-card img { width: 17px; height: 17px; }
  .opp-mini-name { font-size: 7px; }
  .opp-mini-used-tag { font-size: 8px; }
  .opp-last-played-badge { bottom: -10px; font-size: 7.5px; padding: 0 4px; }
  .setsuna-home { --div-angle: 82deg; }
  .setsuna-home-hud { flex-direction: column; align-items: stretch; gap: 8px; }
  .setsuna-hud-right { justify-content: flex-end; }
  .setsuna-field-tint.left-tint  { clip-path: polygon(0 0, 100% 0, 100% 48%, 0 54%); }
  .setsuna-field-tint.right-tint { clip-path: polygon(0 54%, 100% 48%, 100% 100%, 0 100%); }
  .setsuna-field-btn { width: calc(100% - 48px); left: 24px !important; right: 24px !important; }
  .setsuna-field-btn.left-classic { top: 27%; transform: translateY(-50%); }
  .setsuna-field-btn.right-card   { top: 76%; transform: translateY(-50%); }
  .tier-grid-2, .tier-grid-3, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-select-layout { grid-template-columns: 1fr; overflow-y: auto; }
  .hero-roster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .hero-tile-card { min-height: 92px; padding: 6px 4px; }
  .hero-tile-thumb { width: 46px; height: 46px; }
  .hero-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

body.low-motion *, body.low-motion *::before, body.low-motion *::after { animation: none !important; transition-duration: 0.01ms !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; } }

/* Composite the hand as one surface on touch screens. */
body.touch-hand:not(.flagship-hand-fx) .hand-expanded-tray {
  perspective: none;
  transform-origin: left bottom;
  animation: touchHandOpen 180ms ease-out both;
}
body.touch-hand:not(.flagship-hand-fx) .hand-expanded-tray.is-retracting { animation: touchHandClose 180ms ease-in both; }
body.touch-hand:not(.flagship-hand-fx) .hand-expanded-tray.is-retracting .clean-card { animation: none !important; }
body.touch-hand:not(.flagship-hand-fx) .hand-expanded-tray .clean-card::after { animation-play-state: paused; }
body.touch-hand:not(.flagship-hand-fx) .hand-expanded-tray .clean-card.book-page-in { animation: none; }
body.touch-hand.flagship-hand-fx .hand-expanded-tray .clean-card::after { animation-play-state: running; }
@keyframes touchHandOpen {
  from { transform: translateX(-32px) scale(.94); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes touchHandClose { to { transform: translateX(-40px) scale(.94); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  body.touch-hand:not(.flagship-hand-fx) .hand-expanded-tray,
  body.touch-hand:not(.flagship-hand-fx) .hand-expanded-tray.is-retracting { animation-duration: 1ms; }
}

/* 武侠擂台 · 全部位移与停顿留在独立的二维装饰层。 */
/* Both solo fighters are direct HUD items. Keep their bars symmetric even with different status content. */
@media (orientation: landscape), (min-width: 641px) {
  #battleHudTop { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
  #battleHudTop > .fighter-hud { width: 100%; max-width: 336px; min-width: 0; }
  #battleHudTop > .fighter-hud:last-child { justify-self: end; }
}
#battleHudTop .hp-num { white-space: nowrap; line-height: 1; }
#battleHudTop .insight-eye {
  align-self: flex-end; display: inline-flex; align-items: center; justify-content: flex-end;
  gap: .32em; min-height: 34px; padding: 0 .28em; margin-left: auto;
  pointer-events: auto; white-space: nowrap; color: #ffdda0; font-size: clamp(12px, 2.2vh, 16px);
  border: 0; background: transparent; box-shadow: none;
  text-shadow: 0 1px 2px #24180e, 0 0 4px #302215;
}
#battleHudTop .insight-eye:focus-visible { outline: 2px solid #ffda8f; outline-offset: 1px; }
.insight-mark { width: 1.42em; height: 1.42em; flex: none; }
.insight-caption { font-family: serif; font-weight: 700; letter-spacing: .08em; }
.insight-traces { display: inline-flex; gap: .32em; align-items: center; }
.insight-traces:not(:empty) { margin-right: .15em; padding-right: .55em; border-right: 1px solid #cfb58b99; }
.insight-traces:empty { display: none; }
.insight-traces > span { font-weight: 800; font-size: .94em; line-height: 1.25; }
.trace-rock { color: #ffbe86; } .trace-scissors { color: #9ee8f5; } .trace-paper { color: #b8e9ac; }
.insight-awake,.classic-clash{position:absolute;inset:0;z-index:85;pointer-events:none;display:grid;place-items:center}
.insight-awake{color:#ffe6a1;font:bold clamp(24px,6vh,56px) serif;letter-spacing:.25em;background:radial-gradient(ellipse,transparent 42%,#9b743833);animation:insight-pulse .65s both}
@keyframes insight-pulse{0%{opacity:0;transform:scale(.92)}35%{opacity:1}100%{opacity:0;transform:scale(1.04)}}
.scene-equip,.arcade-arena footer,.jade-discs{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}
.arcade-body{position:relative;min-height:0;overflow:auto}.arcade-arena{isolation:isolate;position:relative;min-height:200px;height:100%;display:flex;flex-direction:column;justify-content:space-between;color:#fff2d8}
.arcade-arena.fever{background:radial-gradient(ellipse,transparent 55%,#73351c50)}
.arcade-arena header{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:start;z-index:1}
.arcade-gauge,.arena-order{background:rgba(14,20,28,.54);border:1px solid #9d8457;border-radius:8px;padding:5px 12px}
.arcade-gauge i{display:block;background:#3c3730;height:6px;margin:3px 0}.arcade-gauge em{display:block;height:100%;background:#ffc869;transform-origin:left;transition:transform .2s}
.arcade-gauge.away{text-align:right}.away em{transform-origin:right}.arena-order{text-align:center}.arena-order strong{color:#ffe09e}.arcade-gauge small{font-size:11px}
.arcade-fighters{position:absolute;inset:10% 7% 12%;display:flex;align-items:end;justify-content:space-between;pointer-events:none}.arcade-fighters figure{position:relative;margin:0;height:100%;max-width:40%;display:grid;align-items:end}.arcade-fighters img{height:100%;max-width:100%;object-fit:contain}.fighter-away img{transform:scaleX(-1)}.arcade-fighters figcaption{position:absolute;top:24%;background:#17191e;color:#fff1c8;text-align:center;width:100%}.arcade-fighters figcaption:empty{display:none}
.arcade-arena footer{align-self:center;z-index:1;position:relative;margin:0 4px;min-height:46px}.jade-discs button{border-radius:50%;border:2px solid #ab9369;background:radial-gradient(circle at 35% 25%,#506c60,#12272a 70%);color:#fff8df;min-width:48px;min-height:48px;padding:4px;display:grid;place-items:center;font-size:11px;line-height:1}.jade-discs img{width:24px;height:24px}.jade-discs button[aria-pressed=true],.arcade-arena button[aria-pressed=true]{outline:2px solid #ffe59d}.jade-discs button:active{transform:scale(.94)}
.arcade-arena.hit{animation:arena-shake .28s}.fighter-home.strike{--dash:20px}.fighter-away.strike{--dash:-20px}.strike{animation:arena-dash .3s}
@keyframes arena-shake{0%,16%{transform:translateX(0)}30%{transform:translateX(3px)}65%{transform:translateX(-2px)}}
@keyframes arena-dash{0%,15%,100%{transform:translateX(0)}55%{transform:translateX(var(--dash))}}
@media(max-height:460px){.arcade-arena header{gap:4px}.arcade-gauge,.arena-order{font-size:12px}.arcade-arena footer{padding:3px 7px}.arcade-arena footer button{min-height:38px}.jade-discs button{min-height:45px}.insight-eye{min-height:24px}.arcade-fighters{inset:12% 7% 10%}}
@media(prefers-reduced-motion:reduce){.insight-awake{display:none}.arcade-arena.hit,.strike{animation:none}}

.arena-count{position:absolute;z-index:82;pointer-events:none;top:25%;left:50%;transform:translateX(-50%);font:bold clamp(22px,6vh,52px) serif;color:#ffe0a0;text-shadow:0 2px 3px #171619}


/* 山门鸣金台：保持插画清晰，文字由局部墨底承托。 */
.gong-ring-bg { object-position: 43% 49%; }
.gong-ring-shade {
  background: linear-gradient(180deg,#091416aa,transparent 28%,transparent 63%,#0a100f7a),
    linear-gradient(90deg,#11191b35,transparent 45%,#0c131c26);
}
.jade-discs { gap: clamp(7px,1.3vw,16px); }
.jade-discs button {
  --jade-tone: #69411e; width: clamp(58px,8.4vh,86px); height: clamp(58px,8.4vh,86px);
  padding: 4px 3px 5px; grid-template-rows: minmax(0,1fr) auto; gap: 1px;
  background: radial-gradient(ellipse at 35% 16%,var(--jade-tone),#111918 74%);
  border: 1px solid #b2945c; box-shadow: inset 0 0 0 2px #242522,inset 0 0 0 3px #927548;
  transition: transform .16s ease;
}
.jade-discs button[data-move="scissors"] { --jade-tone: #245c62; }
.jade-discs button[data-move="paper"] { --jade-tone: #554261; }
.jade-discs img { width: 76%; height: 100%; min-height: 0; object-fit: contain; }
.jade-discs span { color: #fff3d7; font-weight: bold; }
.jade-discs button[aria-pressed="true"] { transform: translateY(-3px); outline-offset: 1px; }
.classic-skin-enamel .jade-discs button { border: 2px solid #ffe09a; box-shadow: inset 0 0 0 3px #725127; }
@media (max-height: 500px) {
  .jade-discs button { width: 56px; height: 56px; }
}
@media (max-width: 590px) {
}

.arena-order { border-inline: 4px double #cba568; background: linear-gradient(90deg,#352e23,#171918 24%,#171918 76%,#352e23); }
.arena-count { background: #201d19ce; border: 2px solid #c9a363; padding: .02em .18em; line-height: 1.09; }
.arcade-fighters.winding-up figure { transform-origin: center bottom; animation: jade-ready .21s ease-out both; }
@keyframes jade-ready { 50% { transform: translateY(3px) scale(1.025,.96); } }
@media (hover:hover) { .jade-discs button:hover:enabled { transform: translateY(-4px); } }
.jade-discs button:active:enabled { transform: scale(.95); }
@media (prefers-reduced-motion: reduce) { .arcade-fighters.winding-up figure { animation: none; } }

.insight-counter-tip { padding: .45em .7em; border-left: 3px solid #bc9963; background: #222724; color: #ffdf95; }
.fighter-home.recoil { --recoil-x: -9px; --recoil-angle: -4deg; }
.fighter-away.recoil { --recoil-x: 9px; --recoil-angle: 4deg; }
.arcade-fighters .recoil { transform-origin: center bottom; animation: classic-recoil .38s ease-out both; }
@keyframes classic-recoil { 38% { transform: translateX(var(--recoil-x)) rotate(var(--recoil-angle)); } }
.arcade-fighters.winding-up figure.strike { animation: arena-dash .3s; }
.arcade-fighters.winding-up figure.recoil { animation: classic-recoil .38s ease-out; }
@media (prefers-reduced-motion:reduce) { .arcade-fighters figure:is(.strike,.recoil) { animation: none !important; } }

/* Classic arena. Header, stage and controls own separate layout rows. */
.gong-ring-panel {
  --ink-glass: rgba(14,20,28,.54);
  --gilt: rgba(220,184,118,.52);
  color:#fff2d4;
}
.gong-ring-panel .glass {
  background:var(--ink-glass); border:1px solid var(--gilt);
  -webkit-backdrop-filter:var(--tower-glass, blur(10px)); backdrop-filter:var(--tower-glass, blur(10px));
  box-shadow:inset 0 1px rgba(255,230,177,.12),0 4px 14px #080e1424;
}
.gong-ring-panel .scene-head {padding-block:2px 7px}
.gong-ring-panel button:not(.mode-tile):not([data-move]), .gong-ring-panel :is(select,input) {
  color:#fff0cd; border:1px solid #b7955a91; border-radius:6px;
  background:rgba(14,20,28,.52);padding:5px 10px;font:inherit;font-size:clamp(12px,1.4vw,15px);
  min-height:32px;line-height:1.25;
}
.gong-ring-panel select option {color:#171c20;background:#ede1c3}
.gong-ring-panel :is(button,select,input):focus-visible {outline:2px solid #ffe2a6;outline-offset:2px}
.gong-ring-panel button:disabled {opacity:.55}
.gong-ring-panel button.accent,.gong-ring-panel button[aria-pressed=true]:not([data-move]) {color:#fff0ba;border-color:#e1b774;background:linear-gradient(135deg,#8358299c,#61462170)}
.gong-ring-panel .classic-mode-mat,.classic-prep {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr));width:min(100%,800px);
  margin:auto;gap:clamp(9px,1.5vw,18px);
}
.mode-tile {--tone:#e6bd75;display:flex;position:relative;overflow:hidden;align-items:center;gap:clamp(10px,2vw,25px);
  min-width:0;padding:clamp(14px,2.6vw,34px);text-align:left;border-radius:4px 18px 4px 18px;color:#fff3d6}
.tone-jade {--tone:#8aceb8}.tone-copper {--tone:#eeac88}.tone-ice {--tone:#a5cce6}
.mode-tile:after {content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 34%,#f6e7ba27,transparent 64%);transform:translateX(-120%);transition:transform .45s}
@media(hover:hover){.mode-tile:hover:after {transform:translateX(120%)}.mode-tile:hover {border-color:var(--tone)}}
.mode-mark {flex:none;display:grid;place-items:center;width:clamp(43px,5vw,66px);aspect-ratio:1;border:3px double var(--tone);border-radius:50%;
  color:var(--tone);font:700 clamp(23px,3vw,36px)/1 STSong,SimSun,serif;box-shadow:inset 0 0 16px #c7905a26}
.mode-copy {display:grid;gap:4px;line-height:1.4}.mode-copy small {font-size:11px;letter-spacing:.15em;color:var(--tone)}
.mode-copy strong,.prep-card h3 {font:700 clamp(18px,2.1vw,30px)/1.2 STSong,SimSun,serif}
.mode-copy>span {font-size:clamp(12px,1.15vw,15px);color:#ece3d1}
.classic-prep {max-width:710px}.prep-roster,.prep-card {border-radius:12px;padding:clamp(10px,1.8vw,22px)}
.prep-roster {grid-column:1/-1;display:flex;justify-content:space-between;align-items:center}
.prep-card {display:grid;align-content:start;gap:10px}.prep-card h3 {margin:0}.prep-card label {display:flex;align-items:center;gap:5px}
.prep-card :is(input,select) {width:0;flex:1;min-width:0}
.gong-ring-panel .arcade-body {margin:0;padding:6px 0 0;overflow:hidden;overflow:clip}
.gong-ring-panel .arcade-arena {display:grid;position:absolute;inset:4px 0 0;grid-template-rows:auto minmax(64px,1fr) auto;gap:4px;min-height:0;height:auto;justify-content:stretch}
.arcade-arena>header {display:grid;grid-template-columns:minmax(0,1fr) minmax(95px,auto) minmax(0,1fr);align-items:stretch;gap:clamp(4px,1vw,15px)}
.classic-hud,.classic-order {border-radius:9px;padding:clamp(5px,1vw,12px);min-width:0}
.classic-hud.skin-silver-frame {border:2px double #d1dce3;box-shadow:inset 0 0 0 2px #9aa9b755}
.hud-line,.hud-value,.move-trail {display:flex;align-items:center;gap:5px}.hud-line {justify-content:space-between}
.classic-hud.away .hud-line,.classic-hud.away .move-trail {flex-direction:row-reverse}
.hud-line>b {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hud-value {flex:none;color:#ffe7a7}.hud-value strong,.classic-order strong {font:700 clamp(20px,2.8vw,38px)/1 Georgia,serif;font-variant-numeric:tabular-nums}
.value-pop {animation:classic-value .36s ease-out}@keyframes classic-value {30%{transform:scale(1.18);color:white}}
.hp-stars {display:flex;color:#9c8d80;gap:1px;font-size:clamp(12px,2vw,22px)}.hp-stars i {font-style:normal}.hp-stars .lit {color:#ffa382;text-shadow:0 0 6px #ff7d4a}
.classic-energy {height:5px;background:#9a8f783b;position:relative;overflow:hidden;margin:4px 0}
.classic-energy i {display:block;height:100%;background:#e7c074}.classic-energy:after {content:'';position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 2px),#343330 calc(10% - 2px) 10%)}
.classic-hud.away .classic-energy i {margin-left:auto}
.move-trail {height:clamp(14px,2.2vh,22px)}.move-trail img,.move-trail>i {width:auto;height:100%;aspect-ratio:1;object-fit:contain}.move-trail>i {height:5px;border:1px solid #ddc99870;border-radius:50%}
.classic-order {display:grid;place-content:center;justify-items:center;text-align:center;max-width:230px}
.classic-order small,.move-trail small {font-size:11px;color:#eadab9}.classic-order b {font-size:clamp(11px,1.4vw,16px)}.classic-order strong {color:#ffe1a1;animation:clock-beat 1s ease-out infinite}
@keyframes clock-beat {0%{transform:scale(1.12)}50%{transform:scale(1)}}
.arcade-arena .arcade-fighters {position:relative;inset:auto;display:flex;align-items:stretch;justify-content:space-around;min-height:0;overflow:clip}
.arcade-fighters figure {width:40%;max-width:40%;height:100%;display:grid;grid-template-rows:32px minmax(0,1fr);justify-items:center;align-items:end;margin:0;position:relative}
.arcade-fighters .classic-standee {grid-row:2;position:relative;inset:auto;width:100%;height:93%;max-height:370px;align-self:end;margin-bottom:3px}
.arcade-fighters .classic-standee.flip-x {transform:scaleX(-1)}
.arcade-fighters .classic-standee .actor-sprite {transform:none;width:100%;object-position:center bottom}
.arcade-fighters figure .classic-bubble {grid-row:1;position:relative;align-self:end;justify-self:end;inset:auto;width:max-content;max-width:100%;border:1px solid var(--gilt);border-radius:10px;padding:4px 8px;background:rgba(14,20,28,.56);backdrop-filter:var(--tower-glass, blur(10px));color:#fff3cd;font-size:clamp(11px,1.2vw,15px);line-height:1.3;animation:speech-leave 3.5s both}
.arcade-fighters .fighter-away .classic-bubble {justify-self:start}
.classic-bubble:after {content:'';position:absolute;left:20%;bottom:-5px;width:8px;height:8px;background:#766446;clip-path:polygon(0 0,100% 0,12% 100%)}
.fighter-away .classic-bubble:after {left:auto;right:20%}
@keyframes speech-leave {0%,86%{opacity:1}100%{opacity:0}}
.gong-ring-panel .arcade-arena footer {display:grid;justify-items:center;justify-content:stretch;gap:5px;align-self:end;width:100%;margin:0;padding:0;min-height:0;background:transparent;border:0;box-shadow:none}
.tactics {justify-self:center;max-width:100%;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;padding:4px 7px;border-radius:10px}
.tactics label,.challenge-chips {display:inline-flex;align-items:center;gap:4px;font-size:12px}
.jade-discs {flex-wrap:nowrap}.jade-discs button {position:relative;width:clamp(56px,9vh,94px);height:clamp(56px,9vh,94px);transition:transform .18s,box-shadow .18s}
.jade-discs button[aria-pressed=true] {box-shadow:0 0 14px #eab96291,inset 0 0 7px #bf9148}
.jade-discs button:disabled {opacity:.83}.hand-seal {position:absolute;top:40%;left:0;width:100%;transform:rotate(-13deg);background:#702824;border-block:1px solid #d49171;color:#ffe1c2;font-size:12px}
@media(max-width:580px) {
  .gong-ring-panel {padding-inline:calc(6px + var(--safe-l)) calc(6px + var(--safe-r))}
  .mode-tile {align-items:start;flex-direction:column;gap:9px;padding:14px}.classic-prep {grid-template-columns:1fr}
  .classic-hud .hud-line {align-items:start;flex-direction:column}.classic-hud.away .hud-line {flex-direction:column;align-items:end}
  .arcade-arena>header {grid-template-columns:minmax(0,1fr) minmax(75px,26%) minmax(0,1fr)}
  .hud-line>b {max-width:100%;font-size:12px}.hud-value small {font-size:10px}
  .classic-hud,.classic-order {padding:6px}.classic-hud .move-trail {gap:2px}
  .arcade-fighters figure {grid-template-rows:44px minmax(0,1fr);width:46%;max-width:46%}
}
@media(max-height:480px) {
  .gong-ring-panel {padding-top:calc(3px + var(--safe-t));padding-bottom:calc(3px + var(--safe-b))}
  .gong-ring-panel .scene-head {padding-block:0 3px}.gong-ring-panel .arcade-body {padding-top:3px}
  .arcade-arena>header {gap:5px}.classic-hud,.classic-order {padding:4px 8px}.classic-order strong {font-size:18px}
  .gong-ring-panel .arcade-arena {gap:2px}.arcade-fighters figure {grid-template-rows:24px minmax(0,1fr)}
  .gong-ring-panel button:not(.mode-tile):not([data-move]),.gong-ring-panel :is(select,input) {min-height:29px;font-size:12px;padding:3px 7px}
  .classic-mode-mat .mode-tile {padding:12px}.classic-prep,.prep-card {gap:6px}.prep-card,.prep-roster {padding:9px}
}
@media(prefers-reduced-motion:reduce) {
  .classic-order strong,.value-pop,.classic-standee .actor-sprite {animation:none}
  .classic-bubble {animation-timing-function:step-end!important}
}


.speech-options {display:flex;flex-wrap:wrap;gap:3px;justify-content:center}.arcade-fighters .classic-standee .actor-sprite {transform-origin:center bottom}

/* Match the card arena ground line; the command dock floats between the fighters. */
.gong-ring-panel .arcade-arena {
  --floor-baseline:clamp(46px,14dvh,120px);
  grid-template-rows:auto minmax(0,1fr);
}
.arcade-arena .arcade-fighters {
  grid-row:2;grid-column:1;container-type:size;
  margin-bottom:var(--floor-baseline);overflow:visible;
  justify-content:space-between;padding-inline:1%;
}
.arcade-fighters figure {
  width:28%;max-width:28%;padding:0;
  grid-template-rows:minmax(0,1fr) auto min(27cqw,calc(100cqh - 38px),370px);
}
.arcade-fighters figure .classic-bubble {grid-row:2;margin-bottom:3px}
.arcade-fighters .classic-standee {
  grid-row:3;height:100%;max-height:none;width:auto;aspect-ratio:1;max-width:100%;margin:0;
}
.arcade-fighters .classic-standee .actor-sprite {
  transform-origin:50% calc(100% - var(--ground-offset-y)*1%);
}
.gong-ring-panel .arcade-arena footer {
  grid-row:2;grid-column:1;align-self:end;justify-self:center;width:44%;max-width:750px;
}
.arcade-arena .tactics {
  max-width:100%;min-width:0;flex-wrap:nowrap;justify-content:safe center;
  overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain;
}
.arcade-arena .tactics>* {flex-shrink:0}
.arcade-arena .speech-options {flex-wrap:nowrap}
.arcade-arena .tactics :is(button,label,b) {white-space:nowrap}
/* 经典擂台的接触点由角色舞台决定，独立于横竖屏上的操作台高度。 */
.classic-clash {display:block;z-index:47;overflow:hidden}
.clash-hand,.classic-verdict,.score-chips {position:absolute;left:var(--impact-x);top:var(--impact-y)}
.clash-hand {--travel:-29vw;--bounce:-11vw;--trail:to left;width:clamp(72px,14vmin,154px);
  aspect-ratio:1;translate:-50% -50%;animation:classic-flight .54s both;isolation:isolate}
.clash-hand.right {--travel:29vw;--bounce:11vw;--trail:to right}
.clash-hand::before {content:"";position:absolute;z-index:-1;inset:37% 50% 30% -80%;border-radius:60%;
  background:linear-gradient(var(--trail),#ffd98da6,transparent);transform:skewY(-7deg)}
.clash-hand.right::before {inset:37% -80% 30% 50%}
.clash-hand img {width:100%;height:100%;object-fit:contain}
.clash-hand.right img {transform:scaleX(-1)}
@keyframes classic-flight {
  0% {transform:translateX(var(--travel)) scale(.72);opacity:0}
  18% {opacity:1}
  40.7%,49% {transform:translateX(0) scale(1.08);opacity:1}
  100% {transform:translateX(var(--bounce)) scale(.7);opacity:0}
}
.clash-hand.shattered img {animation:classic-break .22s 45ms both}
@keyframes classic-break {to{transform:rotate(12deg) scale(.25);opacity:0}}
.classic-verdict {z-index:2;translate:-50% -50%;padding:.14em .52em .24em;white-space:nowrap;
  font:900 clamp(22px,5.1vmin,62px)/1.15 "STKaiti","KaiTi",serif;letter-spacing:.06em;color:#ffdc8a;
  background:linear-gradient(105deg,transparent,#231810d9 19%,#342118e6 75%,transparent);
  text-shadow:0 2px 1px #3e200c,0 0 10px #82552c;animation:classic-verdict .85s both}
@keyframes classic-verdict {from{transform:scale(1.3) rotate(-4deg);opacity:0}15%,75%{transform:scale(1);opacity:1}to{transform:translateY(-7px);opacity:0}}
.score-chips b {position:absolute;width:15px;height:15px;border:2px solid #b88c44;border-radius:50%;
  background:radial-gradient(circle at 34% 30%,#fff3b9,#c49039 64%,#735125);box-shadow:inset 0 0 0 2px #e9c57b}
#classicResult {margin:auto;width:min(90vw,490px);max-height:90dvh;overflow:auto;box-sizing:border-box;
  padding:clamp(15px,4vmin,32px);border:1px solid #ad8a50;border-radius:15px;background:rgba(20,23,28,.83);
  backdrop-filter:var(--tower-glass, blur(10px));color:#fff2cf;box-shadow:0 12px 60px #100d0b99}
#classicResult::backdrop {background:#100f144f}
#classicResult article {position:relative}
#classicResult h2 {margin:0 0 .45em;font:900 clamp(32px,7vmin,56px)/1.15 "STKaiti","KaiTi",serif;color:#f8d38b}
#classicResult dl {display:grid;grid-template-columns:1fr 1fr;gap:8px 20px;margin:0 0 16px}
#classicResult dl div {border-bottom:1px solid #9377495c;padding:4px 0}
#classicResult dt {color:#d8ccb2;font-size:.83rem}
#classicResult dd {margin:2px 0;font-weight:750;font-variant-numeric:tabular-nums}
.classic-award {color:#ffd77a;animation:classic-award .54s ease-out both}
@keyframes classic-award {from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}
#classicResult nav {display:flex;flex-wrap:wrap;gap:6px}
#classicResult button {flex:1;min-height:42px;border:1px solid #9a8157;border-radius:8px;background:#393630;color:#fff1d4;cursor:pointer}
#classicResult button:first-child {background:#76603b}
#classicResult button:focus-visible {outline:2px solid #ffdb93;outline-offset:2px}
@media(prefers-reduced-motion:reduce) {
  .clash-hand,.score-chips {display:none}
  .classic-verdict,.classic-award,.arcade-arena .arena-count {animation:none}
}


#classicLandscapeNotice {
  width:min(86vw,340px); margin:auto; padding:24px; text-align:center;
  color:#fff1cf; background:#222428; border:1px solid #a38a59; border-radius:12px;
}
#classicLandscapeNotice h2 {margin:0;font-size:1.25rem}
#classicLandscapeNotice p {margin:12px 0 20px;color:#dfd3bd}
#classicLandscapeNotice::backdrop {background:#101319}


/* 典藏展柜与试景 */
.collection-tabs,.collection-card .scene-equip,.collection-name{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.collection-tabs{padding:7px;margin:10px 0 14px;border:1px solid #b59b644d;border-radius:12px;background:rgba(18,25,31,.56);backdrop-filter:var(--tower-glass, blur(10px))}
.collection-tabs button,.collection-action,.collection-card .scene-equip button,.scene-preview-btn{border:1px solid #bca46b69;border-radius:18px;color:#f5e6c8;background:#25272c;padding:6px 12px;min-height:34px;font:inherit;font-size:13px;cursor:pointer}
.collection-tabs button{flex:1;background:transparent;white-space:nowrap}
.collection-tabs [aria-pressed=true],.collection-card .scene-equip [aria-pressed=true],.collection-action:enabled{color:#fce6ac;background:linear-gradient(120deg,#55402c,#312b23);border-color:#c79e60}
.collection-action:disabled{color:#c0b8aa;cursor:default}
.collection-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,218px),1fr));gap:12px}
.collection-card{--rim:#9b78b6;display:flex;flex-direction:column;min-width:0;overflow:hidden;border-radius:12px;border:1px solid color-mix(in srgb,var(--rim) 55%,transparent);background:linear-gradient(145deg,#282b30cc,#151a20bd);box-shadow:inset 0 1px 0 #ffecc114}
.collection-card[data-tier=legendary]{--rim:#dcb66d}.collection-card[data-tier=mythic]{--rim:#e5b35d}
.collection-card.equipped{border-color:#ead18f;box-shadow:inset 0 0 12px #e5b35d35}
.collection-art{position:relative;isolation:isolate;overflow:hidden;display:grid;place-items:center;margin:0;aspect-ratio:16/9;background:radial-gradient(ellipse at 50% 70%,#66513e80,#1f2125 72%)}
.collection-art img{width:100%;height:100%;min-height:0;object-fit:cover}
.collection-art.relic:before{content:"";position:absolute;inset:42% 13% 6%;border-radius:50%;background:radial-gradient(ellipse,#eab96350,transparent 69%);z-index:-1}
.collection-art.relic img{object-fit:contain;padding:6px;box-sizing:border-box}
.collection-tier,.scene-preview-btn{position:absolute;right:7px;background:#1a2025dd;color:#f0dbac;font-size:11px}
.collection-tier{top:7px;padding:2px 7px;border:1px solid var(--rim,#bea576);border-radius:8px;color:var(--rim,#eeddb5)}
.scene-preview-btn{bottom:7px;min-height:29px;padding:3px 9px}
.collection-detail{padding:10px;display:flex;flex:1;flex-direction:column;align-items:stretch;gap:8px}
.collection-detail strong{font-size:15px;color:#ffefca}.collection-detail p{margin:0;color:#d0c6b6;font-size:13px;line-height:1.5}
.collection-name{justify-content:space-between}.collection-name small{color:#afd7c0}
.collection-detail>.collection-action,.collection-detail>.scene-equip{margin-top:auto}
.collection-card .scene-equip{justify-content:flex-start;gap:4px}
.collection-card .scene-equip button{padding:4px 7px;font-size:12px}
.collection-section{margin:12px 0 20px}.collection-section h4{margin:0 0 8px;color:#e8c988}
.skin-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,174px),1fr))}
.default-art{color:#c7bfa0;font-size:30px}
dialog.collection-preview{position:fixed;inset:0;margin:0;width:100%;height:100%;max-width:none;max-height:none;padding:0;border:0;background:#090b0d}
.collection-preview::backdrop{background:#090b0d}
.collection-preview button,.collection-preview img{display:block;width:100%;height:100%;padding:0;margin:0;background:none;border:0;box-shadow:none;object-fit:contain;cursor:zoom-out}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
.collection-art.landscape img{transition:transform .5s ease-out}.collection-art.landscape:hover img{transform:scale(1.035)}
.collection-card:focus-within .relic:before,.collection-card:hover .relic:before{animation:collection-glow 1.8s ease-in-out infinite alternate}
@keyframes collection-glow{from{opacity:.48}to{opacity:1}}
}
@media(max-width:680px){.collection-grid,.skin-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.collection-detail{padding:8px}.collection-tabs button{padding:6px 4px}}
@media(max-width:360px){.collection-grid,.skin-grid{grid-template-columns:1fr}}


/* Presentation lives inside the panel so seals also render in native dialog top layers. */
#classicResult {width:min(91vw,548px);background:linear-gradient(135deg,rgba(37,32,33,.85),rgba(15,21,28,.82));border-color:#b59a63}
#classicResult::backdrop {background:radial-gradient(ellipse at center,transparent,#0d0c15a6)}
#classicResult article {isolation:isolate}
#classicResult h2 {padding-right:24%;line-height:1.2;letter-spacing:.06em}
#classicResult:before {content:"";position:absolute;top:0;left:14%;right:14%;height:2px;background:linear-gradient(90deg,transparent,#e5bd6e,#fff1ca,#e0b066,transparent)}
#classicResult dl {grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:18px}
#classicResult dl div {border:1px solid #a78d5c55;background:#201e226b;border-radius:7px;padding:7px 9px}
#classicResult dd {color:#ffebbe}
#classicResult .classic-award {color:#ffda87}
#classicResult[data-tone=loss] h2 {color:#c8bfc3}
#classicResult[data-tone=tie] h2 {color:#c9e5ee}
.award-seal {--start:2.4;--angle:-18deg;position:absolute;right:0;top:-8px;width:clamp(58px,12vmin,89px);aspect-ratio:1;z-index:1;display:grid;place-items:center;pointer-events:none;opacity:0}
.award-seal img {width:100%;height:100%;object-fit:contain}
.award-seal[data-kind=royal] {--start:2.8;--angle:-24deg}
.award-seal.landing,.award-seal.settled {opacity:1}
.award-seal.landing img {animation:award-drop .30s both}
@keyframes award-drop {0%{transform:translateY(-22px) rotate(var(--angle)) scale(var(--start));opacity:0}46%{transform:rotate(-3deg) scale(.91);opacity:1}72%{transform:scale(1.06)}to{transform:none}}
.seal-burst {position:absolute;left:50%;top:50%;width:230%;height:230%;transform:translate(-50%,-50%);pointer-events:none}
.award-seal[data-kind=royal].landing:after {content:"";position:absolute;inset:17%;border-radius:50%;background:linear-gradient(115deg,transparent 36%,#fff6ce77 49%,transparent 60%);animation:award-sheen 3.2s .35s infinite;pointer-events:none}
@keyframes award-sheen {0%,50%{transform:translateX(-22%) scaleX(.35);opacity:0}70%{opacity:.8}92%,100%{transform:translateX(24%) scaleX(.42);opacity:0}}
.award-seal:is([data-kind=tie],[data-kind=loss]){font:700 clamp(26px,6vmin,42px)/1 KaiTi,serif;border:2px double #bbcfd7;border-radius:50%;color:#d0e4ed;background:radial-gradient(ellipse,#4f6a7999,transparent)}
.award-seal[data-kind=loss]{color:#bcb5bb;border-color:#928b93;background:radial-gradient(ellipse,#7d758466,transparent)}
.award-seal[data-kind=loss].landing:before{content:"";position:absolute;inset:-12%;border-radius:50%;background:radial-gradient(ellipse,#d0c8cd60,transparent 68%);animation:loss-mist .7s both}
@keyframes loss-mist{from{transform:translateY(-16px);opacity:0}35%{opacity:.8}to{transform:translateY(10px);opacity:0}}
.card-award-panel{position:relative}.card-award-panel>.award-seal{position:relative;top:0;right:auto;width:42px;margin:0 auto 4px}
.stamp-preview{position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(ellipse,#38302a,#161920);z-index:2}
.stamp-preview .award-seal{position:relative;top:auto;right:auto;width:min(37%,96px)}
.classic-clash.finisher{background:radial-gradient(ellipse at var(--impact-x) var(--impact-y),transparent 28%,#11101b87);animation:award-focus .32s ease-out both}
@keyframes award-focus{from{opacity:.75}to{opacity:1}}
.fighter-finisher .actor-sprite {filter:drop-shadow(0 0 4px #ffd38e)}
.fighter-finisher:after {content:"";position:absolute;bottom:0;left:20%;width:60%;height:12%;border:2px solid #ffe5b2;border-radius:50%;animation:final-wave .32s both;pointer-events:none}
@keyframes final-wave{from{transform:scale(.45);opacity:.9}to{transform:scale(1.5);opacity:0}}
@media(prefers-reduced-motion:no-preference){
#classicResult[open]{animation:altar-open .36s cubic-bezier(.22,.8,.22,1.1) both}
#classicResult dl div{animation:ledger-reveal .22s both}
#classicResult dl div:nth-child(n+3){animation-delay:.07s}
#classicResult dl div:nth-child(n+5){animation-delay:.14s}
@keyframes altar-open{from{opacity:0;transform:translateY(8px) scale(.93)}to{opacity:1;transform:none}}
@keyframes ledger-reveal{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
}
@media(prefers-reduced-motion:reduce){.award-seal,.award-seal *,.award-seal:after,.award-seal:before,.fighter-finisher:after{animation:none!important}.award-seal:after,.seal-burst{display:none}}
@media(max-height:420px){#classicResult{padding:11px 18px}#classicResult dl{margin:6px 0}#classicResult dl div{padding:4px 6px}#classicResult h2{font-size:30px}}


@media(prefers-reduced-motion:no-preference){
  #classicResult[open]:before{animation:altar-gold-line .68s ease-out both}
  @keyframes altar-gold-line{from{transform:scaleX(.12);opacity:.25}65%{opacity:1}to{transform:scaleX(1)}}
  .award-seal[data-kind=royal].landing:before{content:"";position:absolute;inset:-36% 14% 12%;z-index:-1;border-radius:55%;
    background:linear-gradient(160deg,transparent 14%,#aa372d77 52%,#ffcc6899 79%,transparent);
    transform-origin:center bottom;animation:wax-wake .30s ease-out both}
  @keyframes wax-wake{from{opacity:0;transform:translateY(-20px) scale(.65,1.3) rotate(-18deg)}
    42%{opacity:.9}to{opacity:0;transform:scale(1,.45)}}
}

/* Boiler pressure fits alongside the armor readout, including narrow landscape HUDs. */
.steam-gauge { display:inline-flex; flex:0 0 auto; align-items:center; gap:3px; padding:2px 4px; vertical-align:middle; }
.steam-gauge i { width:clamp(5px,.7vw,9px); aspect-ratio:1; border-radius:50%; border:1px solid #ab8357; background:#372a23; box-sizing:border-box; }
.steam-gauge .lit { background:#ffc469; box-shadow:0 0 3px #e9a743; }
.steam-gauge.full .lit { background:#ff734b; border-color:#ffba84; box-shadow:0 0 4px #f77431; }
.steam-gauge small { color:#ffbd96; font:bold clamp(8px,.8vw,11px)/1 sans-serif; white-space:nowrap; }
.steam-warm .actor-ground-pad::after,.steam-hot .actor-ground-pad::after {
  content:""; pointer-events:none; position:absolute; left:36%; top:30%; width:27%; height:22%;
  background:radial-gradient(ellipse,rgba(226,237,235,.55),transparent 65%); opacity:0; animation:boiler-wisp 3.6s ease-out infinite;
}
.steam-hot .actor-ground-pad::after { width:24%; height:29%; background:radial-gradient(circle at 18% 68%,#ffb763 1px,transparent 2px),radial-gradient(circle at 78% 32%,#ffd49c 1px,transparent 2px),radial-gradient(ellipse,rgba(211,112,49,.4),transparent 66%); animation-duration:1.4s; }
.steam-hot .actor-sprite { filter:drop-shadow(0 0 4px #cc4f26); }
.steam-hit .actor-ground-pad { animation:metal-jolt 150ms linear; }
@keyframes metal-jolt { 20%,60% {translate:2px 0;filter:brightness(1.45) sepia(.34)} 40%,80% {translate:-1px 0} }
@keyframes boiler-wisp { 15%{opacity:0} 35%{opacity:.78} 85%,100%{opacity:0;transform:translate(10%,-65%) scale(1.5)} }
@media (prefers-reduced-motion:no-preference) {
  .steam-gauge.full .lit { animation:pressure-pulse 1s ease-in-out infinite alternate; }
  body:not(.gfx-smooth) .steam-hot .actor-ground-pad:not(.dead) { animation:boiler-tremor 2s steps(1,end) infinite; }
  body .steam-hot.steam-hit .actor-ground-pad { animation:metal-jolt 150ms linear; }
}
@keyframes pressure-pulse { to{opacity:.67} }
@keyframes boiler-tremor { 78%,84%{translate:1px 0} 81%,87%{translate:-1px 0} 90%{translate:0 0} }
body.gfx-smooth .steam-warm .actor-ground-pad::after,body.gfx-smooth .steam-hot .actor-ground-pad::after { display:none; }
@media (prefers-reduced-motion:reduce) {
  .steam-hit .actor-ground-pad,.steam-warm .actor-ground-pad::after,.steam-hot .actor-ground-pad::after { animation:none; }
}


.practice-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.practice-picker p,.practice-picker button { grid-column:1/-1; }
.practice-picker label { display:grid; gap:4px; min-width:0; color:#e6cd98; }
.practice-picker select { box-sizing:border-box; width:100%; min-width:0; min-height:36px; color:#ffdfa2; border:1px solid #987841; border-radius:6px; background:#262926; }
.practice-picker button { justify-self:end; min-height:36px; }


/* The shared glass value affects only surfaces that already use blur. */
body.mobile-webview-opt { --tower-glass: blur(4px); }
body.tier-high.gfx-hd { --tower-glass: blur(8px); }
body.mobile-webview-opt.gfx-smooth, body.tier-low { --tower-glass: none; }

body.tier-low *, body.tier-low *::before, body.tier-low *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
body.tier-low :is(.glass, .classic-bubble, .fighter-hud, .battle-bottom-hud, .modal-box,
  .card-box, .setsuna-field-btn, .battle-tactic-bar, .toast-bar, .adventure-panel, .adventure-forge, .collection-tabs) {
  background-color: rgba(12, 18, 28, 0.78);
}
body.mobile-webview-opt :is(.fighter-hud, .battle-bottom-hud, .modal-box) { contain: layout style; }
body.mobile-webview-opt :is(.clean-card, [class^="boiler-ring-"], [class*=" boiler-ring-"]),
body.mobile-webview-opt .boiler-ring-floor::before, body.mobile-webview-opt .boiler-ring-floor::after {
  filter: none !important;
}
body.mobile-webview-opt :is(.inspect-face, .inspect-face-back, .inspect-face *, .clean-card, .clean-card *) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Battle overlays above the live canvas use a static tint. Modal glass is independent. */
body.mobile-webview-opt .battle-godrays { display: none !important; }
body.mobile-webview-opt .battle-camera :is(.hud-top-row, .battle-bottom-hud, .battle-tactic-bar, .fighter-hud, .debuff-badge),
body.mobile-webview-opt #stageRoot:has(.battle-camera) > .toast-bar {
  --tower-glass: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.mobile-webview-opt .battle-camera .fighter-hud { background: transparent; }
body.mobile-webview-opt .battle-camera .battle-tactic-bar,
body.mobile-webview-opt #stageRoot:has(.battle-camera) > .toast-bar {
  background: linear-gradient(110deg, rgba(12, 18, 28, .66), rgba(59, 45, 27, .48));
}

/* Landscape release notes and integrity verification. */
.tower-update { box-sizing:border-box; width:min(36rem,90vw); max-height:86vh; overflow:auto;
  padding:clamp(14px,3vh,28px); color:#f7ecd5; background:linear-gradient(125deg,#242a30ed,#20252bea);
  border:1px solid #b39458; border-radius:14px; backdrop-filter:blur(8px); }
.tower-update::backdrop { background:rgba(11,15,20,.48); }
.tower-update h2 { margin:0 0 .6em; color:#f8d698; font-size:clamp(18px,3vw,28px); }
.tower-update ul { padding-inline-start:1.25em; white-space:pre-wrap; overflow-wrap:anywhere; }
.tower-update progress { width:100%; accent-color:#e4b46b; }
.update-actions { display:flex; flex-wrap:wrap; gap:8px; }
.update-actions button { min-height:40px; }
.tower-update [hidden], .tower-update-pill[hidden] { display:none; }
.tower-update .update-status { font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
body.tower-update-in-background {
  --update-strip:calc(var(--safe-t) + 30px);
}
body.tower-update-in-background .viewport { margin-top:var(--update-strip); }
.tower-update-pill {
  position:fixed; z-index:100; top:calc(var(--safe-t) + 2px);
  right:max(var(--safe-r),24%); max-width:calc(100% - var(--safe-l) - var(--safe-r) - 12px);
  min-height:26px; padding:3px 12px; border:1px solid #a9834f; border-radius:999px;
  background:rgba(38,33,27,.86); color:#f4dfba; font:600 12px/1.3 system-ui,sans-serif;
  font-variant-numeric:tabular-nums; pointer-events:auto; -webkit-app-region:no-drag;
}
body:has(.win-drag-bar:not([hidden])) .tower-update-pill { top:calc(34px + var(--safe-t)); }
.tower-update-pill[data-phase="ready"] { border-color:#f3ce80; color:#ffdf9d; }
.tower-update-pill:focus-visible { outline:2px solid #efcf88; outline-offset:1px; }
@media (max-height:440px) {
  .tower-update { max-height:calc(100% - var(--safe-t) - var(--safe-b) - 8px); padding:12px 16px; }
  .tower-update .update-actions { gap:6px; }
  .tower-update .update-actions button { min-height:34px; }
}

/* The open hand follows the tallest HUD column, including wrapped status badges. */
.duel-top-layers {
  position: absolute; inset: calc(var(--safe-t) + 6px) 0 auto;
  z-index: 22; pointer-events: none; display: grid; row-gap: 8px;
}
.duel-top-layers > .hud-top-row {
  position: relative; inset: auto; margin-inline: calc(var(--safe-l) + 10px) calc(var(--safe-r) + 94px);
  z-index: 2; min-width: 0;
}
.duel-top-layers .battle-center-banner { min-width: 0; }
.duel-top-layers .pvp-timer-slot, .duel-top-layers .battle-float-log {
  position: static; transform: none; max-width: 100%; margin: 2px auto 0;
}
.duel-top-layers > #pvpTurnOrderSlot:empty { display: none; }
.duel-top-layers > .multi-opp-open-zone {
  position: relative; inset: auto; transform: none; justify-self: center; z-index: 1; transition: none;
}
.duel-top-layers .debuff-mini-bar { gap: 4px; }
@media (orientation: landscape) and (max-height: 450px) {
  .duel-top-layers .battle-center-banner { padding-block: 0; }
  .duel-top-layers .battle-center-banner strong { line-height: 1.15; }
  .duel-top-layers .pvp-turn-timer .pvp-timer-num { display: inline; font-size: 12px; }
  .duel-top-layers .debuff-badge.has-label { padding-inline: 4px; font-size: 10px; }
}
@media (orientation: portrait) and (max-width: 640px) {
  .duel-top-layers > .hud-top-row { margin-right: calc(var(--safe-r) + 10px); }
}
