/* ==========================================================================
   星轨 STARTRAIL · v7 亮色美漫工坊风（贴合《疯狂水世界》实机视觉规范）
   Token 来源：../fksj/tokens.css & 交接文档 §4.5
   ========================================================================== */

:root {
  /* 核心色彩（实机取色） */
  --bg: #eff2ff;
  --bg-2: #dde4ff;
  --surface: #fffdf7;
  --surface-2: #f4f6ff;
  --panel: #c7cffe;
  --head-violet: #746fcc;
  --head-navy: #2b317b;
  --ink: #242c74;
  --ink-dark: #192059;
  --tx-2: #4e568c;
  --tx-3: #767eb0;

  /* 交互 CTA */
  --accent: #4181fd;
  --accent-top: #5298ff;
  --accent-edge: #2457c9;
  --gold: #ffb020;
  --gold-top: #ffd24c;
  --gold-edge: #c97b0c;
  --green: #42c96c;
  --green-edge: #248a45;
  --danger: #fe325c;
  --danger-edge: #be1a3c;

  /* 品质色板 */
  --q5: #fbc840;
  --q4: #942aac;
  --q3: #3f4cab;
  --q2: #2fb872;
  --q1: #7b8bc4;

  /* 尺寸与描边 */
  --stroke: 2.5px;
  --stroke-lg: 3.5px;
  --r-card: 16px;
  --r-slot: 11px;
  --r-btn: 13px;
  --tab-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(36, 44, 116, 0.055) 1.2px, transparent 1.2px),
    linear-gradient(180deg, #eff2ff 0%, #dfe6ff 100%);
  background-size: 12px 12px, 100% 100%;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* 桌面端居中手机容器 */
#app {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 14px);
}

/* ==========================================================================
   顶部导航 & 卡池切换条
   ========================================================================== */
.comic-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(var(--safe-t) + 6px) 14px 5px;
  background: rgba(239, 242, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.comic-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comic-title {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--ink-dark);
  text-align: center;
  line-height: 1.1;
}

.topbar-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid var(--ink);
  white-space: nowrap;
}

.topbar-quota {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-dark);
  background: #fff5cc;
  border: 2px solid var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.topbar-act {
  justify-self: end;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: var(--ink-dark);
  background: linear-gradient(180deg, var(--gold-top), var(--gold));
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.topbar-act:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--ink-dark);
}

/* 卡池横滑药丸 */
.pool-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 1px 4px;
}

.pool-tabs::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 rgba(36, 44, 116, 0.2);
  transition: transform 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}

.chip:active {
  transform: translateY(2px);
  box-shadow: none;
}

.chip.on {
  background: linear-gradient(180deg, #4b8dff, #2e67e6);
  color: #ffe45e;
  border-color: var(--ink-dark);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 2px 0 var(--ink-dark);
  text-shadow: 0 1px 0 var(--ink-dark);
}

/* ==========================================================================
   页面通用间距
   ========================================================================== */
.page {
  padding: 2px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-plan {
  gap: 7px;
}

/* ==========================================================================
   首页主卡 · 海浪漫画头图 + 大倍率 + 潮汐贴纸 + 橙金进度条
   ========================================================================== */
.hero-card {
  border-radius: var(--r-card);
  border: var(--stroke) solid var(--ink-dark);
  background: var(--surface);
  box-shadow: 0 4px 0 rgba(25, 32, 89, 0.22);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 94px;
  padding: 16px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1f82ff;
  background-image:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.16), transparent 62%),
    url("../static/art/hero-wave.jpg");
  background-size: cover;
  background-position: center 45%;
  border-bottom: var(--stroke) solid var(--ink-dark);
  overflow: visible;
}

.hero-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-num {
  font-size: 45px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffdd4a;
  -webkit-text-stroke: 7px var(--ink-dark);
  paint-order: stroke fill;
  filter: drop-shadow(0 4px 0 var(--ink-dark));
  font-variant-numeric: tabular-nums;
}

.hero-num.pop {
  animation: numPop 0.28s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes numPop {
  0% { transform: scale(0.88); }
  55% { transform: scale(1.09); }
  100% { transform: scale(1); }
}

.hero-rate-pill {
  margin-top: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(25, 32, 89, 0.88);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 0 rgba(25, 32, 89, 0.35);
}

.hero-rate-pill b {
  color: #ffe259;
  font-variant-numeric: tabular-nums;
}

/* 歪斜黄色潮汐漫画贴纸 */
.tide-sticker {
  position: absolute;
  right: 9px;
  bottom: -10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff078, #ffd633);
  border: 2.5px solid var(--ink-dark);
  box-shadow: 2px 3px 0 var(--ink-dark);
  transform: rotate(7deg);
  line-height: 1.1;
}

.tide-name {
  font-size: 10.5px;
  font-weight: 900;
  color: var(--ink-dark);
}

.tide-val {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink-dark);
  font-variant-numeric: tabular-nums;
}

.hero-foot {
  padding: 7px 11px 8px;
  background: var(--surface);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--tx-2);
  margin-bottom: 5px;
}

.hero-stats b {
  color: var(--ink-dark);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.hero-stats .sep {
  opacity: 0.45;
}

/* 橙金斜纹漫画进度条 */
.comic-bar {
  height: 14px;
  border-radius: 999px;
  background: var(--head-navy);
  border: 2px solid var(--ink-dark);
  padding: 1.5px;
  overflow: hidden;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.25);
}

.comic-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(
    -45deg,
    #ffc438 0px,
    #ffc438 7px,
    #f29113 7px,
    #f29113 14px
  );
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.42);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   6 格投入槽（工坊面板）
   ========================================================================== */
.tray-card,
.bag-card,
.comic-panel {
  border-radius: var(--r-card);
  border: var(--stroke) solid var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 0 rgba(36, 44, 116, 0.16);
  padding: 7px 10px 8px;
}

.tray-hd,
.bag-hd,
.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.tray-title,
.fam-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tray-hd h2,
.bag-hd h2,
.panel-hd h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 900;
  color: var(--ink-dark);
}

.tray-count {
  font-size: 13px;
  font-weight: 900;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.tray-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.aff-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: var(--ink-dark);
  background: #6ee89a;
  border: 2px solid var(--ink-dark);
  box-shadow: 0 1.5px 0 var(--ink-dark);
  white-space: nowrap;
}

.aff-pill.syn {
  background: #ffe052;
}

.aff-pill.muted {
  background: var(--surface-2);
  color: var(--tx-3);
  border-color: #b7c0e6;
  box-shadow: none;
}

.aff-pill.hide {
  display: none;
}

.hd-link {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  padding: 2px 4px;
}

.hd-link.danger-link {
  color: var(--danger);
}

.hd-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--tx-2);
  background: var(--surface-2);
  border: 1.5px solid #c3cbf0;
  border-radius: 999px;
  padding: 2px 8px;
}

.bag-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-3);
}

/* 6 格横排实体槽 */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.slot-box {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-slot);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-empty {
  background: #eef2ff;
  border: 2px dashed #9da8db;
}

.slot-box.picked-chip {
  border: 2.5px solid var(--ink-dark);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14), 0 2.5px 0 var(--ink-dark);
  animation: slotPop 0.22s cubic-bezier(0.22, 1.4, 0.36, 1);
  transition: transform 0.1s ease;
}

.slot-box.picked-chip:active {
  transform: scale(0.92);
}

@keyframes slotPop {
  0% { transform: scale(0.65); opacity: 0.4; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

.slot-x {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--ink-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 15px;
  text-align: center;
  border: 1.5px solid #fff;
}

/* 品质渐变底色（用于槽位、道具卡、图鉴图标框） */
.q-5 {
  background: linear-gradient(180deg, #ffe778 0%, #ffba26 100%);
}
.q-4 {
  background: linear-gradient(180deg, #df9cff 0%, #a548ec 100%);
}
.q-3 {
  background: linear-gradient(180deg, #87d0ff 0%, #3d8bff 100%);
}
.q-2 {
  background: linear-gradient(180deg, #86f0be 0%, #34bd79 100%);
}
.q-1 {
  background: linear-gradient(180deg, #e0e7ff 0%, #b1bfe9 100%);
}

/* ==========================================================================
   4x2 选择物资 · 全彩美漫道具卡片
   ========================================================================== */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 12px;
  border: 2.5px solid var(--ink-dark);
  box-shadow: 0 3px 0 var(--ink-dark);
  overflow: hidden;
  padding-top: 5px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.tile:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink-dark);
}

.tile[data-out="1"] {
  opacity: 0.45;
  filter: grayscale(0.55);
}

.tile-count {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 19px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.tile-aff {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 1px 4px;
  border-radius: 5px;
  background: #fe325c;
  color: #fff;
  border: 1.5px solid var(--ink-dark);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  z-index: 2;
}

.tile-ico {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 0;
  filter: drop-shadow(0 2px 0 rgba(25, 32, 89, 0.22));
}

.tile-mult {
  align-self: flex-end;
  margin: -4px 4px 2px 0;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(25, 32, 89, 0.88);
  color: #ffe366;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

.tile-name {
  width: 100%;
  flex: 1;
  min-height: 24px;
  padding: 2px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fffdf7;
  border-top: 2px solid var(--ink-dark);
  color: var(--ink-dark);
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   首屏底部操作区：紧凑参数药丸 + 立体 3D 美漫主按钮
   ========================================================================== */
.action-dock {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.param-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.param-pill {
  height: 34px;
  padding: 0 5px 0 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 rgba(36, 44, 116, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.param-k {
  font-size: 12px;
  font-weight: 900;
  color: var(--tx-2);
}

.param-pill b {
  min-width: 26px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink-dark);
}

.step-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--ink);
  color: var(--ink-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, background 0.08s ease;
}

.step-btn:active {
  transform: scale(0.9);
  background: #aeb9ff;
}

/* 立体美漫按钮（沿用实机 4px 厚度 + 顶部高光 + 白字描边） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-btn);
  font-size: 15px;
  font-weight: 900;
  color: var(--ink-dark);
  background: var(--surface);
  border: 2.5px solid var(--ink-dark);
  box-shadow: inset 0 -3px 0 rgba(36, 44, 116, 0.12), 0 4px 0 var(--ink-dark);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--ink-dark);
}

.btn-block {
  width: 100%;
}

.btn-comic-lg {
  min-height: 45px;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.25;
  font-size: 16.5px;
  letter-spacing: 0.04em;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent-top) 0%, var(--accent) 55%, #2e6ce8 100%);
  border-color: var(--ink-dark);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.48),
    inset 0 -4px 0 rgba(0, 0, 0, 0.18),
    0 4px 0 var(--ink-dark);
  -webkit-text-stroke: 3.5px var(--ink-dark);
  paint-order: stroke fill;
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 0 0 var(--ink-dark);
}

.btn-gold {
  color: var(--ink-dark);
  background: linear-gradient(180deg, #ffe26b 0%, var(--gold) 100%);
  border-color: var(--ink-dark);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.55),
    inset 0 -4px 0 rgba(180, 96, 0, 0.25),
    0 4px 0 var(--ink-dark);
}

/* ==========================================================================
   折叠概率曲线与口径面板
   ========================================================================== */
.comic-disclose {
  border-radius: var(--r-card);
  border: 2px solid var(--ink);
  background: rgba(255, 253, 247, 0.88);
  overflow: hidden;
}

.disclose-hd {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

.disclose-hd::-webkit-details-marker {
  display: none;
}

.comic-disclose[open] .disclose-hd .ico {
  transform: rotate(180deg);
}

.disclose-body {
  padding: 2px 12px 12px;
  border-top: 1.5px dashed #b9c3ec;
}

.spark {
  width: 100%;
  height: 68px;
  display: block;
  margin-top: 8px;
}

.hero-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-3);
  margin: 2px 0 8px;
}

.disclose-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--tx-2);
}

.disclose-lines p {
  margin: 0;
}

.disclose-lines b {
  color: var(--ink-dark);
}

/* ==========================================================================
   全宽游戏底部弹层（严格沿用实机方角 + 4px 深靛顶描边 + #746FCC 紫标题条）
   ========================================================================== */
.mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 25, 68, 0.56);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.mask.show {
  opacity: 1;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  max-width: 460px;
  margin: 0 auto;
  background: var(--panel);
  border-top: 4px solid var(--ink-dark);
  border-radius: 0;
  box-shadow: 0 -8px 28px rgba(20, 25, 68, 0.32);
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet.show {
  transform: translateY(0);
}

.sheet-head {
  flex: 0 0 auto;
  background: var(--head-violet);
  border-bottom: 3px solid var(--ink-dark);
  padding: 8px 16px 12px;
  text-align: center;
}

.sheet-grab {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  margin: 0 auto 6px;
}

.sheet-head h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #ffffff;
  -webkit-text-stroke: 4px var(--ink-dark);
  paint-order: stroke fill;
}

.sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(22px + var(--safe-b));
}

/* 预计完成 · 放射线美漫庆祝主卡 */
.result-banner {
  border-radius: var(--r-card);
  border: 3px solid var(--ink-dark);
  box-shadow: 0 4px 0 var(--ink-dark);
  padding: 14px 12px 12px;
  text-align: center;
  margin-bottom: 12px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 245, 175, 0.92) 0%, rgba(255, 196, 56, 0.72) 38%, rgba(65, 129, 253, 0.88) 100%),
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.24) 0deg 12deg, transparent 12deg 24deg);
}

.result-kicker {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ink-dark);
  color: #ffe259;
  font-size: 11px;
  font-weight: 900;
}

.sheet-num {
  margin: 6px 0 4px;
  font-size: 54px;
  font-weight: 900;
  line-height: 1;
  color: #ffe04a;
  -webkit-text-stroke: 7px var(--ink-dark);
  paint-order: stroke fill;
  filter: drop-shadow(0 4px 0 var(--ink-dark));
  font-variant-numeric: tabular-nums;
}

.result-sub {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink-dark);
}

.result-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.mini-slot {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kv-list {
  border-radius: 14px;
  background: var(--surface);
  border: 2.5px solid var(--ink-dark);
  overflow: hidden;
  margin-bottom: 10px;
}

.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tx-2);
  border-bottom: 1.5px dashed #c6cef0;
}

.kv-row:last-child {
  border-bottom: 0;
}

.kv-row b {
  color: var(--ink-dark);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.kv-row em {
  font-style: normal;
  color: #2166eb;
}

.sheet-note {
  font-size: 12px;
  font-weight: 700;
  color: var(--tx-2);
  margin: 0 0 12px;
  line-height: 1.5;
}

.center {
  text-align: center;
}

/* ==========================================================================
   记录 / 图鉴 / 我的 页面组件
   ========================================================================== */
.last-forge-box {
  border-radius: 12px;
  background: linear-gradient(135deg, #e5ebff 0%, #d3ddff 100%);
  border: 2px solid var(--ink);
  padding: 12px;
}

.lf-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.lf-pool {
  font-size: 12px;
  font-weight: 800;
  color: var(--tx-2);
}

.lf-mult {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.05;
  color: #ffd84a;
  -webkit-text-stroke: 5px var(--ink-dark);
  paint-order: stroke fill;
  margin-top: 2px;
}

.lf-rate-tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ink-dark);
  color: #ffe259;
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
}

.lf-meta {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tx-2);
}

.empty-comic {
  padding: 22px 14px;
  text-align: center;
}

.empty-art {
  margin-bottom: 10px;
}

.empty-comic h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 900;
  color: var(--ink-dark);
}

.empty-comic p {
  margin: 0 auto 16px;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--tx-2);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-box {
  border-radius: 12px;
  background: var(--surface-2);
  border: 2px solid #bec7ec;
  padding: 10px 12px;
}

.stat-box-wide {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #eef3ff, #dfe7ff);
  border-color: var(--ink);
}

.stat-k {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--tx-2);
}

.stat-v {
  margin-top: 2px;
  font-size: 26px;
  font-weight: 900;
  color: var(--ink-dark);
  line-height: 1.15;
}

.stat-v small {
  font-size: 13px;
  font-weight: 800;
  margin-left: 2px;
  color: var(--tx-2);
}

.stat-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--tx-2);
}

/* 列表行（记录 / 图鉴 / 我的） */
.comic-list,
.codex-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.comic-row,
.codex-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 2px solid #c6ceef;
}

.comic-row-btn {
  width: 100%;
  text-align: left;
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.comic-row-btn:active {
  transform: scale(0.985);
  border-color: var(--ink);
}

.codex-ico {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink-dark);
}

.row-sub {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tx-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-right {
  text-align: right;
  flex: 0 0 auto;
}

.row-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--ink-dark);
}

.row-val.is-boost {
  color: #1f64e6;
}

.row-val.is-good {
  color: #1c9b52;
}

.is-danger {
  color: var(--danger) !important;
}

.row-note {
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-3);
}

.pill-mini {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--panel);
  border: 1.5px solid var(--ink);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-dark);
}

.rarity-pill {
  padding: 1px 6px;
  border-radius: 6px;
  border: 1.5px solid var(--ink-dark);
  font-size: 10px;
  font-weight: 900;
  color: var(--ink-dark);
}

.fam-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--ink-dark);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface);
  border: 2px solid #c3cbf0;
  color: var(--tx-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:active {
  border-color: var(--danger);
  color: var(--danger);
}

/* 「我的」页面头部船长卡 */
.profile-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--r-card);
  border: var(--stroke) solid var(--ink-dark);
  box-shadow: 0 4px 0 var(--ink-dark);
  background: linear-gradient(135deg, #4b8dff 0%, #2d66e5 100%);
  color: #ffffff;
}

.profile-avatar {
  flex: 0 0 auto;
  filter: drop-shadow(0 3px 0 rgba(25, 32, 89, 0.4));
}

.profile-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 2px 0 var(--ink-dark);
}

.plan-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffe052;
  color: var(--ink-dark);
  border: 2px solid var(--ink-dark);
  font-size: 10.5px;
  font-weight: 900;
  text-shadow: none;
  white-space: nowrap;
}

.profile-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.quota-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.quota-top b {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink-dark);
}

.meta-strip {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1.5px dashed #c4ccf0;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--tx-3);
}

.foot-note {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tx-3);
  margin: 4px 6px 8px;
  line-height: 1.5;
}

/* 引导页与表单 */
.ob-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 2.5px solid var(--ink-dark);
  margin-bottom: 12px;
}

.ob-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--ink-dark);
}

.ob-sub {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--tx-2);
}

.comic-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.comic-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--surface);
  border: 2px solid var(--ink);
}

.step-num {
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffe052;
  border: 2px solid var(--ink-dark);
  color: var(--ink-dark);
  font-size: 11.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-t {
  font-size: 13.5px;
  font-weight: 900;
  color: var(--ink-dark);
}

.step-d {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-2);
  line-height: 1.4;
}

.form-row {
  margin-bottom: 11px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--ink-dark);
  margin-bottom: 5px;
}

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--surface);
  border: 2.5px solid var(--ink-dark);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-dark);
  outline: none;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(65, 129, 253, 0.2);
}

/* ==========================================================================
   底部 4 Tab 美漫彩绘导航栏
   ========================================================================== */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  max-width: 460px;
  margin: 0 auto;
  display: grid;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 2.5px solid var(--ink-dark);
  box-shadow: 0 -4px 14px rgba(25, 32, 89, 0.08);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--tx-3);
  transition: transform 0.12s ease;
}

.tab-ico {
  width: 42px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tab-txt {
  font-size: 11px;
  font-weight: 900;
  color: var(--tx-2);
}

.tab.on .tab-ico {
  background: #fff0a8;
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
  transform: translateY(-2px);
}

.tab.on .tab-txt {
  color: var(--ink-dark);
}

/* ==========================================================================
   Toast 气泡
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-t) + 18px);
  z-index: 120;
  transform: translate(-50%, -18px);
  opacity: 0;
  pointer-events: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink-dark);
  color: #ffffff;
  border: 2px solid #ffe052;
  box-shadow: 0 4px 0 rgba(25, 32, 89, 0.35);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast[data-kind="bad"] {
  background: var(--danger);
  border-color: var(--ink-dark);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   v8 交互与获得感升级样式（心愿锚点 / 校准模块 / 4档位 / 飘字 / 校准仪式 / 凭证 / 潮汐曲线）
   ========================================================================== */

.topbar-right {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sfx-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ink);
  color: var(--ink-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1.5px 0 rgba(36, 44, 116, 0.2);
}

.sfx-btn:active {
  transform: scale(0.9);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42c96c;
  border: 1.5px solid var(--ink-dark);
  box-shadow: 0 0 0 2px rgba(66, 201, 108, 0.3);
}

/* 4 档位主卡视觉分级 */
.tier-pill {
  position: absolute;
  top: 7px;
  left: 9px;
  z-index: 4;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
  background: #ffffff;
  color: var(--ink-dark);
}

.tier-pill.tier-b {
  background: #9ef5c2;
}

.tier-pill.tier-a {
  background: #ffe052;
}

.tier-pill.tier-s {
  background: linear-gradient(180deg, #ff6b8b, #fe325c);
  color: #fffbe0;
}

.hero-card.tier-a {
  box-shadow: 0 4px 0 rgba(25, 32, 89, 0.25), 0 0 0 2px rgba(255, 208, 56, 0.45);
}

.hero-card.tier-s {
  box-shadow: 0 4px 0 var(--ink-dark), 0 0 16px rgba(255, 180, 32, 0.55);
}

.hero-card.tier-s .hero-stage {
  background-image:
    radial-gradient(circle at 50% 42%, rgba(255, 224, 92, 0.34), transparent 64%),
    url("../static/art/hero-wave.jpg");
}

/* 生效中凭证态 */
.hero-card.is-active {
  border-color: #1c245b;
  box-shadow: 0 4px 0 var(--ink-dark), 0 0 0 3px rgba(66, 201, 108, 0.32);
}

.active-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 11px;
  background: linear-gradient(90deg, #1b245c 0%, #2b3886 100%);
  color: #ffffff;
  border-bottom: 2.5px solid var(--ink-dark);
}

.active-dot-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #88ffad;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42e877;
  box-shadow: 0 0 0 0 rgba(66, 232, 119, 0.7);
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(66, 232, 119, 0.75); }
  70% { box-shadow: 0 0 0 7px rgba(66, 232, 119, 0); }
  100% { box-shadow: 0 0 0 0 rgba(66, 232, 119, 0); }
}

.active-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.active-cd {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffe259;
}

.reconfig-btn {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.gain-hi {
  color: #198d4b;
  font-weight: 800;
}

.gain-hi b {
  color: #116937;
}

.active-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.active-actions .btn {
  height: 40px;
  padding: 0 10px;
  font-size: 13.5px;
}

/* 4 档刻度进度条 */
.milestone-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.milestone-track {
  position: relative;
  height: 13px;
  border-radius: 999px;
  background: var(--head-navy);
  border: 2px solid var(--ink-dark);
  padding: 1.5px;
  overflow: hidden;
}

.ms-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.55);
  z-index: 2;
}

.ms-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-size: 10px;
  font-weight: 800;
  color: var(--tx-3);
  text-align: center;
}

.ms-labels span.on {
  color: var(--ink-dark);
  font-weight: 900;
}

/* 挂载槽与飘字、一键满配 */
.tray-card {
  position: relative;
}

.float-host {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  z-index: 25;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.float-pop {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ink-dark);
  color: #ffe259;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 0 rgba(25, 32, 89, 0.35);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  animation: floatUp 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.float-pop.syn,
.float-pop.tier {
  background: linear-gradient(180deg, #ffe259, #ffb020);
  color: var(--ink-dark);
  border-color: var(--ink-dark);
}

.float-pop.wish {
  background: #4181fd;
  color: #ffffff;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(10px) scale(0.8); }
  20% { opacity: 1; transform: translateY(-4px) scale(1.06); }
  80% { opacity: 1; transform: translateY(-20px) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.95); }
}

.mini-gold-btn {
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe46b, #ffb020);
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
  font-size: 11px;
  font-weight: 900;
  color: var(--ink-dark);
  white-space: nowrap;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.mini-gold-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.slot-wish-empty {
  border-color: #e69b1a;
  background: #fff9df;
  color: #b87308;
  font-size: 11px;
  font-weight: 900;
}

.slot-wish.picked-chip {
  border-color: #1c245b;
  box-shadow: 0 0 0 2px #ffb020, 0 2.5px 0 var(--ink-dark);
}

.wish-crown {
  position: absolute;
  top: -6px;
  left: -5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ffb020;
  border: 1.5px solid var(--ink-dark);
  color: var(--ink-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* 选心愿 & 挂模块分区 */
.pick-subhd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pick-subhd h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink-dark);
}

.pick-subhd h3 small {
  font-size: 11px;
  font-weight: 800;
  color: var(--tx-3);
  margin-left: 3px;
}

.tile-dim-tag {
  position: absolute;
  top: 3px;
  right: 3px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(25, 32, 89, 0.8);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  z-index: 2;
}

.tile-picked-tag {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 1px 5px;
  border-radius: 5px;
  background: #42c96c;
  color: var(--ink-dark);
  border: 1.5px solid var(--ink-dark);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
  z-index: 2;
}

.tile.is-picked {
  box-shadow: 0 0 0 2.5px #ffe052, 0 3px 0 var(--ink-dark);
  transform: translateY(-1px);
}

/* 保底临界警示条 */
.pity-alert {
  padding: 6px 11px;
  border-radius: 11px;
  background: linear-gradient(90deg, #fff1ba, #ffe27a);
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-dark);
  text-align: center;
}

.pity-alert.hide {
  display: none;
}

/* 1.6s 校准仪表弹层 */
.calib-gauge {
  border-radius: var(--r-card);
  border: 3px solid var(--ink-dark);
  background: linear-gradient(135deg, #2744b8 0%, #4181fd 100%);
  padding: 14px 14px 12px;
  text-align: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 0 var(--ink-dark);
}

.calib-kicker {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(25, 32, 89, 0.85);
  color: #ffe259;
  font-size: 11px;
  font-weight: 900;
}

.calib-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.calib-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 2px solid #c6ceef;
  opacity: 0.45;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.calib-step.done {
  opacity: 1;
  background: var(--surface);
  border-color: var(--ink-dark);
}

.cstep-dot {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dce3ff;
  border: 2px solid var(--ink);
  position: relative;
}

.calib-step.done .cstep-dot {
  background: #42c96c;
  border-color: var(--ink-dark);
}

.calib-step.done .cstep-dot::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 2px;
  width: 5px;
  height: 8px;
  border-right: 2.2px solid #fff;
  border-bottom: 2.2px solid #fff;
  transform: rotate(40deg);
}

.cstep-t {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink-dark);
}

.cstep-d {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tx-2);
}

/* 结果页印章与胶囊 */
.result-banner {
  position: relative;
}

.tier-stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 8px;
  background: #fe325c;
  color: #fffbe0;
  border: 2.5px solid var(--ink-dark);
  box-shadow: 2px 2px 0 var(--ink-dark);
  font-size: 11.5px;
  font-weight: 900;
  transform: rotate(8deg);
  animation: stampSlam 0.34s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes stampSlam {
  0% { transform: scale(1.9) rotate(18deg); opacity: 0; }
  70% { transform: scale(0.92) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(8deg); opacity: 1; }
}

.mini-slot-wish {
  box-shadow: 0 0 0 2px #ffb020, 0 2px 0 var(--ink-dark);
}

.tag-save {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #6ee89a;
  color: var(--ink-dark) !important;
  border: 1.5px solid var(--ink-dark);
  font-size: 11px;
}

.tag-boost {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #ffe052;
  color: var(--ink-dark) !important;
  border: 1.5px solid var(--ink-dark);
  font-size: 11px;
}

/* 24h 潮汐曲线弹层 */
.tide-sheet-card {
  border-radius: 14px;
  background: var(--surface);
  border: 2.5px solid var(--ink-dark);
  padding: 12px;
}

.tide-now-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.tide-now-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink-dark);
}

.tide-now-val b {
  color: #2166eb;
}

.tide-advice-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  border: 2px solid var(--ink);
  font-size: 11.5px;
  font-weight: 900;
  color: var(--ink-dark);
  white-space: nowrap;
}

.tide-advice-pill.hot {
  background: #ffe052;
  border-color: var(--ink-dark);
}

.tide-svg {
  width: 100%;
  height: 96px;
  display: block;
}

/* 图鉴双分页切换 */
.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 3px;
  border-radius: 12px;
  background: var(--panel);
  border: 2px solid var(--ink-dark);
}

.seg-btn {
  height: 30px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
  color: var(--tx-2);
  transition: background 0.15s ease, color 0.15s ease;
}

.seg-btn.on {
  background: var(--surface);
  color: var(--ink-dark);
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 rgba(25, 32, 89, 0.15);
}

/* ==========================================================================
   v9 卡密兑换激活 / 多游戏切换入口 / 快捷登记抽数样式
   ========================================================================== */

.topbar-game {
  cursor: pointer;
  background: var(--surface);
  border-color: var(--ink-dark);
  box-shadow: 0 1.5px 0 var(--ink-dark);
}

.topbar-game:active {
  transform: translateY(1.5px);
  box-shadow: none;
}

.topbar-quota {
  cursor: pointer;
}

.plan-badge.free {
  background: #e2e8ff;
  color: var(--ink-dark);
}

.redeem-status {
  border-radius: 13px;
  border: 2.5px solid var(--ink-dark);
  background: var(--surface);
  padding: 11px 13px;
  margin-bottom: 12px;
}

.redeem-status.is-pro {
  background: linear-gradient(135deg, #fff5bf, #ffe173);
}

.rs-k {
  font-size: 11px;
  font-weight: 800;
  color: var(--tx-2);
}

.rs-v {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 900;
  color: var(--ink-dark);
}

.rs-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--tx-2);
}

.input-code {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.demo-keys {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 12px;
}

.dk-lbl {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--tx-2);
}

.dk-chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-dark);
}

.dk-chip:active {
  background: #ffe052;
}

.redeem-err {
  margin: 0 0 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #ffe0e6;
  border: 2px solid var(--danger);
  color: #a80d2d;
  font-size: 12.5px;
  font-weight: 800;
}

.redeem-err.hide {
  display: none;
}

/* 多游戏切换入口 */
.game-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--surface);
  border: 2.5px solid #bfc8ee;
  text-align: left;
}

.game-item.is-cur {
  border-color: var(--ink-dark);
  background: linear-gradient(135deg, #fff6cc, #ffe684);
  box-shadow: 0 3px 0 var(--ink-dark);
}

.game-item.is-soon {
  opacity: 0.72;
}

.game-item-name {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--ink-dark);
}

.game-item-sub {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tx-2);
}

.game-item-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1.5px solid #b8c2ea;
  font-size: 11px;
  font-weight: 800;
  color: var(--tx-3);
  white-space: nowrap;
}

.game-item-tag.on {
  background: #42c96c;
  border-color: var(--ink-dark);
  color: var(--ink-dark);
}

/* 记录页快捷抽数胶囊 */
.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qp-btn {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-dark);
}

.qp-btn.on {
  background: #ffe052;
  border-color: var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
}

.auth-pill-btn {
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
  font-size: 11.5px;
  font-weight: 900;
  color: var(--ink-dark);
  white-space: nowrap;
}

.auth-pill-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.plan-badge.expired {
  background: #ffd9d2;
  color: #a81c07;
  border-color: var(--ink-dark);
}

.redeem-status.is-expired {
  background: #fff0ec;
  border-color: #d9381e;
}

.redeem-status.is-expired .rs-v {
  color: #a81c07;
}

.confirm-warn-box {
  padding: 13px 14px;
  border-radius: 13px;
  background: #fff6e0;
  border: 2.5px solid #d97706;
  margin-bottom: 12px;
}

.confirm-warn-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #9a3412;
  margin-bottom: 6px;
}

.confirm-warn-code {
  padding: 7px 10px;
  border-radius: 9px;
  background: #ffffff;
  border: 2px dashed var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink-dark);
  text-align: center;
  margin-bottom: 8px;
  word-break: break-all;
}

.confirm-warn-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 700;
  color: #7c2d12;
}

.confirm-warn-replace {
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #ffe4e6;
  border: 1.5px solid #e11d48;
  font-size: 12px;
  font-weight: 800;
  color: #9f1239;
}

.hide,
[hidden] {
  display: none !important;
}

.cta-split-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.cta-split-row .btn {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 13.5px;
}

.strategy-strip {
  margin: 8px 0 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #f0f6ff;
  border: 2px solid var(--ink);
  text-align: left;
}

.strategy-strip-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--ink-dark);
}

.strategy-strip-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: #ffe052;
  border: 1.5px solid var(--ink-dark);
  font-size: 10.5px;
  white-space: nowrap;
}

.strategy-strip-pace {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 900;
  color: #1d4ed8;
}

.strategy-strip-sub {
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--tx-2);
}

.legal-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #2563eb;
  font-weight: 800;
  text-decoration: underline;
  font-size: inherit;
  cursor: pointer;
}

/* AI 4阶算子芯片指示条 */
.ai-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0;
}

.ai-chip {
  padding: 4px 4px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1.5px solid #b8c2ea;
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--tx-3);
  transition: all 0.2s ease;
}

.ai-chip b {
  display: block;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.ai-chip.on {
  background: linear-gradient(180deg, #fff1a6, #ffc940);
  border: 2px solid var(--ink-dark);
  color: var(--ink-dark);
  box-shadow: 0 2px 0 var(--ink-dark);
}

/* 账号冷热偏差状态条 */
.bias-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid #c3cdf2;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-2);
}

.bias-tag {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1.5px solid var(--ink-dark);
  font-size: 10px;
  font-weight: 900;
  background: #e2e8ff;
  color: var(--ink-dark);
}

.bias-tag.cold {
  background: #bae6fd;
  color: #0c4a6e;
}

.bias-tag.hot {
  background: #fde68a;
  color: #78350f;
}

/* 千次蒙特卡洛 5 区间出货分布柱状图 */
.mc-box {
  margin: 10px 0;
  padding: 10px 11px 9px;
  border-radius: 12px;
  background: #ffffff;
  border: 2px solid var(--ink-dark);
  box-shadow: 0 2px 0 rgba(25, 32, 89, 0.14);
}

.mc-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--ink-dark);
  margin-bottom: 8px;
}

.mc-meta {
  font-size: 10.5px;
  font-weight: 800;
  color: #2563eb;
}

.mc-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  align-items: end;
  min-height: 82px;
  padding-top: 4px;
}

.mc-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.mc-pct {
  font-size: 10px;
  font-weight: 900;
  color: var(--tx-2);
}

.mc-bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #7db2ff, #4181fd);
  border: 1.5px solid var(--ink-dark);
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.mc-col.peak .mc-bar {
  background: linear-gradient(180deg, #ffe26b, #ff9f1c);
}

.mc-col.peak .mc-pct {
  color: #b45309;
}

.mc-lbl {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--tx-3);
  white-space: nowrap;
}

.mc-foot {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1.5px dashed #d3dcfa;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: var(--tx-2);
}

.mc-foot b {
  color: var(--ink-dark);
}

/* 首次登录用户协议勾选条与滚动条款区 */
.ob-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f5f7ff;
  border: 1.5px solid #c3cdf2;
  font-size: 11.5px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--tx-2);
  cursor: pointer;
}

.ob-agree input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #2563eb;
  cursor: pointer;
}

.ob-agree.is-err {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
}

.legal-scroll {
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

/* Pro 金锁算子芯片 */
.ai-chip.locked {
  background: linear-gradient(180deg, #f8f9ff, #e7ecff);
  border: 1.5px dashed #8a95cc;
  color: #6b75a8;
  cursor: pointer;
}

.ai-chip.locked b {
  color: #b45309;
}

/* 卡密弹窗内 Pro 权益亮点卡 */
.pro-perks-box {
  margin-bottom: 12px;
  padding: 10px 11px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff9e3, #ffefb8);
  border: 2px solid var(--ink-dark);
}

.pro-perks-reason {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink-dark);
  margin-bottom: 7px;
}

.pro-perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--tx-2);
}

.pro-perks-grid span.is-on {
  color: #15803d;
}

/* 主页双情报卡（今日热池监控 + 多池省钻横评） */
.pro-intel-card {
  padding: 12px 13px;
}

.intel-tabs {
  display: flex;
  gap: 6px;
}

.intel-tab {
  padding: 5px 10px;
  border-radius: 9px;
  border: 2px solid #bfc9f0;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 900;
  color: var(--tx-2);
  cursor: pointer;
}

.intel-tab.on {
  background: var(--ink-dark);
  border-color: var(--ink-dark);
  color: #ffe052;
}

.pro-tag {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  border: 1.5px solid var(--ink-dark);
  background: #ffe052;
  color: var(--ink-dark);
}

.pro-tag.on {
  background: #7af0a6;
}

.intel-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-3);
  margin-bottom: 8px;
}

.intel-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.intel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #ffffff;
  border: 1.8px solid #cfd7f6;
}

.intel-row.is-cur {
  border-color: var(--ink-dark);
  background: #fffdf0;
}

.intel-rank {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  background: #e2e8ff;
  border: 1.5px solid var(--ink-dark);
  color: var(--ink-dark);
}

.intel-rank.r-1 {
  background: linear-gradient(180deg, #ffe26b, #ff9f1c);
}

.intel-main {
  flex: 1;
  min-width: 0;
}

.intel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-dark);
}

.intel-badge {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  border: 1.5px solid var(--ink-dark);
  background: #e2e8ff;
}

.intel-badge.hot { background: #fde68a; color: #92400e; }
.intel-badge.good { background: #bbf7d0; color: #166534; }
.intel-badge.warn { background: #fed7aa; color: #9a3412; }
.intel-badge.bad { background: #fecdd3; color: #9f1239; }

.intel-sub {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-2);
}

.intel-heat-track {
  margin-top: 5px;
  height: 5px;
  border-radius: 999px;
  background: #e5ebff;
  overflow: hidden;
}

.intel-heat-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4181fd, #ff9f1c);
}

.intel-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.intel-score {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink-dark);
}

.intel-score small {
  font-size: 10px;
  margin-left: 1px;
}

.intel-go {
  padding: 3px 9px;
  border-radius: 7px;
  background: #4181fd;
  color: #fff;
  border: 1.5px solid var(--ink-dark);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.intel-cur-tag {
  font-size: 10.5px;
  font-weight: 900;
  color: #2563eb;
}

/* Pro 毛玻璃金锁遮罩 */
.pro-lock-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  min-height: 106px;
}

.pro-blur-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  filter: blur(4px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.pro-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  text-align: center;
  background: rgba(244, 246, 255, 0.72);
  border: 2px dashed var(--ink);
  border-radius: 10px;
}

.pro-lock-txt {
  font-size: 11.5px;
  font-weight: 900;
  color: var(--ink-dark);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
  min-height: 34px;
}

/* 实战收益账单 & 到期续费横幅 */
.roi-headline {
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  border: 1.8px solid var(--ink-dark);
  font-size: 12px;
  font-weight: 900;
  color: var(--ink-dark);
  line-height: 1.45;
}

.renew-banner {
  background: linear-gradient(180deg, #fff9db, #ffe8a3);
}

.renew-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-dark);
}

.renew-sub {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #78350f;
  line-height: 1.45;
}
