:root {
  --fire: #E2583E;
  --water: #3B82F6;
  --grass: #4CAF50;
  --electric: #F2C037;
  --bg: #1f2440;
  --panel: #2b3157;
  --panel2: #353c6b;
  --text: #f4f5fb;
  --muted: #aab0d4;
  --gold: #ffd54a;
  --good: #5fd38a;
  --bad: #ff6b6b;
  --r: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 流动光晕氛围层 */
body::before {
  content: '';
  position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(226,88,62,.12), transparent 70%) 8% 22% / 42% 42% no-repeat,
    radial-gradient(closest-side, rgba(59,130,246,.12), transparent 70%) 82% 30% / 46% 46% no-repeat,
    radial-gradient(closest-side, rgba(76,175,80,.12), transparent 70%) 50% 88% / 52% 52% no-repeat,
    radial-gradient(1200px 800px at 50% -10%, #2a3160, var(--bg));
  animation: bgFloat 18s ease-in-out infinite alternate;
}
@keyframes bgFloat { from { transform: translate(0,0); } to { transform: translate(0,-22px); } }
/* 精灵球水印 */
body::after {
  content: '';
  position: fixed; right: -110px; bottom: -110px; width: 420px; height: 420px; z-index: -1; pointer-events: none;
  opacity: .06;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='44' fill='none' stroke='white' stroke-width='5'/%3E%3Cpath d='M6 50a44 44 0 0 1 88 0' fill='white' opacity='0.25'/%3E%3Cpath d='M6 50h88' stroke='white' stroke-width='5'/%3E%3Ccircle cx='50' cy='50' r='13' fill='white'/%3E%3Ccircle cx='50' cy='50' r='13' fill='none' stroke='%231f2440' stroke-width='4'/%3E%3Ccircle cx='50' cy='50' r='5' fill='%231f2440'/%3E%3C/svg%3E") no-repeat center / contain;
}

#app { max-width: 1100px; margin: 0 auto; padding: 16px; min-height: 100%; position: relative; z-index: 1; }

/* ---------- 通用 ---------- */
.btn {
  background: linear-gradient(180deg, #5b62a8, #444b86);
  color: #fff; border: none; border-radius: 12px;
  padding: 12px 18px; font-size: 16px; cursor: pointer; font-weight: 700;
  box-shadow: 0 4px 0 #2c3160, inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .08s, box-shadow .08s, filter .12s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2c3160, inset 0 1px 0 rgba(255,255,255,.25); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: 0 4px 0 #2c3160; filter: none; }
.btn.primary {
  background: linear-gradient(180deg, #ffd54a, #f5b400); color: #3a2c00;
  box-shadow: 0 4px 0 #b98600, 0 0 16px rgba(255,213,74,.45), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:active { box-shadow: 0 1px 0 #b98600, 0 0 16px rgba(255,213,74,.45); }
.btn.ghost { background: rgba(255,255,255,.04); box-shadow: none; border: 1px solid #5b62a8; }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 9px; }

.panel {
  background: linear-gradient(180deg, rgba(43,49,87,.92), rgba(35,40,72,.92));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px; padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(4px);
}

.title {
  text-align: center; font-size: 38px; font-weight: 800; margin: 18px 0 4px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--fire), var(--electric), var(--grass), var(--water));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.subtitle { text-align: center; color: var(--muted); margin-bottom: 22px; }

.menu { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 0 auto; }
.menu .btn { position: relative; overflow: hidden; }
.menu .btn::after { content: '▶'; position: absolute; right: 14px; opacity: .5; font-size: 12px; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: rgba(43,49,87,.72); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  padding: 12px 16px; border-radius: 14px; margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.topbar .stat { display: flex; flex-direction: column; line-height: 1.15; }
.topbar .stat b { font-size: 18px; }
.topbar .stat span { font-size: 12px; color: var(--muted); }
.jokers-row { display: flex; gap: 6px; flex-wrap: wrap; }
.joker-chip {
  background: linear-gradient(180deg, #3a4170, #2c3260);
  border-radius: 10px; padding: 6px 9px; font-size: 12px; border: 1px solid #4a5290;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.joker-chip.epic { border-color: #c084fc; box-shadow: 0 0 10px rgba(192,132,252,.4), inset 0 1px 0 rgba(255,255,255,.08); }
.joker-chip.legendary { border-color: var(--gold); box-shadow: 0 0 12px rgba(255,213,74,.5), inset 0 1px 0 rgba(255,255,255,.08); }

/* ---------- 对手（血条对战） ---------- */
.opponent {
  display: flex; gap: 14px; align-items: center;
  background: linear-gradient(180deg, #2f2140, #241a33);
  border: 2px solid var(--oc); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35), 0 0 22px color-mix(in srgb, var(--oc) 35%, transparent);
}
.opponent .opp-avatar {
  font-size: 40px; width: 66px; height: 66px; line-height: 66px; text-align: center;
  background: var(--oc); border-radius: 50%; flex: 0 0 auto;
  box-shadow: 0 0 0 4px #0006, 0 0 18px var(--oc);
}
.opponent .opp-main { flex: 1; min-width: 0; }
.opponent .opp-name { font-size: 16px; margin-bottom: 6px; }
.opponent .opp-tag { font-size: 12px; color: var(--muted); background: #0004; padding: 2px 8px; border-radius: 8px; margin-left: 6px; }
.hp-bar {
  position: relative; height: 24px; background: #0008; border-radius: 12px; overflow: hidden;
  border: 1px solid #0009; box-shadow: inset 0 2px 5px rgba(0,0,0,.55);
}
.hp-bar::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0, transparent 17px, rgba(0,0,0,.22) 17px, rgba(0,0,0,.22) 19px);
}
.hp-bar .hp-fill {
  position: absolute; inset: 0 auto 0 0; height: 100%;
  background: linear-gradient(90deg, #ff4d4d, #ff8a4d);
  transition: width .45s cubic-bezier(.2,.8,.2,1);
}
.hp-bar.low .hp-fill { background: linear-gradient(90deg, #ff2d2d, #ff5b3a); animation: hpPulse .7s ease-in-out infinite; }
@keyframes hpPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.45); } }
.hp-bar .hp-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000;
}
.opp-move { font-size: 13px; color: var(--gold); margin-top: 6px; }
.opp-taunt { font-size: 13px; color: #ffd9a8; margin-top: 4px; font-style: italic; }
.opp-hit { animation: oppHit .35s ease; }
@keyframes oppHit { 0%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 100%{transform:translateX(0)} }

/* ---------- 牌 ---------- */
.table {
  background: linear-gradient(180deg, #243056, #1c2240);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px; padding: 18px; min-height: 280px;
  display: flex; flex-direction: column; justify-content: flex-start;
  box-shadow: inset 0 0 40px rgba(0,0,0,.35);
}
.hand { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; min-height: 170px; align-items: center; perspective: 800px; padding-top: 10px; }
.card {
  width: 112px; height: 166px; border-radius: var(--r);
  background: linear-gradient(160deg, #ffffff, #f2f3fb);
  color: #1c2240; position: relative; cursor: pointer; user-select: none;
  border: 2px solid #e2e4f0;
  box-shadow: 0 6px 14px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.7);
  transition: transform .14s cubic-bezier(.2,.8,.2,1), box-shadow .14s, filter .14s;
  display: flex; flex-direction: column; padding: 7px; text-align: center; overflow: hidden;
  animation: cardIn .35s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.94); } to { opacity: 1; transform: none; } }

/* 属性主题渐变 + 主色 */
.card[data-attr="fire"]     { background: linear-gradient(160deg,#ffffff,#ffe9e1); border-color:#f3b9aa; --cc:#ff7a5c; }
.card[data-attr="water"]    { background: linear-gradient(160deg,#ffffff,#e4eeff); border-color:#aecbff; --cc:#5aa0ff; }
.card[data-attr="grass"]    { background: linear-gradient(160deg,#ffffff,#e6f8e8); border-color:#b6e3bb; --cc:#5fcf73; }
.card[data-attr="electric"] { background: linear-gradient(160deg,#ffffff,#fff6d6); border-color:#f0dca0; --cc:#ffce4d; }

/* 角标：属性 + 战力 */
.card .attr {
  position: absolute; top: 7px; left: 7px; z-index: 3;
  font-size: 12px; font-weight: 800; color: #fff;
  width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.card[data-attr="fire"] .attr { background: var(--fire); }
.card[data-attr="water"] .attr { background: var(--water); }
.card[data-attr="electric"] .attr { background: var(--electric); color:#5a4500; }
.card[data-attr="grass"] .attr { background: var(--grass); }
.card .pow {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  font-size: 14px; font-weight: 900; color: #3a2c00;
  width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%;
  background: linear-gradient(180deg, #ffe27a, #f5b400);
  box-shadow: 0 2px 4px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.5);
}

/* 精灵图区域 */
.card .art {
  position: relative; width: 100%; height: 72px; margin: 30px 0 4px;
  display: flex; align-items: center; justify-content: center;
}
.card .art .emoji {
  position: relative; z-index: 2; font-size: 46px; line-height: 1;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.3));
}
.card .art::after {
  content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 50% 38%, var(--cc), rgba(255,255,255,0) 70%);
  opacity: .55;
}
.card .nm {
  font-size: 13px; font-weight: 800; text-align: center; color: #1c2240;
  margin-top: 2px; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 修饰徽章 */
.card .badges { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; align-content: flex-start; width: 100%; margin-top: auto; }
.card .mod {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800;
  padding: 2px 6px; border-radius: 7px; max-width: 100%; line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.card .mod .ic { width: 14px; height: 14px; flex: 0 0 auto; display: block; }
.card .mod .op { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.card .mod.ability { background: #fff3d6; color: #8a5a00; }
.card .mod.enh { background: #ffe3f1; color: #b8006b; }
.card .mod.edition { background: #efe6ff; color: #6a3ea1; }
.card .mod.seal { background: #e3f3ff; color: #1565c0; }
.card .mod.seal.s-fire { background: var(--fire); color: #fff; }
.card .mod.seal.s-water { background: var(--water); color: #fff; }
.card .mod.seal.s-electric { background: var(--electric); color: #5a4500; }
.card .mod.seal.s-grass { background: var(--grass); color: #fff; }

/* 版本辉光 */
.card.ed-shiny { border-color: #ffe27a; box-shadow: 0 0 14px #ffe27a99, 0 6px 14px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.7); }
.card.ed-chromatic { border-color: #c084fc; box-shadow: 0 0 14px #c084fc99, 0 6px 14px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.7); }
.card.ed-polychrome { border-color: #5fd3ff; box-shadow: 0 0 16px #5fd3ffbb, 0 6px 14px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.7); }
.card.ed-negative { border-color: #ffffff; box-shadow: 0 0 14px #ffffffbb, 0 6px 14px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.7); }

.card:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 14px 22px rgba(0,0,0,.45); filter: brightness(1.03); }
/* 一旦有选中，其余卡变暗衬托 */
.hand.has-sel .card:not(.selected) { filter: saturate(.5) brightness(.62); }
.card.selected {
  transform: translateY(-20px) scale(1.07);
  box-shadow: 0 18px 28px rgba(0,0,0,.55), 0 0 0 3px var(--gold), 0 0 22px 5px rgba(255,213,74,.8);
  z-index: 5;
  overflow: visible;
  animation: selPulse 1.1s ease-in-out infinite;
}
.card.selected::after {
  content: '✓ 已选'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #3a2c00; font-size: 11px; font-weight: 900; padding: 2px 9px;
  border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.4); z-index: 6; white-space: nowrap;
}
.card.selected::before {
  content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 6px solid var(--gold); z-index: 6;
}
@keyframes selPulse {
  0%,100% { box-shadow: 0 18px 28px rgba(0,0,0,.55), 0 0 0 3px var(--gold), 0 0 18px 3px rgba(255,213,74,.6); }
  50%     { box-shadow: 0 18px 28px rgba(0,0,0,.55), 0 0 0 3px var(--gold), 0 0 30px 9px rgba(255,213,74,.95); }
}
.card.selected:hover { transform: translateY(-22px) scale(1.08); }

.controls { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.preview {
  text-align: center; color: var(--muted); min-height: 58px; margin: 10px 0 4px;
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 4px;
}
.preview .pv-line { white-space: nowrap; }
.preview b { color: var(--gold); }
.bd-list { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.bd {
  font-size: 11px; font-weight: 700; color: #d9def7;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  padding: 2px 8px; border-radius: 8px; white-space: nowrap;
}

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 10px;
  z-index: 50; transition: opacity .3s; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.1);
}
.toast.err { background: #a01818; }

/* 飘字伤害 */
.float-dmg {
  position: fixed; z-index: 200; font-size: 36px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 0 #c62828, 0 0 16px #ff5b5b; pointer-events: none;
  transform: translate(-50%, 0); animation: floatDmg 1s ease forwards;
}
.float-dmg.crit {
  color: #ffe27a; text-shadow: 0 2px 0 #b8860b, 0 0 22px #ffd24a, 0 0 40px #ff9d00;
  font-size: 44px;
}
.float-dmg .crit-tag {
  display: inline-block; margin-left: 6px; font-size: 20px; font-weight: 900;
  color: #3a2c00; background: linear-gradient(180deg,#ffe27a,#f5b400);
  padding: 1px 8px; border-radius: 8px; vertical-align: middle;
  box-shadow: 0 2px 6px rgba(0,0,0,.5); transform: rotate(-6deg);
}
@keyframes floatDmg {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  20%  { opacity: 1; transform: translate(-50%, -16px) scale(1.18); }
  100% { opacity: 0; transform: translate(-50%, -58px) scale(1); }
}

/* 幸运暴击大屏提示 */
.float-crit {
  position: fixed; z-index: 300; top: 32%; left: 50%; pointer-events: none;
  transform: translate(-50%, -50%);
  font-size: 54px; font-weight: 900; letter-spacing: 2px; white-space: nowrap;
  color: #fff;
  text-shadow: 0 3px 0 #b8860b, 0 0 24px #ffd24a, 0 0 48px #ff8a00;
  animation: critPop 1.5s cubic-bezier(.2,.9,.2,1) forwards;
}
@keyframes critPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-8deg); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.35) rotate(3deg); }
  30%  { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  75%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(1.1); }
}

/* ---------- 商店 ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.shop-item {
  background: linear-gradient(180deg, #3a4170, #2c3260);
  border-radius: 12px; padding: 12px; text-align: center; border: 1px solid #4a5290;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .12s, box-shadow .12s;
}
.shop-item:hover { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06); }
.shop-item.epic { border-color: #c084fc; box-shadow: 0 0 12px rgba(192,132,252,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.shop-item.legendary { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,213,74,.45), inset 0 1px 0 rgba(255,255,255,.06); }
.shop-item.rare { border-color: #5fd3ff; box-shadow: 0 0 12px rgba(95,211,255,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.shop-item .nm { font-weight: 700; margin-bottom: 4px; }
.shop-item .ds { font-size: 12px; color: var(--muted); min-height: 32px; }
.shop-item .cost { color: var(--gold); font-weight: 700; margin: 6px 0; }
.section-title { margin: 18px 0 8px; font-size: 18px; border-left: 4px solid var(--gold); padding-left: 8px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* 卡组管理卡片 */
.deck-list { display: flex; flex-wrap: wrap; gap: 10px; }
.deck-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 8px 10px; min-width: 190px; max-width: 280px; flex: 1 1 190px;
  border-left: 4px solid var(--attr-c);
  transition: transform .12s, background .12s;
}
.deck-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); }
.deck-card[data-attr="fire"]     { --attr-c: var(--fire); }
.deck-card[data-attr="water"]    { --attr-c: var(--water); }
.deck-card[data-attr="grass"]    { --attr-c: var(--grass); }
.deck-card[data-attr="electric"] { --attr-c: var(--electric); }
.dc-attr {
  font-size: 12px; font-weight: 800; width: 26px; height: 26px; line-height: 26px;
  text-align: center; border-radius: 50%; background: var(--attr-c); color: #fff;
  flex: 0 0 auto;
}
.deck-card[data-attr="electric"] .dc-attr { color: #5a4500; }
.dc-body { flex: 1; min-width: 0; }
.dc-name { font-size: 14px; font-weight: 800; color: #e9eefc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.dc-pow { font-size: 11px; font-weight: 700; color: #ffd86e; margin-right: 2px; }
.dc-tag { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; white-space: nowrap; }
.dc-tag.ability { background: #fff3d6; color: #8a5a00; }
.dc-tag.enh { background: #ffe3f1; color: #b8006b; }
.dc-tag.edition { background: #efe6ff; color: #6a3ea1; }
.dc-tag.seal { background: #e3f3ff; color: #1565c0; }
.dc-tag.seal.s-fire     { background: var(--fire); color: #fff; }
.dc-tag.seal.s-water    { background: var(--water); color: #fff; }
.dc-tag.seal.s-grass    { background: var(--grass); color: #fff; }
.dc-tag.seal.s-electric { background: var(--electric); color: #5a4500; }
.dc-remove {
  font-size: 11px; font-weight: 700; color: #ffb3b3; background: rgba(160,24,24,.22);
  border: 1px solid rgba(255,100,100,.28); border-radius: 8px; padding: 4px 7px;
  cursor: pointer; line-height: 1.25; text-align: center; flex: 0 0 auto;
}
.dc-remove:hover { background: rgba(160,24,24,.38); color: #fff; }

/* ---------- 覆盖层 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8,10,24,.72); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay.hidden { display: none; }
.overlay-box {
  background: linear-gradient(180deg, rgba(43,49,87,.98), rgba(33,38,70,.98));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 26px; max-width: 520px; width: 92%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.55); animation: popIn .25s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes popIn { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: none; } }
.overlay-box h2 { margin-top: 0; }
.lb-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.lb-table th, .lb-table td { padding: 8px; border-bottom: 1px solid #3a4170; font-size: 14px; }
.lb-table th { color: var(--muted); }
.rank1 { color: var(--gold); font-weight: 800; }
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
input.name-input { padding: 10px; border-radius: 10px; border: 1px solid #4a5290; background: #1c2240; color: #fff; font-size: 16px; width: 200px; }

/* ---------- 设置 ---------- */
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #3a4170; }

body.cb .card .attr { box-shadow: 0 0 0 2px #000; }
body.no-anim * { transition: none !important; animation: none !important; }

@media (max-width: 640px) {
  .card { width: 84px; height: 126px; padding: 5px; }
  .card .attr { width: 20px; height: 20px; line-height: 20px; font-size: 10px; top: 5px; left: 5px; }
  .card .pow { width: 22px; height: 22px; line-height: 22px; font-size: 11px; top: 5px; right: 5px; }
  .card .art { height: 52px; margin-top: 24px; }
  .card .art .emoji { font-size: 34px; }
  .card .nm { font-size: 11px; }
  .card .mod { font-size: 9px; padding: 1px 4px; }
  .title { font-size: 30px; }
}
