/**
 * 《牌宗》手感层 — 克制版
 * 加载于 clean.css 之后；只做跟手反馈，不做花哨堆叠
 */

/* ===== 手牌：轻扇形 + 跟手抬起 ===== */
.hand-cards {
  perspective: 800px;
  padding: 26px 18px 16px !important;
  min-height: calc(var(--card-h) + 48px) !important;
  align-items: flex-end;
}

.hand-cards .card {
  margin-left: var(--fan-ml, -20px) !important;
  transform-origin: 50% 110%;
  transition:
    transform 0.13s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.12s ease,
    border-color 0.1s ease,
    margin-left 0.12s ease;
  transform:
    translateY(var(--fan-y, 0px))
    rotate(var(--fan-rot, 0deg));
  will-change: transform;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.hand-cards .card:first-child {
  margin-left: 0 !important;
}

.hand-cards .card:hover {
  transform:
    translateY(calc(var(--fan-y, 0px) - 16px))
    rotate(var(--fan-rot, 0deg))
    scale(1.04);
  z-index: 90 !important;
  border-color: rgba(212, 175, 55, 0.8) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35) !important;
}

.hand-cards .card.selected {
  transform:
    translateY(calc(var(--fan-y, 0px) - 28px))
    rotate(calc(var(--fan-rot, 0deg) * 0.35))
    scale(1.05);
  z-index: 130 !important;
  border-color: #e0c15a !important;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.65),
    0 14px 28px rgba(0, 0, 0, 0.4) !important;
}

.hand-cards .card.selected:hover {
  transform:
    translateY(calc(var(--fan-y, 0px) - 30px))
    rotate(calc(var(--fan-rot, 0deg) * 0.35))
    scale(1.06);
}

/* 点选瞬间 */
.hand-cards .card.tap {
  animation: card-tap 0.16s ease;
}
@keyframes card-tap {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.18); }
  100% { filter: brightness(1); }
}

/* 推荐/高亮 */
.hand-cards .card.hint {
  box-shadow:
    0 0 0 2px rgba(61, 207, 154, 0.7),
    0 8px 18px rgba(61, 207, 154, 0.25) !important;
}

.hand-cards .card.frozen {
  opacity: 0.42 !important;
  filter: grayscale(0.8) !important;
  pointer-events: none;
  transform: translateY(4px) !important;
}

/* ===== 按钮跟手 ===== */
.btn:active:not(:disabled) {
  transform: scale(0.96);
  transition: transform 0.05s ease !important;
}
#btn-play.ready-play:not(:disabled) {
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4), 0 6px 18px rgba(212, 175, 55, 0.22);
}
#btn-play.can-clear:not(:disabled) {
  animation: clear-soft 1.6s ease-in-out infinite;
}
@keyframes clear-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 207, 154, 0.25), 0 6px 18px rgba(61, 207, 154, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(61, 207, 154, 0), 0 8px 22px rgba(61, 207, 154, 0.35); }
}
.btn.need-action:not(:disabled) {
  outline: 1px solid rgba(212, 175, 55, 0.45);
  outline-offset: 1px;
}

/* ===== 进度条跳动 ===== */
.bar-fill {
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.bar-fill.bump {
  animation: bar-bump 0.35s ease;
}
@keyframes bar-bump {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.45); }
  100% { filter: brightness(1); }
}
.score-num {
  display: inline-block;
  transition: color 0.15s;
}
.score-num.bump {
  animation: num-pop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--gold-light) !important;
}
.score-num.bump-enemy {
  animation: num-pop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  color: #fc8181 !important;
}
@keyframes num-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ===== 非法操作抖动 ===== */
.shake {
  animation: shake-x 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes shake-x {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}
.hand-area.shake,
.action-bar.shake {
  animation: shake-x 0.32s ease;
}

/* ===== 回合指示（克制） ===== */
.hand-area.your-turn {
  box-shadow:
    0 -6px 28px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(212, 175, 55, 0.28);
}
.hand-area.enemy-turn {
  opacity: 0.94;
}
.hand-area.enemy-turn .hand-cards {
  pointer-events: none;
}
.hand-area.enemy-turn .action-bar {
  opacity: 0.55;
  pointer-events: none;
}

/* ===== 桌面出牌落位 ===== */
.last-play .card.table-card {
  animation: table-deal 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.last-play .card.table-card:nth-child(1) { animation-delay: 0s; }
.last-play .card.table-card:nth-child(2) { animation-delay: 0.025s; }
.last-play .card.table-card:nth-child(3) { animation-delay: 0.05s; }
.last-play .card.table-card:nth-child(4) { animation-delay: 0.075s; }
.last-play .card.table-card:nth-child(5) { animation-delay: 0.1s; }
.last-play .card.table-card:nth-child(n+6) { animation-delay: 0.12s; }
@keyframes table-deal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.table-area.hit {
  animation: table-hit 0.38s ease;
}
@keyframes table-hit {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.28); }
  100% { filter: brightness(1); }
}

/* ===== 敌方牌背微动 ===== */
.enemy-cards.dealing .card-back {
  animation: enemy-deal 0.28s ease both;
}
.enemy-cards.dealing .card-back:nth-child(odd) { animation-delay: 0.02s; }
.enemy-cards.dealing .card-back:nth-child(even) { animation-delay: 0.05s; }
@keyframes enemy-deal {
  from { transform: translateY(-6px); opacity: 0.55; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== 飘分（桌面附近） ===== */
.float-score {
  position: fixed;
  z-index: 340;
  font-family: var(--display, serif);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: 1px;
  pointer-events: none;
  color: #f0d78c;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55), 0 0 16px rgba(212, 175, 55, 0.35);
  animation: float-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  white-space: nowrap;
}
.float-score.big {
  font-size: 44px;
  color: #9dffc0;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(61, 207, 154, 0.4);
}
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.7); }
  18% { opacity: 1; transform: translate(-50%, -6px) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -64px) scale(1); }
}

/* ===== 过牌轻微闪 ===== */
.table-felt.pass-flash {
  animation: pass-flash 0.35s ease;
}
@keyframes pass-flash {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.12); }
  100% { filter: brightness(1); }
}

/* ===== 提示条状态 ===== */
.hand-hint {
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  border-radius: 8px;
  padding: 2px 10px;
}
.hand-hint.can-play {
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
}
.hand-hint.can-clear {
  border-color: rgba(61, 207, 154, 0.5) !important;
  background: rgba(61, 207, 154, 0.1) !important;
}
.hand-hint.cannot-play {
  border: 1px solid rgba(240, 113, 120, 0.35);
  background: rgba(240, 113, 120, 0.08);
}

/* ===== chip 轻入 ===== */
.battle-info-row .chip {
  animation: chip-in 0.2s ease both;
}
@keyframes chip-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 日志最新一条强调 ===== */
.battle-log-panel div:first-child {
  color: var(--gold-light, #f0d78c);
}

/* ===== 破境竞速 ===== */
.race-desc {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted, #8b93a7);
}
.score-race {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.race-row {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.race-row.is-player {
  border-color: rgba(212, 175, 55, 0.22);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0.18));
}
.race-row.is-enemy {
  border-color: rgba(232, 93, 76, 0.22);
  background: linear-gradient(135deg, rgba(232, 93, 76, 0.08), rgba(0, 0, 0, 0.18));
}
.race-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.race-who {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text, #e8ecf4);
}
.race-row.is-player .race-who { color: var(--gold-light, #f0d78c); }
.race-row.is-enemy .race-who { color: #f0a090; }
.score-race .score-num {
  width: auto;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text, #e8ecf4);
  opacity: 1;
}
.score-race .bar-track {
  height: 8px;
  border-radius: 999px;
}
.race-tip {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted, #8b93a7);
  line-height: 1.35;
}
.race-tip.is-lead { color: #7dffa8; }
.race-tip.is-danger { color: #fc8181; }
.race-tip.is-near { color: var(--gold-light, #f0d78c); }
.race-vs {
  text-align: center;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(212, 175, 55, 0.45);
  line-height: 1;
}

/* ===== 本局资源 ===== */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.res-cell {
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.res-cell.is-warn {
  border-color: rgba(240, 113, 120, 0.35);
  background: rgba(240, 113, 120, 0.08);
}
.res-cell.is-good {
  border-color: rgba(61, 207, 154, 0.3);
  background: rgba(61, 207, 154, 0.07);
}
.res-label {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted, #8b93a7);
  margin-bottom: 2px;
}
.res-value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text, #e8ecf4);
}
.res-cell.is-warn .res-value { color: #fc8181; }
.res-cell.is-good .res-value { color: #7dffa8; }
.res-bar {
  margin-top: 5px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.res-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c9a227, #e85d4c);
  width: 0%;
  transition: width 0.3s ease;
}
.battle-info-row {
  gap: 5px;
}
.battle-info-row .chip {
  font-size: 10.5px;
  padding: 3px 8px;
}

/* ===== 机关/锦囊托盘 ===== */
.util-tray {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 10px 10px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(10, 14, 20, 0.55), rgba(8, 10, 16, 0.72));
  border: 1px solid rgba(212, 175, 55, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) inset;
}
.util-section { min-height: 0; }
.util-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.util-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.util-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-light, #f0d78c);
}
.util-sub {
  font-size: 10px;
  color: var(--muted, #8b93a7);
}
.util-meta {
  font-size: 11px;
  color: #9fd9c0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.util-empty {
  width: 100%;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(180, 188, 204, 0.55);
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

.jiguan-bar,
.jinnang-bar {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.jiguan-chip,
.jinnang-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 5px 10px 5px 5px;
  border-radius: 10px;
  border: 1px solid rgba(61, 207, 154, 0.35);
  background: rgba(12, 18, 16, 0.85);
  color: #c8f0dc;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.jiguan-chip:hover:not(:disabled),
.jinnang-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(125, 255, 168, 0.55);
  background: rgba(20, 36, 28, 0.95);
}
.jiguan-chip:active:not(:disabled),
.jinnang-chip:active:not(:disabled) {
  transform: scale(0.97);
}
.jinnang-chip {
  border-color: rgba(130, 150, 255, 0.4);
  color: #c8d2ff;
  background: rgba(12, 14, 28, 0.85);
}
.jinnang-chip:hover:not(:disabled) {
  border-color: rgba(160, 180, 255, 0.55);
  background: rgba(22, 26, 48, 0.95);
}
.jiguan-chip .chip-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.2;
}
.jiguan-chip .chip-name {
  font-weight: 700;
  letter-spacing: 0.5px;
}
.jiguan-chip .chip-desc {
  font-size: 10px;
  opacity: 0.72;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jiguan-chip .cost-pill {
  margin-left: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(61, 207, 154, 0.15);
  color: #7dffa8;
  border: 1px solid rgba(61, 207, 154, 0.3);
}
.jiguan-chip .cost-pill.is-paid {
  background: rgba(212, 175, 55, 0.12);
  color: #f0d78c;
  border-color: rgba(212, 175, 55, 0.35);
}
.jiguan-chip .cost-pill.is-short {
  background: rgba(240, 113, 120, 0.12);
  color: #fc8181;
  border-color: rgba(240, 113, 120, 0.35);
}

/* ===== 选角色/奇牌卡片 ===== */
.char-card,
.qipai-card,
.mode-card,
.codex-card,
.achieve-card {
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease !important;
}
.char-card:hover:not(.locked),
.qipai-card:hover,
.mode-card:hover {
  transform: translateY(-2px);
}
.char-card.selected,
.qipai-card.selected,
.mode-card.selected {
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.55), 0 8px 22px rgba(0, 0, 0, 0.3);
}

/* ===== 屏幕切换 ===== */
.screen.active {
  animation: screen-in 0.22s ease both;
}
@keyframes screen-in {
  from { opacity: 0.88; }
  to { opacity: 1; }
}

/* ===== 选中序号角标 ===== */
.hand-cards .card.has-pick::after {
  content: attr(data-pick);
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f0d78c, #d4af37);
  color: #1a1408;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 5;
  pointer-events: none;
}

/* ===== 机关/锦囊不可用 ===== */
.jiguan-chip.is-disabled,
.jinnang-chip.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.jiguan-chip.no-token .cost {
  color: #fc8181 !important;
}
.jiguan-chip .cost.free {
  color: #7dffa8;
  opacity: 0.9;
}
.jiguan-bar.used-flash {
  animation: used-flash 0.32s ease;
}
@keyframes used-flash {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.35); }
  100% { filter: brightness(1); }
}

/* ===== 商店买不起 ===== */
.shop-item.unaffordable {
  opacity: 0.72;
}
.shop-item .price.short {
  color: #fc8181 !important;
}

/* ===== 地图关卡标签 ===== */
.stage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.stage-tag {
  font-style: normal;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.stage-tag.now {
  color: #1a1408;
  background: linear-gradient(135deg, #f0d78c, #d4af37);
  border-color: transparent;
  font-weight: 700;
}
.map-stage.current {
  border-color: rgba(212, 175, 55, 0.45) !important;
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.15);
}
.map-stage.done {
  opacity: 0.7;
}

/* ===== 出牌按钮动态文案 ===== */
#btn-play span {
  white-space: nowrap;
}

/* ===== 机关/锦囊发动演出 ===== */
.cast-fx {
  position: fixed;
  left: 50%;
  top: 22%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 260;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.cast-fx.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cast-fx-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  border: 2px solid rgba(61, 207, 154, 0.45);
  animation: cast-ring 0.9s ease-out forwards;
  pointer-events: none;
}
.cast-fx.show.fx-strike .cast-fx-ring,
.cast-fx.show.fx-seal .cast-fx-ring { border-color: rgba(252, 129, 129, 0.5); }
.cast-fx.show.fx-ice .cast-fx-ring { border-color: rgba(144, 205, 244, 0.55); }
.cast-fx.show.fx-buff .cast-fx-ring,
.cast-fx.show.fx-heal .cast-fx-ring { border-color: rgba(212, 175, 55, 0.55); }
@keyframes cast-ring {
  0% { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}
.cast-fx-card {
  position: relative;
  min-width: 280px;
  max-width: min(420px, 92vw);
  padding: 18px 22px 16px;
  border-radius: 14px;
  text-align: center;
  background: rgba(12, 16, 24, 0.96);
  border: 1px solid rgba(61, 207, 154, 0.5);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 24px rgba(61, 207, 154, 0.12);
}
.cast-fx.is-jinnang .cast-fx-card {
  border-color: rgba(144, 168, 255, 0.55);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 24px rgba(110, 140, 255, 0.16);
}
.cast-fx.is-jinnang .cast-fx-kind { color: #b8c7ff; }
.cast-fx.fx-buff .cast-fx-card,
.cast-fx.fx-heal .cast-fx-card {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 24px rgba(212, 175, 55, 0.14);
}
.cast-fx.fx-strike .cast-fx-card,
.cast-fx.fx-seal .cast-fx-card {
  border-color: rgba(252, 129, 129, 0.5);
}
.cast-fx.fx-ice .cast-fx-card {
  border-color: rgba(144, 205, 244, 0.55);
}
.cast-fx-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: cast-icon 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cast-icon {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.cast-fx-kind {
  font-size: 11px;
  letter-spacing: 4px;
  color: #7dffa8;
  margin-bottom: 4px;
}
.cast-fx.fx-buff .cast-fx-kind,
.cast-fx.fx-heal .cast-fx-kind { color: var(--gold-light, #f0d78c); }
.cast-fx-name {
  font-family: var(--display, serif);
  font-size: 22px;
  font-weight: 700;
  color: #e8ecf1;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.cast-fx-desc {
  font-size: 12px;
  color: var(--muted, #9aa4b2);
  line-height: 1.45;
  margin-bottom: 10px;
}
.cast-fx-effect {
  font-size: 15px;
  font-weight: 600;
  color: #7dffa8;
  line-height: 1.45;
  margin-bottom: 6px;
}
.cast-fx.fx-strike .cast-fx-effect,
.cast-fx.fx-seal .cast-fx-effect { color: #fc8181; }
.cast-fx.fx-ice .cast-fx-effect { color: #90cdf4; }
.cast-fx.fx-buff .cast-fx-effect,
.cast-fx.fx-heal .cast-fx-effect,
.cast-fx.fx-shield .cast-fx-effect { color: #f0d78c; }
.cast-fx-extra {
  font-size: 11px;
  color: var(--muted, #9aa4b2);
  line-height: 1.4;
}
.cast-modal-desc {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* 区域短促反馈 */
.enemy-area.fx-seal,
.enemy-area.fx-strike,
.enemy-area.fx-ice,
.enemy-area.fx-steal {
  animation: enemy-hit 0.5s ease;
}
@keyframes enemy-hit {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.35) saturate(1.2); }
  100% { filter: brightness(1); }
}
.enemy-area.fx-ice { animation-name: enemy-ice; }
@keyframes enemy-ice {
  0% { filter: brightness(1) hue-rotate(0deg); }
  40% { filter: brightness(1.25) hue-rotate(30deg); }
  100% { filter: brightness(1) hue-rotate(0deg); }
}
.hand-area.fx-buff,
.hand-area.fx-heal,
.hand-area.fx-shield,
.hand-area.fx-draw,
.hand-area.fx-morph,
.hand-area.fx-clear {
  animation: hand-cast 0.48s ease;
}
@keyframes hand-cast {
  0% { box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.35); }
  40% { box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 175, 55, 0.55), 0 0 28px rgba(212, 175, 55, 0.2); }
  100% { box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.35); }
}
.table-felt.fx-ripple {
  animation: table-ripple 0.4s ease;
}
@keyframes table-ripple {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.18); }
  100% { filter: brightness(1); }
}
.jinnang-bar.used-flash {
  animation: used-flash 0.32s ease;
}

/* ===== 新手引导（金漆暗纹卷轴风） ===== */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  pointer-events: none;
}
.guide-overlay.show {
  display: block;
}
.guide-dim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(40, 32, 18, 0.15) 0%, transparent 55%),
    rgba(4, 6, 12, 0.52);
  pointer-events: none;
}
.guide-hole {
  position: absolute;
  z-index: 1;
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px rgba(4, 6, 12, 0.62),
    0 0 0 2px rgba(212, 175, 55, 0.85),
    0 0 0 6px rgba(212, 175, 55, 0.12),
    0 0 28px rgba(212, 175, 55, 0.28);
  pointer-events: none;
  transition: left 0.22s ease, top 0.22s ease, width 0.22s ease, height 0.22s ease;
}
.guide-hole::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 18px;
  border: 1px dashed rgba(240, 215, 140, 0.35);
  pointer-events: none;
  opacity: 0.7;
}

/* 默认屏幕居中，避免 JS 未跑时掉到文档流角落 */
.guide-card {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 28px));
  max-height: min(78vh, 560px);
  border-radius: 16px;
  pointer-events: auto;
  overflow: hidden;
  /* 漆面底 + 生成 panel 纹理 */
  background:
    linear-gradient(165deg, rgba(18, 22, 32, 0.55) 0%, rgba(8, 10, 16, 0.72) 100%),
    url('../assets/ui/guide/panel.jpg') center / cover no-repeat;
  border: 1px solid rgba(212, 175, 55, 0.55);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 230, 160, 0.06) inset,
    0 1px 0 rgba(255, 220, 140, 0.12) inset;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.guide-overlay.show .guide-card {
  opacity: 1;
}
.guide-card-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255, 230, 160, 0.08) 0%, transparent 32%, transparent 68%, rgba(120, 90, 40, 0.08) 100%);
  z-index: 0;
}
.guide-card-inner {
  position: relative;
  z-index: 1;
  padding: 16px 16px 14px;
  max-height: min(78vh, 560px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.35) transparent;
}

.guide-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.guide-icon-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
}
.guide-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(40, 36, 28, 0.9), rgba(12, 14, 20, 0.95)),
    center / cover no-repeat;
  border: 1px solid rgba(212, 175, 55, 0.55);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.4) inset;
  background-size: cover;
  background-position: center;
}
.guide-badge {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  min-width: 36px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #1a1208;
  background: linear-gradient(180deg, #f3e0a0 0%, #d4af37 55%, #a8862a 100%);
  border: 1px solid rgba(255, 240, 180, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  font-weight: 700;
}
.guide-head-text {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}
.guide-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.guide-seal-mini {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: url('../assets/ui/guide/seal.jpg') center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
  flex-shrink: 0;
}
.guide-kicker-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(212, 175, 55, 0.85);
  text-transform: none;
}
.guide-title {
  font-family: var(--display, serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-light, #f0d78c);
  letter-spacing: 1px;
  line-height: 1.3;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  margin: 0 0 6px;
}
.guide-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.guide-progress {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(212, 175, 55, 0.75);
  white-space: nowrap;
}
.guide-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.guide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.guide-dot.done {
  background: rgba(212, 175, 55, 0.45);
  border-color: rgba(212, 175, 55, 0.5);
}
.guide-dot.current {
  background: linear-gradient(180deg, #f3e0a0, #d4af37);
  border-color: #f0d78c;
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.55);
}

.guide-divider {
  height: 14px;
  margin: 4px 0 12px;
  background: url('../assets/ui/guide/divider.jpg') center / auto 100% no-repeat;
  opacity: 0.9;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.guide-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: #d2d8e2;
  margin-bottom: 12px;
}
.guide-body b { color: #f0d78c; font-weight: 700; }
.guide-body kbd {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.1);
  font-size: 11px;
  color: #f0d78c;
  font-family: inherit;
}

.guide-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: #b8f5d0;
  background:
    linear-gradient(90deg, rgba(61, 207, 154, 0.14), rgba(61, 207, 154, 0.06));
  border: 1px solid rgba(61, 207, 154, 0.35);
  border-left: 3px solid rgba(125, 255, 168, 0.75);
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.guide-hint-ico {
  color: #7dffa8;
  flex-shrink: 0;
  margin-top: 1px;
  text-shadow: 0 0 8px rgba(125, 255, 168, 0.5);
}
.guide-hint-text { flex: 1; }

.guide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.guide-btn-next {
  min-width: 96px;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.2);
}
.guide-btn-skip {
  opacity: 0.85;
}

.guide-target {
  position: relative;
  z-index: 283 !important;
}
.guide-target .card,
.guide-target button {
  position: relative;
  z-index: 284;
}
.guide-pulse-btn {
  animation: guide-btn-pulse 1s ease-in-out 3;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.7) !important;
  outline: 2px solid rgba(212, 175, 55, 0.55);
  outline-offset: 3px;
}
@keyframes guide-btn-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@media (max-width: 480px) {
  .guide-card { width: calc(100vw - 20px); }
  .guide-icon-wrap,
  .guide-icon { width: 52px; height: 52px; }
  .guide-title { font-size: 16px; }
}

/* ===== 标题大堂重构 ===== */
#screen-title.screen-title {
  overflow: auto;
}
#screen-title .title-bg-art {
  background:
    linear-gradient(105deg, rgba(6, 8, 12, 0.88) 0%, rgba(6, 8, 12, 0.42) 42%, rgba(6, 8, 12, 0.78) 100%),
    linear-gradient(180deg, rgba(6, 8, 12, 0.2) 0%, rgba(6, 8, 12, 0.92) 100%),
    url('../assets/shell/title_hall.jpg') center / cover no-repeat !important;
}
.title-vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 30% 45%, rgba(212, 175, 55, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(40, 60, 90, 0.12), transparent 55%);
}
#screen-title .title-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.75fr);
  gap: 28px 40px;
  align-items: center;
  padding: 28px 40px 36px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  min-height: calc(100dvh - var(--header-h, 58px) - 8px);
}

.title-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(212, 175, 55, 0.72);
}
.title-kicker-line {
  flex: 1;
  max-width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
}

.title-brand-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
#screen-title .title-seal {
  width: 88px;
  height: 88px;
  margin-bottom: 0;
  flex-shrink: 0;
  border-radius: 12px;
  border-width: 2px;
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.45),
    0 0 36px rgba(212, 175, 55, 0.18);
}
#screen-title .title-main {
  margin-bottom: 8px;
  font-size: clamp(52px, 6.5vw, 80px);
  letter-spacing: 14px;
  text-indent: 14px;
  line-height: 1.05;
}
#screen-title .title-sub {
  max-width: 380px;
  font-size: 14px;
  letter-spacing: 1.5px;
  line-height: 1.6;
  color: rgba(200, 208, 220, 0.78);
}

#screen-title .title-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
  max-width: 520px;
}
#screen-title .stat-card {
  min-width: 0;
  padding: 12px 10px;
  text-align: center;
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.16);
  backdrop-filter: blur(12px);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
#screen-title .stat-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}
#screen-title .stat-card span {
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: 2px;
}
#screen-title .stat-card strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

/* 主 CTA */
.title-cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.title-cta-main {
  display: inline-flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 2px;
  min-width: 260px !important;
  padding: 16px 28px !important;
  border-radius: 14px !important;
  box-shadow:
    0 8px 28px rgba(212, 175, 55, 0.22),
    0 2px 0 rgba(255, 240, 180, 0.2) inset !important;
}
.title-cta-main .cta-label {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
}
.title-cta-main .cta-hint {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 500;
  letter-spacing: 1px;
}
.title-cta-resume {
  font-size: 12px !important;
  padding: 6px 12px !important;
  opacity: 0.9;
}
.title-cta-continue {
  font-size: 13px !important;
  padding: 10px 16px !important;
  margin-top: 8px;
  width: 100%;
  max-width: 360px;
  justify-content: center;
  background: linear-gradient(180deg, rgba(56, 178, 172, 0.35), rgba(26, 100, 96, 0.45)) !important;
  border-color: rgba(72, 187, 180, 0.55) !important;
  box-shadow: 0 0 18px rgba(56, 178, 172, 0.18);
}

/* 模式卡片 */
.title-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  max-width: 560px;
}
.title-mode-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(10, 12, 18, 0.58);
  backdrop-filter: blur(10px);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.title-mode-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(16, 18, 26, 0.78);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}
.title-mode-card:active {
  transform: translateY(0);
}
.title-mode-card .mode-ico {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.28);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.title-mode-card .mode-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.title-mode-card .mode-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light, #f0d78c);
  letter-spacing: 1px;
}
.title-mode-card .mode-text em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted, #8b93a7);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 次级链接 */
.title-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.title-link-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
}
.link-group-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(212, 175, 55, 0.55);
  margin-right: 6px;
  min-width: 28px;
}
.title-link {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(200, 208, 220, 0.78);
  font-family: inherit;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.title-link:hover {
  color: var(--gold-light, #f0d78c);
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.2);
}
.title-link.is-accent {
  color: var(--gold-light, #f0d78c);
  border-color: rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.06);
}

#screen-title .title-quote {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 5px;
  color: rgba(212, 175, 55, 0.45);
}

/* 右侧路径面板 */
.title-side {
  align-self: stretch;
  display: flex;
  align-items: center;
}
.title-side-panel {
  width: 100%;
  padding: 20px 18px 16px;
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(14, 16, 24, 0.78), rgba(8, 10, 16, 0.88)),
    url('../assets/shell/panel.jpg') center / cover no-repeat;
  border: 1px solid rgba(212, 175, 55, 0.28);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.3) inset;
  backdrop-filter: blur(14px);
}
.side-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.side-panel-head h3 {
  margin: 0;
  font-family: var(--display, serif);
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--gold-light, #f0d78c);
  font-weight: 700;
}
.side-panel-head-sub {
  margin-top: 18px;
  margin-bottom: 10px;
}
.side-panel-tag {
  font-size: 10px;
  letter-spacing: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  color: rgba(212, 175, 55, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.08);
}
.path-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.path-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.path-list li:hover {
  background: rgba(212, 175, 55, 0.06);
  border-color: rgba(212, 175, 55, 0.22);
  transform: translateX(2px);
}
.path-list b {
  color: var(--text, #e8ecf4);
  font-weight: 700;
  letter-spacing: 1px;
}
.path-list span {
  color: var(--muted, #8b93a7);
  font-size: 11px;
  text-align: right;
}

#screen-title .sect-icons {
  gap: 6px;
}
#screen-title .sect-icon {
  width: 44px;
  height: 44px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
#screen-title .sect-icon-item:hover .sect-icon {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
#screen-title .sect-icon-item em {
  font-size: 10px;
}

.side-progress {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(212, 175, 55, 0.14);
}
.side-progress-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(212, 175, 55, 0.7);
  margin-bottom: 6px;
}
#screen-title .side-tip {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(200, 208, 220, 0.82);
  background: none;
  border: none;
  padding: 0;
}

@media (max-width: 1100px) {
  #screen-title .title-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px 28px 32px;
  }
  .title-side {
    max-width: 520px;
  }
  .title-modes {
    max-width: none;
  }
}
@media (max-width: 780px) {
  #screen-title .title-stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }
  .title-modes {
    grid-template-columns: 1fr;
  }
  .title-brand-row {
    gap: 14px;
  }
  #screen-title .title-seal {
    width: 68px;
    height: 68px;
  }
  #screen-title .title-main {
    letter-spacing: 10px;
    font-size: 48px;
  }
  .title-cta-main {
    width: 100%;
    min-width: 0 !important;
  }
}

/* ===== 存档弹层 ===== */
.save-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 940;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
}
.save-modal-overlay.show {
  display: flex;
}
.save-modal-card {
  width: min(520px, 96vw);
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: 20px 18px 16px;
  border-radius: 16px;
  background: rgba(12, 14, 20, 0.98);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
}
.save-modal-card h3 {
  margin: 0 0 8px;
  font-family: var(--display, serif);
  color: var(--gold-light, #f0d78c);
  letter-spacing: 2px;
}
.save-modal-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted, #9aa4b2);
}
.save-modal-text {
  width: 100%;
  box-sizing: border-box;
  min-height: 180px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #d8dee8;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  resize: vertical;
}
.save-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* 窄屏顶栏可横滑 */
@media (max-width: 900px) {
  .app-header {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .header-nav {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 6px;
    padding-bottom: 2px;
  }
  .header-nav .nav-link {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* 减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  .hand-cards .card,
  .bar-fill,
  .last-play .card.table-card,
  .float-score,
  .screen.active,
  #btn-play.can-clear:not(:disabled),
  .guide-card,
  .guide-pulse-btn,
  .title-mode-card,
  .stat-card {
    animation: none !important;
    transition: none !important;
  }
}
