/* =========================================================
 * 暴揍 Tibo —— 漫画风样式
 * ========================================================= */
:root {
  --ink: #1E1A17;
  --paper: #FFF3D6;
  --card: #FFFDF6;
  --yellow: #FFD43B;
  --red: #FF4D5E;
  --blue: #4DABF7;
  --green: #51CF66;
  --purple: #845EF7;
  --muted: #7A6E62;
  --shadow: 4px 4px 0 var(--ink);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(0,0,0,.09) 1.2px, transparent 1.6px) 0 0 / 14px 14px,
    var(--paper);
  -webkit-user-select: none; user-select: none;
  overflow-x: hidden;
}
button { font-family: inherit; color: inherit; cursor: pointer; }

#app { max-width: 920px; margin: 0 auto; padding: 10px 16px 18px; }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.brand-title { font-size: 30px; font-weight: 900; line-height: 1; letter-spacing: 1px; }
.brand-title .hit {
  color: var(--red); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink); display: inline-block; transform: rotate(-6deg); margin-right: 4px;
}
.brand-title .name {
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 8px; padding: 0 8px;
  box-shadow: 3px 3px 0 var(--ink); display: inline-block; transform: rotate(2deg);
}
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 700; }
.top-actions { display: flex; gap: 8px; align-items: center; }

.btn {
  border: 3px solid var(--ink); background: #fff; border-radius: 12px; padding: 8px 14px;
  font-weight: 900; font-size: 15px; box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.small { padding: 6px 10px; font-size: 14px; }
.btn.big { padding: 12px 22px; font-size: 20px; }
.btn.primary { background: var(--red); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
.btn.yellow { background: var(--yellow); }
.icon-btn {
  width: 40px; height: 40px; border: 3px solid var(--ink); border-radius: 12px; background: #fff;
  font-size: 18px; box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center; padding: 0;
}
.icon-btn.off { opacity: .45; filter: grayscale(1); }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- HUD ---------- */
.hud { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.hud-cell {
  background: var(--card); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink);
  padding: 4px 10px 6px; position: relative; overflow: hidden; min-width: 0;
}
.hud-cell label { display: block; font-size: 11px; font-weight: 800; color: var(--muted); }
.hud-cell b { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hud-cell small { font-size: 11px; color: var(--muted); margin-left: 3px; font-weight: 700; }
.hud-cell.timer b { color: var(--ink); }
.hud-cell.timer.hurry b { color: var(--red); animation: pulse .5s infinite alternate; }
.tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #eee; }
.tbar i { display: block; height: 100%; width: 100%; background: var(--green); transition: width .1s linear; }
.hud-cell.timer.hurry .tbar i { background: var(--red); }
.bump { animation: bump .18s; display: inline-block; }
@keyframes bump { 50% { transform: scale(1.25); } }
@keyframes pulse { to { transform: scale(1.12); } }

/* ---------- 主区域 ---------- */
.arena { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.stage-col { display: flex; justify-content: center; }
.stage-wrap {
  position: relative; width: min(100%, calc((100vh - 190px) * .8)); min-width: 280px; aspect-ratio: 4 / 5;
  border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; background: #fff;
  box-shadow: 6px 6px 0 var(--ink); touch-action: manipulation;
}
.stage-wrap.playing { cursor: none; }
#stage { width: 100%; height: 100%; display: block; font-family: var(--font); }
#tiboWrap { transform-box: fill-box; transform-origin: 50% 100%; }

.injury-tag {
  position: absolute; left: 10px; top: 10px; background: var(--ink); color: #fff; font-weight: 900; font-size: 13px;
  padding: 4px 10px; border-radius: 99px; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.injury-tag.show { opacity: 1; }
.fever {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: var(--red); color: #fff;
  border: 3px solid var(--ink); border-radius: 99px; padding: 3px 12px; font-weight: 900; font-size: 14px;
  display: none; pointer-events: none; animation: pulse .35s infinite alternate; white-space: nowrap;
}
.fever.show { display: block; }

/* 对话气泡 */
.bubble {
  position: absolute; right: 4%; top: 6%; max-width: 54%; background: #fff; border: 3px solid var(--ink);
  border-radius: 16px; padding: 8px 12px; font-weight: 900; font-size: 15px; line-height: 1.35;
  box-shadow: 3px 3px 0 var(--ink); pointer-events: none; opacity: 0; transform: scale(.6) rotate(-4deg);
  transform-origin: 10% 100%; transition: opacity .15s, transform .2s cubic-bezier(.3,1.6,.6,1);
  z-index: 4;
}
.bubble::after {
  content: ""; position: absolute; left: 18px; bottom: -14px; width: 18px; height: 18px; background: #fff;
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(-30deg) rotate(45deg);
}
.bubble.show { opacity: 1; transform: scale(1) rotate(-2deg); }
.bubble.left { right: auto; left: 4%; }

/* 特效层 */
.fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.fx > * { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
.comic {
  font-weight: 900; font-size: 34px; color: var(--yellow); white-space: nowrap; letter-spacing: 1px;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink);
}
.comic.t1 { color: #FFA94D; } .comic.t2 { color: #FF6B6B; font-size: 40px; } .comic.t3 { color: #E599F7; font-size: 46px; }
.comic.blocked { color: #74C0FC; font-size: 30px; }
.comic.miss { color: #ced4da; font-size: 22px; }
.pts { font-weight: 900; font-size: 20px; color: #fff; -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; white-space: nowrap; }
.pts.crit { color: var(--yellow); font-size: 24px; }
.ring { width: 70px; height: 70px; border: 5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 3px var(--ink); }
.p { width: 16px; height: 16px; }
.p.star { background: var(--yellow); clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); }
.p.stink { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(#B2F2BB, #51CF66); opacity: .85; }
.p.yolk { width: 18px; height: 14px; border-radius: 50%; background: #FFC21A; border: 2px solid var(--ink); }
.p.shell { width: 14px; height: 12px; background: #FFF8E7; border: 2px solid var(--ink); clip-path: polygon(0 100%, 30% 0, 60% 50%, 100% 10%, 90% 100%); }
.p.leaf { width: 20px; height: 10px; border-radius: 50% 0; background: #51CF66; border: 2px solid var(--ink); }
.p.key {
  width: 26px; height: 24px; border: 2px solid var(--ink); border-radius: 5px; background: #fff; font-size: 12px;
  font-weight: 900; display: grid; place-items: center; box-shadow: 0 3px 0 #adb5bd;
}
.p.page {
  width: 40px; height: 30px; background: #fff; border: 2px solid var(--ink); border-top: 7px solid #FA5252;
  font-size: 10px; font-weight: 900; display: grid; place-items: center; border-radius: 3px;
}
.p.tooth { width: 14px; height: 18px; background: #fff; border: 2px solid var(--ink); border-radius: 40% 40% 50% 50%; }

/* 武器光标 */
.weapon-cursor { position: absolute; left: 0; top: 0; width: 72px; height: 72px; pointer-events: none; z-index: 6; opacity: 0; }
.weapon-cursor.show { opacity: 1; }
.weapon-cursor .cw { width: 100%; height: 100%; transform-origin: 20% 85%; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.25)); }
.weapon-cursor svg { width: 100%; height: 100%; }

/* 待机卡片 */
.idle-card {
  position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(255,253,246,.94);
  border: 3px solid var(--ink); border-radius: 16px; padding: 10px 14px 12px; box-shadow: 4px 4px 0 var(--ink);
  text-align: center; z-index: 7; transition: transform .25s, opacity .25s;
}
.idle-card.hide { transform: translateY(130%); opacity: 0; pointer-events: none; }
.status-tag { display: inline-block; font-size: 12px; font-weight: 900; background: var(--ink); color: #fff; border-radius: 99px; padding: 2px 10px; }
.status-text { font-size: 14px; line-height: 1.45; margin: 6px 0 10px; font-weight: 700; }
.status-text b { color: var(--red); font-size: 17px; }
.idle-meta { font-size: 12px; color: var(--muted); margin-top: 8px; font-weight: 700; }

.countdown {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 8;
  font-size: 120px; font-weight: 900; color: var(--yellow); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--ink);
}
.countdown span { animation: pop .6s ease-out forwards; }
@keyframes pop { 0% { transform: scale(2.2); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9); opacity: 0; } }

.wheel-fab {
  position: absolute; right: 10px; bottom: 10px; width: 62px; height: 62px; border-radius: 50%; z-index: 7;
  border: 3px solid var(--ink); background: conic-gradient(var(--yellow) 0 25%, var(--red) 0 50%, var(--blue) 0 75%, var(--green) 0);
  box-shadow: 3px 3px 0 var(--ink); display: none; place-items: center; padding: 0;
}
.stage-wrap.idle .wheel-fab { display: none; }
.wheel-fab > span { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); display: grid; place-items: center; }
.wheel-fab svg { width: 34px; height: 34px; }

/* ---------- 侧栏 ---------- */
.side { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card); border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; }
.card h4 { margin: 0 0 6px; font-size: 14px; }
.weapon-card { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.weapon-card .wicon { width: 64px; height: 64px; border: 3px solid var(--ink); border-radius: 12px; background: #FFF9DB; display: grid; place-items: center; }
.weapon-card .wname { font-weight: 900; font-size: 16px; }
.weapon-card .wdesc { font-size: 12px; color: var(--muted); margin: 2px 0 4px; }
.weapon-card .wstat { font-size: 12px; font-weight: 800; display: flex; gap: 8px; flex-wrap: wrap; }
.pow { letter-spacing: -1px; color: var(--red); }

.wheel-btn {
  position: relative; display: flex; align-items: center; gap: 10px; justify-content: center;
  border: 3px solid var(--ink); border-radius: 14px; background: var(--yellow); box-shadow: var(--shadow);
  padding: 10px; font-weight: 900; font-size: 17px;
}
.wheel-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.wheel-mini {
  width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink);
  background: conic-gradient(var(--red) 0 25%, #fff 0 50%, var(--blue) 0 75%, #fff 0); animation: spin 4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.new-badge, .new-dot {
  position: absolute; top: -10px; right: -8px; background: var(--red); color: #fff; font-style: normal; font-size: 12px;
  font-weight: 900; border: 2px solid var(--ink); border-radius: 99px; padding: 1px 7px; display: none; animation: pulse .5s infinite alternate;
}
.new-dot { top: -4px; right: -4px; width: 16px; height: 16px; padding: 0; }
.new-badge.show, .new-dot.show { display: block; }

.unlock-card { font-size: 13px; line-height: 1.5; }
.unlock-card .next { display: flex; gap: 8px; align-items: center; }
.unlock-card .next .ic { flex: none; width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 10px; display: grid; place-items: center; background: #f1f3f5; filter: grayscale(.9); }
.unlock-card b { color: var(--red); }
.bar { height: 10px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--red)); transition: width .2s; }

.injury-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.injury-card li { font-size: 12.5px; font-weight: 800; color: #b9b0a5; display: flex; gap: 6px; align-items: center; }
.injury-card li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.injury-card li.done { color: var(--ink); }
.injury-card li.done::before { background: var(--red); border-color: var(--ink); }
.injury-card li.cur { color: var(--red); font-size: 14px; }
.injury-card li small { font-weight: 600; color: var(--muted); font-size: 11px; }
.dmg-bar { height: 8px; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; margin-top: 8px; background: #fff; }
.dmg-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #B197FC, #FF4D5E); transition: width .15s; }
.tips { font-size: 12px; color: var(--muted); font-weight: 700; line-height: 1.5; }

.foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 14px; font-weight: 700; }

/* ---------- 浮层 / 弹窗 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(30,26,23,.55); display: none; align-items: center; justify-content: center;
  z-index: 50; padding: 16px;
}
.overlay.show { display: flex; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.modal {
  background: var(--card); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink);
  width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px; text-align: center;
  animation: modalin .25s cubic-bezier(.3,1.5,.6,1);
}
@keyframes modalin { from { transform: scale(.7) rotate(-3deg); } }
.modal h3 { margin: 0 0 6px; font-size: 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.muted.small { font-size: 11.5px; margin: 10px 0 0; }
.link { background: none; border: 0; color: var(--red); text-decoration: underline; font-size: 11.5px; font-weight: 800; padding: 0 0 0 4px; }
.name-row { display: flex; gap: 8px; margin-bottom: 14px; }
.name-row input {
  flex: 1; min-width: 0; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 17px;
  font-weight: 800; font-family: inherit; -webkit-user-select: text; user-select: text; background: #fff;
}

/* 轮盘 */
.wheel {
  --size: min(440px, 92vw); width: var(--size); height: var(--size); position: relative; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 27%, var(--ink) 27% 28%, transparent 28%),
    repeating-conic-gradient(from -15deg, #FFF9DB 0 30deg, #FFE8CC 30deg 60deg);
  border: 5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); animation: wheelin .35s cubic-bezier(.3,1.4,.6,1);
}
@keyframes wheelin { from { transform: rotate(-120deg) scale(.4); opacity: 0; } }
.wheel-center {
  position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--yellow); border: 4px solid var(--ink); display: grid; place-items: center; text-align: center;
  font-weight: 900; font-size: 12px; padding: 4px; line-height: 1.2;
}
.wheel-center svg { width: 50%; height: auto; display: block; margin: 0 auto 2px; }
.slot {
  position: absolute; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  border: 3px solid var(--ink); background: #fff; display: grid; place-items: center; padding: 0;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .1s;
}
.slot svg { width: 66%; height: 66%; }
.slot:hover { transform: translate(-50%, -50%) scale(1.1); }
.slot.cur { background: var(--yellow); box-shadow: 0 0 0 4px var(--red), 3px 3px 0 var(--ink); }
.slot.locked { background: #e9ecef; }
.slot.locked svg { filter: grayscale(1) brightness(.6); opacity: .45; }
.slot .lock { position: absolute; font-size: 16px; }
.slot .lbl {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; white-space: nowrap;
  font-size: 11px; font-weight: 900; background: var(--ink); color: #fff; border-radius: 6px; padding: 0 5px; pointer-events: none;
}
.slot .prog { position: absolute; bottom: -3px; left: 10%; right: 10%; height: 6px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.slot .prog i { display: block; height: 100%; background: var(--red); }
.slot.newly { animation: pulse .4s infinite alternate; }

/* 结算 */
.result .big-score {
  font-size: 56px; font-weight: 900; color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink); line-height: 1.1; margin: 4px 0;
}
.result .title-tag { display: inline-block; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 3px 12px; font-weight: 900; transform: rotate(-2deg); }
.result .sub { font-size: 13px; color: var(--muted); margin: 8px 0 12px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.stats div { border: 2px solid var(--ink); border-radius: 10px; padding: 6px 4px; background: #fff; }
.stats b { display: block; font-size: 17px; }
.stats span { font-size: 11px; color: var(--muted); font-weight: 700; }
.rank-msg { border: 3px dashed var(--ink); border-radius: 12px; padding: 8px; font-weight: 900; margin-bottom: 10px; font-size: 15px; }
.rank-msg.up { background: #EBFBEE; } .rank-msg.drop { background: #FFF0F0; }
.unlocked-list { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.unlocked-list span { border: 2px solid var(--ink); border-radius: 10px; background: #FFF9DB; padding: 2px 8px 2px 2px; display: flex; align-items: center; font-weight: 900; font-size: 13px; }
.quote { font-size: 14px; font-weight: 800; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 8px; margin-bottom: 14px; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 排行榜 */
.board { text-align: left; }
.board-me { border: 3px solid var(--ink); border-radius: 12px; background: var(--yellow); padding: 8px 12px; font-weight: 900; margin-bottom: 10px; font-size: 14px; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.board-list li { display: grid; grid-template-columns: 34px 28px 1fr auto; align-items: center; gap: 6px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; padding: 5px 10px; font-weight: 800; font-size: 14px; }
.board-list li.me { background: #FFE3E3; border-width: 3px; }
.board-list .rk { font-weight: 900; text-align: center; }
.board-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .sc { font-variant-numeric: tabular-nums; font-weight: 900; }
.board-list .gap { text-align: center; border: 0; background: none; color: var(--muted); padding: 0; display: block; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -150%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 14px; font-weight: 900; z-index: 80; transition: transform .3s cubic-bezier(.3,1.4,.6,1);
  max-width: calc(100vw - 32px); text-align: center; display: flex; align-items: center; gap: 8px; font-size: 15px;
}
.toast.show { transform: translate(-50%, 0); }
.toast svg { width: 34px; height: 34px; flex: none; background: #fff; border-radius: 8px; }

/* SVG 内动画 */
.zzz text { animation: zfloat 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.zzz text:nth-child(2) { animation-delay: .5s; } .zzz text:nth-child(3) { animation-delay: 1s; }
@keyframes zfloat { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-8px); opacity: 1; } }
.kick { animation: kick .7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 30% 100%; }
@keyframes kick { from { transform: rotate(-12deg); } to { transform: rotate(10deg); } }
.steam path { animation: steam 2s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: 1s; }
@keyframes steam { 0% { transform: translateY(10px); opacity: 0; } 50% { opacity: .9; } 100% { transform: translateY(-16px); opacity: 0; } }
.stink path { animation: steam 1.6s ease-in-out infinite; }
.stink path:nth-child(2) { animation-delay: .5s; } .stink path:nth-child(3) { animation-delay: 1s; }
.tear { stroke-dasharray: 14 8; animation: tear .5s linear infinite; }
@keyframes tear { to { stroke-dashoffset: -22; } }
.ghost { animation: ghost 1.6s ease-in-out infinite alternate; }
@keyframes ghost { from { transform: translateY(6px); } to { transform: translateY(-8px); } }
.shield { animation: shieldin .25s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes shieldin { from { transform: scale(.6); opacity: 0; } }
.fall rect { animation: fall 2.4s ease-in infinite; transform-box: fill-box; }
.fall rect:nth-child(2) { animation-delay: .8s; } .fall rect:nth-child(3) { animation-delay: 1.6s; }
@keyframes fall { 0% { transform: translateY(-30px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(160px); opacity: 0; } }
#tibo.wobble { animation: wobble 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes wobble { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- 手机 ---------- */
@media (max-width: 820px) {
  #app { padding: 8px 12px 14px; }
  .arena { grid-template-columns: 1fr; gap: 12px; }
  .stage-wrap { width: min(100%, calc((100vh - 170px) * .8)); }
  .wheel-fab { display: grid; }
  .side { display: grid; grid-template-columns: 1fr 1fr; }
  .weapon-card, .unlock-card, .injury-card, .tips { grid-column: 1 / -1; }
  .wheel-btn { grid-column: 1 / -1; }
  .tips { display: none; }
  .idle-card { left: 8px; right: 8px; bottom: 8px; padding: 8px 10px 10px; }
  .status-text { font-size: 12.5px; margin: 4px 0 8px; }
  .status-text b { font-size: 15px; }
  .idle-meta { margin-top: 6px; font-size: 11px; }
}
@media (max-width: 480px) {
  .brand-title { font-size: 24px; }
  .brand-sub { display: none; }
  .hud { gap: 6px; }
  .hud-cell { padding: 3px 7px 5px; }
  .hud-cell b { font-size: 19px; }
  .hud-cell small { display: none; }
  .btn.small { font-size: 13px; padding: 5px 8px; }
  .icon-btn { width: 36px; height: 36px; font-size: 16px; }
  .bubble { font-size: 13px; max-width: 62%; }
  .status-text { font-size: 13px; }
  .btn.big { font-size: 18px; padding: 10px 18px; }
  .comic { font-size: 28px; } .comic.t2 { font-size: 32px; } .comic.t3 { font-size: 36px; }
  .slot .lbl { font-size: 9.5px; }
  .result .big-score { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .wheel-mini, .kick, .zzz text, .ghost, .fall rect, #tibo.wobble { animation: none; }
}
