/* 盲盒星球 · 卡通盲盒游戏视觉 */
:root {
  --orange: #FF8A3D;
  --orange-deep: #F06A14;
  --orange-soft: #FFF0E2;
  --ink: #2C2118;
  --ink-2: #6F5B4A;
  --ink-3: #A08B78;
  --cream: #FFF9F0;
  --card: #FFFDF8;
  --line: #F1DEC8;
  --teal: #45B8AE;
  --yellow: #FFC94A;
  --pink: #FF9BB6;
  --purple: #9B7BFF;
  --blue: #5C9DFF;
  --shadow: 0 10px 28px rgba(126, 78, 37, .10), 0 2px 6px rgba(126, 78, 37, .05);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { background: #FFF1DD; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #FFF1DD;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
img { display: block; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
.mp-icon { flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 背景 ---------- */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(105% 70% at 12% 0%, #FFF9EF 0%, #FFF1DC 46%, #FFE7CB 100%);
}
.app-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 249, 239, .15) 0%, transparent 34%, rgba(255, 197, 138, .12) 100%);
}
.bg-blob { position: absolute; border-radius: 50%; filter: blur(6px); }
.blob-a {
  width: 300px; height: 300px; top: -120px; right: -120px;
  background: radial-gradient(circle at 36% 36%, rgba(255, 208, 150, .85), rgba(255, 208, 150, 0) 70%);
}
.blob-b {
  width: 260px; height: 260px; bottom: 10%; left: -140px;
  background: radial-gradient(circle at 50% 50%, rgba(135, 208, 196, .42), rgba(135, 208, 196, 0) 70%);
}
.blob-c {
  width: 220px; height: 220px; top: 42%; right: -110px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 178, 199, .38), rgba(255, 178, 199, 0) 70%);
}
.bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(215, 133, 66, .16) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.5) 34%, transparent 72%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.5) 34%, transparent 72%);
  opacity: .7;
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
}
.screen {
  padding: 0 16px calc(108px + var(--safe-bottom));
  min-height: 100dvh;
}
.screen-lobby { padding-top: calc(var(--safe-top) + 14px); }
.screen-collection { padding-top: calc(var(--safe-top) + 22px); }

/* ---------- 顶部 HUD ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.player-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 13px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .74);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 5px 16px rgba(122, 75, 32, .08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  max-width: 58%;
  transition: transform .15s ease;
}
.player-chip:active { transform: scale(.97); }
.avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #FFE0C2;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8);
}
.avatar-fallback, .avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar-fallback svg { width: 100%; height: 100%; display: block; }
.avatar-img { object-fit: cover; z-index: 1; }
.player-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.player-meta strong {
  font-size: 13px;
  font-weight: 800;
  max-width: 128px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-meta small { font-size: 9.5px; color: var(--ink-3); margin-top: 2px; }
.coin-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  background: #2D2118;
  color: #FFF7E8;
  box-shadow: 0 7px 18px rgba(60, 35, 10, .18);
  flex: 0 0 auto;
  transition: transform .15s ease;
}
.coin-pill:active { transform: scale(.96); }
.coin-pill.is-bump { animation: coinBump .5s cubic-bezier(.2, 1.6, .4, 1); }
.coin-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFE783, #FFB01F);
  display: grid;
  place-items: center;
  color: #8A5500;
  box-shadow: inset 0 -2px 3px rgba(160, 90, 0, .28);
  flex: 0 0 auto;
}
.coin-dot .mp-icon { width: 15px; height: 15px; }
.coin-dot.mini { width: 18px; height: 18px; }
.coin-dot.mini .mp-icon { width: 11px; height: 11px; }
.coin-pill b {
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}
.coin-label { font-size: 8.5px; opacity: .55; align-self: flex-end; margin-bottom: 2px; }
.coin-pill.is-small { padding: 6px 10px 6px 6px; }
.coin-pill.is-small b { font-size: 14px; }

/* ---------- 大厅头图 ---------- */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 2px 16px;
}
.hero-copy { min-width: 0; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  color: var(--orange-deep);
  text-transform: uppercase;
}
.eyebrow .mp-icon { width: 13px; height: 13px; }
.hero h1 {
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -.05em;
  font-weight: 900;
  color: var(--ink);
}
.hero h1 em {
  font-style: normal;
  color: var(--orange);
  background: linear-gradient(transparent 64%, rgba(255, 201, 74, .48) 64%);
  padding: 0 1px;
}
.hero-sub { margin: 9px 0 0; font-size: 11.5px; color: var(--ink-2); }
.orb-card {
  flex: 0 0 auto;
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 9px 7px 8px;
  border-radius: 22px;
  background: rgba(255, 253, 248, .8);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 8px 20px rgba(126, 78, 37, .09);
  transition: transform .15s ease;
}
.orb-card:active { transform: scale(.96); }
.orb-ring {
  --p: 0;
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--orange) calc(var(--p) * 1%), #F3E3D2 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.orb-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #FFFBF4;
}
.orb-inner { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 1px; }
.orb-inner b { font-size: 17px; font-weight: 900; letter-spacing: -.04em; }
.orb-inner small { font-size: 8.5px; color: var(--ink-3); font-weight: 700; }
.orb-label { font-size: 9px; font-weight: 800; color: var(--ink-2); }

/* ---------- 盒子轮播 ---------- */
.carousel-wrap { margin: 0 -16px; }
.box-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.box-carousel::-webkit-scrollbar { display: none; }
.box-card {
  position: relative;
  flex: 0 0 calc(100% - 44px);
  scroll-snap-align: center;
  border-radius: 28px;
  padding: 16px;
  background: linear-gradient(160deg, #FFFDF9 0%, var(--bs) 100%);
  border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow: 0 16px 38px rgba(141, 84, 35, .13), 0 2px 4px rgba(141, 84, 35, .05);
  overflow: hidden;
}
.rar-common { --rc: #94A3B8; --rs: #F1F4F8; }
.rar-rare { --rc: #4E9BFF; --rs: #EAF3FF; }
.rar-epic { --rc: #A46BFF; --rs: #F3ECFF; }
.rar-legend { --rc: #F5A300; --rs: #FFF5DC; }
.box-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  right: -80px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bc), transparent 70%);
  opacity: .34;
  pointer-events: none;
}
.box-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  gap: 8px;
}
.box-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .78);
  color: var(--bd);
  font-size: 9.5px;
  font-weight: 900;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .92);
  white-space: nowrap;
}
.box-tag .mp-icon { width: 12px; height: 12px; }
.box-count { font-size: 9px; color: var(--ink-3); white-space: nowrap; }
.box-visual {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0 0;
}
.box-art {
  width: 150px;
  height: 150px;
  animation: floaty 5s ease-in-out infinite;
  filter: drop-shadow(0 12px 14px rgba(120, 70, 30, .12));
}
.box-art svg { width: 100%; height: 100%; display: block; }
.float-star { position: absolute; border-radius: 50%; background: var(--bc); opacity: .5; }
.float-star.s1 { width: 6px; height: 6px; left: 21%; top: 22%; animation: floaty 3.5s ease-in-out infinite; }
.float-star.s2 { width: 9px; height: 9px; right: 16%; bottom: 24%; background: #FFC94A; animation: floaty 4.2s 1s ease-in-out infinite; }
.box-body { position: relative; z-index: 2; }
.box-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.box-title-row h3 { font-size: 21px; font-weight: 900; letter-spacing: -.03em; }
.price-tag { display: flex; align-items: baseline; gap: 3px; color: var(--bd); flex: 0 0 auto; }
.price-tag .coin-dot.mini { align-self: center; }
.price-tag b { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.price-tag small { font-size: 8.5px; color: var(--ink-3); }
.box-desc { margin: 5px 0 10px; font-size: 10.5px; line-height: 1.55; color: var(--ink-2); }
.odds-bar { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: #F3E8DA; }
.odds-seg { height: 100%; }
.odds-labels { display: flex; justify-content: space-between; gap: 4px; margin-top: 5px; }
.odds-labels span { display: flex; align-items: center; gap: 3px; font-size: 8px; color: var(--ink-3); white-space: nowrap; }
.r-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.range-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 9px;
  color: var(--ink-3);
}
.range-line b { color: var(--bd); }
.range-line span { font-size: 8px; }
.buy-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  transition: transform .13s ease, opacity .2s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.96); }
.btn small { font-size: 8.5px; font-weight: 700; opacity: .72; }
.btn-primary {
  background: linear-gradient(135deg, #FFA24E, #FF7A28);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 122, 40, .3), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-outline { background: #FFF9F0; border: 1.5px solid #F3D3B3; color: var(--orange-deep); }
.btn-outline small { color: var(--ink-3); }
.btn.is-poor { opacity: .5; box-shadow: none; }
.btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-block { width: 100%; }
.btn-lg { min-height: 50px; font-size: 13.5px; border-radius: 17px; }
.btn-small { min-height: 38px; padding: 8px 14px; font-size: 11px; border-radius: 12px; }
.btn-text { background: transparent; color: var(--ink-3); min-height: 40px; font-size: 11px; font-weight: 700; }
.btn-link { background: transparent; color: var(--ink-3); min-height: 38px; font-size: 10.5px; font-weight: 700; }
.btn-link .mp-icon { width: 13px; height: 13px; }

/* ---------- 轮播指示 ---------- */
.carousel-dots { display: flex; justify-content: center; gap: 5px; margin-top: 1px; }
.carousel-dot { width: 6px; height: 6px; border-radius: 99px; background: #E8CDB1; transition: all .25s ease; }
.carousel-dot.is-active { width: 18px; background: var(--orange); }

/* ---------- 本期阵容 ---------- */
.section { margin-top: 20px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.section-head h2 { font-size: 16px; font-weight: 900; letter-spacing: -.02em; }
.section-head span { font-size: 9px; color: var(--ink-3); }
.lineup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lineup-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 4px 8px;
  border-radius: 16px;
  background: rgba(255, 253, 248, .8);
  border: 1px solid rgba(255, 255, 255, .94);
  box-shadow: 0 4px 10px rgba(130, 80, 35, .06);
  transition: transform .13s ease;
}
.lineup-item:active { transform: scale(.95); }
.lineup-art { width: 62px; height: 62px; display: block; }
.lineup-art svg { width: 100%; height: 100%; display: block; }
.lineup-item b {
  font-size: 9px;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lineup-rar { font-size: 7.5px; color: var(--rc); font-weight: 900; }
.owned-tick {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
}
.owned-tick .mp-icon { width: 9px; height: 9px; }

/* ---------- 提示 / 余额不足 ---------- */
.tip-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .75), rgba(255, 240, 222, .9));
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 8px 20px rgba(126, 78, 37, .06);
}
.tip-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #FFF2D9;
  color: #E79A18;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.tip-icon .mp-icon { width: 16px; height: 16px; }
.tip-card p { display: flex; flex-direction: column; gap: 2px; }
.tip-card b { font-size: 11px; }
.tip-card span { font-size: 9.5px; line-height: 1.55; color: var(--ink-2); }
.wallet-banner {
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFF4E6, #FFE7D2);
  border: 1.5px solid #FFD2B2;
  box-shadow: 0 8px 20px rgba(200, 120, 50, .1);
}
.wallet-copy { display: flex; flex-direction: column; gap: 3px; }
.wallet-copy b { font-size: 13px; color: var(--orange-deep); }
.wallet-copy span { font-size: 10px; color: var(--ink-2); line-height: 1.5; }
.wallet-actions { display: flex; gap: 8px; margin-top: 10px; }
.wallet-actions button {
  flex: 1;
  min-height: 38px;
  border-radius: 12px;
  background: #FFF9F1;
  border: 1px solid #F0D3B7;
  font-size: 11px;
  font-weight: 900;
  color: var(--orange-deep);
}
.wallet-actions button.is-primary { background: var(--orange); border-color: transparent; color: #fff; }

/* ---------- 收藏册 ---------- */
.collection-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.collection-top h1 { font-size: 27px; font-weight: 900; letter-spacing: -.045em; }
.collection-top h1 span { font-size: 11px; color: var(--ink-3); font-weight: 700; margin-left: 3px; }
.progress-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 253, 248, .86);
  border: 1px solid #fff;
  box-shadow: var(--shadow);
}
.progress-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 900; }
.progress-top b { color: var(--orange); }
.progress-track { height: 8px; border-radius: 99px; background: #F2E3D3; overflow: hidden; margin: 9px 0 8px; }
.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #FFC94A, #FF8A3D);
  transition: width .45s ease;
}
.progress-card p { font-size: 9.5px; color: var(--ink-3); }
.filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 16px 2px 12px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .82);
  border: 1px solid #F0DDC8;
  font-size: 9.5px;
  font-weight: 900;
  color: var(--ink-2);
}
.filter-chip span { font-size: 7.5px; color: var(--ink-3); font-weight: 600; }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: #FFF7E8; }
.filter-chip.is-active span { color: rgba(255, 247, 232, .62); }
.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
/* 收藏册按系列分组 */
.collection-sections { display: block; }
.series-block { margin-top: 16px; }
.series-block:first-child { margin-top: 2px; }
.series-head {
  padding: 12px 14px 11px;
  border-radius: 18px;
  background: rgba(255, 253, 248, .88);
  border: 1px solid #fff;
  box-shadow: 0 7px 18px rgba(126, 78, 37, .07);
}
.series-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.series-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.series-name h2 { font-size: 14px; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.series-name b { font-size: 9px; color: var(--ink-3); font-weight: 800; }
.series-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.series-reward {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #FFF2DA;
  color: #B57A12;
  font-size: 8.5px;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
}
.series-reward .mp-icon { width: 11px; height: 11px; }
.series-reward.is-ready { background: linear-gradient(135deg, #FFE08A, #FFC247); color: #7A4A00; }
.series-reward.is-claimed { background: #F0E9E0; color: #A08B78; }
.series-track { height: 5px; border-radius: 99px; background: #F2E3D3; overflow: hidden; margin-top: 9px; }
.series-track span { display: block; height: 100%; border-radius: 99px; transition: width .4s ease; }
.series-block .item-grid { margin-top: 9px; }
.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 5px 9px;
  border-radius: 18px;
  background: linear-gradient(165deg, #FFFDFA, var(--rs));
  border: 1.5px solid rgba(255, 255, 255, .92);
  box-shadow: 0 6px 14px rgba(120, 75, 35, .07);
  overflow: hidden;
  transition: transform .15s ease;
}
.item-card:active { transform: scale(.95); }
.item-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--rc);
  opacity: .14;
  pointer-events: none;
}
.item-art { display: block; width: 88px; height: 88px; }
.item-art svg { width: 100%; height: 100%; display: block; }
.item-name {
  font-size: 9.5px;
  font-weight: 800;
  margin-top: 1px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-rar { display: flex; align-items: center; gap: 3px; font-size: 7.5px; color: var(--rc); font-weight: 900; margin-top: 2px; }
.item-card.is-locked { background: linear-gradient(165deg, #FFFDFA, #F4F0EA); }
.item-card.is-locked .item-art { filter: grayscale(1) brightness(.1); opacity: .17; }
.item-card.is-locked .item-art .art-bg,
.item-card.is-locked .item-art .art-floor,
.item-card.is-locked .item-art .tw { display: none; }
.item-card.is-locked .item-name { color: var(--ink-3); font-weight: 600; }
.item-card.is-locked .item-rar { color: var(--ink-3); opacity: .7; }
.count-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  background: var(--ink);
  color: #FFF7E8;
  font-size: 8.5px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 99px;
}
.lock-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  display: grid;
  place-items: center;
  color: #B9A998;
}
.lock-badge .mp-icon { width: 10px; height: 10px; }
.empty-hint {
  margin: 20px auto;
  padding: 18px;
  text-align: center;
  border-radius: 16px;
  background: rgba(255, 253, 248, .7);
  border: 1px dashed #EBD6BE;
  font-size: 10px;
  color: var(--ink-3);
}
.collection-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(255, 253, 248, .7);
  border: 1px dashed #EBD6BE;
  color: var(--ink-3);
  font-size: 9.5px;
  line-height: 1.5;
}
.collection-tip .mp-icon { width: 16px; height: 16px; color: var(--orange); }
.collection-tip p { margin: 0; }

/* ---------- 底部菜单 ---------- */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 7px;
  border-radius: 25px;
  background: rgba(255, 252, 245, .9);
  border: 1px solid rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(100, 60, 25, .18);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 40;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  border-radius: 18px;
  color: #9C8975;
  font-size: 9.5px;
  font-weight: 900;
  transition: all .2s ease;
}
.nav-btn .mp-icon { width: 20px; height: 20px; }
.nav-btn.is-active {
  background: linear-gradient(135deg, #FFA24E, #FF7A28);
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 122, 40, .28);
}

/* ---------- 开盒全屏 ---------- */
.open-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 20%, #4A2A16 0%, #2A170C 55%, #1B0F08 100%);
  opacity: 0;
  transition: opacity .25s ease;
}
.open-overlay.is-visible { opacity: 1; }
.open-overlay.is-opening .open-inner { justify-content: center; }
.open-overlay.is-opening .open-actions { margin-top: 0; padding-top: 0; }
.open-overlay.is-opening .reveal-wrap:empty { display: none; }
.open-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.open-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 360px;
  height: 360px;
  margin: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 90, .26), transparent 68%);
}
.open-ray {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 560px;
  height: 560px;
  margin: -280px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 8deg, rgba(255, 223, 160, .07) 8deg 14deg, transparent 14deg 30deg);
  animation: spin 40s linear infinite;
}
.confetti { position: absolute; inset: 0; overflow: hidden; }
.confetti span {
  position: absolute;
  top: -16px;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  border-radius: 2px;
  background: var(--c);
  transform: rotate(var(--r));
  animation: confettiFall var(--d) linear var(--delay) forwards;
}
.skip-btn {
  position: absolute;
  z-index: 6;
  top: calc(var(--safe-top) + 14px);
  right: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 248, 236, .14);
  border: 1px solid rgba(255, 248, 236, .22);
  color: rgba(255, 248, 236, .84);
  font-size: 10px;
  font-weight: 700;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.open-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--safe-top) + 58px) 20px calc(var(--safe-bottom) + 22px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.open-kicker { color: #FFE3B4; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.open-sub { margin-top: 6px; color: rgba(255, 243, 222, .5); font-size: 9.5px; }
.box-stage {
  position: relative;
  width: 230px;
  height: 230px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  outline: none;
}
.tap-hint {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 248, 236, .14);
  border: 1px solid rgba(255, 248, 236, .24);
  color: rgba(255, 243, 224, .9);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: hintIn .4s .3s both;
}
.tap-hint .mp-icon { width: 13px; height: 13px; }
.box-stage.is-ready .box-stage-art { animation: boxReady 1.5s ease-in-out infinite; }
.box-stage.is-ready .tap-hint {
  background: rgba(255, 201, 74, .2);
  border-color: rgba(255, 201, 74, .48);
  color: #FFE7A8;
}
.box-stage.is-burst .tap-hint { display: none; }
.box-stage:focus-visible { outline: 2px solid rgba(255, 201, 74, .8); outline-offset: 4px; border-radius: 24px; }
.box-stage-art { width: 100%; height: 100%; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .35)); }
.box-stage-art svg { width: 100%; height: 100%; display: block; }
.box-stage.is-shaking { animation: boxShake .62s ease-in-out infinite; }
.box-stage.is-burst { animation: boxBurst .35s ease-out forwards; }
.box-stage.is-gone { display: none; }
.open-overlay.is-revealed .box-stage { display: none; }
.reveal-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; }
.reveal-wrap.is-single { flex: 1; justify-content: center; padding-bottom: 8px; }
.reveal-wrap.is-pop { animation: popIn .55s cubic-bezier(.18, 1.5, .4, 1); }
.open-actions {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: auto;
  padding-top: 18px;
}
.open-actions .btn { width: 100%; }
.open-actions .btn-primary { background: linear-gradient(135deg, #FFB35C, #FF7A28); }
.open-actions .btn-outline { background: rgba(255, 248, 236, .1); border: 1px solid rgba(255, 248, 236, .28); color: #FFF2DD; }
.open-actions .btn-link { color: rgba(255, 244, 226, .6); }
.open-actions .btn small { display: block; font-size: 8px; opacity: .72; margin-top: 2px; }
.open-actions .btn span { display: block; line-height: 1; }

/* 单抽卡片 */
.reveal-card {
  position: relative;
  width: 100%;
  max-width: 310px;
  padding: 16px 18px 20px;
  border-radius: 28px;
  background: linear-gradient(170deg, #FFFDF8, var(--rs));
  border: 2px solid var(--rc);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .06), 0 24px 50px rgba(0, 0, 0, .35), 0 0 34px var(--rc);
  overflow: hidden;
  text-align: center;
}
.reveal-card.rar-legend {
  box-shadow: 0 0 0 8px rgba(255, 201, 74, .12), 0 24px 60px rgba(0, 0, 0, .4), 0 0 50px rgba(255, 193, 60, .55);
}
.reveal-card-glow {
  position: absolute;
  inset: -40% -30% auto;
  height: 70%;
  background: radial-gradient(circle at 50% 30%, var(--rs), transparent 68%);
  opacity: .9;
  pointer-events: none;
}
.reveal-art {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 2px auto 4px;
  filter: drop-shadow(0 14px 18px rgba(100, 60, 30, .15));
}
.reveal-art svg { width: 100%; height: 100%; display: block; }
.new-ribbon, .dup-ribbon {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFC94A, #FF9E1B);
  color: #6A3A00;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 3px 8px rgba(160, 95, 0, .2);
}
.dup-ribbon { background: rgba(58, 42, 34, .08); color: var(--ink-3); box-shadow: none; font-weight: 700; }
.reveal-body { position: relative; z-index: 1; }
.rarity-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--rs);
  color: var(--rc);
  font-size: 9px;
  font-weight: 900;
  border: 1px solid rgba(0, 0, 0, .04);
}
.reveal-body h2 { margin: 7px 0 0; font-size: 24px; font-weight: 900; letter-spacing: -.035em; color: var(--ink); }
.reveal-series { margin-top: 2px; font-size: 9px; color: var(--ink-3); font-weight: 800; letter-spacing: .08em; }
.reveal-desc { margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: var(--ink-2); }

/* 十连 */
.open-overlay.is-result .open-sub { display: none; }
.open-overlay.is-ten-result .open-kicker { display: none; }
.reveal-wrap.is-ten { flex: 1; justify-content: center; padding-bottom: 10px; }
.ten-head { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; margin-bottom: 14px; }
.ten-head h3 { color: #FFF4E2; font-size: 19px; font-weight: 900; letter-spacing: -.02em; }
.ten-head p { margin-top: 3px; color: rgba(255, 244, 226, .45); font-size: 9px; }
.ten-summary { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 100%; }
.summary-chip {
  font-size: 8.5px;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: var(--rc);
  border: 1px solid rgba(255, 255, 255, .14);
}
.summary-chip.is-guarantee { color: #FFD86B; border-color: rgba(255, 201, 74, .4); }
.ten-grid { width: 100%; max-width: 400px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mini-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px;
  border-radius: 12px;
  background: linear-gradient(170deg, #FFFCF6, var(--rs));
  border: 1.5px solid var(--rc);
  opacity: 0;
  transform: translateY(12px) scale(.88);
  transition: opacity .24s ease, transform .3s cubic-bezier(.2, 1.4, .4, 1);
  overflow: hidden;
}
.mini-card.is-in { opacity: 1; transform: translateY(0) scale(1); }
.mini-art { width: 48px; height: 48px; display: block; }
.mini-art svg { width: 100%; height: 100%; display: block; }
.mini-name { font-size: 7.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: var(--ink); }
.mini-rar { font-size: 7px; font-weight: 900; color: var(--rc); margin-top: 1px; }
.mini-new, .mini-guarantee {
  position: absolute;
  top: 2px;
  z-index: 2;
  padding: 1px 3px;
  border-radius: 4px;
  font-size: 5.5px;
  font-weight: 900;
}
.mini-new { left: 2px; background: #FF9E1B; color: #fff; }
.mini-guarantee { right: 2px; background: #4E9BFF; color: #fff; }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 26, 14, .5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease;
}
.modal.is-open .modal-backdrop { opacity: 1; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #FFFCF6 0%, #FFF6EA 100%);
  border-radius: 28px 28px 0 0;
  padding: 14px 18px calc(var(--safe-bottom) + 18px);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .25);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1);
}
.modal.is-open .sheet { transform: translateY(0); }
.sheet-handle { width: 38px; height: 4px; border-radius: 99px; background: #E6D2BC; margin: 0 auto 10px; }
.sheet-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F6E8D8;
  color: var(--ink-2);
  display: grid;
  place-items: center;
}
.sheet-close .mp-icon { width: 16px; height: 16px; }
.sheet-inner { position: relative; }
.detail-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  margin: 2px -2px 14px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(165deg, #FFF9F0, var(--rs));
  border: 1px solid rgba(255, 255, 255, .9);
  overflow: hidden;
}
.detail-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid var(--rc);
  opacity: .2;
  pointer-events: none;
}
.detail-art-svg {
  position: relative;
  z-index: 1;
  width: 170px;
  height: 170px;
  filter: drop-shadow(0 14px 18px rgba(100, 60, 30, .14));
}
.detail-art-svg svg { width: 100%; height: 100%; display: block; }
.detail-rarity {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .84);
  color: var(--rc);
  font-size: 8.5px;
  font-weight: 900;
}
.sheet-body { padding: 0 2px; }
.sheet-eyebrow {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  color: var(--orange-deep);
  text-transform: uppercase;
}
.sheet-title { margin-top: 4px; font-size: 24px; font-weight: 900; letter-spacing: -.035em; }
.detail-desc { margin-top: 7px; font-size: 11px; line-height: 1.65; color: var(--ink-2); }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.detail-stats div { background: #FFF8EE; border: 1px solid #F0E0CD; border-radius: 14px; padding: 9px 4px; text-align: center; }
.detail-stats b { display: block; font-size: 16px; font-weight: 900; }
.detail-stats span { font-size: 8.5px; color: var(--ink-3); }
.detail-stats div:nth-child(2) b { color: var(--orange); }
.sheet-note { margin: 10px 2px 0; font-size: 9px; line-height: 1.55; color: var(--ink-3); text-align: center; }
.sheet .btn-block + .btn-block { margin-top: 9px; }

/* 玩家资料 */
.profile-head { display: flex; align-items: center; gap: 13px; padding: 6px 2px 14px; }
.profile-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #FFE0C2;
  box-shadow: 0 8px 18px rgba(150, 90, 40, .16);
}
.profile-avatar .avatar-fallback, .profile-avatar .avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.profile-avatar .avatar-fallback svg { width: 100%; height: 100%; display: block; }
.profile-avatar .avatar-img { object-fit: cover; }
.profile-sub { margin-top: 3px; font-size: 9.5px; color: var(--ink-3); }
.profile-edit { margin-top: 4px; }
.profile-edit label { display: block; font-size: 9.5px; font-weight: 900; color: var(--ink-2); margin-bottom: 6px; }
.nick-row { display: flex; gap: 8px; }
.nick-row input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #EED9C2;
  background: #FFFCF6;
  border-radius: 13px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ink);
  outline: none;
}
.nick-row input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 61, .12); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.profile-stats div { background: #FFF7EC; border: 1px solid #F0E0CD; border-radius: 15px; padding: 11px 4px; text-align: center; }
.profile-stats b { display: block; font-size: 18px; font-weight: 900; color: var(--ink); }
.profile-stats b small { font-size: 9px; color: var(--ink-3); }
.profile-stats span { font-size: 8.5px; color: var(--ink-3); }
.run-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #FFF5E7, #FFECD6);
  border: 1px solid #F3DDC3;
}
.run-label { font-size: 8px; font-weight: 900; letter-spacing: .1em; color: var(--orange-deep); }
.run-main { margin-top: 3px; font-size: 11px; font-weight: 800; }
.run-sub { margin-top: 3px; font-size: 8.5px; color: var(--ink-3); }
.run-coins { text-align: right; flex: 0 0 auto; }
.run-coins b { display: block; font-size: 18px; font-weight: 900; color: var(--orange-deep); }
.run-coins span { font-size: 8px; color: var(--ink-3); }

.setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 16px;
  background: #FFF8EE;
  border: 1px solid #F0E0CD;
}
.setting-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #FFF0DA;
  color: var(--orange-deep);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.setting-icon .mp-icon { width: 17px; height: 17px; }
.setting-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setting-copy b { font-size: 11px; }
.setting-copy span { font-size: 8.5px; color: var(--ink-3); }
.switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 99px;
  background: #E6D3BE;
  transition: background .2s ease;
  flex: 0 0 auto;
}
.switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(80, 45, 15, .22);
  transition: transform .22s cubic-bezier(.2, 1.2, .4, 1);
}
.switch.is-on { background: linear-gradient(135deg, #FFA24E, #FF7A28); }
.switch.is-on span { transform: translateX(20px); }

/* 本局结束 */
.runover-hero { text-align: center; padding: 6px 0 14px; }
.runover-orb {
  width: 74px;
  height: 74px;
  border-radius: 26px;
  margin: 0 auto 10px;
  background: linear-gradient(145deg, #FFD98A, #FFA53D);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px rgba(255, 140, 50, .28);
  transform: rotate(-5deg);
}
.runover-orb.small { width: 60px; height: 60px; border-radius: 22px; }
.runover-orb .mp-icon { width: 34px; height: 34px; }
.runover-orb.small .mp-icon { width: 26px; height: 26px; }
.runover-copy { margin: 7px auto 0; max-width: 290px; font-size: 10.5px; line-height: 1.6; color: var(--ink-2); }
.runover-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.runover-stats div { background: #FFF7EC; border: 1px solid #F0E0CD; border-radius: 15px; padding: 11px 4px; text-align: center; }
.runover-stats b { display: block; font-size: 17px; font-weight: 900; }
.runover-stats b small { font-size: 9px; color: var(--ink-3); }
.runover-stats span { font-size: 8.5px; color: var(--ink-3); }
.runover-best {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: #FFF8EE;
  border: 1px dashed #EBD4BA;
  font-size: 9.5px;
  color: var(--ink-3);
}
.runover-best b { font-size: 11px; color: var(--ink); }
.rar-text-legend { color: #D98A00 !important; }
.rar-text-epic { color: #8B4DE0 !important; }
.rar-text-rare { color: #2E7EDB !important; }
.confirm-wrap { text-align: center; padding: 8px 2px 2px; }
.confirm-copy { margin: 8px auto 16px; max-width: 300px; font-size: 11px; line-height: 1.65; color: var(--ink-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + var(--safe-bottom));
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 48px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(45, 33, 24, .94);
  color: #FFF7E8;
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(30, 18, 8, .28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast-icon .mp-icon { width: 14px; height: 14px; color: #FFD27A; }
.toast-icon:empty { display: none; }

/* ---------- 动画 ---------- */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes coinBump { 0% { transform: scale(1); } 35% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes boxShake {
  0%, 100% { transform: rotate(0) scale(1); }
  15% { transform: rotate(-4deg) scale(1.02); }
  30% { transform: rotate(4deg) scale(1.02); }
  45% { transform: rotate(-5deg) scale(1.04); }
  60% { transform: rotate(5deg) scale(1.05); }
  75% { transform: rotate(-3deg) scale(1.07); }
}
@keyframes boxBurst {
  0% { transform: scale(1.06); opacity: 1; }
  55% { transform: scale(1.25); opacity: 1; filter: brightness(1.6); }
  100% { transform: scale(.4); opacity: 0; }
}
@keyframes popIn {
  0% { transform: scale(.75); opacity: 0; }
  70% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes confettiFall {
  0% { transform: translate3d(0, -20px, 0) rotate(var(--r)); opacity: 1; }
  100% { transform: translate3d(20px, 105vh, 0) rotate(calc(var(--r) + 320deg)); opacity: .2; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes boxReady {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  50% { transform: translateY(-7px) rotate(-1.5deg) scale(1.015); }
}
@keyframes hintIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes twinkle { 0%, 100% { opacity: .45; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 2px); }
  40% { transform: translate(5px, -2px); }
  60% { transform: translate(-4px, -1px); }
  80% { transform: translate(3px, 1px); }
}
.tw { animation: twinkle 2.8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.open-overlay.is-shake .open-inner { animation: screenShake .5s ease-in-out; }

/* ---------- 小屏适配 ---------- */
@media (max-width: 370px) {
  .hero h1 { font-size: 26px; }
  .hero-sub { font-size: 10.5px; }
  .orb-card { width: 70px; padding: 8px 5px; }
  .orb-ring { width: 48px; height: 48px; }
  .box-card { flex-basis: calc(100% - 34px); padding: 14px; }
  .box-visual { height: 134px; }
  .box-art { width: 134px; height: 134px; }
  .box-title-row h3 { font-size: 18px; }
  .odds-labels span { font-size: 7px; }
  .lineup { gap: 6px; }
  .lineup-art { width: 54px; height: 54px; }
  .item-grid { gap: 7px; }
  .item-art { width: 78px; height: 78px; }
  .item-name { font-size: 9px; }
  .series-head { padding: 11px 12px 10px; }
  .series-name h2 { font-size: 13px; }
  .series-reward { font-size: 8px; padding: 3px 7px; }
  .ten-grid { gap: 4px; }
  .mini-art { width: 42px; height: 42px; }
  .mini-name { font-size: 6.8px; }
  .reveal-card { max-width: 290px; padding: 14px 14px 18px; }
  .reveal-art { width: 168px; height: 168px; }
  .open-inner { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
