/* ==========================================================
   宝可梦璀璨宝石 · 页面设计稿
   - 精灵球 token / 卡面均为纯 CSS 绘制（无图片依赖）
   - 游戏逻辑后续接入，本文件只负责视觉
   ========================================================== */

/* ---------- 设计变量 ---------- */
:root {
  /* 品牌色 */
  --pk-red: #e3350d;
  --pk-red-dark: #b02a0a;
  --pk-blue-deep: #16324f;
  --bg: #0f1a2b;
  --bg-2: #142238;
  --panel: #1b2c47;
  --panel-2: #22375a;
  --line: #2d4570;
  --text: #eaf1fb;
  --text-dim: #9db1cc;
  --gold: #f5c451;
  --gold-dark: #c9982a;

  /* 五种普通球 + 大师球 */
  --ball-red: #ee5253;
  --ball-pink: #fd79a8;
  --ball-blue: #54a0ff;
  --ball-yellow: #feca57;
  --ball-black: #3d4f5e;
  --ball-master: #9b59b6;

  /* 卡面等级色 */
  --card-l1: linear-gradient(160deg, #2f7d5b, #1c503c);
  --card-l2: linear-gradient(160deg, #2b6aa8, #173e69);
  --card-l3: linear-gradient(160deg, #6b4bc4, #3a2580);
  --card-rare: linear-gradient(160deg, #a55eea, #6c2bd9);
  --card-legendary: linear-gradient(160deg, #d4a017, #8a6210);

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(227, 53, 13, .12), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(84, 160, 255, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  overflow: hidden;
}

ul { list-style: none; }
b { color: var(--gold); }

/* ---------- 页面切换 ---------- */
.page { display: none; height: 100vh; flex-direction: column; }
.page--active { display: flex; }

/* ---------- 通用按钮 ---------- */
.button {
  font-family: var(--font);
  border: none; cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 15px; font-weight: 700;
  color: #fff; background: var(--panel-2);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, filter .12s ease, opacity .12s;
}
.button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button--primary { background: linear-gradient(180deg, #ff6a3d, var(--pk-red) 60%, var(--pk-red-dark)); }
.button--ghost { background: transparent; border: 1px solid var(--line); color: var(--text-dim); }
.button--ghost:hover { color: var(--text); }
.button--danger { background: transparent; border: 1px solid #a33; color: #ff9b9b; }
.button--danger:hover { background: rgba(170, 51, 51, .15); }
.button--sm { padding: 6px 12px; font-size: 13px; }
.button--lg { padding: 14px 32px; font-size: 17px; }
.button--block { width: 100%; }

/* ---------- 精灵球（token 通用图形） ---------- */
.pokeball, .pokeball-mini, .pokeball-logo {
  position: relative;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--ball-red) 0 42%, #20232a 42% 58%, #f4f6f8 58% 100%);
  border: 2px solid rgba(0, 0, 0, .55);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .35);
}
.pokeball::after, .pokeball-mini::after, .pokeball-logo::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 34%; height: 34%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #fff, #cfd6df);
  border: 2px solid #20232a;
  border-radius: 50%;
}
/* 颜色变体：改变上半球颜色 */
.pokeball[data-color="red"]    { background: linear-gradient(180deg, var(--ball-red) 0 42%, #20232a 42% 58%, #f4f6f8 58% 100%); }
.pokeball[data-color="pink"]   { background: linear-gradient(180deg, var(--ball-pink) 0 42%, #20232a 42% 58%, #f4f6f8 58% 100%); }
.pokeball[data-color="blue"]   { background: linear-gradient(180deg, var(--ball-blue) 0 42%, #20232a 42% 58%, #f4f6f8 58% 100%); }
.pokeball[data-color="yellow"] { background: linear-gradient(180deg, var(--ball-yellow) 0 42%, #20232a 42% 58%, #f4f6f8 58% 100%); }
.pokeball[data-color="black"]  { background: linear-gradient(180deg, var(--ball-black) 0 42%, #12161b 42% 58%, #d7dde3 58% 100%); }
/* 大师球：紫 + 金钮 */
.pokeball[data-color="master"] {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 45%),
    linear-gradient(180deg, var(--ball-master) 0 42%, #20232a 42% 58%, #f0e6f7 58% 100%);
  border-color: var(--gold);
}
.pokeball[data-color="master"]::after { border-color: var(--gold); box-shadow: 0 0 6px rgba(245, 196, 81, .8); }

.pokeball-mini { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
.pokeball-logo { width: 84px; height: 84px; margin: 0 auto 18px; }
.pokeball-logo i { display: none; }

/* ==========================================================
   大厅页
   ========================================================== */
.lobby {
  width: 100%; height: 100%;
  overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 24px 24px;
}
.lobby__header { text-align: center; margin-bottom: 34px; }
.lobby__title {
  font-size: 44px; letter-spacing: 6px;
  background: linear-gradient(180deg, #fff, #ffd9c8 55%, var(--pk-red));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 4px 24px rgba(227, 53, 13, .25);
}
.lobby__subtitle { color: var(--text-dim); margin-top: 10px; letter-spacing: 2px; }

.lobby__body {
  display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap;
  justify-content: center; max-width: 900px; width: 100%;
}
.lobby__panel, .lobby__rules {
  background: linear-gradient(180deg, rgba(34, 55, 90, .9), rgba(27, 44, 71, .9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  width: 380px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.lobby__panel-title {
  font-size: 17px; margin-bottom: 18px; color: var(--gold);
  border-bottom: 1px dashed var(--line); padding-bottom: 10px;
}
.lobby__form .field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.field__input {
  width: 100%; padding: 10px 12px;
  background: rgba(10, 18, 32, .7);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field__input:focus { border-color: var(--pk-red); box-shadow: 0 0 0 3px rgba(227, 53, 13, .18); }
.field__input--code { letter-spacing: 6px; font-size: 18px; text-align: center; }

.lobby__divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 12px; margin: 16px 0;
}
.lobby__divider::before, .lobby__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.rules-list li { margin-bottom: 14px; }
.rules-list__num { font-weight: 700; color: var(--gold); display: block; margin-bottom: 3px; }
.rules-list__num::before {
  content: attr(data-num);
  display: inline-block; width: 20px; height: 20px; line-height: 20px;
  text-align: center; font-size: 12px; margin-right: 8px;
  background: var(--pk-red); color: #fff; border-radius: 50%;
}
.rules-list p { font-size: 13px; color: var(--text-dim); line-height: 1.6; padding-left: 28px; }
.rules-note { font-size: 12px; color: var(--text-dim); border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 6px; }

.lobby__footer { margin-top: auto; padding-top: 30px; color: var(--text-dim); font-size: 12px; opacity: .7; }

/* ==========================================================
   顶栏（房间页 / 游戏页共用）
   ========================================================== */
.top-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(27, 44, 71, .95), rgba(20, 34, 56, .95));
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.top-bar__brand { font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.top-bar__room { color: var(--text-dim); font-size: 14px; }
.top-bar__room b { letter-spacing: 3px; }
.top-bar__meta { color: var(--text-dim); font-size: 14px; }
.top-bar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.status-tag {
  font-size: 12px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--text-dim);
}
.status-tag--ok { color: #7bed9f; border-color: rgba(123, 237, 159, .4); background: rgba(123, 237, 159, .08); }
.status-tag--bad { color: #ff7b7b; border-color: rgba(255, 123, 123, .4); background: rgba(255, 123, 123, .08); }

.turn-banner {
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 14px; border-radius: 20px;
  background: rgba(245, 196, 81, .12);
  border: 1px solid rgba(245, 196, 81, .5);
  color: var(--gold);
  animation: pulse 1.6s ease-in-out infinite;
}
.turn-banner--idle {
  background: rgba(148, 163, 184, .1);
  border-color: var(--line);
  color: var(--text-dim);
  animation: none;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 196, 81, .35); }
  50% { box-shadow: 0 0 0 6px rgba(245, 196, 81, 0); }
}

/* ==========================================================
   房间等待页
   ========================================================== */
.room-layout {
  flex: 1; display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px; padding: 18px;
  min-height: 0;
}
.room-main {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; min-height: 0;
  overflow-y: auto;
}
.room-main__head h2 { font-size: 20px; }
.room-main__hint { color: var(--text-dim); font-size: 13px; margin-top: 6px; }

.player-slots {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px; margin: 22px 0; flex: 1; align-content: start;
}
.player-slot {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
  min-height: 84px;
}
.player-slot--empty {
  border-style: dashed; color: var(--text-dim);
  justify-content: center; font-size: 13px;
  background: rgba(15, 26, 43, .4);
}
.player-slot__avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(180deg, var(--ball-blue), #2b6aa8);
  border: 2px solid rgba(255, 255, 255, .25);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.player-slot__info { flex: 1; min-width: 0; }
.player-slot__name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-slot__tags { margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 12px;
  background: rgba(84, 160, 255, .14); color: #9ec9ff; border: 1px solid rgba(84, 160, 255, .3);
}
.tag--host { background: rgba(245, 196, 81, .14); color: var(--gold); border-color: rgba(245, 196, 81, .4); }
.tag--offline { background: rgba(160, 160, 160, .12); color: #aab; border-color: rgba(160, 160, 160, .3); }

.room-main__actions { margin-top: auto; text-align: center; padding-top: 16px; }

/* ==========================================================
   聊天（房间页 / 游戏页共用）
   ========================================================== */
.chat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column; min-height: 0;
}
.chat__title {
  font-size: 14px; color: var(--gold);
  padding: 12px 14px 10px; border-bottom: 1px solid var(--line);
}
.chat__list { flex: 1; overflow-y: auto; padding: 10px 14px; }
.chat__list li { margin-bottom: 10px; font-size: 13px; line-height: 1.55; }
.chat__name { color: #7fb3ff; font-weight: 700; margin-right: 6px; }
.chat__name--self { color: var(--gold); }
.chat__text { color: var(--text); word-break: break-word; }
.chat__time { color: var(--text-dim); font-size: 11px; margin-left: 8px; opacity: .8; }
.chat__form {
  display: flex; gap: 8px; padding: 10px;
  border-top: 1px solid var(--line);
}
.chat__input {
  flex: 1; background: rgba(10, 18, 32, .7);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); padding: 8px 10px; font-size: 13px; outline: none;
}
.chat__input:focus { border-color: var(--pk-red); }

/* ==========================================================
   游戏页布局
   ========================================================== */
.game-layout {
  flex: 1; display: grid;
  grid-template-columns: 250px 1fr 270px;
  gap: 14px; padding: 14px;
  min-height: 0;
}

/* ---------- 对手面板 ---------- */
.opponents {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0; overflow-y: auto;
}
.opponent-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}
.opponent-card--active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(245, 196, 81, .15);
}
.opponent-card__head { display: flex; align-items: center; gap: 10px; }
.opponent-card__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(180deg, var(--ball-blue), #2b6aa8);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .2);
}
.opponent-card__name {
  font-weight: 700; font-size: 14px; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.opponent-card__score { font-size: 20px; font-weight: 800; color: var(--gold); }
.opponent-card__score small { font-size: 11px; color: var(--text-dim); font-weight: 400; }

.opponent-res-row { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.res-chip {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  border: 1px solid rgba(0, 0, 0, .45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.res-chip--red { background: var(--ball-red); }
.res-chip--pink { background: var(--ball-pink); }
.res-chip--blue { background: var(--ball-blue); }
.res-chip--yellow { background: var(--ball-yellow); color: #5b4400; text-shadow: none; }
.res-chip--black { background: var(--ball-black); }
.res-chip--master { background: var(--ball-master); border-color: var(--gold); }

.opponent-card__stats {
  display: flex; gap: 12px; margin-top: 9px;
  font-size: 12px; color: var(--text-dim);
}
.opponent-card__stats b { font-weight: 700; }
.opponent-card__reserved { display: flex; gap: 4px; margin-top: 8px; }
.card-back-mini {
  width: 26px; height: 36px; border-radius: 4px;
  background: linear-gradient(160deg, #3a4f74, #22304b);
  border: 1px solid rgba(255, 255, 255, .15);
  position: relative;
}
.card-back-mini::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 12px; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--ball-red) 0 45%, #20232a 45% 55%, #eee 55% 100%);
  border: 1px solid #14181f;
}

/* ---------- 中央棋盘 ---------- */
.board-area {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding-right: 4px;
}

/* 精灵球公共区 */
.token-bank {
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
  background: rgba(20, 34, 56, .6);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px;
}
.token-pile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm);
  transition: background .15s;
  position: relative;
}
.token-pile:hover { background: rgba(255, 255, 255, .06); }
.token-pile--selected { background: rgba(245, 196, 81, .14); outline: 1px solid rgba(245, 196, 81, .5); }
.token-pile--empty { opacity: .35; cursor: default; }
.token-pile__balls { position: relative; width: 52px; height: 44px; }
.token-pile .pokeball {
  position: absolute; width: 40px; height: 40px; left: 6px; top: 2px;
}
.token-pile__count {
  font-weight: 800; font-size: 14px;
  background: rgba(0, 0, 0, .5); border-radius: 12px;
  padding: 2px 12px;
}
.token-pile__label { font-size: 11px; color: var(--text-dim); }
.token-pile--selected .token-pile__label { color: var(--gold); }
/* 叠加的第二个球表示数量感 */
.token-pile[data-count="0"] .pokeball { filter: grayscale(.7); }

/* 特殊卡槽 */
.special-row { display: flex; gap: 12px; }
.special-slot {
  flex: 1; background: rgba(20, 34, 56, .6);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.special-slot--legendary { border-color: rgba(245, 196, 81, .45); }
.special-slot--legendary .special-slot__title { color: var(--gold); }
.special-slot--rare { border-color: rgba(165, 94, 234, .45); }
.special-slot--rare .special-slot__title { color: #c39bf0; }
.special-slot__title { font-size: 13px; letter-spacing: 8px; text-indent: 8px; text-align: center; }
.special-slot__cards {
  display: flex; justify-content: center; gap: 10px; min-height: 158px;
}

/* 基础牌行 */
.board-rows { display: flex; flex-direction: column; gap: 10px; }
.board-row {
  display: flex; align-items: stretch; gap: 10px;
  background: rgba(20, 34, 56, .6);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px;
}
.board-row__cards { display: flex; gap: 10px; flex: 1; }

/* 牌堆 */
.deck-pile {
  width: 84px; flex-shrink: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; border-radius: var(--radius-sm);
  transition: filter .15s;
}
.deck-pile:hover { filter: brightness(1.15); }
.deck-pile__back {
  width: 66px; height: 92px; border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, .18);
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}
.deck-pile__back::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 30px; height: 30px; transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .75);
  background:
    linear-gradient(180deg, transparent 0 38%, rgba(0,0,0,.85) 38% 62%, transparent 62%),
    radial-gradient(circle, #fff 0 28%, transparent 28%);
  background-color: var(--pk-red);
}
.deck-pile__back--l1 { background: linear-gradient(160deg, #2f7d5b, #1c503c); }
.deck-pile__back--l2 { background: linear-gradient(160deg, #2b6aa8, #173e69); }
.deck-pile__back--l3 { background: linear-gradient(160deg, #6b4bc4, #3a2580); }
.deck-pile__back--l1::before { background-color: #2f9c6e; }
.deck-pile__back--l2::before { background-color: #54a0ff; }
.deck-pile__back--l3::before { background-color: #9b7cf0; }
.deck-pile__count { font-size: 12px; color: var(--text-dim); font-weight: 700; }
.deck-pile__label { font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }

/* ==========================================================
   CSS 卡面
   ========================================================== */
.card {
  width: 110px; height: 158px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, .22);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex; flex-direction: column;
  padding: 8px 8px 7px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s;
  user-select: none;
  flex-shrink: 0;
  overflow: hidden;
}
.card--level1 { background: var(--card-l1); }
.card--level2 { background: var(--card-l2); }
.card--level3 { background: var(--card-l3); }
.card--rare { background: var(--card-rare); border-color: rgba(195, 155, 240, .7); }
.card--legendary { background: var(--card-legendary); border-color: var(--gold); box-shadow: 0 0 14px rgba(245, 196, 81, .28), var(--shadow-sm); }

.card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
  z-index: 5;
}
.card--capturable { outline: 2px solid rgba(126, 237, 159, .75); outline-offset: 1px; }
.card--reserved-mine { outline: 2px solid var(--gold); outline-offset: 1px; }
.card--disabled { filter: grayscale(.55) brightness(.75); cursor: default; }
.card--disabled:hover { transform: none; }

/* 卡面内部 */
.card__top { display: flex; justify-content: space-between; align-items: flex-start; height: 20px; }
.card__level {
  font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, .85);
  background: rgba(0, 0, 0, .3); padding: 1px 7px; border-radius: 8px;
  letter-spacing: 1px;
}
.card__score {
  min-width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #3b2c00;
  background: radial-gradient(circle at 30% 25%, #ffe9a8, var(--gold));
  border-radius: 50%; border: 1px solid var(--gold-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.card__score--zero { visibility: hidden; }

.card__name {
  text-align: center; font-weight: 800; font-size: 16px;
  margin-top: 4px; letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__art {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 4px 0;
}
.type-orb {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .3), 0 2px 6px rgba(0, 0, 0, .35);
  position: relative;
}
.type-orb--red { background: var(--ball-red); }
.type-orb--pink { background: var(--ball-pink); }
.type-orb--blue { background: var(--ball-blue); }
.type-orb--yellow { background: var(--ball-yellow); }
.type-orb--black { background: var(--ball-black); }

.card__cost {
  display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
  background: rgba(0, 0, 0, .28);
  border-radius: 6px; padding: 4px 2px 3px;
}
.cost-chip {
  min-width: 19px; height: 19px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
  border: 1px solid rgba(0, 0, 0, .4);
  padding: 0 3px;
}
.cost-chip--red { background: var(--ball-red); }
.cost-chip--pink { background: var(--ball-pink); }
.cost-chip--blue { background: var(--ball-blue); }
.cost-chip--yellow { background: var(--ball-yellow); color: #5b4400; text-shadow: none; }
.cost-chip--black { background: var(--ball-black); }
.cost-chip--master { background: var(--ball-master); border-color: var(--gold); }

/* 迷你卡（我方正面区域 / 保留区） */
.card--mini { width: 58px; height: 84px; padding: 4px; border-width: 1px; cursor: default; }
.card--mini:hover { transform: none; box-shadow: var(--shadow-sm); }
.card--mini .card__level { display: none; }
.card--mini .card__score { min-width: 16px; height: 16px; font-size: 10px; }
.card--mini .card__name { font-size: 10px; margin-top: 2px; }
.card--mini .card__art { margin: 2px 0; }
.card--mini .type-orb { width: 16px; height: 16px; border-width: 1px; }
.card--mini .card__cost { display: none; }

/* 进化徽章（可进化的卡） */
.card__evo-mark {
  position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  font-size: 9px; color: #c39bf0; letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(155, 93, 240, .8);
}

/* ==========================================================
   我的面板（游戏页底部）
   ========================================================== */
.my-panel {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 170px 190px 170px 1fr 1fr 230px;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(34, 55, 90, .95), rgba(24, 40, 67, .95));
  border-top: 2px solid var(--gold-dark);
  min-height: 138px;
}
.my-panel__section { min-width: 0; }
.my-panel__section h4 {
  font-size: 12px; color: var(--text-dim); font-weight: 700;
  margin-bottom: 8px; letter-spacing: 1px;
}
.my-panel__hint { font-weight: 400; color: #6c7f9c; font-size: 11px; }

.my-panel__info { border-right: 1px solid var(--line); padding-right: 8px; }
.my-panel__name-row { display: flex; align-items: center; gap: 8px; }
.my-panel__name { font-weight: 800; font-size: 17px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-panel__badge {
  font-size: 11px; color: var(--gold); border: 1px solid rgba(245, 196, 81, .5);
  padding: 1px 8px; border-radius: 10px;
}
.my-panel__score-row { margin: 6px 0 2px; }
.score-big { font-size: 34px; font-weight: 800; color: var(--gold); line-height: 1; }
.score-unit { font-size: 12px; color: var(--text-dim); margin-left: 4px; }
.my-panel__counts { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.token-row { display: flex; gap: 8px; flex-wrap: wrap; }
.token-row .token-unit {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 3px; border-radius: 6px;
}
.token-row .token-unit:hover { background: rgba(255, 255, 255, .07); }
.token-unit .pokeball { width: 34px; height: 34px; }
.token-unit__count { font-size: 13px; font-weight: 800; }
.token-unit--zero { opacity: .3; }

.resource-row { display: flex; gap: 7px; flex-wrap: wrap; }
.resource-row .res-chip { width: 30px; height: 30px; font-size: 14px; }
.resource-row .res-chip--zero { opacity: .25; }

.mini-cards {
  display: flex; gap: 6px; flex-wrap: wrap; overflow-y: auto; max-height: 100px;
  align-content: flex-start;
}

.my-panel__action {
  display: flex; flex-direction: column; gap: 8px; justify-content: center;
  border-left: 1px solid var(--line); padding-left: 12px;
}
.action-hint {
  font-size: 12px; color: var(--gold);
  background: rgba(245, 196, 81, .08);
  border: 1px dashed rgba(245, 196, 81, .35);
  border-radius: var(--radius-sm);
  padding: 8px 10px; line-height: 1.5;
}

/* ==========================================================
   弹窗
   ========================================================== */
.modal-layer {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6, 10, 18, .68);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.modal-layer--hidden { display: none; }

.modal {
  width: 460px; max-width: calc(100vw - 40px);
  max-height: calc(100vh - 60px);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column;
  animation: modal-in .18s ease;
}
@keyframes modal-in {
  from { transform: translateY(14px) scale(.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.modal__title { font-size: 17px; color: var(--gold); }
.modal__close {
  background: none; border: none; color: var(--text-dim);
  font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px;
}
.modal__close:hover { color: var(--text); }
.modal__body { padding: 16px 18px; overflow-y: auto; }
.modal__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 18px 16px; border-top: 1px solid var(--line);
}

/* 弹窗内部组件 */
.confirm-desc { font-size: 15px; line-height: 1.6; margin-bottom: 12px; }
.confirm-desc .em { color: var(--gold); font-weight: 700; }
.pay-lines { background: rgba(0, 0, 0, .25); border-radius: var(--radius-sm); padding: 10px 12px; }
.pay-lines p { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.pay-lines p:last-child { margin-bottom: 0; }
.pay-lines .cost-chip { margin: 0 2px; }
.confirm-notes { margin-top: 12px; }
.confirm-notes li {
  font-size: 12px; color: var(--text-dim);
  list-style: none; padding-left: 16px; position: relative; margin-bottom: 4px;
}
.confirm-notes li::before { content: "·"; position: absolute; left: 4px; color: var(--pk-red); font-weight: 800; }
.confirm-cards { display: flex; gap: 14px; margin: 4px 0 8px; justify-content: center; }
.confirm-cards .card { cursor: default; }
.confirm-cards .card:hover { transform: none; }
.card-label {
  text-align: center; font-size: 11px; color: var(--text-dim); margin-top: 5px;
}
.evo-arrow { align-self: center; font-size: 26px; color: var(--gold); font-weight: 800; }

/* 弃牌弹窗 */
.discard-grid { display: flex; flex-direction: column; gap: 8px; }
.discard-item { display: flex; align-items: center; gap: 12px; }
.discard-item .pokeball { width: 30px; height: 30px; }
.discard-item__label { flex: 1; font-size: 14px; }
.discard-item__stepper { display: flex; align-items: center; gap: 8px; }
.stepper-btn {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 16px; cursor: pointer;
}
.stepper-btn:hover { border-color: var(--gold); }
.stepper-val { min-width: 20px; text-align: center; font-weight: 800; }

/* 结算 */
.victory-title {
  text-align: center; font-size: 22px; font-weight: 800; color: var(--gold);
  margin: 6px 0 14px; letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(245, 196, 81, .5);
}
.standings { display: flex; flex-direction: column; gap: 8px; }
.standing-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0, 0, 0, .22); border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.standing-row--winner { border: 1px solid var(--gold); background: rgba(245, 196, 81, .08); }
.standing-rank { font-size: 18px; font-weight: 800; width: 26px; color: var(--text-dim); }
.standing-row--winner .standing-rank { color: var(--gold); }
.standing-name { flex: 1; font-weight: 700; }
.standing-stats { font-size: 12px; color: var(--text-dim); }
.standing-stats b { margin-left: 10px; }

/* ==========================================================
   卡牌快速预览（悬停）
   ========================================================== */
.card-preview {
  position: fixed; z-index: 90; pointer-events: none;
  display: flex; gap: 14px;
  background: linear-gradient(180deg, rgba(34, 55, 90, .97), rgba(22, 36, 60, .97));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .6);
  max-width: 430px;
}
.card-preview--hidden { display: none; }
.card-preview__detail { font-size: 13px; color: var(--text-dim); line-height: 1.7; min-width: 180px; }
.card-preview__detail h5 { color: var(--text); font-size: 16px; margin-bottom: 4px; }
.card-preview__detail .cost-chip { margin: 0 3px 0 0; }
.pv-row { margin-top: 6px; }
.pv-row .pv-label { color: #6c7f9c; margin-right: 6px; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2d4570; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a598c; }
::-webkit-scrollbar-track { background: transparent; }

/* 响应式：窄屏时允许滚动并压缩列 */
@media (max-width: 1200px) {
  .game-layout { grid-template-columns: 210px 1fr 230px; }
  .my-panel { grid-template-columns: 150px 160px 150px 1fr 1fr; }
  .my-panel__action { display: none; }
}
@media (max-width: 980px) {
  body { overflow: auto; }
  .game-layout { grid-template-columns: 1fr; overflow-y: visible; }
  .opponents { flex-direction: row; overflow-x: auto; }
  .opponent-card { min-width: 200px; }
  .my-panel { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================
   图片资源版：卡面 / 精灵球 / 牌背 均调用图包与 Config.txt
   ========================================================== */

/* --- 卡面：图包图片填充 --- */
.card.card--img { padding: 0; display: block; background: #0d1520; }
.card--img .card__image {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  border-radius: 8px;
}
.card--mini.card--img .card__image { border-radius: 5px; }
/* 悬停预览：放大卡图 */
.card-preview__frame .card { width: 152px; height: 218px; }

/* --- 精灵球：token 图包图片 --- */
img.token-ball { display: block; border-radius: 50%; }
.token-pile .token-ball { position: absolute; width: 40px; height: 40px; left: 6px; top: 2px; }
.token-pile[data-count="0"] .token-ball { filter: grayscale(.7); }
.token-unit .token-ball { width: 34px; height: 34px; }
.discard-item .token-ball { width: 30px; height: 30px; }

/* --- 牌堆卡背：back 图包 --- */
.deck-pile__back { background-size: cover; background-position: center; }
.deck-pile__back::before { display: none; }
.deck-pile__back--l1 { background: url("/img/back/level1-back.jpg") center/cover no-repeat; }
.deck-pile__back--l2 { background: url("/img/back/level2-back.jpg") center/cover no-repeat; }
.deck-pile__back--l3 { background: url("/img/back/level3-back.jpg") center/cover no-repeat; }

/* --- 对手保留区小卡背 --- */
.card-back-mini { background: url("/img/back/level1-back.jpg") center/cover no-repeat; }
.card-back-mini::after { display: none; }

/* --- 精灵球徽章：费用 / 可减免精灵球显示 --- */
.ball-chip {
  display: inline-flex; align-items: center; gap: 3px;
  margin-right: 8px; vertical-align: middle;
}
.ball-chip__img { width: 20px; height: 20px; border-radius: 50%; display: block; }
.ball-chip__count { font-weight: 800; font-size: 13px; color: var(--text); }
.ball-chip--zero { opacity: .32; }
/* 我的面板 / 对手面板内的徽章稍大 */
.resource-row .ball-chip, .opponent-res-row .ball-chip { margin-right: 10px; }
.resource-row .ball-chip__img, .opponent-res-row .ball-chip__img { width: 24px; height: 24px; }

/* --- 神兽/稀有牌库剩余数 --- */
.special-slot__title .special-slot__count { font-size: 11px; opacity: .75; margin-left: 4px; font-weight: 600; }

/* --- 捕捉区：减免精灵球相同的卡纵向堆叠（每张覆盖前一张下方 3/4，露出顶部 1/4） --- */
.mini-card-stack { display: flex; flex-direction: column; }
.mini-card-stack .card--mini + .card--mini { margin-top: -63px; } /* 84 * 3/4 */
.mini-card-stack .card--mini:hover { z-index: 5; }
/* 可进化角标放顶部（堆叠时底部会被上一张盖住） */
.card__evo-mark { bottom: auto; top: 2px; }

/* ==========================================================
   手机适配：触屏 / 竖屏 / 横屏
   ========================================================== */

/* ---------- 触屏设备通用 ---------- */
@media (hover: none) {
  /* 悬浮预览在触屏上不可用：详情已内置于点击弹窗，直接隐藏浮层 */
  .card-preview { display: none !important; }
  /* 长按卡牌不弹出系统图片菜单 / 不触发文字选中 */
  .card, .card__image { -webkit-touch-callout: none; -webkit-user-select: none; }
  /* 点击不残留 hover 位移 */
  .card:hover { transform: none; box-shadow: var(--shadow-sm); }
}
/* 去除点击高亮与双击缩放延迟 */
body { -webkit-tap-highlight-color: transparent; }
.card, .button, .token-pile, .token-unit, .deck-pile, .stepper-btn { touch-action: manipulation; }

/* ---------- 手机竖屏（≤760px）：整页纵向滚动 ---------- */
@media (max-width: 760px) {
  body { overflow-y: auto; }
  .page { height: auto; min-height: 100vh; min-height: 100dvh; }

  /* 大厅：面板纵向堆叠 */
  .lobby { padding: 24px 14px 16px; }
  .lobby__title { font-size: 30px; letter-spacing: 3px; }
  .pokeball-logo { width: 60px; height: 60px; margin-bottom: 12px; }
  .lobby__subtitle { font-size: 12px; letter-spacing: 1px; }
  .lobby__body { flex-direction: column; align-items: stretch; }
  .lobby__panel, .lobby__rules { width: 100%; max-width: 480px; margin: 0 auto; padding: 20px 18px; }

  /* 房间页：单列，聊天固定高度 */
  .room-layout { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .room-main { padding: 18px 16px; }
  .chat { height: 220px; }

  /* 顶栏：允许换行，次要信息隐藏 */
  .top-bar {
    flex-wrap: wrap; gap: 8px;
    padding: 8px max(10px, env(safe-area-inset-left)) 8px max(10px, env(safe-area-inset-right));
  }
  .top-bar__brand { font-size: 13px; }
  .top-bar__room, .status-tag { display: none; }
  .top-bar__meta { font-size: 12px; }
  .turn-banner { font-size: 11px; padding: 3px 10px; }
  .top-bar__right { gap: 6px; }
  .top-bar__right .button { padding: 5px 10px; font-size: 12px; }

  /* 游戏页：单列纵向堆叠（对手条 → 棋盘 → 聊天），整页滚动 */
  .game-layout { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
  .opponents { flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 8px; flex-shrink: 0; }
  .opponent-card { min-width: 170px; flex-shrink: 0; padding: 10px 12px; }
  .board-area { overflow: visible; padding-right: 0; gap: 10px; }
  .chat--game { height: 180px; flex-shrink: 0; }

  /* 精灵球公共区：小球 + 均布 */
  .token-bank { gap: 4px 6px; padding: 8px 6px; justify-content: space-between; }
  .token-pile { padding: 4px 6px; }
  .token-pile__balls { width: 40px; height: 38px; }
  .token-pile .token-ball, .token-pile .pokeball { width: 32px; height: 32px; left: 4px; top: 3px; }
  .token-pile__count { font-size: 12px; padding: 1px 10px; }
  .token-pile__label { font-size: 10px; }

  /* 特殊卡槽 */
  .special-slot { padding: 6px 8px 8px; }
  .special-slot__title { font-size: 11px; letter-spacing: 4px; text-indent: 4px; }
  .special-slot__cards { min-height: 110px; gap: 6px; }

  /* 卡牌缩小；每行可横向滑动 */
  .card { width: 84px; height: 121px; border-radius: 8px; }
  .board-row { padding: 6px 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .board-row__cards { gap: 6px; }
  .deck-pile { width: 52px; }
  .deck-pile__back { width: 46px; height: 66px; }
  .deck-pile__count { font-size: 10px; }
  .deck-pile__label { font-size: 9px; }
  .confirm-cards .card { width: 84px; height: 121px; }

  /* 我的面板：两列网格；操作区（提示 + 进化/弃牌按钮）恢复显示 */
  .my-panel {
    grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 10px 12px;
    padding: 10px 12px max(12px, env(safe-area-inset-bottom));
    min-height: 0;
  }
  .my-panel__info { grid-column: 1 / -1; border-right: none; border-bottom: 1px dashed var(--line); display: flex; align-items: center; gap: 12px; }
  .my-panel__score-row { margin: 0 0 0 auto; }
  .score-big { font-size: 26px; }
  .my-panel__counts { flex-direction: row; gap: 12px; margin: 0; }
  .my-panel__section h4 { font-size: 11px; margin-bottom: 6px; }
  .my-panel__section--cards { grid-column: 1 / -1; }
  .token-row .token-ball, .token-unit .pokeball { width: 28px; height: 28px; }
  .mini-cards { max-height: 128px; }
  .my-panel__action {
    display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px;
    grid-column: 1 / -1; border-left: none; border-top: 1px dashed var(--line); padding: 8px 0 0;
  }
  .action-hint { font-size: 11px; flex: 1; min-width: 150px; padding: 6px 8px; }

  /* 弹窗 */
  .modal { width: 100%; max-width: 360px; max-height: calc(100dvh - 32px); }
  .modal__body { padding: 12px 14px; }
  .pay-lines p { font-size: 12px; }
}

/* ---------- 手机横屏（高度 ≤520px）：固定两栏紧凑布局 ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  body { overflow: hidden; }
  .page { height: 100vh; height: 100dvh; }

  /* 大厅：双面板并排、内容内滚 */
  .lobby { padding: 10px 16px; }
  .lobby__header { margin-bottom: 10px; }
  .lobby__title { font-size: 24px; letter-spacing: 2px; }
  .pokeball-logo { width: 44px; height: 44px; margin-bottom: 8px; }
  .lobby__subtitle { display: none; }
  .lobby__footer { display: none; }
  .lobby__panel, .lobby__rules { width: 340px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 16px; }
  .lobby__panel-title { font-size: 14px; margin-bottom: 10px; }
  .rules-list li { margin-bottom: 8px; }

  /* 房间页 */
  .room-layout { grid-template-columns: 1fr 260px; padding: 10px; gap: 10px; }
  .room-main { padding: 14px; }
  .room-main__head h2 { font-size: 16px; }
  .player-slot { min-height: 56px; padding: 10px; }
  .player-slot__avatar { width: 34px; height: 34px; font-size: 15px; }

  /* 顶栏：压缩到一行 */
  .top-bar { padding: 5px 10px; gap: 8px; }
  .top-bar__brand { font-size: 12px; }
  .top-bar__room, .status-tag { display: none; }
  .turn-banner { font-size: 10px; padding: 2px 8px; }
  .top-bar__right .button { padding: 4px 8px; font-size: 11px; }

  /* 游戏页：两栏网格（棋盘 | 我的面板），聊天隐藏 */
  #page-game.page--active {
    display: grid;
    grid-template-columns: 1fr minmax(200px, 250px);
    grid-template-rows: auto minmax(0, 1fr);
  }
  #page-game .top-bar { grid-column: 1 / -1; }
  .game-layout {
    grid-row: 2; grid-column: 1;
    display: flex; flex-direction: column; gap: 6px; padding: 8px; min-height: 0;
  }
  .chat--game { display: none; }
  .my-panel {
    grid-row: 2; grid-column: 2;
    margin: 0 8px 8px 0; border: 1px solid var(--line); border-radius: var(--radius);
    overflow-y: auto; min-height: 0;
    display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: min-content; gap: 8px; padding: 10px;
  }
  .my-panel__info { grid-column: 1 / -1; border-right: none; border-bottom: 1px dashed var(--line); display: flex; align-items: center; gap: 10px; padding: 0 0 6px; }
  .my-panel__score-row { margin: 0 0 0 auto; }
  .score-big { font-size: 22px; }
  .my-panel__counts { flex-direction: row; gap: 10px; margin: 0; font-size: 11px; }
  .my-panel__section h4 { font-size: 10px; margin-bottom: 4px; }
  .my-panel__section--cards { grid-column: 1 / -1; }
  .mini-cards { max-height: 76px; }
  .token-row .token-ball, .token-unit .pokeball { width: 24px; height: 24px; }
  .my-panel__action {
    display: flex; flex-direction: column; gap: 6px;
    grid-column: 1 / -1; border-left: none; border-top: 1px dashed var(--line); padding: 6px 0 0;
  }
  .action-hint { font-size: 10px; padding: 5px 6px; }

  /* 对手：顶部横滑条 */
  .opponents { flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 6px; flex-shrink: 0; }
  .opponent-card { min-width: 150px; flex-shrink: 0; padding: 6px 10px; }
  .opponent-card__avatar { width: 24px; height: 24px; font-size: 12px; }
  .opponent-card__score { font-size: 14px; }
  .opponent-card__stats { margin-top: 4px; font-size: 10px; gap: 8px; }
  .card-back-mini { width: 16px; height: 22px; }

  /* 棋盘：小卡牌，纵向滚动 */
  .board-area { overflow-y: auto; gap: 6px; padding-right: 2px; }
  .token-bank { gap: 2px 4px; padding: 4px; flex-wrap: nowrap; justify-content: center; }
  .token-pile { padding: 2px 4px; }
  .token-pile__balls { width: 34px; height: 32px; }
  .token-pile .token-ball, .token-pile .pokeball { width: 26px; height: 26px; left: 4px; top: 3px; }
  .token-pile__count { font-size: 10px; padding: 0 8px; }
  .token-pile__label { display: none; }
  .card { width: 66px; height: 95px; border-radius: 6px; }
  .deck-pile { width: 42px; }
  .deck-pile__back { width: 38px; height: 54px; }
  .deck-pile__count { font-size: 9px; }
  .deck-pile__label { display: none; }
  .board-row { padding: 4px 6px; gap: 6px; }
  .board-row__cards { gap: 6px; }
  .special-slot { padding: 4px 6px 6px; gap: 4px; }
  .special-slot__title { font-size: 10px; letter-spacing: 2px; }
  .special-slot__cards { min-height: 72px; gap: 4px; }
  .confirm-cards .card { width: 66px; height: 95px; }

  /* 弹窗 */
  .modal { width: 92vw; max-width: 420px; max-height: calc(100dvh - 24px); }
  .modal__body { padding: 10px 14px; }
}
