/* ============================================================
   战场样式：环形座次 / 座位卡 / 中央牌堆 / 手牌扇形 / 日志 / HUD / 动效
   ============================================================ */

.battle { position: absolute; inset: 0; overflow: hidden; }
.battle .stage { position: absolute; inset: 0; }

/* 中央桌面（木纹椭圆） */
.table-oval {
  position: absolute; left: 50%; top: 47%; width: min(64vw, 900px); height: min(46vh, 480px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(80% 80% at 50% 36%, #5d472e 0%, #453221 52%, #2c2013 100%);
  box-shadow:
    inset 0 4px 30px rgb(0 0 0 / .55),
    inset 0 0 0 2px rgb(201 162 39 / .22),
    inset 0 0 0 10px #2c2013,
    0 30px 60px rgb(0 0 0 / .5);
}
.table-oval::before { /* 木纹 */
  content: ''; position: absolute; inset: 10px; border-radius: 50%; opacity: .16;
  background: repeating-radial-gradient(ellipse at 50% 42%, transparent 0 14px, rgb(232 217 176 / .5) 14px 15px);
}
.table-oval::after { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(60% 55% at 50% 40%, rgb(255 220 150 / .1), transparent 70%); }

/* 中央：牌堆 & 弃牌堆 */
.center-zone { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 26px; z-index: 3; }
.pile { position: relative; width: 74px; aspect-ratio: 100/140; }
.pile .cardface { position: absolute; inset: 0; width: 100%; height: 100%; }
.pile.deck .cardface { box-shadow: var(--shadow-2); }
.pile .pile-count { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: var(--text-xs); color: var(--gold-300); letter-spacing: .1em; white-space: nowrap; }
.pile-label { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: var(--text-xs); color: var(--fg-dim); letter-spacing: .3em; text-indent: .3em; white-space: nowrap; }
.discard-top { width: 74px; aspect-ratio: 100/140; opacity: .96; }

/* 判定展示区 */
.judge-display { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); z-index: 8; width: 130px; }
.judge-display .cardface { width: 100%; box-shadow: 0 14px 40px rgb(0 0 0 / .6); }

/* ---------- 座位 ---------- */
.seat {
  position: absolute; width: 148px; margin-left: -74px; margin-top: -58px; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: filter var(--dur), transform var(--dur) var(--ease-out);
}
.seat .avatar {
  position: relative; width: 84px; height: 84px; border-radius: 50%;
  background: var(--ink-800);
  border: 2.5px solid var(--k-color, var(--line-strong));
  box-shadow: var(--shadow-1), inset 0 0 18px rgb(0 0 0 / .5);
  overflow: visible;
  transition: box-shadow var(--dur), border-color var(--dur);
}
.seat .avatar svg { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 50%; overflow: hidden; }
.seat.turn .avatar { border-color: var(--gold-400); box-shadow: 0 0 0 3px rgb(201 162 39 / .35), 0 0 26px rgb(223 190 114 / .5), var(--shadow-1); }
.seat.turn::before { content: ''; position: absolute; inset: -10px; border-radius: 24px; border: 1.5px dashed rgb(223 190 114 / .5); animation: spin 14s linear infinite; pointer-events: none; }
.seat.targetable .avatar { cursor: pointer; border-color: var(--cinnabar-400); animation: targetPulse 1.1s ease-in-out infinite; }
@keyframes targetPulse { 0%,100% { box-shadow: 0 0 0 0 rgb(210 74 62 / .55); } 50% { box-shadow: 0 0 0 9px rgb(210 74 62 / 0); } }
.seat.selected-target .avatar { border-color: var(--gold-400); box-shadow: 0 0 0 4px rgb(223 190 114 / .6); }
.seat.dead { filter: grayscale(1) brightness(.55); }
.seat .dead-ribbon { position: absolute; top: 38px; left: 50%; transform: translateX(-50%) rotate(-14deg); z-index: 2; padding: 1px 10px; font-size: var(--text-xs); letter-spacing: .2em; color: var(--paper-50); background: var(--ink-950); border: 1px solid var(--line); border-radius: 4px; }

.seat .name-row { display: flex; align-items: center; gap: 5px; font-size: var(--text-sm); color: var(--paper-50); text-shadow: 0 1px 2px rgb(0 0 0 / .8); white-space: nowrap; }
.seat .g-name { font-family: var(--font-display); font-size: var(--text-md); }
.seat .k-badge { font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid currentColor; }
.seat .hp-row { display: flex; gap: 2px; }
.seat .hp-pip { width: 12px; height: 12px; }
.seat .hp-pip svg { width: 100%; height: 100%; display: block; }
.seat .hand-count { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--gold-300); background: rgb(10 15 26 / .7); padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); }
.seat .equips { display: flex; gap: 3px; }
.seat .mini-card { width: 26px; aspect-ratio: 100/140; border-radius: 3px; overflow: hidden; box-shadow: var(--shadow-1); border: 1px solid rgb(0 0 0 / .55); position: relative; background: var(--ink-700); }
.seat .mini-card svg { width: 100%; height: 100%; }
.seat .mini-card .mc-name { position: absolute; inset: 0; display: grid; place-items: center; font-size: 8.5px; color: #efe6cf; text-shadow: 0 1px 1px #000; font-family: var(--font-display); }
.seat .judgment { display: flex; gap: 3px; min-height: 22px; }
.seat .judgment .mini-card { opacity: .92; }
.seat .identity-shield {
  position: absolute; top: -6px; right: -8px; z-index: 3;
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; font-size: var(--text-xs); font-family: var(--font-display);
  background: linear-gradient(160deg, var(--ic, #1e2c40), var(--ink-900));
  border: 1.5px solid var(--line-strong); color: var(--paper-50);
  box-shadow: var(--shadow-1);
  transform: rotate(8deg);
}
.seat .thinking { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 3px; padding: 2px 10px; border-radius: 999px; background: rgb(10 15 26 / .85); border: 1px solid var(--line); font-size: 10px; color: var(--gold-300); white-space: nowrap; }
.seat .thinking i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold-300); animation: blink 1s infinite; }
.seat .thinking i:nth-child(2) { animation-delay: .18s; } .seat .thinking i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%,100% { opacity: .2; } 50% { opacity: 1; } }
.seat.thinking-on .thinking { display: inline-flex; }

/* ---------- 底部：我的区域 ---------- */
.my-zone { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; gap: var(--space-lg); padding: 0 var(--space-md) 14px; pointer-events: none; }
.my-zone > * { pointer-events: auto; }
.me-panel { display: flex; align-items: flex-end; gap: var(--space-md); }
.me-avatar { position: relative; width: 92px; text-align: center; }
.me-avatar .avatar-frame { width: 92px; height: 92px; border-radius: 18px; overflow: hidden; border: 2.5px solid var(--k-color, var(--line-strong)); box-shadow: var(--shadow-1); background: var(--ink-800); position: relative; }
.me-avatar .avatar-frame svg { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.me-avatar .me-name { margin-top: 4px; font-family: var(--font-display); color: var(--paper-50); font-size: var(--text-md); }
.me-avatar .me-identity { font-size: var(--text-xs); padding: 1px 12px; border-radius: 999px; border: 1px solid var(--ic, var(--line)); color: var(--ic, var(--fg-dim)); display: inline-block; margin-top: 2px; }
.me-hp { display: flex; gap: 3px; justify-content: center; margin-top: 2px; }
.me-hp .hp-pip { width: 15px; height: 15px; }
.me-skills { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.skill-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(180deg, var(--ink-600), var(--ink-700));
  border: 1px solid var(--line-strong); color: var(--gold-300);
  font-family: var(--font-display); font-size: var(--text-md); letter-spacing: .12em;
  box-shadow: var(--shadow-1); transition: all var(--dur) var(--ease-out); }
.skill-btn:hover:not(:disabled) { box-shadow: var(--shadow-gold); transform: translateY(-1px); }
.skill-btn:disabled { opacity: .4; }
.skill-btn.armed { background: linear-gradient(180deg, var(--gold-400), var(--gold-600)); color: #241a06; }

/* 手牌扇形 */
.hand-fan { display: flex; justify-content: center; align-items: flex-end; height: 148px; padding: 0 8px 10px; min-width: 220px; max-width: 64vw; }
.hand-card { position: relative; width: 88px; margin: 0 -12px; transform-origin: 50% 120%;
  transition: transform var(--dur) var(--ease-out), filter var(--dur); cursor: pointer; }
.hand-card .cardface { width: 100%; box-shadow: 0 -2px 10px rgb(0 0 0 / .4), var(--shadow-1); }
.hand-card:hover { transform: translateY(-16px) !important; z-index: 30; }
.hand-card.selected { transform: translateY(-22px) !important; z-index: 29; }
.hand-card.selected .cardface { box-shadow: 0 0 0 2.5px var(--gold-400), 0 10px 24px rgb(201 162 39 / .35); }
.hand-card.unplayable { filter: brightness(.72) saturate(.6); }
.hand-card .hc-dim { pointer-events: none; }

/* 操作按钮列 */
.action-col { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.action-col .btn { min-width: 128px; }
.confirm-hint { margin-bottom: 4px; font-size: var(--text-sm); color: var(--gold-300); background: rgb(201 162 39 / .1); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; animation: fadeIn var(--dur); }

/* ---------- HUD ---------- */
.hud { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-md); padding: 10px 14px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud .turn-banner {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 18px; border-radius: 999px;
  background: linear-gradient(90deg, rgb(164 22 26 / .85), rgb(164 22 26 / .35));
  border: 1px solid color-mix(in oklab, var(--gold-400) 50%, transparent);
  font-family: var(--font-display); font-size: var(--text-lg); color: var(--paper-50); letter-spacing: .14em;
  box-shadow: var(--shadow-1); white-space: nowrap;
}
.hud .phase-pips { display: inline-flex; gap: 6px; }
.phase-pip { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-600); border: 1px solid var(--line); transition: all var(--dur); }
.phase-pip.on { background: var(--gold-400); border-color: var(--gold-400); box-shadow: 0 0 8px rgb(223 190 114 / .6); }
.hud .spacer { flex: 1; }
.hud .icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgb(22 32 47 / .9); border: 1px solid var(--line); color: var(--fg-dim); font-size: 17px; transition: all var(--dur); }
.hud .icon-btn:hover { color: var(--gold-300); border-color: var(--line-strong); }

/* ---------- 日志 ---------- */
.log-panel {
  position: absolute; right: 12px; top: 58px; bottom: 150px; width: 252px; z-index: 15;
  background: color-mix(in oklab, var(--ink-800) 82%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur);
  backdrop-filter: blur(8px);
}
.log-panel.collapsed { transform: translateX(calc(100% + 14px)); }
.log-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.log-head b { font-family: var(--font-display); color: var(--gold-300); letter-spacing: .2em; font-weight: 400; }
.log-body { flex: 1; overflow: auto; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); }
.log-line { color: var(--fg-dim); line-height: 1.55; animation: logIn var(--dur) var(--ease-out); }
.log-line.new { color: var(--paper-50); }
.log-line.damage { color: #ffb4a6; } .log-line.heal { color: #a9e3c4; }
.log-line.skill { color: var(--gold-300); } .log-line.system { color: var(--paper-200); text-align: center; letter-spacing: .1em; }
.log-line.death { color: #ff8d7a; } .log-line.warn { color: #f2cf5b; }
.log-line.delayed { color: #9ec1e8; } .log-line.judge { color: #cbb9ee; }
.log-line.reward { color: #ffe49b; } .log-line.steal { color: #e8b4d0; }
@keyframes logIn { from { opacity: 0; transform: translateX(8px); } }
.log-toggle { position: absolute; right: 12px; top: 58px; z-index: 16; }

/* ---------- 动效元素 ---------- */
.fx-fly { position: fixed; z-index: 95; pointer-events: none; width: 86px; transition: all .55s var(--ease-in-out); will-change: transform; }
.fx-fly .cardface, .fx-fly .mini-card { width: 100%; box-shadow: 0 14px 34px rgb(0 0 0 / .55); }
.fx-num {
  position: fixed; z-index: 96; pointer-events: none;
  font-family: var(--font-display); font-size: 44px; color: #ff6b57;
  text-shadow: 0 2px 0 #4a0e08, 0 6px 18px rgb(0 0 0 / .6);
  animation: numPop 1s var(--ease-out) forwards;
}
.fx-num.heal { color: #7be3a8; text-shadow: 0 2px 0 #0c3a20, 0 6px 18px rgb(0 0 0 / .6); }
.fx-num.thunder { color: #ffe46b; }
@keyframes numPop { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 18% { opacity: 1; transform: translateY(-6px) scale(1.12); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px) scale(1); } }
.fx-skill-splash {
  position: fixed; left: 50%; top: 34%; z-index: 97; pointer-events: none; text-align: center;
  animation: splash 1.25s var(--ease-out) forwards;
}
.fx-skill-splash .ss-name {
  font-family: var(--font-display); font-size: clamp(40px, 6vw, 72px); letter-spacing: .3em; text-indent: .3em;
  background: linear-gradient(180deg, #fff7e0, var(--gold-300) 60%, var(--gold-600));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 rgb(0 0 0 / .5)) drop-shadow(0 0 26px rgb(201 162 39 / .5));
}
.fx-skill-splash .ss-user { font-size: var(--text-md); color: var(--paper-200); margin-top: 2px; }
@keyframes splash { 0% { opacity: 0; transform: translate(-50%, 0) scale(.7); } 16% { opacity: 1; transform: translate(-50%, 0) scale(1.04); } 26% { transform: translate(-50%, 0) scale(1); } 74% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px) scale(1); } }
.fx-slash { position: fixed; z-index: 96; pointer-events: none; width: 120px; height: 120px; margin: -60px; animation: slashGo .5s var(--ease-out) forwards; }
@keyframes slashGo { 0% { opacity: 0; transform: scale(.4) rotate(-30deg); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25) rotate(8deg); } }
.fx-shield { position: fixed; z-index: 96; pointer-events: none; width: 110px; height: 110px; margin: -55px; border-radius: 50%; border: 3px solid var(--azure-400); animation: shieldGo .6s var(--ease-out) forwards; }
@keyframes shieldGo { 0% { opacity: 0; transform: scale(.5); } 30% { opacity: .95; } 100% { opacity: 0; transform: scale(1.3); } }
.shake { animation: shakeIt .42s var(--ease-in-out); }
@keyframes shakeIt { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-4px); } 88% { transform: translateX(2px); } }

/* 响应提示条 */
.respond-bar {
  position: absolute; left: 50%; bottom: 196px; transform: translateX(-50%);
  z-index: 40; display: flex; align-items: center; gap: var(--space-md);
  padding: 10px 18px; border-radius: 999px;
  background: color-mix(in oklab, var(--ink-800) 92%, black);
  border: 1.5px solid var(--gold-400);
  box-shadow: var(--shadow-2);
  animation: fadeIn var(--dur);
  max-width: 94vw; flex-wrap: wrap; justify-content: center;
}
.respond-bar .rb-text { font-size: var(--text-md); color: var(--paper-50); }
.respond-bar .rb-text b { color: var(--gold-300); font-family: var(--font-display); font-weight: 400; letter-spacing: .1em; }
.respond-bar .btn { min-height: 36px; padding: 4px 16px; }

/* 五谷丰登选择条 */
.wugu-bar { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); z-index: 45; display: flex; gap: 10px; padding: 14px 18px; border-radius: var(--radius-lg); background: rgb(10 15 26 / .9); border: 1.5px solid var(--gold-400); animation: popIn var(--dur) var(--ease-out); }
.wugu-bar .cardface { width: 86px; cursor: pointer; transition: transform var(--dur) var(--ease-out); }
.wugu-bar .cardface:hover { transform: translateY(-10px); }

/* 观星面板 */
.guanxing-panel { display: flex; flex-direction: column; gap: var(--space-md); }
.gx-row { display: flex; gap: 8px; min-height: 120px; align-items: center; }
.gx-row .cardface { width: 78px; }
.gx-label { writing-mode: vertical-lr; font-family: var(--font-display); color: var(--gold-300); letter-spacing: .3em; font-size: var(--text-md); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .log-panel { width: 220px; }
}
@media (max-width: 900px) {
  .seat { width: 118px; margin-left: -59px; margin-top: -46px; }
  .seat .avatar { width: 64px; height: 64px; }
  .seat .equips { display: none; }
  .log-panel { top: 52px; bottom: 190px; }
  .hand-fan { max-width: 88vw; }
  .hand-card { width: 74px; margin: 0 -12px; }
  .my-zone { gap: var(--space-sm); }
  .table-oval { width: 88vw; height: 40vh; }
  .respond-bar { bottom: 140px; }
}
@media (max-width: 600px) {
  .seat .judgment { display: none; }
  .hand-card { width: 62px; }
  .me-avatar { width: 72px; } .me-avatar .avatar-frame { width: 72px; height: 72px; }
  .action-col .btn { min-width: 96px; padding: 8px 12px; font-size: var(--text-sm); }
  .judge-display { top: 18%; }
}

/* ============================================================
   手机版专项设计（触屏 · 横屏）：与桌面版并存、独立设计
   —— 紧凑环形战场 / 触点≥44px / 点按详情抽屉 / 长按看牌 / 抽屉日志
   ============================================================ */

/* 竖屏引导 */
.rotate-hint {
  display: none; position: absolute; inset: 0; z-index: 200;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background:
    radial-gradient(120% 90% at 50% -10%, #223351 0%, transparent 60%),
    linear-gradient(180deg, #0b1120, #0a0e18);
  text-align: center;
}
.rotate-hint b { font-family: var(--font-display); font-size: 30px; color: var(--gold-300); letter-spacing: .2em; }
.rotate-hint small { color: var(--fg-dim); }
.battle.portrait-block .rotate-hint { display: flex; }
.rotate-hint .rh-phone { width: 84px; height: 84px; animation: rhSpin 2.2s var(--ease-in-out) infinite; }
.rotate-hint .rh-phone svg { width: 100%; height: 100%; }
@keyframes rhSpin { 0%, 42% { transform: rotate(0); } 58%, 100% { transform: rotate(-90deg); } }

/* —— 横屏触屏布局 —— */
.battle.mobile .hud { padding: 6px 10px; }
.battle.mobile .turn-banner { font-size: var(--text-md); padding: 4px 14px; }
.battle.mobile .phase-pips { gap: 4px; }
.battle.mobile .phase-pip { width: 7px; height: 7px; }
.battle.mobile .hud .icon-btn { width: 34px; height: 34px; font-size: 15px; }

/* 紧凑椭圆战场：座位缩小但保留环形构图 */
.battle.mobile .table-oval { width: 74vw; height: 62vh; min-height: 190px; }
.battle.mobile .center-zone { gap: 16px; top: 48%; }
.battle.mobile .pile { width: 46px; }
.battle.mobile .discard-top { width: 46px; }
.battle.mobile .pile-label { font-size: 10px; top: -18px; }
.battle.mobile .pile .pile-count { font-size: 10px; bottom: -16px; }

.battle.mobile .seat {
  width: 104px; margin-left: -52px; margin-top: -48px;
  cursor: pointer;
}
.battle.mobile .seat .avatar { width: 46px; height: 46px; border-width: 2px; }
.battle.mobile .seat .g-name { font-size: 12.5px; }
.battle.mobile .seat .name-row { font-size: 10px; gap: 3px; }
.battle.mobile .seat .k-badge { width: 14px; height: 14px; font-size: 9px; }
.battle.mobile .seat .hp-pip { width: 9px; height: 9px; }
.battle.mobile .seat .hand-count { font-size: 9.5px; padding: 0 6px; gap: 3px; }
.battle.mobile .seat .equips, .battle.mobile .seat .judgment { display: none; } /* 收进点按抽屉 */
.battle.mobile .seat .identity-shield { width: 24px; height: 24px; font-size: 10px; top: -4px; right: -6px; }
.battle.mobile .seat .thinking { font-size: 9px; padding: 1px 8px; top: -18px; }
.battle.mobile .seat::after { /* 可点提示 */
  content: ''; position: absolute; inset: -6px; border-radius: 18px; pointer-events: none;
}

/* 我的区域：拇指区（单行紧凑） */
.battle.mobile .my-zone { padding: 0 8px 8px; gap: 8px; }
.battle.mobile .me-panel { gap: 6px; }
.battle.mobile .me-avatar { width: auto; flex: none; }
.battle.mobile .me-avatar .avatar-frame { width: 56px; height: 56px; border-radius: 12px; }
.battle.mobile .me-avatar .me-name { font-size: 13px; margin-top: 2px; }
.battle.mobile .me-avatar .me-identity { font-size: 10px; padding: 0 8px; }
.battle.mobile .me-hp .hp-pip { width: 11px; height: 11px; }
.battle.mobile .me-skills { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 6px; margin-bottom: 4px; max-width: 40vw; overflow: hidden; }
.battle.mobile .skill-btn { min-height: 38px; padding: 4px 12px; font-size: var(--text-md); }
/* 手牌：横向滚动条 + 大触点卡 */
.battle.mobile .hand-fan {
  height: 118px; max-width: none; flex: 1; min-width: 0;
  justify-content: flex-start; overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x proximity; padding: 4px 10px 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}
.battle.mobile .hand-fan::-webkit-scrollbar { display: none; }
.battle.mobile .hand-card { flex: none; width: 80px; margin: 0 -8px; scroll-snap-align: center; }
.battle.mobile .hand-card .cf-name { font-size: 13.5px; }
.battle.mobile .action-col { margin-bottom: 2px; }
.battle.mobile .action-col .btn { min-height: 46px; min-width: 104px; padding: 8px 16px; }
/* 响应条悬浮于手牌上方 */
.battle.mobile .respond-bar { bottom: 116px; max-width: 92vw; flex-wrap: wrap; }
.battle.mobile .respond-bar .btn { min-height: 42px; }
.battle.mobile .wugu-bar { top: auto; bottom: 142px; transform: translateX(-50%); max-width: 94vw; flex-wrap: wrap; justify-content: center; }
.battle.mobile .wugu-bar .cardface { width: 68px; }

/* 日志：右侧滑出抽屉，不占对局空间 */
.battle.mobile .log-panel {
  top: 0; right: 0; bottom: 0; width: min(76vw, 320px); height: auto;
  border-radius: 0; border-top: none; border-bottom: none;
  transform: translateX(105%);
  z-index: 80; background: rgb(13 19 31 / .96);
}
.battle.mobile .log-panel:not(.collapsed) { transform: none; box-shadow: -12px 0 34px rgb(0 0 0 / .5); }
.battle.mobile .log-toggle { top: 6px; right: 52px; }
.battle.mobile .judge-display { width: 96px; top: 16%; }

/* —— 底部抽屉 / 长按看牌（手机版交互组件） —— */
.sheet-mask {
  position: fixed; inset: 0; z-index: 130;
  background: rgb(4 8 14 / .58); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn var(--dur) var(--ease-out);
}
.sheet {
  width: 100%; max-width: 620px; max-height: 76vh; overflow: auto;
  background: linear-gradient(180deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--line-strong); border-bottom: none;
  border-radius: 18px 18px 0 0; padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  animation: sheetUp var(--dur-slow) var(--ease-out);
}
@keyframes sheetUp { from { transform: translateY(40%); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.sh-who { display: flex; align-items: center; gap: 12px; }
.sh-art { width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden; border: 2px solid var(--line-strong); }
.sh-art svg { width: 100%; height: 100%; }
.sh-who b { font-family: var(--font-display); font-size: var(--text-xl); color: var(--paper-50); }
.sh-who small { display: block; color: var(--fg-dim); font-size: var(--text-sm); }
.sheet-body h4 { font-family: var(--font-display); color: var(--gold-300); font-size: var(--text-md); margin: 12px 0 6px; letter-spacing: .15em; font-weight: 400; }
.sheet-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-item { display: flex; align-items: center; gap: 7px; font-size: var(--text-sm); color: var(--paper-100); }
.sheet.sheet-card { display: flex; gap: 16px; align-items: center; max-width: 480px; margin: 0 auto 12px; border-radius: 18px; border-bottom: 1px solid var(--line-strong); }
.peek-wrap { width: 158px; flex: none; }
.peek-info b { font-family: var(--font-display); font-size: var(--text-xl); color: var(--gold-300); }
.peek-info small { display: block; color: var(--fg-dim); margin: 2px 0 8px; }
.peek-info p { font-size: var(--text-sm); color: var(--fg-dim); line-height: 1.8; }
.sheet.sheet-card .btn { align-self: flex-end; min-height: 44px; }

@media (max-height: 420px) {
  .battle.mobile .seat { width: 96px; margin-left: -48px; margin-top: -44px; }
  .battle.mobile .seat .avatar { width: 40px; height: 40px; }
  .battle.mobile .hand-fan { height: 108px; }
  .battle.mobile .hand-card { width: 74px; }
  .battle.mobile .respond-bar { bottom: 122px; }
  .battle.mobile .wugu-bar { bottom: 126px; }
  .battle.mobile .me-avatar .avatar-frame { width: 48px; height: 48px; }
  .battle.mobile .table-oval { height: 58vh; }
}
