/* 矿井版图 */
.mine-scroll { height: 100%; overflow: hidden; display: flex; justify-content: flex-start; align-items: flex-start; padding-top: 4px; }
.minecol { background: linear-gradient(90deg, #0b0b0c, #121316); }
.board { position: relative; flex: none; user-select: none; }
.b-art { position: absolute; inset: 0; overflow: hidden; border-radius: 6px; pointer-events: none; }
.b-art-in { position: relative; }
.board .bimg { display: block; width: 100%; pointer-events: none; }
.board .bimg + .bimg { margin-top: -1px; }
/* 地表面板 */
.board.surf { border-radius: 10px; box-shadow: 0 0 0 1px #000, 0 8px 22px rgba(0,0,0,.6); }
.board.surf .b-art { border-radius: 10px; }
.board.surf::after { content: ''; position: absolute; inset: 0; border-radius: 10px; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 -30px 40px -20px rgba(0,0,0,.55); }
.board.surf.surfnow { box-shadow: 0 0 0 2px var(--hazard), 0 0 26px rgba(246,194,28,.35), 0 8px 22px rgba(0,0,0,.6); }
.s-tag { position: absolute; left: 8px; bottom: 8px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 7px; border-radius: 8px;
  background: rgba(12,12,14,.82); border: 1px solid var(--line2); font-size: 13px; color: var(--hazard); pointer-events: none; letter-spacing: .1em; }
.s-tag .ic { width: 15px; height: 15px; }
.s-acts { position: absolute; inset: 0; pointer-events: none; }
.s-station { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px 6px 9px; border-radius: 10px; cursor: pointer;
  font-family: var(--zh); font-size: 14px; color: #1d1405; background: linear-gradient(180deg, #ffd65a, #e8a812); border: 1px solid #ffe08a; z-index: 7;
  box-shadow: 0 3px 10px rgba(0,0,0,.7), 0 0 18px rgba(246,194,28,.55); animation: actbob 1.6s ease-in-out infinite; }
.s-station .ic { width: 17px; height: 17px; }
.fly-mech img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 6px 8px rgba(0,0,0,.8)); }
.board.flash::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(255,190,90,.45), transparent 70%); animation: bflash .5s ease-out forwards; pointer-events: none; }
@keyframes bflash { to { opacity: 0; } }
.b-floors, .b-gems, .b-mechs, .b-stacks, .b-cards, .b-acts { position: absolute; inset: 0; pointer-events: none; }
.b-floor { position: absolute; left: 0; right: 0; pointer-events: auto; }
.bf-hl { position: absolute; inset: 2px 3px; border-radius: 8px; border: 2px solid transparent; transition: all .25s; pointer-events: none; }
.b-floor.here .bf-hl { background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 16%, transparent), transparent 70%); }
.b-floor.move { cursor: pointer; }
/* 移动 / 选楼层高亮的「呼吸」：只动画 opacity（合成器处理，不重绘）。
   以前直接动画 box-shadow（整行宽、模糊半径 20~30px、每层一个），手机上每帧都要重新模糊重绘，出现移动效果时非常卡。
   现在静态底色 + 一个叠加的「更亮」发光层在做 opacity 0→1→0，视觉一样，但手机上不再重绘。 */
.b-floor.move .bf-hl { border-color: rgba(90,170,255,.85); background: rgba(61,156,255,.14); box-shadow: inset 0 0 22px rgba(61,156,255,.35), 0 0 14px rgba(61,156,255,.4); }
.b-floor.move:hover .bf-hl { background: rgba(61,156,255,.28); }
.b-floor.move .bf-hl::after, .b-floor.pick .bf-hl::after { content: ''; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none; opacity: 0; will-change: opacity; animation: mvglow 1.4s ease-in-out infinite; }
.b-floor.move .bf-hl::after { box-shadow: inset 0 0 30px rgba(61,156,255,.5), 0 0 22px rgba(61,156,255,.55); }
@keyframes mvglow { 50% { opacity: 1; } }
.b-floor.pick { cursor: pointer; }
.b-floor.pick .bf-hl { border-color: var(--hazard); background: rgba(246,194,28,.14); box-shadow: inset 0 0 20px rgba(246,194,28,.35); }
.b-floor.pick .bf-hl::after { box-shadow: inset 0 0 30px rgba(246,194,28,.5), 0 0 18px rgba(246,194,28,.45); }
.bf-tag { position: absolute; left: 6px; top: 6px; font-family: var(--zh); font-size: 12px; color: #fff; display: none; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 6px; background: rgba(10,30,60,.9); border: 1px solid rgba(90,170,255,.8); pointer-events: none; white-space: nowrap; }
.b-floor.move .bf-tag, .b-floor.pick .bf-tag { display: inline-flex; }
.b-floor.pick .bf-tag { background: rgba(50,36,4,.92); border-color: var(--hazard); }
.board.picking .b-floor:not(.pick) .bf-hl { background: rgba(0,0,0,.35); }

.b-gem { position: absolute; width: calc(var(--k) * 11.5px); height: calc(var(--k) * 11.5px); transform: translate(-50%, -50%); transition: left .45s cubic-bezier(.3,.7,.3,1), top .45s cubic-bezier(.3,.7,.3,1), transform .2s; pointer-events: auto; }
.b-gem .gem { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.8)); }
.b-gem.new { transform: translate(-50%, -50%) scale(0); }
.b-gem.can { cursor: pointer; z-index: 3; animation: gemglow 1.3s ease-in-out infinite; }
.b-gem.can::after { content: ''; position: absolute; inset: -35%; border-radius: 50%; border: 2px solid var(--hazard); opacity: .9; animation: gemring 1.3s ease-out infinite; pointer-events: none; }
.b-gem.can:hover { transform: translate(-50%, -50%) scale(1.35); }
.b-gem.mute { opacity: .35; }
@keyframes gemglow { 50% { filter: brightness(1.35) drop-shadow(0 0 6px rgba(255,230,120,.9)); } }
@keyframes gemring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

.b-stack { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: zoom-in; transition: transform .15s; }
.b-stack:hover { transform: translate(-50%, -50%) scale(1.06); z-index: 6; }
.b-stack img { width: 100%; display: block; position: relative; border-radius: 4px; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.85)); }
.b-stack img.under { position: absolute; left: 5%; top: 3%; filter: brightness(.4) drop-shadow(2px 3px 0 rgba(0,0,0,.85)); }
.b-stack .cnt { position: absolute; right: -8px; bottom: -7px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #000e; border: 1px solid var(--line2); font-size: 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px #000; }
.b-stack.can img:not(.under) { filter: drop-shadow(0 0 6px rgba(246,194,28,.9)) drop-shadow(2px 3px 0 rgba(0,0,0,.85)); }
.b-barrier { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: zoom-in; transition: transform .15s; }
.b-barrier:hover { transform: translate(-50%, -50%) scale(1.04); z-index: 6; }
.b-barrier img { width: 100%; display: block; border-radius: 4px; filter: drop-shadow(0 4px 5px rgba(0,0,0,.9)); }
.b-barrier.can img { filter: drop-shadow(0 0 8px rgba(255,140,40,.95)) drop-shadow(0 4px 5px rgba(0,0,0,.9)); animation: barglow 1.2s ease-in-out infinite; }
@keyframes barglow { 50% { transform: scale(1.03) rotate(-1deg); } }
.b-fcard { position: absolute; left: calc(100% + 5px); width: calc(var(--rail, 72px) - 10px); transform: translateY(-50%); pointer-events: auto; cursor: zoom-in; border-radius: 4px; transition: transform .2s; text-align: center; }
.b-fcard img { width: 100%; display: block; border-radius: 4px; box-shadow: 0 3px 8px rgba(0,0,0,.8); }
.b-fcard span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--dim); font-family: var(--zh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-fcard em { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; font-size: 10px; line-height: 1.35; color: var(--dim2); text-align: left; margin-top: 1px; }
.b-fcard.up span { color: #ffe08a; }
/* 大奖祖母绿（.b-jack）叠在楼层牌上，z-index 要比悬停放大的楼层牌高，否则鼠标一碰到牌就被盖住、点不到 */
.b-fcard:hover { transform: translateY(-50%) scale(1.08); z-index: 5; }
.b-fcard:not(.up) img { filter: brightness(.7) saturate(.7); }
.b-fcard.flipin { animation: fcflip .7s ease-out; }
@keyframes fcflip { 0% { transform: translateY(-50%) rotateY(90deg); } 100% { transform: translateY(-50%) rotateY(0); } }
.b-jack { position: absolute; z-index: 6; width: 20px; height: 20px; pointer-events: auto; border-radius: 50%; box-shadow: 0 0 0 2px var(--pc); background: #000a; padding: 1px; }
.b-jack .gem { width: 100%; height: 100%; display: block; }
.b-jack.can { cursor: pointer; animation: gemglow 1.2s infinite; }

.b-mech { position: absolute; left: 0; top: 0; width: 0; height: 0; transition: transform .62s cubic-bezier(.45,.05,.3,1); z-index: 4; pointer-events: auto; }
.b-mech img { position: absolute; width: calc(var(--k) * 23px); transform: translate(-50%, -80%); filter: drop-shadow(0 4px 4px rgba(0,0,0,.85)); pointer-events: none; }
.b-mech .bm-ring { position: absolute; width: calc(var(--k) * 22px); height: calc(var(--k) * 7px); transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--pc) 70%, transparent), transparent 70%); opacity: .0; }
.b-mech.me .bm-ring { opacity: 1; animation: ringpulse 1.6s ease-in-out infinite; }
.b-mech.cur img { animation: mechidle 1.6s ease-in-out infinite; }
@keyframes ringpulse { 50% { transform: translate(-50%, -50%) scale(1.25); opacity: .6; } }
@keyframes mechidle { 50% { transform: translate(-50%, -84%); } }
.b-mech.moving img { animation: mechjolt .62s ease-in-out; }
@keyframes mechjolt { 30% { transform: translate(-50%, -88%) rotate(-4deg); } 70% { transform: translate(-50%, -82%) rotate(3deg); } }
.b-mech .bm-tag { position: absolute; transform: translate(-50%, calc(var(--k) * -30px)); font-size: 10.5px; padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--pc) 85%, #000); color: #111; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 4px rgba(0,0,0,.6); }
.b-mech.me .bm-tag { font-family: var(--zh); font-weight: 400; }

.b-act { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px 4px 6px; border-radius: 8px; cursor: pointer;
  font-family: var(--zh); font-size: 12.5px; color: #1d1405; background: linear-gradient(180deg, #ffd65a, #e8a812); border: 1px solid #ffe08a; box-shadow: 0 3px 8px rgba(0,0,0,.7), 0 0 14px rgba(246,194,28,.45); white-space: nowrap; z-index: 6; animation: actbob 1.6s ease-in-out infinite; }
.b-act b { font-family: var(--num); font-weight: 400; font-size: 14px; }
.b-act .ic { width: 15px; height: 15px; }
.b-act.boom { background: linear-gradient(180deg, #ff9a4a, #d9480f); border-color: #ffbe8a; color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.7), 0 0 14px rgba(255,120,40,.55); }
.b-act.off { filter: grayscale(.8) brightness(.7); animation: none; cursor: not-allowed; box-shadow: 0 3px 8px rgba(0,0,0,.7); }
.b-act:hover:not(.off) { filter: brightness(1.1); }
@keyframes actbob { 50% { transform: translate(-50%, calc(-50% - 2px)); } }
.b-pickhint { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); display: none; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 10px; background: rgba(20,16,4,.94);
  border: 1px solid var(--hazard); font-family: var(--zh); font-size: 13px; z-index: 10; white-space: nowrap; box-shadow: var(--shadow); pointer-events: auto; }
.b-pickhint.on { display: flex; }
.b-pickhint .ic { width: 16px; height: 16px; }

/* 楼层牌翻开时的大图 */
.reveal-pop { position: fixed; left: 50%; top: 45%; width: min(460px, 80vw); z-index: 3; pointer-events: none; }
.reveal-pop img { width: 100%; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.8), 0 0 0 2px rgba(246,194,28,.6); display: block; }
.reveal-pop .rp-t { margin-top: 10px; background: rgba(12,12,14,.94); border: 1px solid var(--hazard); border-radius: 12px; padding: 10px 14px; font-size: 15px; line-height: 1.6; text-align: center; }
.reveal-pop .rp-t b { display: block; font-family: var(--zh); font-weight: 400; color: var(--hazard); font-size: 20px; letter-spacing: .1em; }
.fly-card.tile, .fly-card.ms { border-radius: 4px; box-shadow: 0 8px 18px rgba(0,0,0,.7); background: transparent; }
.fly-card.tile img, .fly-card.ms img { object-fit: contain; }
.fly-card.back { background: url('../assets/cards/back_card.webp') center / cover; border-radius: 5px; }

/* 地表叠在矿井上面（平板、手机） */
.game:not(.split) .mine-scroll { flex-direction: column; }
.game:not(.split) .board.surf { border-radius: 6px 6px 0 0; box-shadow: none; }
.game:not(.split) .board.surf .b-art { border-radius: 6px 6px 0 0; }
.game:not(.split) .board.surf::after { border-radius: 6px 6px 0 0; box-shadow: none; }
.game:not(.split) .board.mine .b-art { border-radius: 0 0 6px 6px; }

/* 第 4 层楼层牌下面压着的 2 张高级牌（打开第 4 层后加入高级商店） */
.b-hadv { position: absolute; left: 50%; top: 0; width: 100%; aspect-ratio: 585 / 420; transform: translateX(-50%); pointer-events: none; z-index: -1; }
.b-hadv img { position: absolute; width: 40%; filter: drop-shadow(0 3px 4px rgba(0,0,0,.85)); }
.b-hadv img:nth-child(1) { left: 2%; top: -34%; transform: rotate(-12deg); }
.b-hadv img:nth-child(2) { left: 22%; top: -38%; transform: rotate(-2deg); }
.b-fcard.hasadv { z-index: 1; }
.b-fcard .hadv-tag { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 10px; color: #8ad8ff; font-family: var(--zh); margin-top: 1px; }
.b-fcard .hadv-tag img { width: 13px; height: 13px; }
