/* ============================================================
 * 班级宠物积分 · 样式
 * 视觉：清爽数码育成教室 —— 淡蓝底、白卡、深蓝正文、蓝主操作、
 * 青绿=进步、橙红=扣分/高影响。基础色 #F3F7FD #FFFFFF #172B4D
 * #2563EB #0F766E #C2410C（均通过对比度检查）
 * ============================================================ */
:root {
  --bg: #F3F7FD;
  --card: #FFFFFF;
  --ink: #172B4D;
  --ink-2: #44546F;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --teal: #0F766E;
  --danger: #C2410C;
  --line: #DCE4F2;
  --ok: #0F766E;
  --warn-bg: #FFF7ED;
  --radius: 14px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
img { -webkit-user-drag: none; }

/* ---------- 顶部 ---------- */
.app-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 2px solid var(--line);
  flex-wrap: wrap;
}
.header-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-title { font-size: 24px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; margin-right: 8px; }
.app-logo { font-size: 22px; }
.header-stat { color: var(--ink-2); font-size: 15px; white-space: nowrap; }
.header-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav-btn {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 8px 14px;
  border-radius: 10px; text-decoration: none;
  color: var(--ink); font-size: 16px; border: 2px solid transparent;
}
.nav-btn:hover { background: #EEF4FF; }
.nav-btn.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-btn:focus-visible { outline: 3px solid #9DB9F5; outline-offset: 1px; }
.header-right { display: flex; align-items: center; gap: 6px; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 16px;
  background: #fff; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 16px; cursor: pointer;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:focus-visible { outline: 3px solid #9DB9F5; outline-offset: 1px; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn-danger:hover { background: #9A3412; color: #fff; }
.btn-danger-ghost { border-color: #F3C9AF; color: var(--danger); background: #FFF7ED; }
.btn-danger-ghost:hover { border-color: var(--danger); color: #9A3412; }
.btn-mini { min-height: 34px; padding: 4px 10px; font-size: 14px; border-radius: 8px; }
.btn-active { border-color: var(--primary); color: var(--primary); background: #EEF4FF; font-weight: 600; }
.btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.btn-col { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.btn-fight { font-size: 20px; padding: 10px 26px; }

.select, .search-input, .note-input {
  min-height: 44px; padding: 8px 12px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 15px; color: var(--ink);
}
.select:focus-visible, .search-input:focus-visible, .note-input:focus-visible,
input:focus-visible, textarea:focus-visible { outline: 3px solid #9DB9F5; outline-offset: 1px; }
input.invalid { border-color: var(--danger); background: #FFF7ED; }
.chk { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--primary); }
.chk-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.field-label { font-size: 14px; color: var(--ink-2); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #E7EDF8; color: var(--ink-2); font-size: 12px; margin-left: 6px;
  vertical-align: middle;
}
.badge.big { font-size: 14px; padding: 4px 12px; }
.badge-demo { background: #FDE68A; color: #7C4A03; font-weight: 600; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

.app-main { padding: 14px 16px 60px; max-width: 1720px; margin: 0 auto; }
.view { min-height: 60vh; }

/* ---------- 存储状态条 ---------- */
.storage-banner {
  position: fixed; left: 12px; bottom: 12px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 6px 14px;
  border: 1.5px solid var(--line); box-shadow: 0 4px 14px rgba(23,43,77,.10);
  font-size: 14px;
}
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.st-unsaved .st-dot, .st-readonly .st-dot { background: #D97706; }
.st-restore .st-dot { background: var(--danger); }
.st-restore { border-color: #F3C9AF; background: var(--warn-bg); }
.st-detail { color: var(--ink-2); }

/* ---------- 宠物墙（紧凑卡片：一屏约 50 人，下滑看其余） ---------- */
.wall-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.wall-count { color: var(--ink-2); font-size: 14px; margin-left: auto; }
.wall-list {
  display: grid; gap: 7px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.stu-card {
  background: var(--card); border-radius: 10px;
  border: 1.5px solid var(--line);
  padding: 6px 5px 5px; text-align: center;
  cursor: pointer; position: relative;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  min-width: 0;
}
.stu-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(37,99,235,.14); transform: translateY(-2px); }
.stu-card:focus-visible { outline: 3px solid #9DB9F5; outline-offset: 2px; }
.stu-card.selected { border-color: var(--primary); background: #F0F6FF; box-shadow: 0 0 0 2px var(--primary) inset; }
.stu-card.archived { opacity: .55; filter: grayscale(.4); }
.stu-card.demo { background: #FFFBEB; }
.card-avatar-wrap { display: flex; justify-content: center; }
.pet-avatar {
  border-radius: 50%; background: #F5F9FF; border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  width: 132px; height: 132px;
}
.pet-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.pet-avatar.md { width: 58px; height: 58px; }
.pet-avatar.md img { padding: 1px; }
.pet-avatar.lg { width: 108px; height: 108px; }
.pet-avatar.sm { width: 44px; height: 44px; }
.pet-avatar.xl { width: 200px; height: 200px; }
.card-name-row { display: flex; justify-content: flex-start; align-items: baseline; gap: 3px; margin-top: 3px; min-height: 19px; }
.card-name { font-size: 13.5px; font-weight: 700; flex: 1 1 auto; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-name-row .badge { font-size: 9.5px; padding: 0 5px; margin-left: 0; flex: 0 0 auto; }
.card-score {
  font-size: 16.5px; font-weight: 800; color: var(--ink);
  font-variant-numeric: tabular-nums; line-height: 1.1; flex: 0 0 auto;
}
.card-score.neg { color: var(--danger); }
.card-form { font-size: 11px; color: var(--ink-2); margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-hint { font-size: 10.5px; line-height: 1.25; color: var(--teal); min-height: 13px; margin-top: 1px; }
.card-hint.warn { color: #B45309; }
.card-meta { display: flex; justify-content: flex-start; align-items: center; margin-top: 2px; }
.group-tag { font-size: 9.5px; background: #E7EDF8; border-radius: 999px; padding: 0 6px; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-tag.none { background: #EEF2F7; color: #7C8BA5; }
.card-no { font-size: 12px; color: #9AA7BD; font-variant-numeric: tabular-nums; }

/* 反馈动画 */
.stu-card.morph-evolve { animation: evolveGlow 1.2s ease; }
@keyframes evolveGlow {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,.0); }
  35% { box-shadow: 0 0 0 10px rgba(15,118,110,.25); border-color: var(--teal); transform: scale(1.04); }
  100% { box-shadow: 0 0 0 0 rgba(15,118,110,0); }
}
.stu-card.morph-devolve { animation: devolveFade .5s ease; }
@keyframes devolveFade {
  0% { background: #FFF7ED; }
  100% { background: var(--card); }
}
.fly-score {
  position: absolute; top: 26%; left: 50%; transform: translateX(-50%);
  font-size: 20px; font-weight: 800; pointer-events: none;
  text-shadow: 0 1px 2px rgba(255,255,255,.8);
  animation: flyUp 1.05s ease forwards;
}
.fly-score.plus { color: var(--teal); }
.fly-score.minus { color: var(--danger); }
@keyframes flyUp {
  0% { opacity: 0; transform: translate(-50%, 12px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -34px); }
}

@media (prefers-reduced-motion: reduce) {
  .stu-card, .fly-score, .btn { animation: none !important; transition: none !important; }
}

/* ---------- 进度条 ---------- */
.progress-track {
  background: #E7EDF8; border-radius: 999px; height: 10px; overflow: hidden;
}
.progress-track.mini { height: 8px; margin-top: 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--teal)); border-radius: 999px; transition: width .3s ease; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(23,43,77,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-panel {
  background: #fff; border-radius: 16px; padding: 18px 20px;
  width: min(560px, 94vw); max-height: 88vh; overflow: auto;
  box-shadow: 0 18px 50px rgba(23,43,77,.28);
}
.modal-panel.wide-panel { width: min(980px, 96vw); }
.modal-panel.eval-panel { width: min(720px, 96vw); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.modal-title { font-size: 22px; font-weight: 700; margin: 0; }
.modal-close {
  border: none; background: #EEF2F7; width: 40px; height: 40px; border-radius: 10px;
  font-size: 22px; cursor: pointer; color: var(--ink-2); line-height: 1;
}
.modal-close:hover { background: #E0E7F2; color: var(--ink); }
.confirm-text { font-size: 16px; white-space: pre-wrap; }
.confirm-detail { font-size: 14px; color: var(--ink-2); }
.warn-text { color: #B45309; font-size: 14px; }
.err-text { color: var(--danger); font-size: 14px; }
.plus-text { color: var(--teal); font-weight: 700; }

/* ---------- 评价弹窗 ---------- */
.eval-head { display: flex; align-items: center; gap: 14px; background: #F5F9FF; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.eval-head-info { display: flex; flex-direction: column; gap: 2px; }
.eval-name { font-size: 20px; font-weight: 700; }
.eval-pet { color: var(--ink-2); }
.eval-score { font-size: 18px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.rule-section { margin-bottom: 12px; }
.rule-title { font-size: 17px; margin: 4px 0 8px; }
.rule-title.plus { color: var(--teal); }
.rule-title.minus { color: var(--danger); }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rule-btn {
  min-height: 46px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; font-size: 14.5px; cursor: pointer; padding: 6px 8px;
}
.rule-btn:hover { border-color: currentColor; }
.rule-btn.plus { color: var(--teal); }
.rule-btn.minus { color: var(--danger); }
.rule-btn.busy { opacity: .6; }
.note-input { width: 100%; margin-top: 6px; }

/* ---------- 批量条 ---------- */
.batch-bar {
  position: sticky; bottom: 8px; z-index: 30;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 2px solid var(--primary);
  border-radius: 14px; padding: 10px 14px; margin-top: 10px;
  box-shadow: 0 8px 24px rgba(23,43,77,.16);
}
.batch-count { font-weight: 700; font-size: 17px; }
.batch-preview { flex: 1 1 240px; font-size: 13.5px; color: var(--ink-2); min-height: 20px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-hint { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--ink-2); }
.batch-submit { font-weight: 700; }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; }
.tbl th { background: #F0F5FD; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.tbl tr:hover td { background: #FAFCFF; }
.tbl td.neg { color: var(--danger); font-weight: 700; font-variant-numeric: tabular-nums; }
.tbl td.ops { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl tr.archived td { opacity: .6; }
.tbl tr.voided td { color: #8A97AE; }
.tbl td.note-cell { max-width: 220px; overflow-wrap: anywhere; }
.records-tbl, .roster-tbl { margin-top: 8px; }

/* ---------- 名单管理 ---------- */
.roster-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.roster-summary { color: var(--ink-2); font-size: 14px; margin: 6px 0; }
.import-ta { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; min-height: 160px; }
.import-preview { background: #F7FAFF; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 10px; }
.preview-list { margin: 4px 0; padding-left: 18px; font-size: 14px; }
.route-dialog .route-list { max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.route-item { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; }
.route-item.current { border-color: var(--teal); background: #F0FBF9; }
.route-title { font-weight: 600; margin-bottom: 6px; }
.route-preview { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.route-form { display: flex; flex-direction: column; align-items: center; width: 92px; flex: 0 0 auto; font-size: 12px; color: var(--ink-2); }
.route-form img { width: 84px; height: 63px; object-fit: contain; }
.route-form span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.groups-dialog .group-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.group-name { font-weight: 600; }
.group-meta { color: var(--ink-2); font-size: 13px; margin-right: auto; }
.rules-editor { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; max-height: 46vh; overflow: auto; }
.rule-row { display: flex; align-items: center; gap: 8px; }
.rule-order { width: 22px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rule-text-in { flex: 1; min-height: 40px; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.rule-val-in { width: 74px; min-height: 40px; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.threshold-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.threshold-cell { display: flex; flex-direction: column; gap: 4px; }
.threshold-cell input { width: 110px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 16px; }
.threshold-preview { min-height: 24px; margin-bottom: 8px; }
.attr-list { max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.attr-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.attr-name { font-size: 14.5px; }

/* ---------- 排行榜 ---------- */
.rank-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rank-opts { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.seg { display: inline-flex; background: #E7EDF8; border-radius: 10px; padding: 3px; }
.seg-btn { min-height: 40px; padding: 6px 16px; border: none; background: transparent; border-radius: 8px; font-size: 15.5px; cursor: pointer; color: var(--ink-2); }
.seg-btn.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 1px 4px rgba(23,43,77,.14); }
.rank-legend { color: var(--ink-2); font-size: 13.5px; margin: 8px 0; }
.rank-wrap { background: #fff; border-radius: 14px; padding: 10px 12px; }
.rank-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-1 { color: #D97706; } .rank-2 { color: #64748B; } .rank-3 { color: #B45309; }
.rank-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-more, .rank-note { color: var(--ink-2); font-size: 13.5px; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 10px; }

/* ---------- 对战 ---------- */
.arena { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: stretch; }
.arena-side {
  background: #fff; border-radius: 16px; border: 2px solid var(--line);
  min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 18px; text-align: center; position: relative; transition: box-shadow .2s, border-color .2s;
  min-width: 0; overflow: hidden;
}
.arena-side .pet-avatar.xl { width: 170px; height: 170px; }
.arena-side .arena-stu, .arena-side .arena-form, .arena-side .arena-attr { max-width: 100%; overflow-wrap: anywhere; }
.arena-side.empty { border-style: dashed; color: #9AA7BD; }
.arena-placeholder { font-size: 18px; }
.arena-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 180px; }
.arena-vs { font-size: 34px; font-weight: 900; color: var(--primary); letter-spacing: 2px; }
.arena-vs.win { color: var(--teal); font-size: 26px; }
.arena-tip, .arena-sub { color: var(--ink-2); font-size: 14px; margin: 0; }
.arena-error { color: var(--danger); font-size: 15px; }
.arena-stu { font-size: 20px; font-weight: 700; }
.arena-form { font-size: 16px; color: var(--ink-2); }
.arena-attr { font-size: 14px; color: var(--ink-2); }
.arena-side.enter { animation: enterIn .6s ease; }
@keyframes enterIn { from { opacity: .3; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.arena-side.attacking { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.18); transform: translateY(-4px); }
.arena-side.hit { animation: hitShake .3s ease; }
@keyframes hitShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.arena-side.win-glow { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(15,118,110,.18); }
.hp-bar { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 300px; }
.hp-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.hp-track { flex: 1; height: 14px; background: #E7EDF8; border-radius: 999px; overflow: hidden; }
.hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #16A34A, #86EFAC); transition: width .35s ease; border-radius: 999px; }
.hp-val { font-size: 13px; font-variant-numeric: tabular-nums; width: 30px; text-align: right; }
.arena-tools { display: flex; gap: 8px; margin-top: 10px; }
.formula-box { background: #fff; border: 1.5px dashed var(--line); border-radius: 12px; padding: 8px 14px; margin-top: 12px; }
.battle-history { margin-top: 14px; }
.battle-picker { margin-top: 14px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.picker-item {
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 8px; display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "av name score" "btns btns btns";
  align-items: center; gap: 4px 8px; cursor: pointer;
}
.picker-item:hover { border-color: var(--primary); }
.picker-item .pet-avatar { grid-area: av; }
.picker-name { grid-area: name; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.picker-score { grid-area: score; font-weight: 800; font-variant-numeric: tabular-nums; }
.picker-btns { grid-area: btns; display: flex; gap: 6px; }

/* ---------- 轻提示 ---------- */
.toast-area {
  position: fixed; top: 66px; right: 14px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; max-width: min(430px, 90vw);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 12px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-left: 5px solid var(--primary);
  box-shadow: 0 8px 22px rgba(23,43,77,.16);
  animation: toastIn .2s ease;
}
.toast-success { border-left-color: var(--teal); }
.toast-error { border-left-color: var(--danger); }
.toast-warn { border-left-color: #D97706; }
.toast-evolve { border-left-color: var(--teal); background: #F0FBF9; }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.toast-msg { flex: 1; font-size: 14.5px; }
.toast-action {
  border: none; background: var(--primary); color: #fff; border-radius: 8px;
  min-height: 36px; padding: 4px 14px; font-size: 14px; cursor: pointer; font-weight: 600;
}
.toast-close { border: none; background: transparent; font-size: 18px; color: var(--ink-2); cursor: pointer; }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center; padding: 46px 16px; color: var(--ink-2);
  background: #fff; border: 1.5px dashed var(--line); border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty-icon { font-size: 40px; }
.empty-title { font-size: 19px; font-weight: 700; color: var(--ink); margin: 0; }
.empty-desc { margin: 0 0 6px; font-size: 14.5px; max-width: 460px; }

/* ---------- 设置页 ---------- */
.settings-sec { margin-bottom: 22px; }
.sec-title { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.panel { background: #fff; border-radius: 14px; padding: 14px 16px; border: 1.5px solid var(--line); }
.danger-zone { margin-top: 12px; padding-top: 12px; border-top: 1.5px dashed #F3C9AF; }
.progress-track .progress-fill { background: var(--primary); }
.progress-label { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }

/* ---------- 展示模式（投屏：大字号大头像，保持规范要求） ---------- */
body.presentation .wall-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
body.presentation .card-name { font-size: 24px; }
body.presentation .card-name-row { margin-top: 8px; min-height: 30px; gap: 6px; }
body.presentation .card-score { font-size: 34px; }
body.presentation .card-form { font-size: 17px; white-space: normal; }
body.presentation .card-hint { font-size: 14.5px; }
body.presentation .card-meta { margin-top: 5px; }
body.presentation .group-tag { font-size: 13px; padding: 1px 10px; }
body.presentation .pet-avatar { width: 190px; height: 190px; }
body.presentation .pet-avatar.md { width: 190px; height: 190px; }
body.presentation .pet-avatar.md img { padding: 6px; }
body.presentation .app-title { font-size: 28px; }
body.presentation .stu-card { padding: 16px 12px 12px; border-radius: 14px; }
body.presentation .wall-toolbar .btn, body.presentation .wall-toolbar .select,
body.presentation .wall-toolbar .search-input, body.presentation .wall-toolbar .chk { display: none; }

/* ---------- 宠物图鉴（收藏卡） ---------- */
.album-list {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.album-mini {
  background: linear-gradient(165deg, #FFF8E1, #FDE9B8);
  border: 2.5px solid #F0A500; border-radius: 12px;
  padding: 5px; cursor: pointer; position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.album-mini:hover { transform: translateY(-3px) rotate(-.5deg); box-shadow: 0 8px 18px rgba(240,165,0,.35); }
.album-mini:focus-visible { outline: 3px solid #9DB9F5; outline-offset: 2px; }
.album-mini.demo { border-color: #D97706; background: linear-gradient(165deg, #FFFBEB, #FDE68A); }
.am-img {
  background: radial-gradient(120% 100% at 50% 22%, #3B82F6, #1D4ED8 70%, #1E40AF);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  height: 108px; overflow: hidden;
}
.am-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.am-name {
  text-align: center; font-size: 14.5px; font-weight: 800; color: #fff; margin-top: 4px;
  text-shadow: -1px -1px 0 #1E3A8A, 1px -1px 0 #1E3A8A, -1px 1px 0 #1E3A8A, 1px 1px 0 #1E3A8A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.am-stage {
  text-align: center; font-size: 10.5px; font-weight: 700; color: #BFDBFE;
  background: rgba(30, 58, 138, .85); border-radius: 999px; margin: 3px 14px 0; padding: 0 6px;
}
.am-foot { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 4px 1px; }
.am-atk { font-size: 12.5px; font-weight: 800; color: #B45309; font-variant-numeric: tabular-nums; }
.am-owner { font-size: 11.5px; color: #92400E; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-demo { position: absolute; top: 8px; right: 8px; margin: 0; }

/* 大卡（数码宝贝收藏卡） */
.album-panel { background: transparent !important; box-shadow: none !important; padding: 0 !important; width: auto !important; max-width: none !important; overflow: visible !important; }
.album-panel .modal-head { display: none; }
.album-panel .modal-body { padding: 0; }
.card-frame {
  position: relative;
  width: min(430px, 92vw);
  background: linear-gradient(160deg, #FFD54A, #FFB300 55%, #F59E0B);
  border-radius: 24px; padding: 13px;
  box-shadow: 0 18px 50px rgba(120, 53, 15, .45), inset 0 0 0 2px #FFE082;
  max-height: 86vh; overflow: auto;
}
.cf-pixel { position: absolute; width: 9px; height: 9px; background: #FDE047; box-shadow: 13px 0 #F59E0B, 0 13px #F59E0B, 13px 13px #FDE047; opacity: .9; }
.cf-pixel.tl { top: 16px; left: 16px; }
.cf-pixel.tr { top: 16px; right: 16px; }
.cf-pixel.bl { bottom: 16px; left: 16px; }
.cf-pixel.br { bottom: 16px; right: 16px; }
.cf-inner {
  position: relative;
  background: linear-gradient(180deg, #1E3A8A, #1D4ED8 52%, #2563EB);
  border: 3px solid #12275C; border-radius: 16px;
  padding: 12px 14px 12px; overflow: hidden;
}
.cf-deco {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(2.4px 2.4px at 18% 30%, #FDE047 40%, transparent 41%),
    radial-gradient(2px 2px at 76% 20%, #93C5FD 40%, transparent 41%),
    radial-gradient(2.6px 2.6px at 85% 55%, #FDE047 40%, transparent 41%),
    radial-gradient(2px 2px at 12% 72%, #93C5FD 40%, transparent 41%),
    radial-gradient(circle at 50% 62%, rgba(96,165,250,.28), transparent 46%),
    repeating-linear-gradient(115deg, rgba(147,197,253,.07) 0 10px, transparent 10px 26px);
}
.cf-owner {
  position: relative; display: inline-block;
  font-size: 12px; font-weight: 700; color: #DBEAFE;
  background: rgba(12, 32, 84, .75); border: 1px solid #3B82F6;
  border-radius: 999px; padding: 1px 10px; margin-bottom: 4px;
}
.cf-name {
  position: relative; text-align: center;
  font-size: 38px; line-height: 1.15; font-weight: 900; letter-spacing: 2px; color: #fff;
  text-shadow: -2px -2px 0 #12275C, 2px -2px 0 #12275C, -2px 2px 0 #12275C, 2px 2px 0 #12275C, 0 5px 12px rgba(2,6,23,.55);
}
.cf-stage {
  position: relative; text-align: center; margin: 6px auto 8px; width: fit-content;
  font-size: 19px; font-weight: 900; color: #EFF6FF;
  background: rgba(12, 32, 84, .8); border: 2px solid #60A5FA; border-radius: 10px;
  padding: 2px 26px; letter-spacing: 6px;
}
.cf-info { position: relative; display: flex; justify-content: space-between; gap: 8px; margin: 2px 4px 4px; }
.cf-info-left > div, .cf-info-right > div {
  font-size: 15.5px; font-weight: 800; color: #fff; line-height: 1.75;
  text-shadow: -1.5px -1.5px 0 #12275C, 1.5px -1.5px 0 #12275C, -1.5px 1.5px 0 #12275C, 1.5px 1.5px 0 #12275C;
  white-space: nowrap;
}
.cf-info-right { text-align: right; }
.cf-k { opacity: .95; }
.cf-num { color: #FDE047; font-variant-numeric: tabular-nums; }
.cf-figure {
  position: relative; height: 218px; margin: 2px 0;
  display: flex; align-items: flex-end; justify-content: center;
}
.cf-figure::after {
  content: ''; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 62%; height: 16px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(2, 6, 23, .45), transparent);
}
.cf-figure img { position: relative; max-width: 88%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(2,6,23,.4)); }
.cf-spark { position: absolute; color: #FDE047; text-shadow: 0 0 6px rgba(253, 224, 71, .9); font-size: 15px; }
.cf-spark.s1 { top: 8px; left: 12%; }
.cf-spark.s2 { top: 38%; right: 10%; font-size: 11px; }
.cf-spark.s3 { bottom: 34%; left: 7%; font-size: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .cf-spark { animation: cfTwinkle 2.2s ease-in-out infinite; }
  .cf-spark.s2 { animation-delay: .7s; }
  .cf-spark.s3 { animation-delay: 1.3s; }
  @keyframes cfTwinkle { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
}
.cf-divider {
  position: relative; height: 12px; border-radius: 999px; overflow: hidden;
  border: 2px solid #12275C; margin: 4px 2px 8px;
  background: linear-gradient(90deg,
    #1E40AF 0 16%, #3B82F6 16% 30%, #FBBF24 30% 48%, #F59E0B 48% 62%,
    #2563EB 62% 78%, #60A5FA 78% 88%, #F59E0B 88% 100%);
}
.cf-skills { position: relative; display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-bottom: 10px; }
.cf-skill {
  font-size: 14px; font-weight: 800; color: #1E3A8A;
  background: #DBEAFE; border: 2px solid #1E40AF; border-radius: 9px;
  padding: 3px 12px; letter-spacing: 1px;
}
.cf-skill.hl { background: #FBBF24; color: #7C2D12; border-color: #B45309; box-shadow: 0 0 0 2px rgba(253, 224, 71, .35); }
.cf-collection { position: relative; text-align: center; font-size: 15px; font-weight: 900; color: #7C2D12; letter-spacing: 3px; }
.cf-no { position: relative; text-align: center; font-size: 12.5px; font-weight: 800; color: #92400E; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.cf-close {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid #FDE047; background: #B45309; color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.cf-close:hover { background: #92400E; }

/* ---------- 进化图鉴 ---------- */
.evo-list {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}
.evo-mini {
  background: linear-gradient(165deg, #E0F2FE, #BAE6FD);
  border: 2.5px solid #0284C7; border-radius: 12px;
  padding: 5px; cursor: pointer; position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.evo-mini:hover { transform: translateY(-3px) rotate(.5deg); box-shadow: 0 8px 18px rgba(2,132,199,.35); }
.evo-mini:focus-visible { outline: 3px solid #9DB9F5; outline-offset: 2px; }
.evo-mini.demo { border-color: #0369A1; background: linear-gradient(165deg, #F0F9FF, #7DD3FC); }
.em-img {
  background: radial-gradient(120% 100% at 50% 22%, #0C4A6E, #075985 70%, #0C4A6E);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  height: 104px; overflow: hidden;
}
.em-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.em-name {
  text-align: center; font-size: 14.5px; font-weight: 800; color: #fff; margin-top: 4px;
  text-shadow: -1px -1px 0 #0C4A6E, 1px -1px 0 #0C4A6E, -1px 1px 0 #0C4A6E, 1px 1px 0 #0C4A6E;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.em-stage {
  text-align: center; font-size: 10.5px; font-weight: 700; color: #E0F2FE;
  background: rgba(7, 89, 133, .9); border-radius: 999px; margin: 3px 14px 0; padding: 0 6px;
}
.em-route {
  text-align: center; font-size: 10.5px; font-weight: 700; color: #0C4A6E;
  margin: 3px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.em-owner { text-align: center; font-size: 11.5px; color: #075985; margin: 1px 0 1px; }
.evo-mini .am-demo { position: absolute; top: 8px; right: 8px; margin: 0; }

/* 进化卡弹窗 */
.evo-panel { background: transparent !important; box-shadow: none !important; padding: 0 !important; width: auto !important; max-width: none !important; overflow: visible !important; }
.evo-panel .modal-head { display: none; }
.evo-panel .modal-body { padding: 0; }
.evo-frame {
  position: relative;
  width: min(880px, 94vw);
  background: linear-gradient(160deg, #38BDF8, #0EA5E9 55%, #0284C7);
  border-radius: 24px; padding: 13px;
  box-shadow: 0 18px 50px rgba(7, 55, 99, .45), inset 0 0 0 2px #BAE6FD;
  max-height: 88vh; overflow: auto;
}
.evo-head { position: relative; margin: 2px 6px 8px; }
.evo-head .cf-owner { margin-bottom: 6px; }
.evo-route-title { font-size: 24px; font-weight: 900; color: #fff; letter-spacing: 1px;
  text-shadow: -2px -2px 0 #0C4A6E, 2px -2px 0 #0C4A6E, -2px 2px 0 #0C4A6E, 2px 2px 0 #0C4A6E; }
.evo-route-series { font-size: 13px; font-weight: 700; color: #E0F2FE; margin-top: 2px; text-shadow: 0 1px 2px rgba(7,55,99,.6); }
.evo-chain {
  display: flex; gap: 6px; align-items: stretch;
  overflow-x: auto; padding: 10px 6px;
  background: rgba(7, 55, 99, .5); border: 2px solid rgba(186, 230, 253, .4); border-radius: 14px;
}
.evo-arrow { align-self: center; color: #FEF08A; font-size: 17px; flex: 0 0 auto; text-shadow: 0 1px 3px rgba(7,55,99,.6); }
.evo-node {
  width: 116px; flex: 0 0 auto; text-align: center; cursor: pointer;
  background: rgba(12, 74, 110, .55); border: 2px solid rgba(125, 211, 252, .4);
  border-radius: 12px; padding: 8px 4px 6px; position: relative;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.evo-node:hover { transform: translateY(-2px); border-color: #BAE6FD; }
.evo-node:focus-visible { outline: 3px solid #FDE047; outline-offset: 1px; }
.evo-node img { width: 78px; height: 66px; object-fit: contain; }
.evo-node .n-name {
  font-size: 13px; font-weight: 800; color: #fff; margin-top: 2px;
  text-shadow: -1px -1px 0 #0C4A6E, 1px -1px 0 #0C4A6E, -1px 1px 0 #0C4A6E, 1px 1px 0 #0C4A6E;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.evo-node .n-stage { font-size: 11px; font-weight: 700; color: #BAE6FD; }
.evo-node .n-th { font-size: 10.5px; font-weight: 700; color: #FEF08A; font-variant-numeric: tabular-nums; min-height: 14px; }
.evo-node.current { border-color: #FDE047; background: rgba(3, 105, 161, .85); box-shadow: 0 0 0 3px rgba(253, 224, 71, .35); }
.evo-node.selected { border-color: #FBBF24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .3); }
.evo-node.locked { opacity: .5; }
.evo-node .n-cur {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  font-size: 9.5px; font-weight: 800; color: #0C4A6E; background: #FDE047;
  border-radius: 999px; padding: 0 8px;
}
.evo-node .n-lock { position: absolute; top: 4px; right: 6px; font-size: 11px; }
.evo-detail {
  display: flex; gap: 14px; margin-top: 10px;
  background: rgba(7, 55, 99, .5); border: 2px solid rgba(186, 230, 253, .4); border-radius: 14px;
  padding: 12px; min-height: 190px;
}
.ed-img { flex: 0 0 auto; width: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ed-img img { width: 100%; height: 140px; object-fit: contain; filter: drop-shadow(0 5px 8px rgba(2,6,23,.4)); }
.ed-img-label {
  font-size: 12px; font-weight: 800; color: #E0F2FE; margin-top: 4px;
  background: rgba(7, 55, 99, .8); border-radius: 999px; padding: 1px 12px;
}
.ed-info { flex: 1 1 auto; min-width: 0; }
.ed-name { font-size: 26px; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  text-shadow: -2px -2px 0 #0C4A6E, 2px -2px 0 #0C4A6E, -2px 2px 0 #0C4A6E, 2px 2px 0 #0C4A6E; }
.ed-current-tag { font-size: 11.5px; font-weight: 800; color: #64748B; background: #E2E8F0; border-radius: 999px; padding: 2px 10px; text-shadow: none; }
.ed-current-tag.on { color: #713F12; background: #FDE047; box-shadow: 0 0 0 2px rgba(253, 224, 71, .4); }
.ed-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; }
.ed-meta-item { font-size: 14px; font-weight: 700; color: #E0F2FE; }
.ed-meta-item b { color: #FEF08A; }
.ed-moves { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.ed-k { font-size: 13.5px; font-weight: 800; color: #FEF08A; }
.ed-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.ed-stat {
  font-size: 13px; font-weight: 700; color: #F0F9FF;
  background: rgba(12, 74, 110, .8); border: 1.5px solid rgba(125, 211, 252, .5);
  border-radius: 9px; padding: 3px 10px; font-variant-numeric: tabular-nums;
}
.ed-stat b { color: #FDE047; }
.ed-note { font-size: 12px; color: #BAE6FD; margin: 6px 0 0; }

/* ---------- 对战平台 v2：3D 卡牌对战场景 ---------- */
.arena3d {
  position: relative; height: 460px; border-radius: 20px; overflow: hidden;
  perspective: 1150px; perspective-origin: 50% 38%;
  background: linear-gradient(180deg, #010409 0%, #041229 45%, #062a55 78%, #06335f 100%);
  border: 2px solid rgba(56, 189, 248, .25);
}
/* 数码空间：网格地面 / 光束 / 粒子 / 代码碎片 */
.space3d { position: absolute; inset: 0; pointer-events: none; }
.floor {
  position: absolute; left: -30%; bottom: -6%; width: 160%; height: 64%;
  transform: rotateX(64deg); transform-origin: bottom center;
  background:
    repeating-linear-gradient(90deg, rgba(56,189,248,.30) 0 2px, transparent 2px 64px),
    repeating-linear-gradient(0deg, rgba(56,189,248,.30) 0 2px, transparent 2px 64px),
    linear-gradient(180deg, rgba(2,6,23,0), rgba(8,47,93,.55));
  animation: gridFlow 1.4s linear infinite;
}
@keyframes gridFlow { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 0, 0 64px, 0 0; } }
.floor-glow {
  position: absolute; left: 50%; bottom: 4%; width: 70%; height: 90px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(56,189,248,.4), transparent);
}
.beam {
  position: absolute; top: -30%; width: 130px; height: 160%;
  background: linear-gradient(180deg, rgba(125,211,252,.14), transparent 75%);
  transform: skewX(-14deg);
}
.beam.b1 { left: 18%; } .beam.b2 { right: 16%; transform: skewX(14deg); }
.pt {
  position: absolute; left: var(--x); bottom: -12px; width: var(--s); height: var(--s);
  border-radius: 50%; background: #7DD3FC; box-shadow: 0 0 9px #38BDF8;
  opacity: 0; animation: ptRise var(--d) linear infinite; animation-delay: var(--dl);
}
@keyframes ptRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .9; }
  85% { opacity: .5; }
  100% { transform: translateY(-430px) translateX(14px); opacity: 0; }
}
.code {
  position: absolute; left: var(--x); top: var(--y);
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 11px; letter-spacing: 2px;
  color: rgba(125,211,252,.55); text-shadow: 0 0 6px rgba(56,189,248,.5);
  animation: codeDrift var(--d) ease-in-out infinite alternate; animation-delay: var(--dl);
}
@keyframes codeDrift { from { transform: translateY(0) translateX(0); opacity: .25; } to { transform: translateY(-26px) translateX(10px); opacity: .8; } }
.vignette { position: absolute; inset: 0; background: radial-gradient(closest-side at 50% 40%, transparent 52%, rgba(2,6,23,.6)); }

/* 两侧 3D 卡牌 */
.side3d {
  position: absolute; bottom: 26px; width: 250px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  transform-style: preserve-3d; z-index: 5;
}
.side3d.side-a { left: 5%; }
.side3d.side-b { right: 5%; }
.side3d.empty { justify-content: center; min-height: 300px; border: 2px dashed rgba(125,211,252,.35); border-radius: 16px;
  background: rgba(7, 55, 99, .35); }
.side3d.empty .arena-placeholder { color: #7DD3FC; font-size: 16px; }
.duel-card3d {
  width: 208px; height: 292px; border-radius: 15px; padding: 6px;
  background: linear-gradient(160deg, #FFD54A, #F59E0B 60%, #D97706);
  box-shadow: 0 26px 50px rgba(1, 8, 23, .6), 0 0 34px var(--glow), inset 0 0 0 2px rgba(255, 236, 153, .8);
  transform: rotateY(var(--tilt, 0deg)) rotateX(3deg);
  transform-style: preserve-3d;
  animation: cardFloat 3.4s ease-in-out infinite;
  transition: filter .2s ease;
}
.side-a .duel-card3d { --tilt: 13deg; }
.side-b .duel-card3d { --tilt: -13deg; }
@keyframes cardFloat {
  0%, 100% { transform: rotateY(var(--tilt)) rotateX(3deg) translateY(0); }
  50% { transform: rotateY(var(--tilt)) rotateX(5deg) translateY(-9px); }
}
.dc-face {
  height: 100%; border-radius: 10px; padding: 8px; position: relative; overflow: hidden;
  background:
    radial-gradient(130% 90% at 50% 108%, rgba(56, 189, 248, .55), transparent 55%),
    linear-gradient(180deg, #16295E, #1D4ED8 58%, #2563EB);
  border: 1.5px solid rgba(30, 58, 138, .9);
  transform: translateZ(16px);
}
.dc-face::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(2.2px 2.2px at 20% 26%, var(--accent) 40%, transparent 41%),
    radial-gradient(2px 2px at 80% 18%, var(--accent) 40%, transparent 41%),
    repeating-linear-gradient(115deg, rgba(191,219,254,.06) 0 8px, transparent 8px 22px);
}
.dc-top { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.dc-name {
  font-size: 17px; font-weight: 900; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: -1.5px -1.5px 0 #12275C, 1.5px -1.5px 0 #12275C, -1.5px 1.5px 0 #12275C, 1.5px 1.5px 0 #12275C;
}
.dc-stage { font-size: 10px; font-weight: 800; color: #0C4A6E; background: var(--accent); border-radius: 999px; padding: 0 7px; flex: 0 0 auto; }
.dc-img { position: relative; height: 138px; margin: 4px 0; display: flex; align-items: flex-end; justify-content: center; }
.dc-img img { max-width: 96%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 4px 7px rgba(2,6,23,.5)); }
.dc-stats { position: relative; display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 800; color: #E0F2FE; }
.dc-stats b { color: #FDE047; font-variant-numeric: tabular-nums; }
.dc-skills { position: relative; display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.dc-skill {
  font-size: 10.5px; font-weight: 800; color: #1E3A8A; background: #DBEAFE;
  border: 1.5px solid #1E40AF; border-radius: 7px; padding: 1px 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px;
}
.dc-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 42%, transparent 55%);
}
.dc-owner { position: relative; font-size: 12.5px; color: #BAE6FD; text-align: center; }
.dc-owner b { color: #fff; font-size: 13.5px; }
.dc-owner span { color: #7DD3FC; font-size: 11.5px; }
.hp3d { position: relative; display: flex; align-items: center; gap: 6px; width: 200px; }
.hp3d .hp-label { font-size: 12px; font-weight: 800; color: #7DD3FC; }
.hp3d .hp-track { flex: 1; height: 12px; background: rgba(7, 55, 99, .85); border: 1.5px solid rgba(125, 211, 252, .55); border-radius: 999px; overflow: hidden; }
.hp3d .hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #22C55E, #86EFAC); transition: width .35s ease; box-shadow: 0 0 10px rgba(74, 222, 128, .6); }
.hp3d .hp-val { font-size: 12px; font-variant-numeric: tabular-nums; color: #fff; width: 28px; text-align: right; }

/* 中央：VS / 开战 / 结果 */
.center3d {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: 220px; text-align: center; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.vs3d {
  font-size: 52px; font-weight: 900; letter-spacing: 4px; color: #fff;
  background: linear-gradient(180deg, #FDE047, #F59E0B);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(253, 224, 71, .55)) drop-shadow(0 3px 0 #12275C);
}
.vs3d.win { font-size: 30px; letter-spacing: 2px;
  background: linear-gradient(180deg, #86EFAC, #10B981);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 18px rgba(16, 185, 129, .6)) drop-shadow(0 3px 0 #052e16);
}
.prob-chip { font-size: 12px; font-weight: 700; color: #BAE6FD; background: rgba(7, 55, 99, .8); border: 1px solid rgba(125, 211, 252, .4); border-radius: 999px; padding: 2px 12px; }

/* 战斗动作 */
.side3d.attack-a .duel-card3d { animation: lungeA .55s ease; }
.side3d.attack-b .duel-card3d { animation: lungeB .55s ease; }
@keyframes lungeA {
  0% { transform: rotateY(13deg) rotateX(3deg) translateY(0); }
  45% { transform: rotateY(2deg) rotateX(2deg) translate(120px, -16px) scale(1.08); }
  100% { transform: rotateY(13deg) rotateX(3deg) translateY(0); }
}
@keyframes lungeB {
  0% { transform: rotateY(-13deg) rotateX(3deg) translateY(0); }
  45% { transform: rotateY(-2deg) rotateX(2deg) translate(-120px, -16px) scale(1.08); }
  100% { transform: rotateY(-13deg) rotateX(3deg) translateY(0); }
}
.side3d.hit .duel-card3d { animation: hitShake3d .4s ease; filter: saturate(.6) brightness(1.25) hue-rotate(-18deg); }
@keyframes hitShake3d {
  0%, 100% { transform: rotateY(var(--tilt)) rotateX(3deg) translateX(0); }
  25% { transform: rotateY(var(--tilt)) rotateX(3deg) translateX(-8px); }
  55% { transform: rotateY(var(--tilt)) rotateX(3deg) translateX(8px); }
  80% { transform: rotateY(var(--tilt)) rotateX(3deg) translateX(-4px); }
}
.side3d.win-glow .duel-card3d { box-shadow: 0 26px 50px rgba(1,8,23,.6), 0 0 60px rgba(16,185,129,.65), inset 0 0 0 2px rgba(167,243,208,.9); }
.side3d.enter .duel-card3d { animation: enter3d .6s ease, cardFloat 3.4s ease-in-out .6s infinite; }
@keyframes enter3d { from { opacity: .2; transform: rotateY(var(--tilt)) translateY(40px) scale(.9); } to { opacity: 1; transform: rotateY(var(--tilt)) translateY(0) scale(1); } }

/* 特效层 */
.fx3d { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.impact { position: absolute; transform: translate(-50%, -50%); width: 0; height: 0; }
.im-flash {
  position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, var(--c1) 0%, var(--c2) 45%, transparent 70%);
  animation: imFlash .45s ease-out forwards;
}
@keyframes imFlash { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.im-ring {
  position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--c2); box-shadow: 0 0 12px var(--c2);
  animation: imRing .6s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes imRing { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(5.2); opacity: 0; } }
.im-spark {
  position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 2px;
  background: var(--c1); box-shadow: 0 0 8px var(--c2);
  animation: imSpark .6s ease-out forwards;
}
@keyframes imSpark { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
.im-blade {
  position: absolute; left: -70px; top: -3px; width: 140px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--c1) 40%, #fff 50%, var(--c1) 60%, transparent);
  box-shadow: 0 0 14px var(--c2);
  animation: imBlade .5s ease-out forwards;
}
@keyframes imBlade { 0% { transform: scaleX(.1); opacity: 0; } 40% { opacity: 1; } 100% { transform: scaleX(1.15); opacity: 0; } }
.impact.big .im-flash { width: 180px; height: 180px; left: -90px; top: -90px; }
.skill-banner {
  position: absolute; left: 50%; top: 14%; transform: translateX(-50%);
  padding: 6px 26px; border-radius: 12px; white-space: nowrap;
  background: linear-gradient(90deg, transparent, rgba(2, 8, 23, .78) 18% 82%, transparent);
  border-top: 2px solid var(--c2); border-bottom: 2px solid var(--c2);
  animation: bannerIn .78s ease forwards;
}
.sb-text {
  font-size: 26px; font-weight: 900; letter-spacing: 3px; color: #fff;
  text-shadow: 0 0 16px var(--c2), -2px -2px 0 #0B1226, 2px -2px 0 #0B1226, -2px 2px 0 #0B1226, 2px 2px 0 #0B1226;
}
@keyframes bannerIn {
  0% { opacity: 0; transform: translateX(-50%) scale(.6); }
  22% { opacity: 1; transform: translateX(-50%) scale(1.12); }
  34% { transform: translateX(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.04); }
}
/* 简化动画：关掉装饰动画，保留流程 */
.arena3d.simple .floor, .arena3d.simple .pt, .arena3d.simple .code, .arena3d.simple .beam { animation: none !important; }
.arena3d.simple .duel-card3d { animation: none !important; transform: rotateY(var(--tilt)) rotateX(3deg); }
.arena3d.simple .impact .im-blade { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1560px) {
  /* 1366×768 投屏：导航换行到第二排，避免溢出遮挡 */
  .header-nav { order: 10; flex-basis: 100%; margin-left: 0; }
  .header-right { margin-left: auto; }
}
@media (max-width: 1100px) {
  .header-nav { margin-left: 0; }
}
@media (max-width: 760px) {
  .app-header { padding: 6px 10px; }
  .app-title { font-size: 20px; }
  .nav-btn { min-height: 40px; padding: 6px 10px; font-size: 15px; }
  .wall-list { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
  .pet-avatar.md { width: 52px; height: 52px; }
  .arena { grid-template-columns: 1fr; }
  .arena-mid { min-height: 90px; }
  .batch-preview { max-width: 100%; }
  .tbl { display: block; overflow-x: auto; }
}
