/* ============================================================
   screens.css — 逐屏布局（照搬 design/css/screens.css）
   ------------------------------------------------------------
   铁律#1：照搬设计稿。所有尺寸用逻辑 px（760 高设计空间），Fit Stage
   (stage.js) 把整页等比缩放铺满视口 → 永不滚动、控件永不被挤出屏。
   加载顺序：本文件放在所有旧皮肤(balatro-*.css/layout.css)之后、最末位，
     令设计屏布局取得最高权威；旧屏类名(.blt-* 与 .screen-overlay)与设计屏类名
     (.lobby/.draft/.reveal/.result/.game/.shop/...)不撞，过渡期并存。
   适配：① 顶部补 .screen 基类 + 通用工具类(原在 design/foundation.css)；
        ② 删 design 的 .devnav(原型导航 chrome)；
        ③ .game/.blt-game 高度改用 var(--logical-h)。
   ============================================================ */

/* ---- 屏外壳 + 工具类（照搬 design/foundation.css 的 .screen/.row/.col/...） ---- */
.screen {
  position: relative;
  width: 100%;
  min-height: var(--logical-h, 760px);
  display: flex;
  flex-direction: column;
}
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.spacer { flex: 1 1 auto; }
.nowrap { white-space: nowrap; }
.center { display: flex; align-items: center; justify-content: center; }

/* corner tools (shared) */
.corner-tools {
  position: absolute; top: 14px; right: 14px; z-index: 20;
  display: flex; gap: 7px;
}

/* ============================================================
   LOBBY / WAITING
   ============================================================ */
.lobby { align-items: center; justify-content: center; }
/* 房间内玩家就绪面板（lobby renderRoom 用） */
.bl-ready-panel { display: flex; flex-direction: column; gap: 7px; padding: 10px; border-radius: var(--r-md); background: rgba(0,0,0,.24); border: 1px solid var(--line); }
.bl-ready-row { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--t3); }
.bl-ready-row b { color: var(--t2); font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-ready-row.on b { color: var(--green); }
.br-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.bl-ready-row.on .br-dot { background: var(--green); box-shadow: 0 0 8px rgba(75,194,146,.7); }
.lobby-card {
  position: relative; z-index: 5;
  width: 440px; padding: 30px 30px 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.brand { text-align: center; }
.brand-title {
  font-size: 40px; font-weight: 900; letter-spacing: 2px;
  color: var(--gold); text-shadow: 0 2px 0 #b8860b, 0 4px 14px rgba(255,200,40,.35);
}
.brand-sub { font-size: 12px; color: var(--t2); letter-spacing: 3px; margin-top: 4px; }
.field {
  width: 100%; padding: 13px 15px; border-radius: var(--r-md);
  background: rgba(8,28,20,.86); border: 1px solid var(--line-2);
  color: var(--t1); font-size: 15px; text-align: center; letter-spacing: 1px;
  outline: none; transition: border-color .15s;
}
.field:focus { border-color: var(--border-focus, rgba(255,210,60,.6)); }
.field::placeholder { color: var(--t-dim); }
.lobby-mode { display: flex; flex-direction: column; gap: 11px; }
.lobby-split,
.lobby-split-left,
.lobby-split-right,
.room-lobby-layout,
.room-lobby-summary,
.room-lobby-controls { display: contents; }
.lobby-mode-desc { font-size: 12px; color: var(--t2); text-align: center; line-height: 1.5; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--t3); font-size: 11px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lobby-join { display: flex; gap: 9px; }
.field-code { flex: 1; text-transform: uppercase; }
.lobby-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.jcard.deco { position: absolute; width: 110px; height: 156px; opacity: .9; filter: drop-shadow(0 12px 30px rgba(0,0,0,.5)); }
.jcard.deco.l { left: calc(50% - 280px); top: 210px; transform: rotate(-16deg); }
.jcard.deco.r { right: calc(50% - 280px); top: 250px; transform: rotate(14deg); }
.jcard.deco .nm { font-size: 12px; }

.wait-label { font-size: 12px; color: var(--t3); letter-spacing: 2px; text-align: center; margin-top: 4px; }
.roomcode-neon {
  font-size: 52px; font-weight: 900; letter-spacing: 8px; text-align: center;
  color: #fff; text-shadow: 0 0 10px var(--gold), 0 0 28px rgba(255,200,40,.7);
  border: 0; background: transparent; font-family: inherit; width: 100%;
}
.wait-dots { text-align: center; color: var(--gold); font-size: 15px; font-weight: 700; }

/* ============================================================
   DRAFT
   ============================================================ */
.draft { align-items: center; padding: 40px 30px; gap: 14px; justify-content: center; }
.draft-head { text-align: center; }
.draft-head .hdr-title { font-size: 26px; }
.draft-turn {
  font-size: 14px; font-weight: 800; padding: 7px 20px; border-radius: 999px; margin: 2px 0 6px;
}
.draft-turn.your { background: rgba(46,194,126,.16); border: 1px solid var(--accent-green-border,rgba(46,194,126,.4)); color: #6fe0aa; }
.draft-turn.wait { background: rgba(255,200,40,.14); border: 1px solid rgba(255,200,40,.4); color: var(--gold); }
.draft-pool { display: flex; gap: 40px; }
.draft-opt {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 230px; padding: 18px; border-radius: var(--r-xl);
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--sh-2); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.draft-opt:hover { transform: translateY(-6px); border-color: var(--accent-gold-border,rgba(255,200,40,.4)); box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 22px rgba(255,200,40,.2); }
.draft-opt.picked { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 14px 40px rgba(0,0,0,.5); }
.draft-opt-card { transform: scale(1.7); margin: 38px 0; }
.draft-opt-name { font-size: 18px; font-weight: 900; color: var(--t1); }
.draft-opt-desc { font-size: 12px; color: var(--t2); text-align: center; line-height: 1.5; min-height: 34px; }
.draft-foot { margin-top: 6px; }

/* ============================================================
   REVEAL FLASH — 胜/负全屏闪光（result 赛果页用；对齐 mod 赢绿/输红 screen）
   ============================================================ */
.reveal-flash { position: absolute; inset: 0; pointer-events: none; z-index: 3; opacity: 0; border-radius: inherit; }
.reveal-flash.win { background: radial-gradient(ellipse at center, transparent 42%, rgba(46,194,126,.55) 100%); animation: revealFlash 1.5s ease-out 1.05s both; }
.reveal-flash.lose { background: radial-gradient(ellipse at center, transparent 42%, rgba(220,52,72,.55) 100%); animation: revealFlash 1.5s ease-out 1.05s both; }
@keyframes revealFlash { 0% { opacity: 0; } 16% { opacity: 1; } 55% { opacity: .55; } 100% { opacity: 0; } }

/* ============================================================
   RESULT
   ============================================================ */
.result { align-items: center; justify-content: center; padding: 24px; }
.result-card { width: 560px; padding: 26px 30px; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 4; }
.result-layout,
.result-primary,
.result-secondary { display: contents; }
.result-head { text-align: center; }
.result-icon { font-size: 56px; line-height: 1; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.result-title { font-size: 38px; font-weight: 900; letter-spacing: 2px; margin: 4px 0; }
.result-title.win { color: var(--gold); text-shadow: 0 2px 0 #b8860b, 0 0 22px rgba(255,200,40,.5); }
.result-title.lose { color: var(--red); }
.result-hp { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; background: rgba(0,0,0,.22); border-radius: var(--r-md); }
.result-stats { display: flex; gap: 10px; }
.result-stats .stat {
  flex: 1; text-align: center; padding: 10px; border-radius: var(--r-md);
  background: rgba(0,0,0,.22); border: 1px solid var(--line);
}
.result-stats .stat .k { display: block; font-size: 10px; color: var(--t3); font-weight: 700; margin-bottom: 3px; }
.result-stats .stat b { font-size: 22px; color: var(--t1); }
.result-extra { padding: 10px 14px; background: rgba(0,0,0,.2); border-radius: var(--r-md); border: 1px solid var(--line); }
.result-curses { display: flex; flex-wrap: wrap; gap: 6px; }
.result-boss-row { display: flex; gap: 8px; }
.bossbar { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; background: rgba(0,0,0,.25); border-radius: var(--r-sm); font-size: 13px; font-weight: 700; }
.scoreboard { display: flex; align-items: center; gap: 14px; }
.sb-side { flex: 1; text-align: center; padding: 12px; border-radius: var(--r-md); background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.sb-side.lead { border-color: var(--accent-gold-border,rgba(255,200,40,.4)); box-shadow: 0 0 16px rgba(255,200,40,.12); }
.sb-l { font-size: 12px; color: var(--t2); font-weight: 700; margin-bottom: 4px; }
.sb-v { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.sb-v.blue { color: #6fb7ff; } .sb-v.red { color: #ff8fa6; }
.sb-vs { font-size: 16px; font-weight: 900; color: var(--t3); }
.result-actions { display: flex; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.result-actions .btn { flex: 1; min-width: 130px; }
/* 查看敌方小丑浮层（mod game_end） */
.enemy-jokers-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.ej-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.ej-name { font-size: 11px; font-weight: 800; color: var(--t2); max-width: 110px; text-align: center; }

/* ============================================================
   BLIND SELECT
   ============================================================ */
.screen.blind-select { min-height: var(--logical-h, 760px); padding: 12px 14px; gap: 12px; }
.bl-select-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex: none; }
.bl-select-title { display: flex; flex-direction: column; min-width: 0; }
.bst-k { font-size: 10px; color: var(--t3); font-weight: 900; letter-spacing: .7px; text-transform: uppercase; }
.bst-v { font-size: 24px; line-height: 1; color: var(--gold); font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-select-stats { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bl-select-tools { display: flex; align-items: center; gap: 7px; }
.bl-select-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(220px, 25%) 1fr; gap: 12px; }
.bl-select-side { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-width: 0; }
/* P1 放开锁步：对手状态角标（替代旧 ready 面板），挂在顶栏 */
.opp-status-chip { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid var(--line); min-width: 0; }
.opp-status-chip .osc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.opp-status-chip.on .osc-dot { background: var(--green); box-shadow: 0 0 8px rgba(75,194,146,.7); }
.opp-status-chip .osc-k { font-size: 10px; color: var(--t3); font-weight: 800; white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.opp-status-chip b { font-size: 12px; color: var(--t2); font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp-status-chip.on b { color: var(--green); }
.bl-room { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: var(--r-md); background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.bl-room span { font-size: 10px; color: var(--t3); font-weight: 800; }
.bl-room b { font-size: 17px; color: var(--gold); font-weight: 900; letter-spacing: 1px; }
.bl-select-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-height: 0; align-items: stretch; }
/* 原版三列立柱：Select 按钮在柱顶（柱外），柱体为深色圆角立柱 */
.bl-select-choice {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  min-width: 0; text-align: center;
}
.bl-choice-top { flex: none; min-height: 42px; display: flex; align-items: center; justify-content: center; }
.bl-top-btn { min-width: 120px; min-height: 40px; font-size: 15px; }
.bl-top-state { padding: 8px 18px; border-radius: var(--r-md); font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.bl-top-state.done { color: var(--t3); background: rgba(255,255,255,.07); }
.bl-top-state.upcoming { color: #ffb24d; background: rgba(255,150,40,.12); border: 1px solid rgba(255,150,40,.3); }
.bl-pillar {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px 12px; border-radius: 8px;
  background: rgba(6,28,20,.72); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--panel-hi), 0 8px 22px rgba(0,0,0,.28);
  overflow: hidden; position: relative;
}
.bl-pillar::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: rgba(255,255,255,.12); }
.bl-select-choice.small .bl-pillar::before { background: #2a9d8f; }
.bl-select-choice.big .bl-pillar::before { background: #d4a017; }
.bl-select-choice.boss .bl-pillar::before { background: #c0392b; }
.bl-select-choice.nemesis .bl-pillar::before { background: linear-gradient(90deg,#7b61ff,#fe5f55); }
.bl-select-choice.done .bl-pillar { opacity: .72; }
.bl-select-choice.upcoming .bl-pillar { opacity: .58; }
.bl-select-choice.active .bl-pillar { transform: translateY(-3px); border-color: rgba(255,210,63,.55); box-shadow: 0 0 0 1px rgba(255,210,63,.28), 0 12px 28px rgba(0,0,0,.42); }
.bl-choice-glyph { font-size: 31px; line-height: 1; font-weight: 900; color: var(--t1); margin-top: 6px; display: flex; align-items: center; justify-content: center; }
.bl-choice-glyph .blind-chip { display: inline-block; image-rendering: pixelated; }
.bl-select-choice.small .bl-choice-glyph { color: #5fd0c2; }
.bl-select-choice.big .bl-choice-glyph { color: #ffd277; }
.bl-select-choice.boss .bl-choice-glyph { color: #ff8f7d; }
.bl-select-choice.nemesis .bl-choice-glyph { color: #b5a8ff; }
.bl-choice-name { max-width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: center; color: var(--t1); font-size: 18px; line-height: 1.05; font-weight: 900; overflow-wrap: anywhere; }
/* 「至少 X 分」横排（原版 Score at least 行） */
.bl-choice-target { display: flex; align-items: baseline; justify-content: center; gap: 5px; }
.bl-choice-target span, .bl-choice-reward span { font-size: 10px; color: var(--t3); font-weight: 900; letter-spacing: .7px; }
.bl-choice-target b { color: #fff; font-size: 28px; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.bl-choice-rule { min-height: 29px; color: var(--t2); font-size: 11px; line-height: 1.35; display: flex; align-items: center; justify-content: center; }
.bl-choice-reward { display: flex; align-items: baseline; justify-content: center; gap: 5px; }
.bl-choice-reward b { color: var(--gold); font-size: 20px; line-height: 1; font-weight: 900; letter-spacing: 1px; }
/* 柱底跳过区：标签 + 跳过按钮（原版 Skip Blind 贴柱内） */
.bl-skip-zone { width: 100%; margin-top: auto; display: flex; flex-direction: column; gap: 7px; }
.bl-skip-zone.preview { opacity: .85; }
.bl-skip-btn { width: 100%; min-height: 38px; }
.bl-tag { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: var(--r-md); background: rgba(255,200,40,.08); border: 1px solid rgba(255,200,40,.24); }
.bl-tag-art { width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bl-tag-art .atlas-art-wrap { transform: scale(.4); transform-origin: center; }
.bl-tag-art .atlas-art-wrap.tag-chip { transform: none; }  /* tags.png 34x34 原尺寸即合身 */
.tag-fallback { color: var(--gold); font-size: 22px; font-weight: 900; }
/* P2-3d：持有标签横排（盲注选择侧栏 / 商店侧栏共用） */
.tag-strip { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--r-md); background: rgba(255,200,40,.07); border: 1px solid rgba(255,200,40,.2); }
.tag-strip-k { font-size: 9px; color: var(--t3); font-weight: 900; letter-spacing: .7px; flex: none; }
.tag-strip-icons { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.tag-strip-icons .tag-chip { display: inline-flex; }
.tag-strip-icons .tag-fallback { font-size: 16px; }
.bl-tag-copy { min-width: 0; text-align: left; }
.bl-tag-name { color: var(--gold); font-size: 12px; line-height: 1.1; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-tag-desc { color: var(--t2); font-size: 10px; line-height: 1.25; margin-top: 2px; }

/* ============================================================
   GAME (lane-play)
   ============================================================ */
.game { min-height: var(--logical-h, 760px); }
/* 信箱容器：牌桌锁原版比例 1.739 居中，超宽视口两侧留绿呢白边（balatro.css:88 已铺满绿呢） */
.blt-game { flex: 1; display: flex; justify-content: center; align-items: stretch; height: var(--logical-h, 760px); }
/* 牌桌：严格 20×11.5 tile 比例（1.739），高=逻辑高，宽随之，max-width 兜窄屏 */
.lane-table {
  position: relative;
  width: calc(var(--logical-h, 760px) * 1.739);
  max-width: 100%;
  height: var(--logical-h, 760px);
  display: flex;
  overflow: visible;
}

.sidebar {
  width: 23.8%; flex: none;
  background: linear-gradient(180deg, var(--green-1), var(--green-2) 45%, #143828);
  border-right: 3px solid var(--green-3);
  box-shadow: 4px 0 24px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px;
}
.blind-head {
  border-radius: 7px; padding: 7px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  color: #fff;
}
.blind-text { flex: 1 1 auto; min-width: 0; }
.blind-chip-slot { flex: none; display: flex; align-items: center; justify-content: center; }
.blind-chip-slot .blind-chip { image-rendering: pixelated; }
.blind-title { font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blind-desc { font-size: 10px; opacity: .9; margin-top: 1px; }
.head-tools { display: flex; gap: 5px; flex: 1 1 100%; justify-content: flex-end; }
.icon-btn.sm { width: 30px; height: 30px; font-size: 13px; }

.sb-sec { background: rgba(0,40,25,.5); border-radius: 7px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.06); }
.sb-k { font-size: 9px; color: #88bbaa; font-weight: 700; }
.hp-sec { display: flex; flex-direction: column; gap: 5px; }
.target-sec { border-radius: 0 0 7px 7px; margin-top: -3px; }
.target-row { display: flex; align-items: center; gap: 9px; }
.chip-icon { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,var(--blue),#1f4f87); border: 2.5px solid #5599dd; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.chip-icon i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }
.target-val { font-size: 26px; font-weight: 900; color: #fff; line-height: 1; }
.reward { font-size: 10px; color: #88bbaa; margin-top: 5px; }
.reward b { color: var(--red); letter-spacing: 1px; }
.rs-sec { display: flex; justify-content: space-between; align-items: baseline; }
.rs-v { font-size: 22px; font-weight: 900; color: #fff; }
.handtype { min-height: 30px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; color: #fff; }
.handtype.empty { font-size: 11px; color: #4d7866; }
.cm-row { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 2px; }
.chips-box, .mult-box { font-family: var(--font-impact); color: #fff; font-size: 27px; font-weight: 400; padding: 3px 14px 1px; border-radius: 5px; min-width: 54px; text-align: center; letter-spacing: .5px; box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
/* 原版 UI_CHIPS=BLUE #009dff / UI_MULT=RED #fe5f55（近纯色 + 共享 inset emboss .05），去渐变 */
.chips-box { background: #009dff; }
.mult-box { background: #fe5f55; }
.cm-x { font-size: 13px; font-weight: 900; color: #fff; background: var(--red); width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.counter-row { display: flex; gap: 4px; }
.counter { flex: 1; padding: 4px 4px 6px; border-radius: 7px; border: 1px solid rgba(255,255,255,.08); text-align: center; }
.counter .t { font-size: 10px; opacity: .85; color: #cfe6da; }
.counter .n { font-size: 22px; font-weight: 900; line-height: 1; }
/* 原版 UI_definitions.lua:1281-1300：计数框=DYN_UI.BOSS_MAIN #374244；数字 hands=BLUE #009dff / discards=RED #FE5F55 */
.counter.plays { background: #374244; } .counter.plays .n { color: #009dff; }
.counter.discards { background: #374244; } .counter.discards .n { color: #fe5f55; }
.info-money-row { display: flex; gap: 4px; }
.info-btn { padding: 6px 8px; border-radius: 7px; background: linear-gradient(135deg,var(--gold),var(--gold-d)); color: #2a1a00; font-weight: 900; font-size: 10px; line-height: 1.2; box-shadow: 0 2px 6px rgba(200,150,0,.3); }
.money { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; background: rgba(0,40,25,.5); border-radius: 7px; border: 1px solid rgba(255,255,255,.06); }
.money .coin-ico { font-size: 16px; } .money .amt { font-size: 19px; font-weight: 900; color: #f3b958; } /* 原版 MONEY globals.lua:356 */
.stage-row { display: flex; gap: 4px; }
.stage-cell { flex: 1; text-align: center; padding: 5px 4px; background: rgba(0,40,25,.5); border-radius: 7px; border: 1px solid rgba(255,255,255,.06); }
.stage-cell .t { font-size: 9px; color: #88bbaa; } .stage-cell .v { font-size: 16px; font-weight: 900; color: #ff9a00; } /* 原版 IMPORTANT 底注/回合 UI_definitions.lua:1322/1336 */
.roomcode { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 5px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.12); border-radius: 6px; }
.roomcode .t { font-size: 10px; color: rgba(255,255,255,.5); } .roomcode .v { font-size: 14px; font-weight: 900; letter-spacing: 1px; color: var(--gold); } .roomcode .ic { font-size: 11px; color: rgba(255,255,255,.4); }
.confirm-btn { margin-top: auto; padding: 11px; font-size: 15px; }
.sb-status { text-align: center; font-size: 11px; font-weight: 700; padding: 3px; }
.sb-status.ready { color: var(--green); } .sb-status.waiting { color: var(--gold); }

/* play area —— 定位上下文：各区按原版 tile 坐标绝对定位（见下方 PLAY ZONES 块） */
.play { flex: 1; position: relative; min-width: 0; display: block; overflow: visible; }
.play::after { display: none; }
.opp-char { position: absolute; right: 12px; top: 10px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.opp-avatar { font-size: 38px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.6)); }
.opp-label { font-size: 10px; font-weight: 700; background: rgba(100,80,60,.85); padding: 2px 8px; border-radius: 4px; }
.opp-hp { font-size: 11px; font-weight: 900; color: var(--red); }
/* 右下角被聊天 FAB(固定)占用 → deck 放右侧中部，与 opp(右上)/chat(右下) 三档错开不重叠 */
.deck-pile { position: absolute; right: 14px; top: 46%; transform: translateY(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; }
.deck-back { width: 54px; height: 76px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.deck-back span { font-size: 7px; font-weight: 700; color: #aa88aa; text-align: center; z-index: 1; position: relative; }
.deck-count { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.6); margin-top: 3px; }

.joker-zone { width: 100%; }
.joker-count { text-align: center; font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 5px; text-shadow: 0 2px 6px rgba(0,0,0,.7); }
.joker-row { display: flex; gap: 6px; justify-content: center; align-items: center; min-height: calc(var(--card-h) + 6px); }
.tray { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.tray-label { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: rgba(255,255,255,.4); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.tray-row { display: flex; gap: 6px; }
.tray-item { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 54px; padding: 6px 8px 4px; border-radius: 8px; background: rgba(140,100,200,.16); border: 1px solid rgba(170,130,230,.4); transition: transform .12s, box-shadow .12s; }
.tray-item:hover { transform: translateY(-2px); box-shadow: 0 0 12px rgba(170,130,230,.4); }
.tray-item.cat-planet { background: rgba(90,160,255,.14); border-color: rgba(90,160,255,.4); }
.tray-item.cat-spectral { background: rgba(56,224,212,.12); border-color: rgba(56,224,212,.4); }
.tray-art { width: 26px; height: 26px; display: flex; }
.tray-name { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.85); white-space: nowrap; }
.stage-zone { display: flex; gap: 6px; justify-content: center; align-items: center; min-height: calc(var(--card-h) + 14px); }
.stage-empty { color: rgba(255,255,255,.18); font-size: 14px; font-weight: 700; }
.bottom { width: 100%; }
.hand-row { display: flex; justify-content: center; align-items: flex-end; gap: 5px; padding: 22px 4px 6px; min-height: calc(var(--card-h) + 30px); }
.handinfo { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 5px 0; }
.hand-counter { font-size: 12px; color: rgba(255,255,255,.55); font-weight: 700; }
.sort-btn { min-height: 34px; padding: 6px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); font-size: 12px; font-weight: 700; touch-action: manipulation; }
.sort-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.bottom-actions { display: flex; justify-content: center; gap: 14px; }
.bottom-actions .btn { letter-spacing: 2px; }

/* big, well-spaced primary actions (landscape-safe tap targets) */
.btn-action { min-width: 110px; min-height: 46px; font-size: 17px; padding: 0 24px; border-radius: var(--r-lg); }

/* ============================================================
   PLAY ZONES —— 原版 tile 绝对定位（% 相对 .play 盒；20×11.5 tile 换算）
   小丑左上 65.88% / 消耗品右上 30.91% / 出牌中 / 手牌+控件 底 / 牌组 底右。
   卡满载靠负 margin 重叠塞下（不缩卡，贴原版）。
   ============================================================ */
/* 顶部两区：top:0 但内容从顶部留白处向下排（卡比 tile 略高，避免上溢出屏顶被裁） */
.zone-jokers {
  position: absolute; top: 0; left: 0; width: 65.88%; height: auto;
  padding-top: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
}
.zone-jokers .joker-count { margin-bottom: 1px; }
.zone-jokers .joker-row {
  width: 100%; min-height: 0; gap: 4px; justify-content: flex-start;
  overflow-x: auto; overflow-y: visible; scrollbar-width: none;
}
.zone-jokers .joker-row::-webkit-scrollbar { display: none; }

.zone-consum {
  position: absolute; top: 0; left: 67.19%; width: 30.91%; height: auto;
  padding-top: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px;
}
.consum-count { font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.7); display: flex; align-items: center; gap: 5px; }
.consum-guide { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; font-size: 11px; font-weight: 900; line-height: 1; }
.consum-row { display: flex; gap: 8px; align-items: center; justify-content: center; min-height: var(--card-h); }
.zone-consum .consum-row {
  width: 100%; gap: 6px; justify-content: flex-start;
  overflow-x: auto; overflow-y: visible; scrollbar-width: none;
}
.zone-consum .consum-row::-webkit-scrollbar { display: none; }
.consum-card { position: relative; width: var(--card-w); flex: none; }
.consum-slot { width: var(--card-w); height: var(--card-h); border-radius: 8px; border: 2px dashed rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.28); font-size: 13px; font-weight: 700; }

/* stage（出牌结算区）—— 中部独立 tile
   原 top:46% 使计分牌底沿 ~522px 与底部手牌(~493px)重叠 29px；
   下调至 38% → 底沿 ~470px，加上 selected translateY(-20px) 仍余 ~12px 间隙。 */
.stage-zone {
  position: absolute; top: 38%; left: 5.38%; width: 71.19%; height: 22.7%; margin: 0;
}

/* bonus-bar（若有）—— 居中浮于 joker 与 stage 之间 */
.play > .bonus-bar { position: absolute; top: 28%; left: 50%; transform: translateX(-50%); margin: 0; z-index: 3; }

/* 底部：手牌（重叠扇形）+ 控件，下沿贴牌桌底；居中于 hand tile（左0.66% 宽80.64%）→ 让开右下牌组 */
.bottom {
  position: absolute; left: 0.66%; bottom: 6px; width: 80.64%;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
/* width:100% 给负叠 margin 公式一个确定的百分比基准（.bottom 在 align-items:center 下子项宽度收缩，会与 % margin 互为循环依赖坍缩成 0） */
.hand-row { padding: 4px 0 0; min-height: 0; gap: 0; width: 100%; }

/* 牌组（底右 tile） */
.deck-pile {
  position: absolute; top: 77.3%; left: 81.96%; right: auto; transform: none;
  width: 14.76%; display: flex; flex-direction: column; align-items: center;
}
/* 原版牌背（Enhancers.png b_* 切片），叠浅阴影模拟牌堆厚度 */
.deck-pile .deck-back-art {
  display: block;
  width: 54px; height: 76px;
  border-radius: 5px;
  overflow: hidden;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.45));
  cursor: pointer;
}
.deck-pile .deck-back-art .atlas-art {
  width: 100%; height: 100%;
  image-rendering: pixelated;
  border-radius: inherit;
}

/* 对手头像：放右侧中段空白带（消耗区底 ~28% 与牌组顶 77.3% 之间），避开放大后的满尺寸消耗品卡 */
.opp-char { position: absolute; right: 6px; top: 32%; left: auto; }

/* —— 卡片负 margin 重叠（满载塞下；原版重叠极少，仅满载微叠） —— */
/* 小丑/消耗品扩槽见上方对应 row：保持原卡尺寸，超出时横向滚动。 */
/* 手牌重叠：任意张数自适应（杂耍标签等可把手牌加到 8+ 张，不能枚举档位）。
   间距 = min(5px, (行宽 - n×卡宽)/(n-1))：放得下时 5px 缝，放不下时均匀负叠，
   永不溢出手牌区（左不压侧栏、右不压牌组堆）。--hand-n/--hand-n1 由 lane-play.js 内联下发。 */
.hand-row .hand-card:not(:first-child) {
  margin-left: min(5px, calc((100% - var(--card-w) * var(--hand-n, 8)) / var(--hand-n1, 7)));
}

/* ============================================================
   BOSS BLIND HEAD
   ============================================================ */
.blind-head.boss { background: linear-gradient(100deg,#5a1a4a,#7a1438); box-shadow: inset 0 0 0 1px rgba(255,120,200,.25), 0 0 16px rgba(150,30,90,.35); }
/* P3.4：Nemesis（ante2+ Boss 比分对拼）头牌用冷紫，与 PvE Boss 暖红区分 */
.blind-head.boss.nemesis { background: linear-gradient(100deg,#3a1a6a,#2a1858); box-shadow: inset 0 0 0 1px rgba(150,140,255,.3), 0 0 16px rgba(90,70,200,.4); }
.blind-badge {
  flex: none; font-size: 10px; font-weight: 900; letter-spacing: 1px;
  color: #2a0a1e; background: linear-gradient(135deg,#ff5db0,#c0287a);
  padding: 3px 7px; border-radius: 5px; align-self: flex-start;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.blind-head.nemesis .blind-badge { color: #0e0a2a; background: linear-gradient(135deg,#9d8bff,#5a3ec8); }

/* ============================================================
   TARGET + ROUND PROGRESS (replaces the old duplicate score box)
   ============================================================ */
.target-sec { display: flex; flex-direction: column; gap: 7px; }
.target-sec.reached { box-shadow: inset 0 0 0 1px rgba(255,210,80,.5), 0 0 14px rgba(255,200,40,.2); }
.target-sec.nemesis { border-color: rgba(157,139,255,.32); box-shadow: inset 0 0 0 1px rgba(157,139,255,.08); }
.tk-suffix { font-style: normal; margin-left: 2px; }
.target-reward { flex: none; text-align: center; }
.target-reward .tr-k { display: block; font-size: 8px; color: #88bbaa; font-weight: 700; }
.target-reward b { font-size: 14px; color: var(--gold); letter-spacing: 1px; }
.nemesis-live {
  border-color: rgba(157,139,255,.32);
  background: linear-gradient(180deg, rgba(70,48,130,.34), rgba(0,40,25,.44));
  box-shadow: inset 0 0 0 1px rgba(157,139,255,.08);
}
.nl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.nl-head span { min-width: 0; color: var(--t1); font-size: 11px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-head b { color: #b5a8ff; font-size: 9px; font-weight: 900; letter-spacing: .8px; }
.nl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.nl-grid div { min-width: 0; padding: 5px 4px; border-radius: 6px; background: rgba(0,0,0,.26); border: 1px solid rgba(255,255,255,.06); text-align: center; }
.nl-grid span { display: block; color: #88bbaa; font-size: 8px; font-weight: 800; white-space: nowrap; }
.nl-grid b { display: block; color: #fff; font-size: 14px; line-height: 1.15; font-weight: 900; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ============================================================
   SCORING ANIMATION
   ============================================================ */
@keyframes scoreBump { 0% { transform: scale(1); } 35% { transform: scale(1.22); filter: brightness(1.3); } 100% { transform: scale(1); } }
.bumpable { animation: scoreBump .34s cubic-bezier(.34,1.5,.5,1); }

.stage-zone.active { min-height: 124px; }
.play-slot { position: relative; transition: transform .18s; }
.play-slot.scored { transform: translateY(-10px); }
.play-slot.scored .pcard { box-shadow: 0 0 0 2px var(--gold), 0 8px 20px rgba(0,0,0,.5), 0 0 18px rgba(255,210,80,.5); }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%,4px); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-30px); } }
@keyframes floatUpBig {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.5) rotate(-6deg); }
  22% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.18) rotate(3deg); }
  40% { transform: translateX(-50%) translateY(-4px) scale(1) rotate(-1deg); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(1); }
}
/* per-card chip gain — a chunky blue token-badge, impossible to miss */
.float-chip {
  position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  font-family: var(--font-impact); font-size: 25px; letter-spacing: .5px; line-height: 1;
  color: #fff; padding: 2px 10px 0; border-radius: 12px; white-space: nowrap;
  background: linear-gradient(135deg,#56a8ee,#2160a8);
  border: 1.5px solid rgba(160,215,255,.7);
  box-shadow: 0 3px 9px rgba(0,0,0,.5), inset 0 1.5px 0 rgba(255,255,255,.45), 0 0 14px rgba(80,165,250,.55);
  text-shadow: 0 2px 3px rgba(0,20,60,.6);
  animation: floatUpBig 1s ease-out forwards; pointer-events: none; z-index: 7;
}

/* joker trigger gain — colored by what it adds */
.float-joker {
  position: absolute; left: 50%; top: -20px; transform: translateX(-50%);
  font-family: var(--font-impact); font-size: 23px; letter-spacing: .5px; line-height: 1;
  white-space: nowrap; color: #fff; padding: 2px 11px 0; border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,.55);
  box-shadow: 0 3px 9px rgba(0,0,0,.5), inset 0 1.5px 0 rgba(255,255,255,.4);
  text-shadow: 0 2px 3px rgba(0,0,0,.5);
  animation: floatUpBig 1.1s ease-out forwards; pointer-events: none; z-index: 9;
}
.float-joker.chips { background: linear-gradient(135deg,#56a8ee,#2160a8); box-shadow: 0 3px 9px rgba(0,0,0,.5), inset 0 1.5px 0 rgba(255,255,255,.4), 0 0 14px rgba(80,165,250,.55); }
.float-joker.mult  { background: linear-gradient(135deg,#ff5d86,#c0285a); box-shadow: 0 3px 9px rgba(0,0,0,.5), inset 0 1.5px 0 rgba(255,255,255,.4), 0 0 14px rgba(255,90,130,.55); }
.float-joker.xmult { background: linear-gradient(135deg,#ffd23f,#e0851a); color: #3a1a00; text-shadow: 0 1px 1px rgba(255,255,255,.4); box-shadow: 0 3px 9px rgba(0,0,0,.5), inset 0 1.5px 0 rgba(255,255,255,.55), 0 0 16px rgba(255,200,60,.6); }

/* 计分浮标（.score-pop / .score-pop-chips / .score-pop-mult）见 balatro.css —— fixed 定位、
   逐张牌头顶冒出。自创的分档爆击弹窗（.score-pop.t1..t4 + .sp-*）已删除，对齐原版结算演出。 */

.joker-wrap { position: relative; flex: none; transition: transform .18s; }
.joker-wrap.active { transform: translateY(-8px); }
.joker-wrap.active .jcard { box-shadow: 0 0 0 2px var(--gold), 0 0 20px rgba(255,210,80,.6), var(--sh-card); }
.hand-row.dim { opacity: .5; pointer-events: none; transition: opacity .2s; }

/* opponent takes damage */
@keyframes oppShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-5px) rotate(-3deg); } 40% { transform: translateX(5px) rotate(3deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.opp-char.hit { animation: oppShake .5s; }
.opp-char.hit .opp-avatar { filter: drop-shadow(0 0 12px rgba(255,60,100,.9)) brightness(1.3); }
@keyframes dmgFloat { 0% { opacity: 0; transform: translateX(-50%) translateY(0) scale(.6); } 20% { opacity: 1; transform: translateX(-50%) translateY(-6px) scale(1.2); } 100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(1); } }
.dmg-float {
  position: absolute; left: 50%; top: 8px;
  font-size: 26px; font-weight: 900; color: #ff4d6d;
  text-shadow: 0 2px 8px rgba(0,0,0,.8); animation: dmgFloat 1.2s ease-out forwards; pointer-events: none; z-index: 9;
}

/* ============================================================
   CONSUMABLES — 消耗品卡（tile 布局，右上独立区）
   ============================================================ */

.consum-card { background: none; padding: 0; transition: transform .14s, filter .14s; }
.consum-card:not(:disabled):hover { transform: translateY(-5px); filter: brightness(1.08); }
.consum-card:disabled { opacity: .55; }
/* #6：消耗品卡与手牌/小丑同尺寸（原版消耗品=同卡尺寸），去掉旧 56×80 缩小 */
.consum-card .jcard { width: var(--card-w); height: var(--card-h); }
.consum-slot {
  width: var(--card-w); height: var(--card-h); border-radius: 9px; flex: none;
  border: 2px dashed rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.25); font-size: 11px; font-weight: 700;
}
/* 单张消耗品的 ⓘ（移动端防误触：点说明不触发使用） */
.consum-card { position: relative; }
.consum-info {
  position: absolute; top: -4px; right: -4px; z-index: 5;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #cfe9da; font-size: 11px; font-weight: 900;
  border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
}
.consum-info:hover { background: rgba(255,200,40,.3); color: var(--gold); }

/* ============================================================
   消耗品 Use/Sell 浮动菜单（对齐原版 use_and_sell_buttons）
   ============================================================ */
.cs-menu {
  position: fixed; z-index: 1200; min-width: 116px;
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  background: linear-gradient(180deg, rgba(14,32,24,.98), rgba(6,18,13,.99));
  border: 1px solid rgba(120,220,170,.32); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08);
  animation: csMenuIn .12s ease-out;
}
@keyframes csMenuIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
.cs-menu-title { font-size: 12px; font-weight: 900; color: var(--gold); text-align: center; padding-bottom: 2px; }
.cs-menu-btn {
  min-height: 38px; padding: 8px 12px; border-radius: 9px; cursor: pointer;
  font-size: 14px; font-weight: 800; color: #fff; border: 1px solid rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: filter .12s, transform .1s;
}
.cs-menu-btn:active { transform: scale(.96); }
.cs-menu-btn.use  { background: linear-gradient(180deg,#2f9e6a,#1c6e48); }
.cs-menu-btn.sell { background: linear-gradient(180deg,#c98a2a,#9a6516); }
.cs-menu-btn.sell b { color: #fff7d8; }
.cs-menu-btn.info { background: rgba(255,255,255,.1); color: #cfe9da; font-weight: 700; min-height: 32px; font-size: 13px; }
.cs-menu-btn:hover { filter: brightness(1.1); }

/* ============================================================
   消耗品使用动画（屏幕中部炸开 + 卡牌图标放大溶解）
   ============================================================ */
.consum-use-fx {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
  z-index: 1300; pointer-events: none; text-align: center;
}
.consum-use-fx .cuf-rays {
  position: absolute; left: 50%; top: 50%; width: 240px; height: 240px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,210,.55), rgba(255,220,120,.18) 45%, transparent 70%);
  animation: cufRays .9s ease-out forwards;
}
@keyframes cufRays { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.6); } }
.consum-use-fx .cuf-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 52px; line-height: 1;
  animation: cufCard 1.05s cubic-bezier(.2,1.1,.4,1) forwards;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.6));
}
.consum-use-fx .cuf-card span { font-size: 15px; font-weight: 900; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
@keyframes cufCard {
  0%   { opacity: 0; transform: scale(.4) translateY(10px); }
  25%  { opacity: 1; transform: scale(1.2) translateY(0); }
  70%  { opacity: 1; transform: scale(1.1) translateY(-8px); }
  100% { opacity: 0; transform: scale(1.35) translateY(-40px); }
}
.consum-use-fx .cuf-effect {
  margin-top: 8px; font-size: 13px; font-weight: 800; color: #ffe9a8;
  text-shadow: 0 2px 6px rgba(0,0,0,.85);
  animation: cufEffect 1.05s ease-out forwards;
}
@keyframes cufEffect { 0% { opacity: 0; } 30% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* 借鉴重做：侧栏「受到攻击」诅咒条（设计稿无，统一 .sb-sec 风格） */
.curse-sec { cursor: pointer; border-color: rgba(226,66,95,.4); background: rgba(60,16,28,.5); }
.curse-sec:hover { border-color: rgba(255,100,130,.6); }
.curse-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.curse-badge {
  font-size: 10px; font-weight: 800; color: #ffbccb;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(226,66,95,.22); border: 1px solid rgba(255,100,130,.35);
}

/* 借鉴重做：消耗品「选目标」模式顶部提示 */
.play-hint {
  align-self: center; margin-bottom: 6px;
  padding: 5px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #2a1a00;
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  box-shadow: 0 3px 12px rgba(255,200,40,.4);
  animation: hintPulse 1.1s ease-in-out infinite;
}
@keyframes hintPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* consumable action sheet */
.csheet { display: flex; gap: 16px; align-items: center; }
.csheet-card .jcard { width: 88px; height: 124px; }
.csheet-info { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.csheet-desc { font-size: 14px; color: var(--t1); line-height: 1.55; }
.csheet-note { font-size: 11px; color: var(--t3); }

/* selection counter in handinfo */
.sel-counter { font-size: 12px; font-weight: 800; color: var(--gold); }
.handinfo .sort-btn { min-height: 32px; }

/* ============================================================
   BOSS INFO OVERLAY
   ============================================================ */
.boss-info { display: flex; gap: 14px; align-items: center; padding: 10px 12px; background: rgba(120,30,90,.16); border: 1px solid rgba(200,80,150,.3); border-radius: var(--r-md); }
.boss-emblem { font-size: 40px; flex: none; }
.boss-rule-h { font-size: 13px; font-weight: 900; color: var(--violet); }
.tip-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.tip-list li { font-size: 12px; color: var(--t2); line-height: 1.55; }
.tip-list li b { color: var(--t1); }
.boss-reward { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.boss-reward-k { font-size: 13px; font-weight: 900; color: var(--t1); }

/* ============================================================
   SHOP
   ============================================================ */
.shop { padding: 12px 14px; gap: 10px; }
.shop-game { min-height: var(--logical-h, 760px); }
.shop-table { background: radial-gradient(circle at 56% 38%, rgba(32,105,77,.72), rgba(14,60,42,.96) 62%); }
.shop-sidebar { gap: 6px; }
.shop-head {
  background: linear-gradient(100deg,#2f8a5c,#1f6048);
  box-shadow: inset 0 0 0 1px rgba(160,255,210,.22), 0 8px 18px rgba(0,0,0,.25);
}
.shop-sidebar .blind-badge { background: linear-gradient(135deg,#ffcc58,#d99220); color: #2a1600; }
.shop-score-sec { margin-top: 0; }

.shop-play {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 92px 10px 12px;
  overflow: visible;
}
.shop-play::after { z-index: 0; }
/* 持有区（原版 Balatro：底部常驻 HUD）—— 小丑左、消耗品右，贴底显示 */
.shop-held-zone {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 9px;
  flex: none;
  margin-top: auto;   /* 推到 flex-column 的底部 */
}
.shop-held-panel {
  min-width: 0;
  padding: 6px 8px 8px;
  border-radius: 8px;
  background: rgba(0,40,25,.42);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;   /* 防止卡片溢出到相邻面板 */
}
.shop-held-jokers { flex: 1 1 0; }
.shop-held-consum { flex: 0 1 36%; max-width: 38%; min-width: calc(var(--card-w) * 1.25); }
.shop-zone-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}
.shop-zone-title b { color: var(--gold); font-variant-numeric: tabular-nums; }
/* 持有卡行：flex-wrap 防溢出，卡片自动缩放适配面板宽度 */
.shop-owned-row {
  width: 100%; align-items: flex-start; justify-content: flex-start; gap: 6px;
  min-height: calc(var(--card-h) + 34px);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.shop-owned-row::-webkit-scrollbar { display: none; }
.shop-held-jokers .shop-owned-row > * { flex: 0 0 auto; }
.shop-held-jokers .shop-owned-row .shop-empty-cell { flex: 0 0 var(--card-w); min-width: var(--card-w); }
.shop-held-jokers .shop-owned-row .shop-empty-cell .jslot { width: var(--card-w); min-width: var(--card-w); }
.shop-held-consum .shop-owned-row { gap: 6px; }
.shop-held-consum .shop-owned-row > * { flex: 0 0 auto; }
.shop-empty-cell, .shop-consum-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: none;
}

@media (max-width: 720px) {
  .shop-held-zone {
    flex-direction: column;
    width: 100%;
  }
  .shop-held-jokers,
  .shop-held-consum {
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}
.shop-floor {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 2px 8px;
}
.shop-play .shop-board {
  min-height: 100%;
  display: flex; flex-direction: column; gap: 10px;
}
/* 原版两排版式：上排 = 按钮柱 + 混合卡槽；下排 = 优惠券 + 补充包 */
.shop-row { display: flex; gap: 10px; align-items: stretch; min-height: 0; }
.shop-btn-col { flex: 0 0 132px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.shop-btn-col .btn { width: 100%; min-height: 46px; font-size: 14px; }
/* 原版霓虹招牌：ShopSignAnimation.png 904×114 = 4 帧横排（每帧 226×114，半尺寸显示 113×57） */
.shop-sign {
  width: 113px; height: 57px;
  margin: 0 auto;
  background: url(/textures/2x/ShopSignAnimation.png) no-repeat 0 0;
  background-size: 452px 57px;
  image-rendering: pixelated;
  animation: shopSignFlick 2s steps(4) infinite;
}
@keyframes shopSignFlick {
  from { background-position: 0 0; }
  to { background-position: -452px 0; }
}
/* 省电 / 减动效：停在第 0 帧静止显示 */
@media (prefers-reduced-motion: reduce) { .shop-sign { animation: none !important; } }
body.powersave .shop-sign { animation: none !important; }
.shop-area {
  flex: 1; min-width: 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(18,30,34,.82);
}
.shop-area-title { font-size: 10px; font-weight: 900; letter-spacing: .8px; color: var(--t3); margin-bottom: 6px; }
.shop-voucher-area { flex: 0 1 38%; }
.shop-pack-area { flex: 1 1 62%; }
.shop-play .shelf-body { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.shop-play .price-cell { gap: 5px; }
.shop-play .btn-sm { min-height: 28px; padding: 5px 9px; }
.shop-play .shop-deck {
  top: 48%;
  right: 14px;
  left: auto;
  width: 66px;
  transform: translateY(-50%);
  z-index: 5;
}
.shop-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex: none; }
.shop-top-l { display: flex; align-items: center; gap: 10px; }
.token-stat .v { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); }
.shop-top-r { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-end; }
.shop-subbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none; overflow-x: auto; max-width: 100%; }

/* coin pips（利息说明浮层用）：蓝色筹码，点亮 = 已得利息 */
.coin-pips { display: flex; gap: 4px; margin: 1px 0; }
.token.coin-pip.off { filter: grayscale(.7) brightness(.5); opacity: .5; }
.token.coin-pip.on { box-shadow: inset 0 1.5px 2px rgba(255,255,255,.55), inset 0 -2px 4px rgba(0,0,20,.4), 0 0 9px rgba(90,170,250,.6), 0 2px 5px rgba(0,0,0,.45); }

/* economy explainer modal */
.econ-explain { display: flex; flex-direction: column; gap: 14px; }
.ee-coins { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; background: rgba(255,200,40,.07); border: 1px solid rgba(255,200,40,.25); border-radius: var(--r-md); }
.ee-k { font-size: 12px; font-weight: 800; color: var(--gold); }
.ee-note { font-size: 11px; color: var(--t2); line-height: 1.6; text-align: center; }
.ee-table { display: flex; flex-direction: column; gap: 6px; }
.ee-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(0,0,0,.22); border-radius: var(--r-md); border: 1px solid var(--line); }
.ee-row.total { background: rgba(46,194,126,.1); border-color: rgba(46,194,126,.3); }
.ee-cell { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ee-cell b { font-size: 14px; font-weight: 800; color: var(--t1); }
.ee-cell span { font-size: 11px; color: var(--t3); }
.ee-val { font-size: 20px; font-weight: 900; color: var(--t1); font-variant-numeric: tabular-nums; }
.ee-val.gold { color: var(--gold); }
.shop-board { flex: 1; display: flex; gap: 12px; min-height: 0; }
.shop-board.locked { opacity: .5; pointer-events: none; filter: saturate(.6); }
.shop-held-zone.locked { pointer-events: none; opacity: .5; }
.shop-col { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.shelf { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; box-shadow: inset 0 1px 0 var(--panel-hi); }
.shelf-body { display: flex; flex-wrap: wrap; gap: 10px; }
.price-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.shop-lockmsg { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); color: var(--gold); font-weight: 800; font-size: 14px; }
/* 货架内说明/空态/提示（借鉴重做：把利息·概率·搜索镜·攻击牌规则写在货架里，统一设计风格） */
.shelf-note { width: 100%; font-size: 10.5px; line-height: 1.5; color: var(--t2); background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 9px; margin-bottom: 2px; }
.shelf-note b { color: var(--gold); font-weight: 900; }
.shelf-note.note-green { background: rgba(46,194,126,.14); border-color: rgba(46,194,126,.38); color: #8fe0bb; }
.shelf-note.note-gold  { background: rgba(255,200,40,.12); border-color: rgba(255,200,40,.4); color: #ffd98a; }
.shelf-empty { width: 100%; text-align: center; font-size: 12px; color: var(--t3); padding: 14px 0; }
.cell-hint { font-size: 10px; font-weight: 700; color: var(--t3); text-align: center; }
/* emoji 占位美术（攻击牌/补充包暂用 emoji，Phase 2 补画 SVG 后退役） */
.art-emoji { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
/* 开包弹窗加宽（设计稿 Modal wide） */
.modal-wide { width: min(880px, 94%); }

/* ============================================================
   OVERLAYS — settings / legend / handinfo / boss / pack
   ============================================================ */
.set-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.settings-grid,
.settings-column { display: contents; }
.settings-help-wrap { position: relative; margin-top: 12px; }
.settings-help-wrap .set-note { margin-top: 8px; }
.set-label { font-size: 13px; font-weight: 700; color: var(--t1); width: 80px; flex: none; }
.set-ctrl { flex: 1; display: flex; align-items: center; gap: 10px; }
.set-ctrl input[type=range] { flex: 1; accent-color: var(--gold); }
.set-val { font-size: 13px; color: var(--gold); min-width: 26px; text-align: right; }
.set-note { font-size: 11px; color: var(--t3); line-height: 1.6; margin-top: 12px; }
.seg { display: flex; background: rgba(0,0,0,.3); border-radius: 7px; padding: 3px; gap: 3px; }
.seg-btn { font-size: 12px; font-weight: 700; color: var(--t2); padding: 5px 14px; border-radius: 5px; }
.seg-btn.on { background: linear-gradient(135deg,var(--gold),var(--gold-d)); color: #2a1a00; }
.toggle { width: 44px; height: 25px; border-radius: 999px; background: rgba(0,0,0,.4); border: 1px solid var(--line-2); position: relative; transition: background .15s; }
.toggle i { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--t3); transition: transform .15s, background .15s; }
.toggle.on { background: rgba(46,194,126,.4); } .toggle.on i { transform: translateX(19px); background: var(--green); }

.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.legend-block { background: rgba(0,0,0,.2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.legend-h { font-size: 13px; font-weight: 900; color: var(--gold); margin-bottom: 8px; }
.legend-swatches { display: flex; gap: 10px; }
.legend-sw { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--t2); }
.legend-sw .sw { width: 34px; height: 46px; border-radius: 6px; border: 2px solid rgba(255,255,255,.2); }
.legend-eds { display: flex; flex-direction: column; gap: 5px; }
.legend-ed { display: flex; justify-content: space-between; font-size: 12px; }
.legend-ed b { font-weight: 900; } .legend-ed span { color: var(--t2); }
.legend-threats { display: flex; flex-wrap: wrap; gap: 6px; }
.legend-p { font-size: 11px; color: var(--t3); line-height: 1.6; margin-top: 8px; }

.hand-table { display: flex; flex-direction: column; gap: 2px; }
.hand-th, .hand-tr { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 8px 12px; border-radius: 6px; }
.hand-th { font-size: 11px; color: var(--t3); font-weight: 700; }
.hand-tr { background: rgba(0,0,0,.2); }
.hand-tr:nth-child(even) { background: rgba(0,0,0,.32); }
.hand-tr .hn { font-size: 14px; font-weight: 800; }
.hand-tr .hc { font-size: 14px; font-weight: 900; color: #6fb7ff; min-width: 44px; text-align: right; }
.hand-tr .hm { font-size: 14px; font-weight: 900; color: #ff8fa6; min-width: 40px; text-align: right; }

.diff-list { display: flex; flex-direction: column; gap: 10px; }
.diff-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px 18px; border-radius: var(--r-md); }
.diff-card b { font-size: 17px; } .diff-card span { font-size: 12px; opacity: .85; }

.pack-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 8px 0; }
/* 开包卡片单元：卡面 + 效果描述 + 选择按钮，分离查看与选取（原版模式） */
.pack-pick-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px; border-radius: var(--r-md);
  border: 2px solid var(--line);
  background: rgba(0,0,0,.2);
  max-width: 180px;
  transition: transform .12s, border-color .12s;
}
.pack-pick-cell:hover { transform: translateY(-4px); border-color: var(--accent-gold-border,rgba(255,200,40,.4)); }
.pack-pick-card { pointer-events: none; }   /* 卡面仅展示，点击走下方按钮 */
.pack-pick-name { font-size: 13px; font-weight: 800; color: var(--t1); }
.pack-pick-desc {
  font-size: 11px; line-height: 1.45; color: var(--t2);
  text-align: center; padding: 4px 6px;
  background: rgba(255,255,255,.06); border-radius: 6px;
  min-height: 1.5em;
}
.pack-pick-cell .btn { margin-top: 2px; width: 100%; }
/* 旧 .pack-pick 按钮兼容（如有残留） */
.pack-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(0,0,0,.2); transition: transform .12s, border-color .12s; }
.pack-pick:hover { transform: translateY(-5px); border-color: var(--accent-gold-border,rgba(255,200,40,.4)); }

/* ============================================================
   DECK INFO (牌组信息) — full-deck viewer
   ============================================================ */
.deckview {
  width: min(960px, 96%); max-height: 94%;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0c2c46, #0a2236 60%, #081a2c);
  border: 1px solid rgba(90,150,210,.35);
  border-radius: var(--r-xl);
  box-shadow: 0 18px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(120,180,240,.18);
  overflow: hidden;
}
.deckview-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; flex: none;
  background: linear-gradient(180deg, rgba(40,90,150,.5), rgba(20,60,110,.2));
  border-bottom: 1px solid rgba(90,150,210,.3);
}
.dv-title { font-size: 18px; font-weight: 900; color: #d6e9ff; letter-spacing: 1px; }
.dv-seg { display: flex; gap: 3px; background: rgba(0,0,0,.32); border-radius: 8px; padding: 3px; margin-left: 6px; }
.dv-seg-btn { font-size: 12px; font-weight: 800; color: #7fa8cc; padding: 6px 14px; border-radius: 6px; min-height: 32px; }
.dv-seg-btn.on { background: linear-gradient(135deg,#3d8fe0,#235f9e); color: #fff; }
.deckview-head .modal-x { margin-left: auto; }

.deckview-body { display: flex; gap: 14px; padding: 16px 18px; overflow: auto; }

/* rail */
.dv-rail { flex: none; width: 150px; display: flex; flex-direction: column; gap: 8px; }
.dv-rail-total {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 12px; border-radius: var(--r-md);
  background: rgba(0,0,0,.3); border: 1px solid rgba(90,150,210,.3);
}
.dv-rail-total .k { font-size: 10px; color: #7fa8cc; font-weight: 700; letter-spacing: 1px; }
.dv-rail-total b { font-size: 26px; font-weight: 900; color: #fff; line-height: 1; }
.dv-rail-total i { font-size: 13px; color: #6f96ba; font-style: normal; font-weight: 700; }
.dv-rail-list { display: flex; flex-direction: column; gap: 3px; }
.dv-rail-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 7px; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.04); }
.dv-rail-row.empty { opacity: .42; }
.dv-rank { font-size: 13px; font-weight: 900; color: #cfe2ff; text-align: center; }
.dv-bar { height: 7px; border-radius: 4px; background: rgba(0,0,0,.4); overflow: hidden; }
.dv-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg,#3d8fe0,#7ec8ff); }
.dv-cnt { font-size: 12px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.dv-cnt small { font-size: 9px; color: #6f96ba; font-weight: 700; }

/* grid */
.dv-grid { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dv-row { display: flex; align-items: center; gap: 10px; }
.dv-suit { font-size: 24px; width: 26px; text-align: center; flex: none; color: #cfe2ff; }
.dv-suit.red { color: #ff7a90; }
.dv-cards { display: flex; gap: 5px; flex-wrap: nowrap; }
.dv-cell { transition: opacity .15s; }
.dv-cell.hide { opacity: .12; filter: grayscale(1); }

.deckview-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 18px; flex: none;
  border-top: 1px solid rgba(90,150,210,.25); background: rgba(0,0,0,.2);
}
.dv-legend { display: flex; gap: 16px; }
.dv-lg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9fc0dd; font-weight: 700; }
.dv-lg .sw { width: 16px; height: 22px; border-radius: 3px; border: 1px solid rgba(255,255,255,.6); }
.dv-lg .sw.live { background: var(--card-face); }
.dv-lg .sw.out { background: var(--card-face); position: relative; opacity: .8; }
.dv-lg .sw.out::after { content: "✕"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(220,40,60,.8); font-size: 15px; font-weight: 900; }

/* ============================================================
   C3 图鉴 Collection —— 全屏只读浏览（小丑/塔罗/星球/幻灵/券/牌型）
   复用 .scrim（fixed，挂 body）+ 自建大面板 .coll-modal；卡片用 .jcard 体系。
   ============================================================ */
/* 图鉴面板大、留白可更紧；但仍吃 safe-area 让右上 ✕/左上标签避开横屏凹口 */
.coll-overlay {
  padding:
    max(14px, var(--sa-top, 0px))
    max(14px, var(--sa-right, 0px))
    max(14px, var(--sa-bottom, 0px))
    max(14px, var(--sa-left, 0px));
}
.coll-modal {
  width: min(1040px, 96%); height: min(94%, 720px);
  display: flex; flex-direction: column;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: 0 18px 60px rgba(0,0,0,.6), inset 0 1px 0 var(--panel-hi);
  overflow: hidden; position: relative;
}
.coll-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; }
.coll-title { font-size: 17px; font-weight: 900; color: var(--gold); }
.coll-x { margin-left: auto; }
.coll-tabs { flex: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.coll-tab {
  font-family: inherit; cursor: pointer; font-size: 13px; font-weight: 800;
  color: var(--t2); background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px;
  display: inline-flex; align-items: center; gap: 6px;
}
.coll-tab b { font-size: 10px; font-weight: 900; color: var(--t3); }
.coll-tab.active { color: #1a1208; background: linear-gradient(180deg, var(--gold), #c9920f); border-color: var(--gold); }
.coll-tab.active b { color: rgba(26,18,8,.7); }
.coll-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 22px; }

.coll-sec { margin-bottom: 18px; }
.coll-sec-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 900; color: var(--t1);
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.coll-sec-h .dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.coll-sec-h .dot.r-common   { background: var(--rar-common); }
.coll-sec-h .dot.r-uncommon { background: var(--rar-uncommon); }
.coll-sec-h .dot.r-rare     { background: var(--rar-rare); }
.coll-sec-h .dot.r-legend   { background: var(--rar-legend); }
.coll-sec-n { margin-left: auto; font-size: 11px; color: var(--t3); font-weight: 800; }

.coll-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.coll-grid .jcard { cursor: pointer; transition: transform .12s ease; }
.coll-grid .jcard:hover { transform: translateY(-3px); }

/* 牌型一览 */
.coll-ht-hint { font-size: 12px; color: var(--t2); line-height: 1.5; margin-bottom: 12px; }
.coll-ht-list { display: flex; flex-direction: column; gap: 7px; }
.coll-ht-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 13px; border-radius: var(--r-md);
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.coll-ht-name { font-size: 14px; font-weight: 800; color: var(--t1); min-width: 88px; }
.coll-ht-cm { font-size: 14px; font-weight: 900; white-space: nowrap; }
.coll-ht-cm .c { color: var(--accent-blue); }
.coll-ht-cm .m { color: var(--accent-red); }
.coll-ht-up { margin-left: auto; font-size: 11px; color: var(--t3); font-weight: 700; }

/* 详情子层（盖在网格上，点背景/✕ 返回）—— 复用 layout.css 的 .jd-* 排版 */
.coll-detail {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(3, 7, 5, 0.66);
  display: flex; align-items: center; justify-content: center; padding: 22px;
}
.coll-detail-card {
  position: relative; width: min(440px, 94%); max-height: 90%; overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--r-xl); padding: 18px 18px 20px;
  box-shadow: 0 18px 60px rgba(0,0,0,.65);
}
.coll-d-x { position: absolute; top: 10px; right: 10px; }
.coll-d-cost { margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--gold); }
.jd-en { font-size: 12px; font-weight: 700; color: var(--t3); letter-spacing: .5px; }
/* 消耗品/券详情的类型 chip 借 .jd-rar 外形 + 类目色 */
.jd-rar.cat-tarot    { background: linear-gradient(160deg,#3a2c5c,#241c3c); border: 1px solid var(--violet); }
.jd-rar.cat-planet   { background: linear-gradient(160deg,#1d3556,#142440); border: 1px solid var(--blue); }
.jd-rar.cat-spectral { background: linear-gradient(160deg,#194742,#0f2c29); border: 1px solid var(--teal); }
.jd-rar.cat-voucher  { background: linear-gradient(160deg,#4a3712,#2e2208); border: 1px solid var(--gold); color: #ffe6a6; text-shadow: none; }

/* 大厅菜单底部（C1 主菜单：图鉴 / 设置 入口）*/
.lobby-menu-row { display: flex; gap: 10px; margin-top: 12px; }
.lobby-codex { flex: 1; font-size: 13px; }

/* ============================================================
   C2 盲注选择/预告浮层 —— 三盲注卡（小/大/Boss）+ 目标分 + 奖励
   复用 .scrim + .modal；色语对齐 .bt-pip（小=teal/大=gold/Boss=red）。
   ============================================================ */
.blind-ov-panel { width: min(660px, 94%); }
.blind-choice-row { display: flex; gap: 10px; justify-content: center; }
.blind-choice {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px 13px; border-radius: var(--r-lg, 12px);
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  text-align: center;
}
.blind-choice.small  { border-color: rgba(42,157,143,.5); }
.blind-choice.big    { border-color: rgba(212,160,23,.5); }
.blind-choice.boss   { border-color: rgba(192,57,43,.55); }
.blind-choice.upcoming { opacity: .62; }
.blind-choice.done { opacity: .8; }
.blind-choice.active {
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 8px 24px rgba(0,0,0,.4);
  transform: translateY(-2px);
}
.blind-choice.active.small { box-shadow: 0 0 14px rgba(42,157,143,.4); border-color: rgba(42,157,143,.85); }
.blind-choice.active.big   { box-shadow: 0 0 14px rgba(212,160,23,.4); border-color: rgba(212,160,23,.85); }
.blind-choice.active.boss  { box-shadow: 0 0 14px rgba(192,57,43,.45); border-color: rgba(192,57,43,.9); }
.bc-flag { position: absolute; top: 7px; right: 8px; font-size: 9px; font-weight: 900; padding: 2px 7px; border-radius: 999px; letter-spacing: .5px; }
.bc-flag.done   { color: #8fe0bb; background: rgba(46,194,126,.16); }
.bc-flag.active { color: #1a1208; background: var(--gold); }
.bc-flag.up     { color: var(--t3); background: rgba(255,255,255,.06); }
.bc-glyph { font-size: 26px; line-height: 1; }
.blind-choice.small .bc-glyph { color: #5fd0c2; }
.blind-choice.big   .bc-glyph { color: #ffd277; }
.blind-choice.boss  .bc-glyph { color: #ff8f7d; }
.bc-name { font-size: 14px; font-weight: 900; color: var(--t1); line-height: 1.15; }
.bc-target { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
.bc-target b { font-size: 22px; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.bc-k { font-size: 9px; font-weight: 800; letter-spacing: .5px; color: var(--t3); text-transform: uppercase; }
.bc-rule { font-size: 10px; line-height: 1.35; color: #ffbcbc; padding: 0 2px; }
.bc-rule.muted { color: var(--t3); }
.bc-reward { display: flex; flex-direction: column; gap: 1px; margin-top: auto; padding-top: 4px; }
.bc-reward b { font-size: 16px; font-weight: 900; color: var(--gold); line-height: 1; }

/* ============================================================
   S7 移动端触控目标 ≥44px —— 仅粗指针(触屏)放大命中区，桌面鼠标保持紧凑。
   断点/安全区:Fit-Stage 已按视口宽高比自适应逻辑宽(stage.js LW 夹钳覆盖
   SE 1.778→1352 / 标准·ProMax 2.167→1647,均落 [1000,1780]),凹口让位由
   .stage-viewport padding + 上面 .scrim/.coll-overlay 的 env(safe-area) 统一负责。
   这里只补「命中区」一项:把弹窗关闭钮、图鉴标签、大厅菜单钮垫到 44。
   注:对局侧栏 .icon-btn.sm(30px) 受 tile 网格挤占,随整盘缩放,故排除不强撑。
   ============================================================ */
@media (pointer: coarse) {
  /* 弹窗/大厅圆形钮(关闭✕、音频、设置、Boss、图例…非侧栏 .sm 变体)→ 44×44 */
  .icon-btn:not(.sm) { width: 44px; height: 44px; }
  /* 图鉴标签页:加高命中区(细指针下默认 ~31px) */
  .coll-tab { min-height: 40px; padding: 9px 15px; }
  /* 大厅主菜单/加入按钮:确保 ≥44 高,便于拇指点选 */
  .lobby-codex,
  .lobby-join .btn,
  .lobby-mode .btn { min-height: 44px; }
  /* 盲注卡片本就 >44,无需补;详情子层关闭钮同 .icon-btn 已覆盖 */

  /* 0.2 商店顶栏按钮压缩（小屏 + 触屏） */
  @media (max-width: 900px) {
    .shop-top-r .btn-sm { padding: 6px 10px; font-size: 12px; }
  }

  /* 0.5 卖出按钮触控命中区 */
  .sell-btn { min-height: 44px; font-size: 12px; padding: 6px 12px; }

  /* 0.6 赌博按钮触控命中区 */
}

/* ========== 回合结算（合并屏，原版 cash_out 单面板）========== */
.cash-out { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px; max-width: 420px; margin: 0 auto; }
.co-head { text-align: center; }
.co-title { font-size: 16px; font-weight: 900; color: var(--t1); }
.co-status { font-size: 14px; font-weight: 900; margin-top: 4px; }
.co-status.met { color: #5fd0c2; }
.co-status.missed { color: #ff6b6b; }
/* 宿敌分数对比条 */
.co-score-strip { width: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 12px; border-radius: var(--r-md); background: rgba(70,48,130,.3); border: 1px solid rgba(157,139,255,.32); }
.co-score-strip .css-side { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.co-score-strip .css-side i { font-style: normal; font-size: 10px; color: var(--t3); font-weight: 800; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-score-strip .css-side b { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; }
.co-score-strip .css-side.you b { color: #6fe0aa; }
.co-score-strip .css-side.opp b { color: #ff9bb2; }
.co-score-strip .css-vs { font-size: 11px; color: var(--t3); font-weight: 900; }
/* 双方命数 */
.co-lives { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 9px 12px; border-radius: var(--r-md); background: rgba(0,0,0,.24); border: 1px solid var(--line); }
.co-body { width: 100%; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-lg); padding: 16px; }
/* 顶部兑现大按钮（原版 Cash Out: $X 位于面板顶） */
.co-cashout-btn { width: 100%; margin-bottom: 12px; font-size: 17px; }
.co-lines { display: flex; flex-direction: column; gap: 6px; }
.co-line { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-md); background: rgba(255,255,255,.04); opacity: 0; animation: coLineIn 0.35s ease-out forwards; }
@keyframes coLineIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
.co-label { flex: 1; font-size: 13px; font-weight: 700; color: var(--t1); }
.co-detail { font-size: 11px; color: var(--t3); }
.co-amount { font-size: 15px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }

/* ========== Phase 10: Deck Select 牌组选择 ========== */
.deck-select-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; }
.ds-panel { max-width: 460px; width: 90%; padding: 20px; border-radius: var(--r-lg); }
.ds-title { font-size: 18px; font-weight: 900; color: var(--t1); text-align: center; margin-bottom: 14px; }
.ds-cards { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0; -webkit-overflow-scrolling: touch; }
.ds-card { flex: 0 0 120px; border: 2px solid rgba(255,255,255,.15); border-radius: var(--r-md); padding: 10px; cursor: pointer; background: rgba(0,0,0,.3); color: inherit; font: inherit; text-align: left; transition: border-color .2s, transform .2s; }
.ds-card.selected { border-width: 3px; transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.ds-card-color { height: 6px; border-radius: 3px; margin-bottom: 8px; }
.ds-card-name { font-size: 13px; font-weight: 900; color: var(--t1); margin-bottom: 4px; }
.ds-card-desc { font-size: 10px; color: var(--t2); line-height: 1.3; }
.ds-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

/* ========== Phase 5: 拖拽 + 预览 ========== */
.hand-card.dragging, .pcard.dragging { opacity: 0.85; box-shadow: 0 12px 32px rgba(0,0,0,.6); z-index: 100; }
.game-tools-layer { display: none; }
.card-preview-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; }
.card-preview-content { background: var(--bg-card); border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-lg); padding: 24px; max-width: 280px; text-align: center; }
.cp-name { font-size: 18px; font-weight: 900; color: var(--t1); margin-bottom: 8px; }
.cp-desc { font-size: 13px; color: var(--t2); line-height: 1.4; }

/* ========== Phase 12: 发牌动画 ========== */
@keyframes cardDealIn {
  0%   { opacity: 0; transform: translateX(-60px) translateY(30px) scale(0.5) rotate(-8deg); }
  60%  { opacity: 1; transform: translateX(5px) translateY(-3px) scale(1.03) rotate(1deg); }
  100% { opacity: 1; transform: translateX(0) translateY(0) scale(1) rotate(0); }
}
.card-deal-enter { animation: cardDealIn 0.35s ease-out both; }

/* ========== Phase 12: 出牌飞出动画 ========== */
@keyframes cardPlayOut {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.7); }
}
.card-play-exit { animation: cardPlayOut 0.25s ease-in forwards; pointer-events: none; }

/* ========== Phase 12: 已购优惠券列表 ========== */
.voucher-list { display: flex; flex-direction: column; gap: 10px; }
.voucher-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.voucher-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.voucher-meta { flex: 1; min-width: 0; }
.voucher-name { font-size: 13px; font-weight: 900; color: var(--t1); margin-bottom: 3px; }
.voucher-desc { font-size: 11px; color: var(--t2); line-height: 1.4; }
.voucher-empty { font-size: 13px; color: var(--t3); text-align: center; padding: 20px 0; }

/* ========== P1-2 敌方信息全程同步：位置行（mod enemy_location HUD） ========== */
.nl-loc { margin: -2px 0 6px; font-size: 10px; font-weight: 800; color: #b5a8ff; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-enemy-loc { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--r-md); background: rgba(0,0,0,.24); border: 1px solid var(--line); }
.bl-enemy-loc span { font-size: 10px; color: var(--t3); font-weight: 800; }
.bl-enemy-loc b { font-size: 11px; color: #b5a8ff; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-enemy { padding: 8px 10px; }

/* ========== P1-1 跳过盲注旁观等待屏 ========== */
.skip-wait .sw-body { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 14px auto 0; padding: 18px 16px; width: min(440px, 92%); border-radius: var(--r-lg, 14px); }
.sw-icon { font-size: 34px; line-height: 1; }
.sw-title { font-size: 18px; font-weight: 900; color: var(--t1); }
.skip-wait .sw-tag { width: 100%; }
.sw-lives { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.sw-opp { width: 100%; padding: 10px; border-radius: var(--r-md); background: rgba(120,90,220,.14); border: 1px solid rgba(150,120,255,.3); }
.sw-opp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.sw-opp-head span { font-size: 12px; font-weight: 900; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-opp-head b { font-size: 11px; font-weight: 900; color: #b5a8ff; animation: swPulse 1.6s ease-in-out infinite; }
.sw-hint { font-size: 11px; color: var(--t3); line-height: 1.5; text-align: center; }
.skip-wait .bl-room { width: 100%; }
@keyframes swPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ========== P1-3 宿敌对决 PvP ready 倒计时（mod start_pvp_countdown 演出） ========== */
#pvp-countdown { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 997; pointer-events: none; background: rgba(0,0,0,.28); }
.pvp-cd-num { font-size: 110px; font-weight: 900; color: #ff4d4d; text-shadow: 0 6px 28px rgba(0,0,0,.65), 0 0 32px rgba(255,77,77,.5); }
.pvp-cd-num.tick { animation: pvpCdTick 0.9s ease-out; }
@keyframes pvpCdTick { 0% { transform: scale(1.7); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(.92); opacity: .85; } }
