/* ══ 深海邮便局 · 设计令牌 ══════════════════════════════ */
:root {
  /* 主色族：深渊青（大面积） */
  --abyss-900: #03101a;
  --abyss-800: #061c28;
  --abyss-700: #0a2735;
  --abyss-600: #0f3444;
  --abyss-500: #164557;
  --abyss-400: #1e5a6d;

  /* 全色度强调 */
  --bio-cyan: #4ff0d8;
  --bio-blue: #58c8ff;
  --acid: #c4e85a;
  --coral: #ff6a52;
  --amber: #ffc94a;
  --brass: #d8a94e;
  --brass-hi: #fbe6b4;
  --brass-lo: #9a7128;
  --pearl-magenta: #ff5fb0;
  --violet: #a68cf0;

  /* 语义 */
  --success: #4ff0d8;
  --warning: #ffc94a;
  --danger: #ff6a52;
  --info: #58c8ff;

  /* 中性：暖（搪瓷/黄铜）与冷（海水/文字） */
  --sand: #f4ead6;
  --sand-dim: #d9c7a3;
  --text-hi: #eef7f8;
  --text: #cfe3e8;
  --text-mid: #9db8c2;
  --text-dim: #7f9fad;

  --line: rgba(79, 240, 216, .14);
  --line-strong: rgba(79, 240, 216, .26);
  --scrim: rgba(2, 10, 16, .62);

  --font-display: "Fredoka", "Baloo 2", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --sh-1: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 6px 18px rgba(0, 0, 0, .34);
  --sh-2: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 12px 32px rgba(0, 0, 0, .46);
  --sh-press: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 8px rgba(0, 0, 0, .3);
  --sh-brass: 0 2px 0 rgba(255, 255, 255, .4) inset, 0 -3px 0 rgba(0, 0, 0, .22) inset, 0 6px 16px rgba(0, 0, 0, .4);

  --ease-out: cubic-bezier(.22, .9, .28, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-1: 150ms;
  --dur-2: 240ms;
  --dur-3: 380ms;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--abyss-900);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.2; letter-spacing: .01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
svg { display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 16px;
  background: var(--brass); color: var(--abyss-900); border-radius: var(--r-sm);
  font-weight: 700; text-decoration: none; transform: translateY(-160%);
  transition: transform var(--dur-2) var(--ease-out);
}
.skip-link:focus { transform: none; }

:focus-visible {
  outline: 3px solid var(--bio-cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ══ 海水环境背景 ══════════════════════════════════════ */
.ocean { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.oc-deep {
  position: absolute; inset: 0;
  background: linear-gradient(178deg, #0b3a4c 0%, #072836 26%, #04141d 58%, #020a10 100%);
}
.oc-rays {
  position: absolute; top: -30%; left: -20%; width: 140%; height: 90%;
  background: repeating-linear-gradient(76deg,
    rgba(140, 240, 255, .085) 0px, rgba(140, 240, 255, .085) 26px,
    transparent 26px, transparent 92px);
  filter: blur(9px);
  transform-origin: top center;
  animation: rays 26s ease-in-out infinite alternate;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 52%, transparent 88%);
}
@keyframes rays {
  0% { transform: translateX(-3%) skewX(-3deg) scaleY(1); opacity: .75; }
  100% { transform: translateX(4%) skewX(4deg) scaleY(1.08); opacity: 1; }
}
.oc-glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.oc-glow-a {
  width: 62vw; height: 62vw; max-width: 720px; max-height: 720px;
  top: -14vw; left: -12vw;
  background: radial-gradient(circle, rgba(79, 240, 216, .3), transparent 66%);
  animation: drift1 34s ease-in-out infinite alternate;
}
.oc-glow-b {
  width: 56vw; height: 56vw; max-width: 660px; max-height: 660px;
  bottom: -18vw; right: -14vw;
  background: radial-gradient(circle, rgba(255, 95, 176, .2), rgba(166, 140, 240, .12) 46%, transparent 70%);
  animation: drift2 41s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(7vw, 5vh, 0) scale(1.14); } }
@keyframes drift2 { to { transform: translate3d(-6vw, -6vh, 0) scale(1.2); } }
.oc-caustic {
  position: absolute; inset: -20%;
  background:
    repeating-radial-gradient(circle at 22% 18%, rgba(120, 240, 255, .055) 0 2px, transparent 2px 46px),
    repeating-radial-gradient(circle at 78% 72%, rgba(196, 232, 90, .04) 0 2px, transparent 2px 62px);
  filter: blur(2px);
  animation: caustic 48s linear infinite;
  opacity: .8;
}
@keyframes caustic { to { transform: translate3d(46px, -62px, 0) rotate(6deg); } }
.oc-grain {
  position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.oc-motes {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 24%, rgba(190, 250, 255, .5), transparent),
    radial-gradient(1.6px 1.6px at 78% 14%, rgba(190, 250, 255, .4), transparent),
    radial-gradient(2.4px 2.4px at 34% 68%, rgba(196, 232, 90, .3), transparent),
    radial-gradient(1.8px 1.8px at 62% 84%, rgba(190, 250, 255, .38), transparent),
    radial-gradient(2px 2px at 88% 56%, rgba(255, 95, 176, .3), transparent),
    radial-gradient(1.5px 1.5px at 22% 92%, rgba(190, 250, 255, .34), transparent),
    radial-gradient(2.2px 2.2px at 48% 38%, rgba(190, 250, 255, .26), transparent);
  animation: motes 30s ease-in-out infinite alternate;
}
@keyframes motes { to { transform: translate3d(-14px, -34px, 0); opacity: .55; } }

/* ══ 应用外壳 ══════════════════════════════════════════ */
.app {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px; height: 100dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(8, 34, 46, .93), rgba(4, 18, 26, .96));
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 560px) and (min-height: 600px) {
  body { padding: 22px; }
  .app {
    height: min(900px, calc(100dvh - 44px));
    border-radius: var(--r-xl);
    border: 1px solid var(--line-strong);
    box-shadow: 0 44px 110px rgba(0, 0, 0, .66), 0 0 70px rgba(79, 240, 216, .07);
  }
  .toast-host { top: 90px; }
  .sheet-wrap { inset: 22px; border-radius: var(--r-xl); overflow: hidden; }
  .sheet { max-height: 100%; }
}

/* ══ 顶栏 ══════════════════════════════════════════════ */
.topbar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--sat)) 12px 8px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 39, 53, .96), rgba(7, 28, 39, .82));
  backdrop-filter: blur(12px);
  z-index: 20;
}
.tb-brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.tb-mark { width: 27px; height: 27px; color: var(--brass); flex: 0 0 auto; filter: drop-shadow(0 0 7px rgba(216, 169, 78, .4)); }
.tb-mark svg { width: 100%; height: 100%; }
.tb-name {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--sand); letter-spacing: .04em; line-height: 1.1; min-width: 0;
}
.tb-name small {
  display: block; font-family: var(--font-mono); font-size: 8.5px; font-weight: 600;
  letter-spacing: .18em; color: var(--bio-cyan); opacity: .72; margin-top: 2px;
}
.tb-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; color: var(--text-mid);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1), transform var(--dur-1);
  box-shadow: var(--sh-press);
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: rgba(79, 240, 216, .12); color: var(--bio-cyan); }
.icon-btn:active { transform: scale(.93); }
.icon-btn[aria-pressed="true"] { color: var(--bio-cyan); border-color: var(--line-strong); }
#soundBtn[aria-pressed="false"] { color: var(--text-dim); }

.shard-chip {
  display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 11px 0 8px;
  background: linear-gradient(180deg, rgba(255, 201, 74, .18), rgba(255, 201, 74, .07));
  border: 1px solid rgba(255, 201, 74, .34); border-radius: 999px;
  cursor: pointer; color: var(--amber); font-weight: 700; font-size: 13px;
  font-variant-numeric: tabular-nums; transition: transform var(--dur-1), background var(--dur-1);
  min-width: 44px; justify-content: center;
}
.shard-chip:hover { background: linear-gradient(180deg, rgba(255, 201, 74, .28), rgba(255, 201, 74, .12)); }
.shard-chip:active { transform: scale(.94); }
.sc-ico { width: 17px; height: 17px; display: block; }
.sc-ico svg { width: 100%; height: 100%; }
.shard-chip.pop { animation: chipPop 520ms var(--ease-spring); }
@keyframes chipPop { 0% { transform: scale(1); } 38% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* ══ 屏幕容器 ══════════════════════════════════════════ */
.screens { flex: 1 1 auto; min-height: 0; position: relative; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen[hidden] { display: none; }
.screen.enter { animation: screenIn var(--dur-3) var(--ease-out); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } }

/* ══ 本期系列条 ════════════════════════════════════════ */
/* 作为顶栏的第二行融入头部带：不再自带底板，避免横条压过背景 */
.series-strip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 8px 12px 10px;
  background: linear-gradient(180deg, rgba(10, 39, 53, .55), rgba(8, 34, 46, 0));
  border-bottom: 1px solid var(--line);
}
.ss-capsules { display: flex; flex: 0 0 auto; }
.ss-capsules i {
  width: 17px; height: 17px; border-radius: 50%; margin-right: -6px;
  border: 1.6px solid rgba(4, 20, 29, .8);
  background: linear-gradient(180deg, var(--c, #4ff0d8) 50%, rgba(233, 250, 255, .92) 50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
}
.ss-capsules i:nth-child(1) { --c: #4ff0d8; z-index: 3; }
.ss-capsules i:nth-child(2) { --c: #ffc94a; z-index: 2; }
.ss-capsules i:nth-child(3) { --c: #ff5fb0; z-index: 1; }
.ss-text { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.ss-text small {
  display: block; font-size: 10px; letter-spacing: .1em; color: var(--text-dim); font-weight: 600;
}
.ss-text b {
  display: block; font-family: var(--font-display); font-size: 15px; color: var(--sand);
  font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-text b span { font-size: 11px; color: var(--bio-cyan); font-weight: 600; margin-left: 6px; opacity: .85; }
.ss-link {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  cursor: pointer; padding: 6px 10px; min-height: 44px;
  justify-content: center; border-radius: var(--r-md);
  transition: background var(--dur-1), border-color var(--dur-1);
}
.ss-link:hover { background: rgba(79, 240, 216, .1); border-color: var(--line-strong); }
.ss-prog { display: block; width: 52px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.ss-prog i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--bio-cyan), var(--amber));
  border-radius: 3px; transition: width var(--dur-3) var(--ease-out);
}
.ss-num { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-mid); font-variant-numeric: tabular-nums; transition: color var(--dur-1); }
.ss-picker {
  appearance: none; background: none; border: 0; margin: 0; padding: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; border-radius: var(--r-sm);
}
.ss-picker:hover b span { opacity: 1; }
.ss-picker:focus-visible { outline: 2px solid var(--bio-cyan); outline-offset: 2px; }

/* ══ 系列选择弹层 ══════════════════════════════════════ */
.series-list { display: flex; flex-direction: column; gap: 10px; }
.series-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(15, 52, 68, .55); border: 1px solid var(--line);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--dur-1), background var(--dur-1);
  -webkit-tap-highlight-color: transparent;
}
.series-row:hover { border-color: var(--bio-cyan); background: rgba(15, 52, 68, .8); }
.series-row:focus-visible { outline: 2px solid var(--bio-cyan); outline-offset: 2px; }
.series-row.current { border-color: rgba(79, 240, 216, .55); background: rgba(79, 240, 216, .07); }
.series-row.pending { opacity: .5; cursor: default; }
.series-row.pending:hover { border-color: var(--line); background: rgba(15, 52, 68, .55); }
.series-row.pending .sr-prog {
  font-size: 10px; letter-spacing: .1em; color: var(--amber);
  border: 1px dashed rgba(255, 201, 74, .45); border-radius: 999px; padding: 3px 8px;
}
.sr-caps { display: flex; flex: 0 0 auto; }
.sr-caps i {
  width: 15px; height: 15px; border-radius: 50%; margin-right: -5px;
  border: 1.6px solid rgba(4, 20, 29, .8);
  background: linear-gradient(180deg, var(--c, #4ff0d8) 50%, rgba(233, 250, 255, .92) 50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
}
.sr-caps i:nth-child(2) { z-index: 1; }
.sr-main { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.sr-main b {
  display: block; font-family: var(--font-display); font-size: 14px; color: var(--sand);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sr-main small { display: block; font-size: 11px; color: var(--text-dim); }
.sr-prog { flex: 0 0 auto; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--text-mid); font-variant-numeric: tabular-nums; }
.series-row.current .sr-prog { color: var(--bio-cyan); }
.sr-cur {
  flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--bio-cyan); border: 1px solid rgba(79, 240, 216, .4);
  border-radius: 999px; padding: 3px 8px;
}

/* ══ 扭蛋机舞台 ════════════════════════════════════════ */
.machine-stage {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: grid; place-items: center; padding: 6px 8px 0;
}
#machine {
  display: block; touch-action: none; cursor: grab; border-radius: 12px;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .5));
}
#machine:focus-visible { outline: 3px solid var(--bio-cyan); outline-offset: 4px; }
.stage-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(78% 62% at 50% 46%, transparent 42%, rgba(2, 10, 16, .5) 100%);
}

/* ══ 机器 HUD ══════════════════════════════════════════ */
.machine-hud {
  flex: 0 0 auto; padding: 8px 12px calc(10px + var(--sab));
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 26, 36, .5), rgba(4, 18, 26, .92));
}
.hud-row { display: flex; align-items: center; gap: 10px; }
.quota {
  flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0;
  height: 48px; padding: 0 12px; cursor: pointer;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-press);
  transition: background var(--dur-1), transform var(--dur-1);
}
.quota:hover { background: rgba(79, 240, 216, .1); }
.quota:active { transform: scale(.98); }
.q-label { font-size: 11.5px; color: var(--text-dim); font-weight: 600; flex: 0 0 auto; letter-spacing: .04em; }
.q-pips { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; }
.q-pips i {
  width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(180deg, var(--bio-cyan) 50%, rgba(233, 250, 255, .9) 50%);
  box-shadow: 0 0 8px rgba(79, 240, 216, .5); transition: all var(--dur-2) var(--ease-out);
}
.q-pips i.spent { background: rgba(255, 255, 255, .13); box-shadow: none; transform: scale(.78); }
.q-pips i.bonus { background: linear-gradient(180deg, var(--amber) 50%, #fff3c4 50%); box-shadow: 0 0 8px rgba(255, 201, 74, .55); }
.q-num { font-family: var(--font-mono); font-size: 17px; font-weight: 700; color: var(--sand); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.q-bonus {
  flex: 0 0 auto; font-style: normal; font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700; line-height: 1; color: #0d3341;
  padding: 2.5px 5px; border-radius: 8px;
  background: linear-gradient(180deg, var(--amber), #f0a93c);
  box-shadow: 0 0 8px rgba(255, 201, 74, .35);
}
.quota[data-empty="true"] .q-num { color: var(--coral); }
.quota[data-empty="true"] { border-color: rgba(255, 106, 82, .34); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 48px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer; font-weight: 700; font-size: 14.5px;
  font-family: var(--font-display); letter-spacing: .03em;
  transition: transform var(--dur-1) var(--ease-out), filter var(--dur-1), background var(--dur-1), box-shadow var(--dur-1);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn svg { width: 19px; height: 19px; }
.btn-primary {
  background: linear-gradient(180deg, #6ffbe4, #21b9a4);
  color: #04222b; border-color: rgba(255, 255, 255, .3);
  box-shadow: 0 2px 0 rgba(255, 255, 255, .45) inset, 0 -3px 0 rgba(0, 0, 0, .16) inset, 0 8px 22px rgba(33, 185, 164, .34);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-crank {
  flex: 0 0 auto;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 52%, var(--brass-lo));
  color: #2d1f06; border-color: rgba(255, 255, 255, .34);
  box-shadow: var(--sh-brass);
}
.btn-crank:hover { filter: brightness(1.07); }
.bc-ico { width: 19px; height: 19px; display: block; }
.bc-ico svg { width: 100%; height: 100%; }
.btn-crank.turning .bc-ico { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-ghost {
  background: rgba(255, 255, 255, .055); border-color: var(--line-strong); color: var(--text);
  box-shadow: var(--sh-press);
}
.btn-ghost:hover { background: rgba(79, 240, 216, .12); color: var(--bio-cyan); }
.btn-danger { background: linear-gradient(180deg, #ff8a72, #e04a35); color: #2b0a04; box-shadow: var(--sh-brass); }
.btn-sm { min-height: 44px; font-size: 13.5px; padding: 0 14px; }
.btn[disabled], .btn:disabled { opacity: .4; cursor: not-allowed; transform: none; filter: saturate(.4); }

.hud-slot { min-height: 46px; display: flex; align-items: center; justify-content: center; margin-top: 6px; }
.hud-note { font-size: 12px; color: var(--text-dim); text-align: center; letter-spacing: .02em; }
.hud-note b { color: var(--bio-cyan); font-weight: 600; }
.hud-slot .btn { width: 100%; animation: slotIn var(--dur-3) var(--ease-spring); }
@keyframes slotIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.pickup-note { font-size: 11.5px; color: var(--amber); text-align: center; margin-top: 5px; font-weight: 600; }

/* ══ 底部导航 ══════════════════════════════════════════ */
.tabbar {
  flex: 0 0 auto; display: flex; gap: 4px;
  padding: 6px 12px calc(6px + var(--sab));
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 32, 44, .96), rgba(4, 16, 24, .99));
  backdrop-filter: blur(12px); z-index: 20;
}
.tab {
  flex: 1; position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 2px; min-height: 50px; justify-content: center;
  background: none; border: 0; border-radius: var(--r-md); cursor: pointer;
  color: var(--text-dim); font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  transition: color var(--dur-2), background var(--dur-2);
}
.tab-ico { width: 23px; height: 23px; display: block; transition: transform var(--dur-2) var(--ease-spring); }
.tab-ico svg { width: 100%; height: 100%; }
.tab:hover { color: var(--text-mid); background: rgba(255, 255, 255, .04); }
.tab.on { color: var(--bio-cyan); }
.tab.on .tab-ico { transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 0 8px rgba(79, 240, 216, .55)); }
.tab.on::after {
  content: ''; position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--bio-cyan), var(--amber));
}
.tab-badge {
  position: absolute; top: 3px; right: calc(50% - 32px);
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--coral); box-shadow: 0 0 0 2px var(--abyss-800);
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  color: #fff; line-height: 1;
  animation: badgePulse 1.8s ease-in-out infinite;
}
@keyframes badgePulse { 50% { transform: scale(1.3); } }

/* ══ 收集册 ════════════════════════════════════════════ */
.screen-album {
  overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 14px calc(22px + var(--sab));
  display: block;
  scrollbar-width: thin; scrollbar-color: var(--brass-lo) rgba(255, 255, 255, .05);
}
.album > * + * { margin-top: 14px; }
.album-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 15px; border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 88% -10%, rgba(255, 95, 176, .18), transparent 52%),
    linear-gradient(140deg, rgba(20, 66, 82, .95), rgba(8, 32, 44, .92));
  border: 1px solid var(--line-strong); box-shadow: var(--sh-2);
}
.ah-ring { position: relative; width: 68px; height: 68px; flex: 0 0 auto; }
.ah-ring svg { width: 100%; height: 100%; }
.ah-arc { transition: stroke-dashoffset 700ms var(--ease-out); }
.ah-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.ah-num b { font-size: 21px; color: var(--sand); font-weight: 700; }
.ah-num i { font-size: 11px; color: var(--text-dim); font-style: normal; margin-top: 5px; }
.ah-text { min-width: 0; }
.ah-kicker { font-size: 10.5px; letter-spacing: .14em; color: var(--bio-cyan); font-weight: 700; }
.ah-title { font-size: 25px; color: var(--sand); font-weight: 700; margin: 3px 0 2px; letter-spacing: .03em; }
.ah-sub { font-size: 11.5px; color: var(--text-mid); }

.album-blurb {
  font-size: 12.5px; line-height: 1.75; color: var(--text-mid);
  padding: 0 4px; border-left: 2px solid var(--line-strong); padding-left: 12px;
}
.album-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  border-radius: 999px; font-size: 11.5px; color: var(--text-mid); font-weight: 600;
}
.stat b { color: var(--sand); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.stat b[data-on="true"] { color: var(--pearl-magenta); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dot-n { background: var(--bio-cyan); box-shadow: 0 0 7px rgba(79, 240, 216, .7); }
.dot-r { background: var(--amber); box-shadow: 0 0 7px rgba(255, 201, 74, .7); }
.dot-h { background: var(--pearl-magenta); box-shadow: 0 0 7px rgba(255, 95, 176, .7); }

.album-banner {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border-radius: var(--r-md); border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(15, 52, 68, .9), rgba(8, 32, 44, .8));
  box-shadow: var(--sh-1); animation: slotIn var(--dur-3) var(--ease-out);
}
.album-banner[data-kind="unlocked"] {
  border-color: rgba(255, 95, 176, .45);
  background: linear-gradient(120deg, rgba(72, 20, 62, .9), rgba(28, 12, 48, .85));
  box-shadow: 0 0 26px rgba(255, 95, 176, .18), var(--sh-1);
}
.album-banner[data-kind="all"] {
  border-color: rgba(255, 201, 74, .5);
  background: linear-gradient(120deg, rgba(74, 52, 16, .92), rgba(30, 20, 8, .88));
  box-shadow: 0 0 30px rgba(255, 201, 74, .2), var(--sh-1);
}
.ab-ico { width: 30px; height: 30px; flex: 0 0 auto; color: var(--bio-cyan); }
.album-banner[data-kind="unlocked"] .ab-ico { color: var(--pearl-magenta); }
.album-banner[data-kind="all"] .ab-ico { color: var(--amber); }
.ab-ico svg { width: 100%; height: 100%; }
.ab-text { min-width: 0; }
.ab-text b { display: block; font-size: 13.5px; color: var(--sand); font-family: var(--font-display); }
.ab-text small { display: block; font-size: 11.5px; color: var(--text-mid); line-height: 1.5; margin-top: 2px; }

.album-toolbar { display: flex; align-items: center; gap: 8px; }
.seg {
  display: flex; flex: 1 1 auto; padding: 3px; gap: 2px;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 999px;
}
.seg button {
  flex: 1; min-height: 38px; padding: 0 8px; border: 0; border-radius: 999px;
  background: none; cursor: pointer; font-size: 12.5px; font-weight: 600;
  color: var(--text-dim); transition: all var(--dur-2) var(--ease-out);
}
.seg button:hover { color: var(--text); }
.seg button.on {
  background: linear-gradient(180deg, rgba(79, 240, 216, .26), rgba(79, 240, 216, .12));
  color: var(--bio-cyan); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset;
}
.sort-wrap { flex: 0 0 auto; position: relative; }
.sort-sel {
  appearance: none; min-height: 44px; padding: 0 30px 0 12px;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  border-radius: var(--r-md); color: var(--text-mid); font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f9fad' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 15px;
}
.sort-sel:hover { border-color: var(--line-strong); color: var(--text); }
.sort-sel option { background: var(--abyss-700); color: var(--text); }

.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (max-width: 340px) { .album-grid { grid-template-columns: repeat(2, 1fr); } }
.slot {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 1px; padding: 9px 6px 10px; cursor: pointer; overflow: hidden;
  background: linear-gradient(168deg, rgba(22, 69, 87, .82), rgba(8, 30, 41, .92));
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-1); text-align: center;
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2), box-shadow var(--dur-2);
  animation: slotIn var(--dur-3) var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 34ms);
}
.slot:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--sh-2); }
.slot:active { transform: scale(.97); }
.slot-fig { width: 82%; max-width: 96px; display: block; margin-bottom: 2px; }
.slot-fig svg { width: 100%; height: auto; }
.slot-no { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--text-dim); font-weight: 600; }
.slot-name {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 700; color: var(--sand);
  line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slot-chip {
  position: absolute; top: 6px; left: 6px; width: 19px; height: 19px; border-radius: 6px;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
}
.slot-chip[data-r="normal"] { background: rgba(79, 240, 216, .2); color: var(--bio-cyan); border: 1px solid rgba(79, 240, 216, .4); }
.slot-chip[data-r="rare"] { background: rgba(255, 201, 74, .22); color: var(--amber); border: 1px solid rgba(255, 201, 74, .5); }
.slot-chip[data-r="hidden"] { background: rgba(255, 95, 176, .22); color: var(--pearl-magenta); border: 1px solid rgba(255, 95, 176, .5); }
.slot-count {
  position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: 999px;
  background: rgba(4, 20, 29, .78); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; color: var(--text-mid);
}
.slot-tag {
  margin-top: 4px; display: inline-flex; align-items: center; gap: 3px;
  font-size: 9.5px; font-weight: 600; color: var(--text-dim); letter-spacing: .04em;
}
.slot-tag svg { width: 11px; height: 11px; }
.tag-lock { color: var(--pearl-magenta); opacity: .85; }
.tag-open { color: var(--acid); }

.slot-missing { background: linear-gradient(168deg, rgba(12, 40, 53, .7), rgba(5, 20, 29, .85)); border-style: dashed; }
.slot-missing .slot-fig svg, .slot-hidden-locked .slot-fig svg, .slot-hidden-open .slot-fig svg {
  filter: brightness(0) invert(1); opacity: .15;
}
.slot-missing .slot-name { color: var(--text-dim); letter-spacing: .12em; }
.slot-missing:hover .slot-fig svg { opacity: .24; }

.slot-owned[data-rarity="rare"] {
  border-color: rgba(255, 201, 74, .45);
  background: linear-gradient(168deg, rgba(74, 52, 16, .8), rgba(24, 17, 6, .92));
  box-shadow: 0 0 22px rgba(255, 201, 74, .14), var(--sh-1);
}
.slot-owned[data-rarity="rare"]::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 246, 220, .2) 48%, transparent 60%);
  background-size: 260% 100%; animation: foil 5.5s linear infinite;
}
@keyframes foil { to { background-position: -260% 0; } }

.slot-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 13px; padding: 13px 15px; text-align: left; }
.slot-wide .slot-fig { width: 84px; max-width: 84px; margin: 0; flex: 0 0 auto; }
.slot-wide .slot-no { font-size: 10px; }
.slot-wide .slot-name { font-size: 16px; white-space: normal; }
.slot-wide .slot-tag { margin-top: 5px; font-size: 11px; }
.slot-wide .slot-chip { position: static; width: auto; height: auto; padding: 2px 8px; border-radius: 999px; font-size: 10px; }
.slot-wide .slot-count { position: static; align-self: flex-start; margin-top: 6px; }
.slot-hidden-locked, .slot-hidden-open {
  border-color: rgba(255, 95, 176, .34);
  background:
    radial-gradient(90% 130% at 12% 0%, rgba(255, 95, 176, .16), transparent 58%),
    linear-gradient(150deg, rgba(48, 18, 62, .88), rgba(12, 10, 32, .94));
}
.slot-hidden-locked .slot-fig svg { opacity: .12; }
.slot-hidden-open { animation: hiddenGlow 3.4s ease-in-out infinite; }
@keyframes hiddenGlow {
  50% { box-shadow: 0 0 30px rgba(255, 95, 176, .3), var(--sh-1); border-color: rgba(255, 95, 176, .6); }
}
.slot-owned[data-rarity="hidden"] {
  border-color: rgba(255, 95, 176, .6);
  background:
    radial-gradient(90% 130% at 14% 0%, rgba(143, 244, 255, .22), transparent 56%),
    linear-gradient(150deg, rgba(66, 22, 82, .92), rgba(16, 14, 44, .96));
  box-shadow: 0 0 34px rgba(255, 95, 176, .24), var(--sh-2);
}
.slot-owned[data-rarity="hidden"]::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(143, 244, 255, .22) 42%, rgba(255, 95, 176, .22) 52%, transparent 64%);
  background-size: 280% 100%; animation: foil 4.2s linear infinite;
}
.slot-wide .slot-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }

.album-empty {
  padding: 26px 16px; text-align: center; color: var(--text-mid); font-size: 13px;
  background: rgba(255, 255, 255, .035); border: 1px dashed var(--line-strong);
  border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.album-empty .btn { margin-top: 2px; }

.album-log { border-top: 1px solid var(--line); padding-top: 14px; }
.al-title {
  display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--sand);
  margin-bottom: 10px; font-weight: 700;
}
.al-title span { width: 18px; height: 18px; color: var(--bio-cyan); }
.al-title svg { width: 100%; height: 100%; }
.al-list {
  display: flex; flex-direction: column; gap: 5px; max-height: 320px; overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin; scrollbar-color: var(--brass-lo) rgba(255, 255, 255, .05);
}
.al-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; width: 100%;
  background: rgba(255, 255, 255, .035); border: 1px solid transparent;
  border-radius: var(--r-sm); cursor: pointer; text-align: left;
  transition: background var(--dur-1), border-color var(--dur-1);
}
.al-row:hover { background: rgba(79, 240, 216, .09); border-color: var(--line); }
.al-fig { width: 30px; height: 33px; flex: 0 0 auto; }
.al-fig svg { width: 100%; height: 100%; }
.al-main { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.al-main b { display: block; font-size: 12.5px; color: var(--text); font-weight: 600; }
.al-main small { display: block; font-size: 10px; color: var(--text-dim); }
.al-row[data-r="rare"] .al-main b { color: var(--amber); }
.al-row[data-r="hidden"] .al-main b { color: var(--pearl-magenta); }
.al-new, .al-dup {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 5px; letter-spacing: .06em;
}
.al-new { background: rgba(196, 232, 90, .2); color: var(--acid); }
.al-dup { background: rgba(255, 255, 255, .08); color: var(--text-dim); }
.al-time { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.al-empty { font-size: 12.5px; color: var(--text-dim); padding: 14px 4px; text-align: center; }
.album-foot { font-size: 10.5px; color: var(--text-dim); text-align: center; line-height: 1.8; opacity: .8; }

/* ══ 开壳揭晓 ══════════════════════════════════════════ */
.reveal {
  position: absolute; inset: 0; z-index: 60; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 14px 14px calc(16px + var(--sab));
  animation: revealIn 320ms var(--ease-out);
}
.reveal[hidden] { display: none; }
@keyframes revealIn { from { opacity: 0; transform: scale(1.03); } }
.reveal.is-leaving { animation: revealOut 240ms var(--ease-out) forwards; }
@keyframes revealOut { to { opacity: 0; transform: scale(.97); } }
.reveal-bg { position: absolute; inset: 0; z-index: 0; }
.reveal-cv { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; touch-action: none; cursor: grab; }
.reveal.is-straining .reveal-cv { cursor: grabbing; }
.reveal-fig {
  position: absolute; left: 50%; top: var(--cy, calc(50% - 128px)); z-index: 2;
  width: var(--fs, clamp(120px, min(62vw, 30vh), 290px)); transform: translate(-50%, -50%) scale(.2);
  opacity: 0; pointer-events: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55));
}
.reveal-fig svg { width: 100%; height: auto; }
.reveal-fig.in { animation: figIn 760ms var(--ease-spring) forwards, figFloat 4.6s ease-in-out 760ms infinite; }
@keyframes figIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-9deg); }
  58% { opacity: 1; transform: translate(-50%, -50%) scale(1.13) rotate(3deg); }
  78% { transform: translate(-50%, -50%) scale(.97) rotate(-1deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}
@keyframes figFloat { 50% { transform: translate(-50%, calc(-50% - 9px)) scale(1.015); } }

.reveal-hint {
  position: absolute; left: 16px; right: 16px; z-index: 3;
  top: calc(var(--cy, 40vh) + var(--r, 100px) + 22px);
  text-align: center; pointer-events: none;
}
.rh-text {
  display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--text); padding: 7px 15px; border-radius: 999px;
  background: rgba(3, 16, 24, .68); border: 1px solid var(--line);
  backdrop-filter: blur(7px); animation: hintBob 2.4s ease-in-out infinite;
}
.reveal[data-rarity="rare"] .rh-text { color: var(--amber); border-color: rgba(255, 201, 74, .4); }
.reveal[data-rarity="hidden"] .rh-text { color: var(--pearl-magenta); border-color: rgba(255, 95, 176, .45); }
@keyframes hintBob { 50% { transform: translateY(-4px); } }
.rh-meter {
  display: block; width: 132px; height: 4px; margin: 9px auto 0; border-radius: 2px;
  background: rgba(255, 255, 255, .14); overflow: hidden;
}
.rh-meter i {
  display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--bio-cyan), var(--amber), var(--coral));
}
.reveal-open-btn {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; cursor: pointer; font-family: var(--font-display);
  font-weight: 700; font-size: 14.5px; letter-spacing: .04em;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 54%, var(--brass-lo));
  color: #2d1f06; border: 1px solid rgba(255, 255, 255, .36); box-shadow: var(--sh-brass);
  transition: transform var(--dur-1) var(--ease-out), filter var(--dur-1);
}
.reveal-open-btn svg { width: 20px; height: 20px; }
.reveal-open-btn:hover { filter: brightness(1.08); }
.reveal-open-btn:active { transform: translateX(-50%) scale(.95); }
.reveal-skip {
  position: absolute; top: calc(12px + var(--sat)); right: 12px; z-index: 5;
  min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: rgba(3, 16, 24, .6); border: 1px solid var(--line);
  color: var(--text-mid); font-size: 12px; font-weight: 600; backdrop-filter: blur(7px);
}
.reveal-skip:hover { color: var(--text); border-color: var(--line-strong); }

.reveal-card {
  position: relative; z-index: 4; width: 100%; padding: 15px 16px 16px;
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(158deg, rgba(18, 62, 78, .96), rgba(6, 24, 34, .98));
  border: 1px solid var(--line-strong); box-shadow: var(--sh-2);
  backdrop-filter: blur(10px);
}
.reveal-card[hidden] { display: none; }
.reveal-card.in { animation: cardIn 460ms var(--ease-out); }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.reveal-card[data-rarity="rare"] {
  border-color: rgba(255, 201, 74, .55);
  background: linear-gradient(158deg, rgba(84, 58, 16, .96), rgba(26, 18, 6, .98));
  box-shadow: 0 0 40px rgba(255, 201, 74, .2), var(--sh-2);
}
.reveal-card[data-rarity="hidden"] {
  border-color: rgba(255, 95, 176, .6);
  background: linear-gradient(158deg, rgba(70, 24, 88, .96), rgba(16, 12, 44, .98));
  box-shadow: 0 0 46px rgba(255, 95, 176, .26), var(--sh-2);
}
.rc-foil { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.reveal-card[data-rarity="rare"] .rc-foil,
.reveal-card[data-rarity="hidden"] .rc-foil {
  opacity: 1;
  background: linear-gradient(112deg, transparent 32%, rgba(255, 255, 255, .17) 46%, transparent 58%);
  background-size: 280% 100%; animation: foil 3.8s linear infinite;
}
.rc-head { display: flex; align-items: center; gap: 8px; position: relative; }
.rc-no { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--text-dim); }
.rc-rarity {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 2px 9px; border-radius: 999px;
}
.rc-rarity[data-rarity="normal"] { background: rgba(79, 240, 216, .18); color: var(--bio-cyan); border: 1px solid rgba(79, 240, 216, .4); }
.rc-rarity[data-rarity="rare"] { background: rgba(255, 201, 74, .2); color: var(--amber); border: 1px solid rgba(255, 201, 74, .55); }
.rc-rarity[data-rarity="hidden"] { background: rgba(255, 95, 176, .2); color: var(--pearl-magenta); border: 1px solid rgba(255, 95, 176, .55); }
.rc-name {
  position: relative; font-size: 25px; font-weight: 700; color: var(--sand);
  margin: 7px 0 6px; letter-spacing: .04em;
}
.reveal-card[data-rarity="rare"] .rc-name { color: #fff3c4; text-shadow: 0 0 22px rgba(255, 201, 74, .5); }
.reveal-card[data-rarity="hidden"] .rc-name {
  background: linear-gradient(96deg, #8ff4ff, #ff5fb0 42%, #eaff9e 74%, #8ff4ff);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: foilText 5s linear infinite;
}
@keyframes foilText { to { background-position: -220% 0; } }
.rc-lore { position: relative; font-size: 12.5px; line-height: 1.75; color: var(--text-mid); }
.rc-status { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.rc-new {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .1em;
  padding: 3px 9px; border-radius: 6px; background: var(--acid); color: #1d2a05;
  animation: newPop 620ms var(--ease-spring) 200ms backwards;
}
@keyframes newPop { from { transform: scale(0) rotate(-14deg); } }
.rc-dup {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 6px; background: rgba(255, 255, 255, .1); color: var(--text-mid);
}
.rc-note { font-size: 11.5px; color: var(--text-dim); }

.reveal-actions { position: relative; z-index: 4; display: flex; gap: 9px; width: 100%; margin-top: 11px; }
.reveal-actions[hidden] { display: none; }
.reveal-actions.in { animation: cardIn 460ms var(--ease-out) 90ms backwards; }
.reveal-actions .btn { flex: 1; min-width: 0; }
.reveal-actions .btn-primary { flex: 1.35; }

.reveal-rewards {
  position: absolute; top: calc(56px + var(--sat)); left: 14px; right: 14px; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none;
}
.reward-pill {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 8px 15px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(3, 16, 24, .84); border: 1px solid var(--line-strong);
  color: var(--text); backdrop-filter: blur(9px); box-shadow: var(--sh-1);
  animation: pillIn 520ms var(--ease-spring) backwards;
}
.reward-pill svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--acid); }
.reward-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reward-pill[data-kind="complete"] { border-color: rgba(255, 95, 176, .6); color: #ffd9f0; box-shadow: 0 0 26px rgba(255, 95, 176, .3); }
.reward-pill[data-kind="complete"] svg { color: var(--pearl-magenta); }
.reward-pill[data-kind="hidden"] { border-color: rgba(255, 201, 74, .6); color: #fff3c4; }
.reward-pill[data-kind="hidden"] svg { color: var(--amber); }
.reward-pill[data-kind="dup"] svg { color: var(--amber); }
@keyframes pillIn { from { opacity: 0; transform: translateY(-14px) scale(.9); } }

/* 矮屏与横屏：压缩卡片与按钮，把空带留给摆件（仍保持 44px 触控高度） */
@media (max-height: 560px) {
  .reveal { padding-bottom: calc(10px + var(--sab)); }
  .reveal-card { padding: 10px 14px 11px; }
  .rc-name { font-size: 20px; margin: 5px 0 4px; }
  .rc-lore { font-size: 11.5px; line-height: 1.5; }
  .rc-status { margin-top: 7px; }
  .reveal-actions { margin-top: 8px; }
  .reveal-actions .btn { min-height: 44px; font-size: 13.5px; }
  .reveal-rewards { top: calc(44px + var(--sat)); }
  .reveal-open-btn { bottom: 70px; }
}

/* ══ 底部抽屉 ══════════════════════════════════════════ */
body.sheet-open { overflow: hidden; }
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim {
  position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity var(--dur-3) var(--ease-out);
}
.sheet-wrap.in .sheet-scrim { opacity: 1; }
.sheet {
  position: relative; width: 100%; max-width: 480px; max-height: 88dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #10414f, #07222e 42%, #051a24);
  border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  transform: translateY(102%); transition: transform var(--dur-3) var(--ease-out);
  padding-bottom: var(--sab);
}
.sheet-wrap.in .sheet { transform: none; }
.sheet-grip { padding: 9px 0 3px; display: grid; place-items: center; cursor: grab; touch-action: none; flex: 0 0 auto; }
.sheet-grip i { width: 40px; height: 4.5px; border-radius: 3px; background: rgba(255, 255, 255, .24); }
.sheet-head {
  display: flex; align-items: flex-start; gap: 10px; padding: 6px 14px 12px;
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.sheet-head > div { flex: 1; min-width: 0; }
.sheet-title { font-size: 19px; color: var(--sand); font-weight: 700; }
.sheet-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; letter-spacing: .04em; }
.sheet-x { width: 40px; height: 40px; flex: 0 0 auto; }
.sheet-body {
  overflow-y: auto; overscroll-behavior: contain; padding: 14px;
  scrollbar-width: thin; scrollbar-color: var(--brass-lo) rgba(255, 255, 255, .05);
}

/* 自定义滚动条（WebKit） */
.screen-album::-webkit-scrollbar, .sheet-body::-webkit-scrollbar, .al-list::-webkit-scrollbar { width: 8px; }
.screen-album::-webkit-scrollbar-track, .sheet-body::-webkit-scrollbar-track, .al-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .045); border-radius: 4px;
}
.screen-album::-webkit-scrollbar-thumb, .sheet-body::-webkit-scrollbar-thumb, .al-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brass), var(--brass-lo)); border-radius: 4px;
  border: 1.5px solid rgba(4, 20, 29, .6);
}
.screen-album::-webkit-scrollbar-thumb:hover, .sheet-body::-webkit-scrollbar-thumb:hover, .al-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
}

/* ══ 摆件详情 ══════════════════════════════════════════ */
.detail { display: flex; flex-direction: column; align-items: center; }
.detail-stage {
  position: relative; width: min(64vw, 210px); padding: 8px;
  border-radius: var(--r-lg);
  background: radial-gradient(70% 60% at 50% 42%, rgba(79, 240, 216, .16), transparent 70%);
}
.detail-stage svg { width: 100%; height: auto; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .5)); }
.detail-stage.is-locked svg { filter: brightness(0) invert(1); opacity: .18; }
.detail-lock {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-mid);
}
.detail-lock svg { width: 38px; height: 38px; filter: none; opacity: 1; }
.detail[data-rarity="rare"] .detail-stage { background: radial-gradient(70% 60% at 50% 42%, rgba(255, 201, 74, .2), transparent 70%); }
.detail[data-rarity="hidden"] .detail-stage { background: radial-gradient(70% 60% at 50% 42%, rgba(255, 95, 176, .22), transparent 70%); }
.detail-head { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.detail-name { font-size: 23px; color: var(--sand); font-weight: 700; margin: 7px 0 8px; text-align: center; }
.detail[data-rarity="rare"][data-own="true"] .detail-name { color: #fff3c4; }
.detail[data-rarity="hidden"][data-own="true"] .detail-name { color: #ffd9f0; }
.detail-lore { font-size: 13px; line-height: 1.8; color: var(--text-mid); text-align: center; max-width: 34em; }
.detail-meta {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; width: 100%;
  margin: 16px 0 0; padding: 13px 14px; font-size: 12.5px;
  background: rgba(0, 0, 0, .24); border: 1px solid var(--line); border-radius: var(--r-md);
}
.detail-meta dt { color: var(--text-dim); font-weight: 600; }
.detail-meta dd { margin: 0; color: var(--text); display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); flex: 0 0 auto; }
.detail-go { width: 100%; margin-top: 14px; }

/* 真实科普卡片：与冷色的 meta 卡区分，用生物青微光底 */
.detail-science {
  width: 100%; margin-top: 12px; padding: 13px 14px 11px; text-align: left;
  background: rgba(79, 240, 216, .055);
  border: 1px solid rgba(79, 240, 216, .26);
  border-radius: var(--r-md);
}
.ds-head { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; }
.ds-head .ds-ico { display: grid; place-items: center; color: var(--bio-cyan); }
.ds-head .ds-ico svg { width: 14px; height: 14px; display: block; }
.ds-title { font-size: 11px; letter-spacing: .12em; font-weight: 700; color: var(--bio-cyan); }
.ds-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.ds-list li {
  position: relative; padding-left: 14px;
  font-size: 12.5px; line-height: 1.75; color: var(--text-mid);
}
.ds-list li::before {
  content: ''; position: absolute; left: 2px; top: .72em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--bio-cyan); opacity: .6;
}
.ds-note { margin: 10px 0 0; font-size: 10.5px; color: var(--text-dim); }

/* 分享贴纸：预览与导出弹层 */
.sticker-preview {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
}
.sticker-img { display: block; width: 100%; height: auto; }
.sticker-hint { margin: 10px 0 0; font-size: 11.5px; color: var(--text-dim); text-align: center; }
.sticker-actions { display: flex; gap: 9px; margin-top: 12px; }
.sticker-actions .btn { flex: 1; }

/* ══ 设置 / 说明抽屉内容 ═══════════════════════════════ */
.set-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}
.set-row:last-of-type { border-bottom: 0; }
.set-row > div { flex: 1; min-width: 0; }
.set-row b { display: block; font-size: 13.5px; color: var(--text); font-weight: 600; }
.set-row small { display: block; font-size: 11.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.5; }
.switch {
  position: relative; width: 52px; height: 32px; flex: 0 0 auto; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid var(--line); cursor: pointer;
  transition: background var(--dur-2) var(--ease-out); padding: 0;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--text-mid);
  transition: transform var(--dur-2) var(--ease-spring), background var(--dur-2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.switch[aria-checked="true"] { background: linear-gradient(180deg, rgba(79, 240, 216, .5), rgba(33, 185, 164, .4)); border-color: var(--line-strong); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--bio-cyan); }
.set-danger { width: 100%; margin-top: 16px; }

.odds-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 4px; }
.odds-table th, .odds-table td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.odds-table th { color: var(--text-dim); font-weight: 600; font-size: 11px; letter-spacing: .06em; }
.odds-table td { color: var(--text); }
.odds-table td:last-child, .odds-table th:last-child { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.odds-table tr:last-child td { border-bottom: 0; }
.rule-list { margin: 12px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.85; color: var(--text-mid); }
.rule-list li + li { margin-top: 5px; }
.rule-list b { color: var(--bio-cyan); font-weight: 600; }
.quota-big {
  display: flex; align-items: baseline; gap: 8px; padding: 14px;
  background: rgba(0, 0, 0, .24); border: 1px solid var(--line); border-radius: var(--r-md);
}
.quota-big b { font-family: var(--font-mono); font-size: 38px; color: var(--sand); line-height: 1; font-variant-numeric: tabular-nums; }
.quota-big span { font-size: 12.5px; color: var(--text-mid); }
.quota-big em { display: block; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--bio-cyan); margin-top: 5px; }
.exchange-row {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 13px 14px;
  background: linear-gradient(120deg, rgba(255, 201, 74, .14), rgba(255, 201, 74, .05));
  border: 1px solid rgba(255, 201, 74, .32); border-radius: var(--r-md);
}
.exchange-row > div { flex: 1; min-width: 0; }
.exchange-row b { display: block; font-size: 13px; color: var(--amber); }
.exchange-row small { display: block; font-size: 11.5px; color: var(--text-mid); margin-top: 2px; }
.confirm-text { font-size: 13px; line-height: 1.8; color: var(--text-mid); }
.confirm-row { display: flex; gap: 9px; margin-top: 18px; }
.confirm-row .btn { flex: 1; }
.save-note { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--text-dim); }
.save-row { display: flex; gap: 9px; margin-top: 12px; }
.save-row .btn { flex: 1; }
.import-area {
  width: 100%; margin-top: 14px; padding: 10px 12px; resize: vertical;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6;
  color: var(--sand); background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); border-radius: var(--r-md);
  outline: none;
}
.import-area:focus { border-color: rgba(79, 240, 216, .45); }
.sync-status { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-dim); }
.sync-status[data-state="on"] { color: var(--bio-cyan); }
.sync-status[data-state="busy"] { color: var(--amber); }
.sync-status[data-state="error"] { color: var(--pearl-magenta); }
.save-code {
  display: flex; align-items: center; gap: 9px; margin-top: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(6, 34, 48, .6); border: 1px solid var(--line);
}
.save-code span { flex: 0 0 auto; font-size: 11px; color: var(--text-dim); }
.save-code code {
  flex: 1 1 auto; font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  letter-spacing: .12em; color: var(--bio-cyan); text-align: center; user-select: all;
}
.save-code .btn { flex: 0 0 auto; }

/* ══ Toast ═════════════════════════════════════════════ */
.toast-host {
  position: fixed; top: calc(68px + var(--sat)); left: 50%; transform: translateX(-50%);
  z-index: 150; display: flex; flex-direction: column; align-items: center; gap: 7px;
  width: min(92vw, 440px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px; max-width: 100%;
  padding: 10px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(4, 20, 29, .93); border: 1px solid var(--line-strong);
  color: var(--text); box-shadow: var(--sh-2); backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(-14px) scale(.94);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.toast.in { opacity: 1; transform: none; }
.toast-ico { width: 17px; height: 17px; flex: 0 0 auto; color: var(--bio-cyan); }
.toast-ico svg { width: 100%; height: 100%; }
.toast-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-warn { border-color: rgba(255, 201, 74, .5); }
.toast-warn .toast-ico { color: var(--amber); }
.toast-reward { border-color: rgba(196, 232, 90, .5); }
.toast-reward .toast-ico { color: var(--acid); }
.toast-ok .toast-ico { color: var(--success); }

/* ══ 减少动效 ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .oc-rays, .oc-caustic, .oc-motes, .oc-glow { animation: none !important; }
}
body.rm *, body.rm *::before, body.rm *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}
body.rm .oc-rays, body.rm .oc-caustic, body.rm .oc-motes, body.rm .oc-glow { animation: none !important; }
body.rm .reveal-fig.in { opacity: 1; transform: translate(-50%, -50%) scale(1); }

@media (prefers-contrast: more) {
  :root { --text-mid: #c6dce3; --text-dim: #a8c2cc; --line: rgba(79, 240, 216, .34); }
}