:root {
  color-scheme: dark;
  --bg: #171a26;
  --bg-elevated: #1e2333;
  --panel-solid: #232838;
  --surface-muted: #2c3245;
  --ink: #f1f3f9;
  --ink-soft: #b8c0d2;
  --ink-faint: #8f98ad;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #9b82ff;
  --accent-2: #7c84f5;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --gold: #fbbf24;
  --green: #34d399;
  --danger: #fb7185;
  --glow: rgba(155, 130, 255, 0.3);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.28);
  --focus-ring: 0 0 0 3px rgba(155, 130, 255, 0.28);
  --radius: 16px;
  --font: "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(139, 108, 247, 0.28), transparent 55%),
    radial-gradient(720px 420px at 100% 0%, rgba(244, 114, 182, 0.14), transparent 50%),
    radial-gradient(640px 420px at 50% 110%, rgba(34, 211, 238, 0.1), transparent 55%),
    var(--bg);
  /* 避免 iOS 橡皮筋把 fixed 底栏顶飞 */
  overscroll-behavior-y: none;
}
button, input, .tag-chip, .diff-card, .day-chip, .icon-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.42;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}
.app {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px 48px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-top: max(14px, env(safe-area-inset-top));
}

/* Two-column: rewards | timeline */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}
.col-left, .col-right {
  min-width: 0;
}
.col-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.col-left-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.col-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.timeline-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(40, 45, 62, 0.96), rgba(32, 36, 50, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}
.timeline-scroll {
  flex: 1 1 auto;
  min-height: 240px;
  max-height: min(70vh, 720px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
.timeline-scroll::-webkit-scrollbar { width: 6px; }
.timeline-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

@media (min-width: 900px) {
  .app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
    padding-bottom: 16px;
  }
  .hud {
    flex-shrink: 0;
  }
  .layout {
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    min-height: 0;
    height: auto;
    max-height: none;
  }
  .col-left {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .col-left-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
  }
  .col-left-main::-webkit-scrollbar { width: 5px; }
  .col-left-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
  }
  /* 日历贴左栏底，与右侧下沿齐平 */
  .col-left > .calendar {
    flex-shrink: 0;
    margin-top: 10px;
    margin-bottom: 0 !important;
  }
  .composer-wrap {
    margin-top: 8px;
    margin-bottom: 0;
    background: linear-gradient(to top, rgba(35, 40, 56, 0.98) 75%, rgba(35, 40, 56, 0.88));
  }
  .col-right {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
  }
  .timeline-panel {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .timeline-scroll {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
  }
  /* tighter left column */
  .player { padding: 11px; margin-bottom: 10px; }
  .manifesto { padding: 8px 10px; margin-bottom: 10px; font-size: 0.74rem; }
  .closure { padding: 11px; margin-bottom: 10px; }
  .closure .combo-timer { margin-top: 10px; margin-bottom: 0; padding: 9px 11px; }
  .loot-panel { margin-bottom: 0; padding: 8px; }
  .calendar { margin-bottom: 0; padding: 12px 12px 14px; flex: 0 0 auto; }
  .pull-line { margin-top: 6px; font-size: 0.76rem; }
  .collection { gap: 5px; }
  .gift-case { min-height: 0; }
  .slot { min-height: 28px; }
  .diff-card { padding: 6px 4px; }
  .diff-reward { font-size: 0.58rem; }
  .day-chip { min-height: 84px; }
  .heat-bar { min-height: 48px; max-height: 60px; }
}

@media (min-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}

/* —— Top HUD —— */
.hud {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  min-width: 0;
}
.brand {
  min-width: 0;
  flex-shrink: 0;
}
.brand h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #c4b5fd;
  background: linear-gradient(135deg, #a5b4fc, #c084fc 45%, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
  white-space: nowrap;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand h1 {
    color: #c4b5fd;
    -webkit-text-fill-color: currentColor;
    background: none;
  }
}
.brand .tagline {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.brand .tagline em {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
}

/* 顶栏：紧凑进度胶囊（不拉满整行） */
.hud-gift {
  appearance: none;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(251, 191, 36, 0.1));
  border-radius: 999px;
  padding: 5px 10px;
  width: min(210px, 42vw);
  max-width: 210px;
  flex: 0 1 210px;
  min-width: 0;
  margin-left: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}
.hud-gift:hover {
  border-color: rgba(251, 191, 36, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.14);
}
.hud-gift:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.7);
  outline-offset: 2px;
}
.hud-gift.is-ready {
  border-color: rgba(74, 222, 128, 0.45);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(251, 191, 36, 0.12));
}
.hud-gift-top {
  display: none;
}
.hud-gift-target {
  font-size: 0.68rem;
  font-weight: 750;
  color: #fde68a;
  white-space: nowrap;
  flex-shrink: 0;
}
.hud-gift-nums {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}
.hud-gift-nums em {
  font-style: normal;
  color: #fde68a;
  font-weight: 900;
}
.hud-gift-nums .sep {
  margin: 0 1px;
  opacity: 0.55;
}
.hud-gift-track {
  flex: 1 1 auto;
  min-width: 36px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.hud-gift-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #a78bfa 0%, #f472b6 52%, #fbbf24 100%);
  transition: width 0.4s ease;
}
.hud-gift.is-ready .hud-gift-track i {
  background: linear-gradient(90deg, #34d399, #fbbf24);
}
.hud-gift-gap {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-faint);
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-gift.is-ready .hud-gift-gap {
  color: #86efac;
}
.hud-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 0;
}

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.icon-btn:focus-visible,
.diff-card:focus-visible,
.tag-chip:focus-visible,
.day-chip:focus-visible,
.igniter:focus-visible,
.composer button:focus-visible,
.readonly-banner button:focus-visible,
.modal-actions button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.icon-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(209, 31, 69, 0.35);
  background: rgba(209, 31, 69, 0.08);
}
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Player strip */
.player {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #2a2f44, #26243c);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.avatar {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(145deg, #6366f1, #a855f7 50%, #ec4899);
  box-shadow: 0 0 24px var(--glow);
}
.player-main { min-width: 0; }
.player-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.player-title-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  min-width: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.player-title {
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-title-btn:hover .player-title {
  color: #e9d5ff;
}
.player-lv {
  appearance: none;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: #fbbf24;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.player-lv:hover {
  filter: brightness(1.1);
  border-color: rgba(251, 191, 36, 0.55);
}

/* 等级阶梯 */
.shop-sec {
  margin: 14px 0 8px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-soft);
}
.lv-panel {
  margin-bottom: 4px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.14), rgba(15, 23, 42, 0.2));
  border: 1px solid rgba(167, 139, 250, 0.25);
}
.lv-now {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.lv-now-emoji { font-size: 1.6rem; line-height: 1; }
.lv-now-title {
  font-size: 0.95rem;
  font-weight: 850;
  color: var(--ink);
}
.lv-now-sub {
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 2px;
}
.lv-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 4px;
}
.lv-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a78bfa, #f472b6, #fbbf24);
  transition: width 0.35s ease;
}
.lv-bar-cap {
  font-size: 0.68rem;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.lv-ladder {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}
.lv-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  opacity: 0.55;
}
.lv-row.done { opacity: 0.88; }
.lv-row.here {
  opacity: 1;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.12);
}
.lv-emoji { font-size: 1.05rem; line-height: 1; }
.lv-name {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--ink);
}
.lv-meta {
  font-size: 0.62rem;
  color: var(--ink-faint);
  margin-top: 1px;
}
.lv-need {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-faint);
}
.lv-row.done .lv-need { color: #6ee7b7; }
.lv-row.here .lv-need { color: #fde68a; }
.xp-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 6px;
}
.xp-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6, #f472b6);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--ink-faint);
}
.player-meta strong { color: var(--ink-soft); font-weight: 700; }
.points-pill {
  color: #fde68a;
  font-weight: 750;
}
.points-pill strong {
  color: #fde68a !important;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

/* 兑换商店 */
.reward-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.reward-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}
.reward-card.can {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(124, 58, 237, 0.08));
}
.reward-card.locked { opacity: 0.72; }
.reward-emoji { font-size: 1.6rem; line-height: 1; }
.reward-body h4 { font-size: 0.92rem; margin-bottom: 2px; }
.reward-body p { font-size: 0.72rem; color: var(--ink-faint); line-height: 1.4; margin: 0; }
.reward-cost {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 850;
  color: #fde68a;
}
.reward-card button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.reward-card button.primary {
  border: none;
  background: linear-gradient(135deg, #6d4fd6, #5558d9);
  color: #fff;
}
.reward-card button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.redeem-hist {
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.shop-progress {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 8px 0 14px;
}
.shop-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a78bfa, #f472b6, #fbbf24);
  transition: width 0.35s ease;
}

/* Manifesto chip */
.manifesto {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: #fcd34d;
  line-height: 1.4;
}
.manifesto b { color: #fde68a; }

/* Daily closure — difficulty + progress */
.closure {
  position: relative;
  padding: 14px;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(139, 108, 247, 0.12), transparent 55%),
    var(--panel-solid);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.closure.open {
  border-color: rgba(251, 113, 133, 0.4);
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.12), 0 16px 40px rgba(251, 113, 133, 0.12);
}
.closure.sealed {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 40px rgba(52, 211, 153, 0.16);
}
.closure-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.closure-copy { min-width: 0; }
.diff-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  padding: 2px 8px 2px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-soft);
}
.diff-live-icon { font-size: 0.85rem; line-height: 1; }
.diff-live-name { letter-spacing: 0.02em; }
.closure-copy h2 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 2px;
  line-height: 1.2;
}
.closure.open .closure-copy h2 { color: #fda4af; }
.closure.sealed .closure-copy h2 { color: #6ee7b7; }
.closure-blurb {
  font-size: 0.72rem;
  color: var(--ink-faint);
  line-height: 1.35;
  font-weight: 600;
}
.closure-blurb em {
  font-style: normal;
  color: #fde68a;
  font-weight: 800;
}

.ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.ring-wrap svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 7; }
.ring-fg {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 188.4;
  stroke-dashoffset: 188.4;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.closure.sealed .ring-fg { stroke: #34d399; }
.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  transform: none;
}
.ring-center .n {
  font-size: 1.02rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ring-center .d {
  font-size: 0.62rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

.slots-block { margin-bottom: 10px; }
.slots-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.slots-label strong { color: #c4b5fd; font-weight: 750; }
.slots {
  display: flex;
  gap: 5px;
  margin-bottom: 0;
}
.slot {
  flex: 1;
  min-height: 26px;
  border-radius: 7px;
  background: var(--surface-muted);
  border: 1px dashed var(--line-strong);
  transition: 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  padding: 3px 2px;
}
.slot .slot-icon { font-size: 0.8rem; line-height: 1; opacity: 0.55; font-weight: 700; color: inherit; }
.slot.filled {
  background: linear-gradient(145deg, rgba(99,102,241,0.28), rgba(168,85,247,0.3));
  border: 1px solid rgba(167, 139, 250, 0.4);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.22);
  color: #ddd6fe;
}
.slot.filled .slot-icon { opacity: 1; }
.slot.bonus {
  background: linear-gradient(145deg, rgba(245,158,11,0.35), rgba(251,191,36,0.28));
  border: 1px solid rgba(251,191,36,0.45);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.28);
  color: #fde68a;
}
.slot.bonus .slot-icon { opacity: 1; }
.slot.next {
  position: relative;
  z-index: 1;
  min-height: 30px;
  border: 2px dashed #fb7185;
  color: #fecdd3;
  background:
    linear-gradient(145deg, rgba(251, 113, 133, 0.28), rgba(244, 63, 94, 0.18));
  box-shadow:
    0 0 0 1px rgba(251, 113, 133, 0.35),
    0 0 14px rgba(251, 113, 133, 0.45),
    0 0 28px rgba(244, 63, 94, 0.22),
    inset 0 0 12px rgba(251, 113, 133, 0.12);
  animation: slot-pulse 1.15s ease-in-out infinite;
}
.slot.next .slot-icon {
  opacity: 1;
  font-size: 0.95rem;
  font-weight: 900;
  color: #fecdd3;
  text-shadow: 0 0 10px rgba(251, 113, 133, 0.9);
}
@keyframes slot-pulse {
  0%, 100% {
    transform: scale(1);
    border-color: #fb7185;
    box-shadow:
      0 0 0 1px rgba(251, 113, 133, 0.3),
      0 0 10px rgba(251, 113, 133, 0.35),
      0 0 18px rgba(244, 63, 94, 0.15),
      inset 0 0 8px rgba(251, 113, 133, 0.08);
  }
  50% {
    transform: scale(1.08);
    border-color: #fda4af;
    background:
      linear-gradient(145deg, rgba(251, 113, 133, 0.42), rgba(244, 63, 94, 0.28));
    box-shadow:
      0 0 0 3px rgba(251, 113, 133, 0.35),
      0 0 18px rgba(251, 113, 133, 0.7),
      0 0 36px rgba(244, 63, 94, 0.4),
      inset 0 0 14px rgba(251, 113, 133, 0.2);
  }
}
.slots-caption {
  font-size: 0.72rem;
  color: var(--ink-faint);
  line-height: 1.4;
}
.slots-caption em {
  font-style: normal;
  color: #f9a8d4;
  font-weight: 700;
}

.closure-hint {
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.closure-hint strong { color: var(--pink); font-weight: 700; }
.closure.sealed .closure-hint strong { color: var(--green); }

/* 难度档 · 游戏感 */
.diff-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.diff-card {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-soft);
  font: inherit;
  padding: 8px 4px 7px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  position: relative;
  overflow: hidden;
}
.diff-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--ink);
}
.diff-card .diff-icon {
  font-size: 1.05rem;
  line-height: 1;
  filter: grayscale(0.25);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.diff-card .diff-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  width: 100%;
}
.diff-card .diff-name {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.diff-card .diff-n {
  font-size: 0.6rem;
  font-weight: 650;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.diff-card .diff-reward {
  font-size: 0.6rem;
  font-weight: 800;
  color: #fcd34d;
  opacity: 0.85;
  margin-top: 1px;
}
.diff-card.active {
  transform: translateY(-1px);
}
.diff-card.active .diff-icon {
  filter: none;
  transform: scale(1.08);
}
.diff-card.d-warm.active {
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.18), rgba(16, 185, 129, 0.08));
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.15), 0 8px 18px rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
}
.diff-card.d-std.active {
  background: linear-gradient(160deg, rgba(129, 140, 248, 0.22), rgba(99, 102, 241, 0.1));
  border-color: rgba(165, 180, 252, 0.55);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.18), 0 8px 18px rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
}
.diff-card.d-hard.active {
  background: linear-gradient(160deg, rgba(251, 146, 60, 0.2), rgba(239, 68, 68, 0.1));
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.16), 0 8px 18px rgba(239, 68, 68, 0.14);
  color: #fdba74;
}
.diff-card.d-myth.active {
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.22), rgba(236, 72, 153, 0.14));
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.18), 0 8px 20px rgba(236, 72, 153, 0.16);
  color: #fde68a;
  animation: myth-glow 2.2s ease-in-out infinite;
}
@keyframes myth-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.18), 0 8px 18px rgba(236, 72, 153, 0.14); }
  50% { box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.32), 0 10px 24px rgba(236, 72, 153, 0.22); }
}
.closure.diff-warm { --diff-tint: rgba(52, 211, 153, 0.1); }
.closure.diff-std { --diff-tint: rgba(129, 140, 248, 0.12); }
.closure.diff-hard { --diff-tint: rgba(251, 146, 60, 0.12); }
.closure.diff-myth { --diff-tint: rgba(251, 191, 36, 0.12); }
.closure.diff-warm,
.closure.diff-std,
.closure.diff-hard,
.closure.diff-myth {
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, var(--diff-tint), transparent 55%),
    var(--panel-solid);
}

/* Combo timer · 嵌在今日任务区底部 */
.closure .combo-timer {
  display: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.22);
}
.closure .combo-timer.show { display: block; }
.closure .combo-timer.urgent {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.28);
}
.closure .combo-timer.idle {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}
/* 兼容旧选择器 */
.combo-timer {
  display: none;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.22);
}
.combo-timer.show { display: block; }
.combo-timer.urgent {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.28);
}
.combo-timer.idle {
  background: var(--panel-solid);
  border-color: var(--line);
}
.combo-timer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.combo-timer-label { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.combo-timer-label em { font-style: normal; color: #c4b5fd; }
.combo-timer.urgent .combo-timer-label em { color: #fda4af; }
.combo-timer-clock {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}
.combo-timer.urgent .combo-timer-clock { color: #fb7185; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.5; } }
.combo-timer-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 6px;
}
.combo-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6, #f472b6);
  transition: width 0.9s linear;
}
.combo-timer.urgent .combo-timer-fill { background: linear-gradient(90deg, #fbbf24, #fb7185); }
.combo-timer-hint { font-size: 0.72rem; color: var(--ink-faint); line-height: 1.4; }
.combo-timer-hint strong { color: var(--ink-soft); }

/* Calendar · 热力柱图 */
.calendar {
  margin-bottom: 12px;
  padding: 12px 12px 14px;
  border-radius: var(--radius);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.cal-week { margin-bottom: 14px; }
.cal-week:last-of-type { margin-bottom: 0; }
.cal-week-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 8px;
}
.cal-week-head .label { font-size: 0.82rem; font-weight: 750; }
.cal-week-head .label span { font-weight: 500; color: var(--ink-faint); font-size: 0.72rem; margin-left: 6px; }
.cal-week-head .cal-stats { font-size: 0.72rem; color: var(--ink-soft); }
.cal-week-head .cal-stats strong { color: #c4b5fd; }
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.day-chip {
  min-width: 0;
  min-height: 78px;
  border: 1.5px solid transparent;
  background: var(--surface-muted);
  border-radius: 12px;
  padding: 6px 3px 7px;
  cursor: pointer;
  text-align: center;
  color: var(--ink);
  transition: 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.day-chip:hover { transform: translateY(-2px); }
.day-chip.active {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.22);
}
.day-chip.future { opacity: 0.35; pointer-events: none; }
.day-chip.today-mark:not(.active) { border-color: rgba(165, 180, 252, 0.4); }
.day-chip.heat-0 { background: rgba(255, 255, 255, 0.04); }
.day-chip.heat-1,
.day-chip.heat-2,
.day-chip.heat-3,
.day-chip.heat-4,
.day-chip.heat-5,
.day-chip.heat-6 {
  background: rgba(255, 255, 255, 0.05);
}
.day-chip.sealed-day { box-shadow: inset 0 0 0 1.5px rgba(52, 211, 153, 0.45); }
.day-chip.active.sealed-day {
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.22), inset 0 0 0 1.5px rgba(52, 211, 153, 0.45);
}
.day-chip .dom {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  margin: 0;
  line-height: 1;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.day-chip.active .dom,
.day-chip.today-mark .dom { color: var(--ink); }
.day-chip .count-mini { display: none; }

/* 柱：高度 = 执行强度（相对 13 笔） */
.heat-bar {
  flex: 1 1 auto;
  width: 52%;
  min-height: 42px;
  max-height: 56px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.heat-bar i {
  display: block;
  width: 100%;
  height: var(--h, 0%);
  min-height: 0;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.day-chip.heat-0 .heat-bar i { height: 0 !important; box-shadow: none; }
.day-chip.heat-1 .heat-bar i { background: linear-gradient(180deg, #64748b, #475569); box-shadow: none; }
.day-chip.heat-2 .heat-bar i { background: linear-gradient(180deg, #818cf8, #4f46e5); }
.day-chip.heat-3 .heat-bar i { background: linear-gradient(180deg, #a78bfa, #6366f1); }
.day-chip.heat-4 .heat-bar i {
  background: linear-gradient(180deg, #c084fc, #7c3aed);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.35);
}
.day-chip.heat-5 .heat-bar i {
  background: linear-gradient(180deg, #e879f9, #db2777 55%, #7c3aed);
  box-shadow: 0 0 14px rgba(219, 39, 119, 0.35);
}
.day-chip.heat-6 .heat-bar i {
  background: linear-gradient(180deg, #fbbf24, #f472b6 50%, #a855f7);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}
.day-chip.future .heat-bar {
  background: rgba(255, 255, 255, 0.03);
}
.cal-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--ink-faint);
  margin-top: 8px;
}
.cal-legend .swatch { width: 10px; height: 10px; border-radius: 3px; }
.cal-legend .h0 { background: var(--surface-muted); border: 1px solid var(--line); }
.cal-legend .h1 { background: rgba(99,102,241,0.4); }
.cal-legend .h2 { background: rgba(139,92,246,0.65); }
.cal-legend .h3 { background: linear-gradient(160deg,#7c3aed,#db2777); }
.cal-legend .h4 { background: linear-gradient(160deg,#f59e0b,#ec4899); }

/* 主线展馆 · 点亮更亮 + 跑马灯 */
.loot-panel {
  margin-bottom: 8px;
  padding: 8px 8px 9px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(167, 139, 250, 0.28), transparent 55%),
    linear-gradient(165deg, #322a52 0%, #242844 50%, #1c2034 100%);
  border: 1px solid rgba(196, 181, 253, 0.28);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 24px rgba(124, 58, 237, 0.12);
  position: relative;
  overflow: hidden;
}
.loot-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(255,255,255,0.05) 50%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
/* 整馆点亮：保留光晕，关掉跑马灯 */
.loot-panel.has-lit {
  border-color: rgba(196, 181, 253, 0.35);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 28px rgba(167, 139, 250, 0.22);
}
.loot-panel.has-lit::after,
.loot-panel.all-lit::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}
.ledger-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding: 0 2px;
}
.ledger-head .title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.9);
  min-width: 0;
}
.ledger-head .sub {
  display: inline;
  font-size: 0.64rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}
.ledger-head .sub em {
  font-style: normal;
  color: #fbbf24;
  font-weight: 900;
}
.tag-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}
.tag-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  color: var(--ink-faint);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 10px;
  min-height: 46px;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.15s ease;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tag-chip:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.18); }
.tag-chip.on {
  color: #ddd6fe;
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(139, 108, 247, 0.22);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.15);
}
.collection {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
/* 展柜位 · 档位皮肤 + 进度 + 跑马灯 */
.gift-case {
  position: relative;
  border-radius: 12px;
  padding: 7px 7px 6px;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  min-height: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 7px;
  align-items: start;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-width: 0;
  overflow: hidden;
}
.gift-case:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
}
.gift-case.empty {
  opacity: 0.62;
  filter: grayscale(0.45);
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
  box-shadow: none;
}
/* 点亮：更亮底 + 持续外发光 */
.gift-case.lit {
  background: linear-gradient(155deg, rgba(255,255,255,0.1), rgba(167,139,250,0.08));
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 0 16px rgba(167, 139, 250, 0.28),
    0 0 28px rgba(167, 139, 250, 0.12);
}
/* 展柜跑马灯关闭：扫光 / 边框追逐光都不显示 */
.gift-marquee,
.gift-case.lit .gift-marquee,
.gift-case.lit .gift-marquee::before,
.gift-case.lit::after,
.gift-case.lane-work.lit::after,
.gift-case.lane-life.lit::after,
.gift-case.lane-love.lit::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}
.gift-case.lit .gift-pedestal,
.gift-case.lit .gift-body {
  position: relative;
  z-index: 1;
}
.gift-case.just-hit {
  animation: lane-hit 0.85s cubic-bezier(0.22, 1.2, 0.36, 1);
  z-index: 2;
}
@keyframes lane-hit {
  0% { transform: scale(1); filter: brightness(1); }
  30% { transform: scale(1.07); filter: brightness(1.35); box-shadow: 0 0 0 2px rgba(251,191,36,0.7), 0 12px 32px rgba(251,191,36,0.4); }
  100% { transform: scale(1); filter: brightness(1); }
}
.gift-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gift-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.gift-mid {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}
/* 底座光 */
.gift-pedestal {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 0;
  position: relative;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.4), transparent 45%),
              var(--gift-bg, #4b5563);
  box-shadow:
    0 0 0 1.5px var(--gift-ring, rgba(107, 114, 128, 0.28)),
    0 4px 12px var(--gift-glow, rgba(107, 114, 128, 0.2));
}
.gift-case.t0 .gift-pedestal,
.gift-case.empty .gift-pedestal {
  --gift-bg: linear-gradient(145deg, #3f4558, #2d3344);
  --gift-ring: rgba(148, 163, 184, 0.2);
  --gift-glow: transparent;
  filter: grayscale(0.4);
  opacity: 0.85;
}
.gift-case.t1 .gift-pedestal {
  --gift-bg: linear-gradient(145deg, #e2e8f0, #94a3b8);
  --gift-ring: rgba(226, 232, 240, 0.65);
  --gift-glow: rgba(203, 213, 225, 0.45);
}
.gift-case.t2 .gift-pedestal {
  --gift-bg: linear-gradient(145deg, #6ee7b7, #10b981);
  --gift-ring: rgba(110, 231, 183, 0.7);
  --gift-glow: rgba(52, 211, 153, 0.55);
  animation: gift-pulse 2.6s ease-in-out infinite;
}
.gift-case.t3 .gift-pedestal {
  --gift-bg: linear-gradient(145deg, #7dd3fc, #3b82f6);
  --gift-ring: rgba(125, 211, 252, 0.75);
  --gift-glow: rgba(59, 130, 246, 0.55);
  animation: gift-pulse 2.2s ease-in-out infinite;
}
.gift-case.t4 .gift-pedestal {
  --gift-bg: linear-gradient(145deg, #e9d5ff, #a78bfa 40%, #7c3aed);
  --gift-ring: rgba(233, 213, 255, 0.8);
  --gift-glow: rgba(167, 139, 250, 0.6);
  animation: gift-pulse 1.9s ease-in-out infinite;
}
.gift-case.t5 .gift-pedestal {
  --gift-bg: linear-gradient(145deg, #fde68a, #fbbf24 35%, #f472b6 70%, #a855f7);
  --gift-ring: rgba(253, 224, 71, 0.85);
  --gift-glow: rgba(251, 191, 36, 0.65);
  animation: gift-pulse 1.4s ease-in-out infinite;
}
/* 点亮后图标更跳 */
.gift-case.lit .gift-pedestal {
  filter: saturate(1.25) brightness(1.12);
}
.gift-case.lit .gift-count {
  color: #fff;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.45), 0 2px 8px rgba(0,0,0,0.3);
}
.gift-case.lit .gift-name {
  color: #fff;
}
.gift-case.lit .gift-bar {
  background: rgba(255, 255, 255, 0.16);
  height: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.gift-case.lit .gift-bar i {
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}
/* 整卡随档位染色 · 更亮 */
.gift-case.t1.lit {
  background: linear-gradient(155deg, rgba(203,213,225,0.18), rgba(255,255,255,0.06));
  border-color: rgba(203, 213, 225, 0.45);
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.25), inset 0 1px 0 rgba(255,255,255,0.12);
}
.gift-case.t2.lit {
  background: linear-gradient(155deg, rgba(52,211,153,0.28), rgba(16,185,129,0.08));
  border-color: rgba(110, 231, 183, 0.55);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.35), 0 0 36px rgba(16, 185, 129, 0.15);
}
.gift-case.t3.lit {
  background: linear-gradient(155deg, rgba(96,165,250,0.3), rgba(37,99,235,0.1));
  border-color: rgba(147, 197, 253, 0.6);
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.4), 0 0 40px rgba(37, 99, 235, 0.18);
}
.gift-case.t4.lit {
  background: linear-gradient(155deg, rgba(192,132,252,0.32), rgba(124,58,237,0.12));
  border-color: rgba(216, 180, 254, 0.65);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.45), 0 0 44px rgba(124, 58, 237, 0.22);
}
.gift-case.t5.lit {
  background: linear-gradient(155deg, rgba(251,191,36,0.32), rgba(236,72,153,0.18));
  border-color: rgba(253, 224, 71, 0.7);
  box-shadow: 0 0 26px rgba(251, 191, 36, 0.5), 0 0 48px rgba(236, 72, 153, 0.22);
}
.gift-case.lane-work.lit {
  box-shadow:
    0 0 18px rgba(167, 139, 250, 0.4),
    0 0 32px rgba(129, 140, 248, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.gift-case.lane-life.lit {
  box-shadow:
    0 0 18px rgba(52, 211, 153, 0.4),
    0 0 32px rgba(34, 211, 238, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.gift-case.lane-love.lit {
  box-shadow:
    0 0 18px rgba(244, 114, 182, 0.42),
    0 0 32px rgba(251, 113, 133, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
@keyframes gift-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--gift-ring), 0 4px 14px var(--gift-glow), 0 0 18px var(--gift-glow); }
  50% { box-shadow: 0 0 0 3px var(--gift-ring), 0 6px 18px var(--gift-glow), 0 0 28px var(--gift-glow); }
}
.gift-name {
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gift-tier {
  display: inline;
  font-size: 0.58rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}
.gift-case.t2 .gift-tier { color: #6ee7b7; }
.gift-case.t3 .gift-tier { color: #7dd3fc; }
.gift-case.t4 .gift-tier { color: #d8b4fe; }
.gift-case.t5 .gift-tier { color: #fcd34d; }
.gift-count {
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.gift-star {
  font-size: 0.55rem;
  font-weight: 800;
  color: rgba(251, 191, 36, 0.75);
  letter-spacing: 0.02em;
}
.gift-today {
  font-size: 0.55rem;
  font-weight: 800;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 1px 5px;
  border-radius: 999px;
  margin-left: auto;
}
.gift-bar {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 3px;
  overflow: hidden;
}
.gift-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a78bfa, #f472b6, #fbbf24);
  transition: width 0.45s ease;
}
.gift-case.lane-work .gift-bar i { background: linear-gradient(90deg, #818cf8, #a78bfa, #c084fc); }
.gift-case.lane-life .gift-bar i { background: linear-gradient(90deg, #34d399, #22d3ee); }
.gift-case.lane-love .gift-bar i { background: linear-gradient(90deg, #f472b6, #fb7185, #fbbf24); }
.gift-next {
  font-size: 0.55rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.2;
}
.gift-count small { display: none; }
.gift-case.empty .gift-count { color: rgba(255, 255, 255, 0.4); }
.gift-case.empty .gift-name { color: rgba(255, 255, 255, 0.5); }
.gift-case.empty .gift-tier { color: rgba(255, 255, 255, 0.3); }

/* Composer — 固定在右侧面板底部，方便连续入账 */
.composer-wrap {
  position: relative;
  z-index: 12;
  flex-shrink: 0;
  margin-top: 10px;
  margin-bottom: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(35, 40, 56, 0.98) 70%, rgba(35, 40, 56, 0.88));
}
.composer-wrap .tag-row {
  margin-top: 0;
  margin-bottom: 10px;
}
.composer-wrap .next-nudge {
  margin-top: 0;
  margin-bottom: 6px;
}
.composer-wrap.hidden { display: none; }
.composer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(145deg, #383f56 0%, #2f3548 100%);
  border: 2px solid rgba(167, 139, 250, 0.55);
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.18),
    0 0 18px rgba(139, 92, 246, 0.28),
    0 0 32px rgba(244, 114, 182, 0.12),
    var(--shadow-sm);
  animation: composer-breathe 1.6s ease-in-out infinite;
}
.composer:focus-within {
  animation: none;
  border-color: rgba(196, 181, 253, 0.85);
  background: linear-gradient(145deg, #3d4560 0%, #343b52 100%);
  box-shadow:
    0 0 0 2px rgba(167, 139, 250, 0.35),
    0 0 22px rgba(139, 92, 246, 0.45),
    0 0 40px rgba(244, 114, 182, 0.2),
    var(--focus-ring);
}
@keyframes composer-breathe {
  0%, 100% {
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow:
      0 0 0 1px rgba(167, 139, 250, 0.12),
      0 0 12px rgba(139, 92, 246, 0.22),
      0 0 22px rgba(244, 114, 182, 0.08),
      var(--shadow-sm);
  }
  50% {
    border-color: rgba(244, 114, 182, 0.75);
    box-shadow:
      0 0 0 2px rgba(244, 114, 182, 0.28),
      0 0 22px rgba(167, 139, 250, 0.5),
      0 0 42px rgba(244, 114, 182, 0.28),
      0 8px 20px rgba(124, 58, 237, 0.18);
  }
}
.composer input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  /* ≥16px 避免 iOS 聚焦自动放大 */
  font-size: 16px;
  padding: 10px 8px;
  border-radius: 0;
}
.composer input::placeholder {
  color: rgba(196, 181, 253, 0.72);
  font-weight: 550;
}
.composer button {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #6366f1 40%, #db2777);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.28);
  animation: composer-btn-pulse 1.6s ease-in-out infinite;
}
.composer button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  animation: composer-btn-pulse 1.6s ease-in-out infinite;
}
.composer:focus-within button:not(:disabled) {
  animation: none;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45);
}
@keyframes composer-btn-pulse {
  0%, 100% { box-shadow: 0 6px 14px rgba(124, 58, 237, 0.25); filter: brightness(1); }
  50% { box-shadow: 0 8px 22px rgba(236, 72, 153, 0.45); filter: brightness(1.08); }
}
.composer.ritual { animation: ritual 0.55s ease; }
@keyframes ritual {
  0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4); }
  100% { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); }
}
@media (prefers-reduced-motion: reduce) {
  .composer,
  .composer button {
    animation: none !important;
  }
}
.next-nudge {
  margin-top: 8px;
  padding: 0 4px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(-4px);
  transition: 0.3s ease;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.next-nudge.show { opacity: 1; transform: none; }
.next-nudge em { font-style: normal; color: #f9a8d4; font-weight: 700; }
.kbd {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-soft);
}

.readonly-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.readonly-banner.show { display: flex; }
.readonly-banner button {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #67e8f9;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.12);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 2px;
  gap: 10px;
}
.section-title h2 { font-size: 0.9rem; font-weight: 750; color: var(--ink-soft); flex-shrink: 0; }
.section-title #list-meta,
.list-meta-btn {
  appearance: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(219, 39, 119, 0.35));
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 16px rgba(251, 191, 36, 0.28),
    0 0 28px rgba(167, 139, 250, 0.22);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.list-meta-btn.has-score:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.list-meta-btn:disabled {
  cursor: default;
  opacity: 0.75;
  filter: none;
  transform: none;
}
.list-meta-btn .meta-hint {
  margin-left: 4px;
  font-size: 0.62rem;
  font-weight: 750;
  color: rgba(253, 224, 71, 0.85);
  opacity: 0.9;
}
.list-meta-btn.has-score .meta-hint::before {
  content: "· ";
  opacity: 0.6;
}
.section-title #list-meta em,
.section-title #list-meta strong,
.list-meta-btn em,
.list-meta-btn strong {
  font-style: normal;
  font-weight: 900;
  color: #fde68a;
  text-shadow:
    0 0 8px rgba(251, 191, 36, 0.7),
    0 0 16px rgba(251, 191, 36, 0.4);
}

/* 积分明细弹层 */
.score-summary {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(251, 191, 36, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.score-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.score-summary-total span {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--ink-soft);
}
.score-summary-total strong {
  font-family: var(--mono);
  font-size: 1.55rem;
  font-weight: 900;
  color: #fde68a;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}
.score-summary-bits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-faint);
}
.score-ledger {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  padding-right: 2px;
  margin-bottom: 8px;
}
.score-row {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}
.score-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.score-row-top time {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-weight: 700;
}
.score-row-xp {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 900;
  color: #fde68a;
}
.score-row-xp.neg,
.score-summary-total strong.neg {
  color: #fecaca;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}
.score-row.is-penalty {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.08);
}
.score-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.score-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 650;
}
.score-table-row strong {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 900;
  color: #fde68a;
}
.score-table-row strong.pos { color: #86efac; }
.score-table-row strong.neg,
.score-table-row.penalty strong {
  color: #fecaca;
}
.score-table-row.penalty {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.1);
}
.score-row-text {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
  word-break: break-word;
}
.score-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.score-tag {
  font-size: 0.62rem;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.score-tag.combo {
  color: #e9d5ff;
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(139, 92, 246, 0.18);
}
.score-tag.seal {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.12);
}
.score-tag.multi {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.12);
}
.score-foot {
  font-size: 0.72rem !important;
  color: var(--ink-faint) !important;
  margin-bottom: 4px !important;
}

/* Timeline */
.timeline { position: relative; display: flex; flex-direction: column; gap: 10px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 22px; top: 8px; bottom: 8px;
  width: 2px;
  /* 上旧下新：线在底部更亮，对齐输入方向 */
  background: linear-gradient(to bottom, transparent, rgba(139,92,246,0.2) 30%, rgba(139,92,246,0.55));
  border-radius: 2px;
  pointer-events: none;
}
.timeline.dens-3::before, .timeline.dens-4::before {
  width: 3px;
  box-shadow: 0 0 14px rgba(139,92,246,0.35);
}
.timeline-day-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.timeline.dens-4 .timeline-day-banner {
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  border: none;
  color: #fff;
}
.timeline-day-banner .tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.card {
  position: relative;
  display: grid;
  /* 时间 | 正文 | 操作 | 积分（最右） */
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  gap: 4px 8px;
  padding: 14px 10px 14px 0;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: card-in 0.4s ease both;
  align-items: center;
}
/* 最新一笔：边框形状固定，光色顺时针绕圈跑 */
@property --latest-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.card.is-latest {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.18),
    0 8px 28px rgba(124, 58, 237, 0.16),
    0 0 20px rgba(251, 191, 36, 0.1);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), var(--bg-elevated) 42%, rgba(251, 191, 36, 0.05));
  z-index: 1;
}
.card.is-latest::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  /* 一截高亮光头 + 暗轨，角度动画 = 顺时针跑 */
  background: conic-gradient(
    from var(--latest-angle),
    rgba(99, 102, 241, 0.25) 0deg,
    rgba(99, 102, 241, 0.25) 280deg,
    #818cf8 300deg,
    #c4b5fd 320deg,
    #fbbf24 335deg,
    #f472b6 348deg,
    rgba(99, 102, 241, 0.25) 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: latest-spin 2.2s linear infinite;
  pointer-events: none;
  z-index: 5;
}
.card.is-latest .card-node {
  border-color: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25), 0 0 12px rgba(167, 139, 250, 0.45);
}
@keyframes latest-spin {
  to { --latest-angle: 360deg; }
}
@media (prefers-reduced-motion: reduce) {
  .card.is-latest::after { animation: none; }
}
.card .card-text { color: var(--ink); }
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #64748b;
}
.card.enter { animation: card-slam 0.65s cubic-bezier(0.22,1.2,0.36,1) both; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes card-slam {
  0% { opacity: 0; transform: translateY(-20px) scale(0.94); }
  60% { opacity: 1; transform: translateY(3px) scale(1.02); }
  100% { transform: none; }
}
.card.tier-1::before { background: #64748b; }
.card.tier-2::before { background: #818cf8; }
.card.tier-2 { background: linear-gradient(135deg, #242a40 50%, #272e4c); border-color: rgba(129,140,248,0.3); }
.card.tier-3::before { background: linear-gradient(#818cf8,#6366f1); width: 4px; }
.card.tier-3 { background: linear-gradient(135deg, #252b44 40%, #2a3258); border-color: rgba(99,102,241,0.38); }
.card.tier-4::before { background: linear-gradient(#a855f7,#ec4899); width: 4px; }
.card.tier-4 { background: linear-gradient(135deg, #2a2544, #34243e); border-color: rgba(167,139,250,0.38); }
.card.tier-5::before { background: linear-gradient(#6366f1,#ec4899,#f59e0b); width: 5px; }
.card.tier-5 { background: linear-gradient(135deg, #272d4c, #38243e); box-shadow: 0 8px 22px rgba(214,61,138,0.18); }
.card.tier-6 {
  background: linear-gradient(135deg, #4f46e5, #7c3aed 40%, #db2777);
  border: none;
  color: #fff;
  box-shadow: 0 14px 36px rgba(124,58,237,0.4);
}
.card.tier-6::before { display: none; }
.card.tier-6 .card-text, .card.tier-6 .card-time, .card.tier-6 .card-index { color: rgba(255,255,255,0.92); }
.card.tier-6 .tier-badge { background: rgba(255,255,255,0.2); color: #fff; }

.card-time-col { display: flex; flex-direction: column; align-items: center; z-index: 1; }
.card-node {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #2c3348;
  border: 2px solid #a5b4fc;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2);
}
.card.tier-4 .card-node, .card.tier-5 .card-node {
  border: none;
  background: linear-gradient(145deg, #c4b5fd, #ec4899);
  box-shadow: 0 0 0 4px rgba(236,72,153,0.2), 0 0 12px rgba(236,72,153,0.35);
}
.card.tier-6 .card-node {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.25);
}
.card-time {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  margin-top: 6px;
}
.card-text-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.card-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.96rem;
  line-height: 1.5;
  word-break: break-word;
}
/* 积分：卡片最右一列 */
.card-xp-col {
  display: grid;
  place-items: center;
  align-self: center;
  padding: 0 10px 0 4px;
  min-width: 0;
}
.card-xp {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fde68a;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(244, 114, 182, 0.16));
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.18);
  white-space: nowrap;
}
.card-xp.neg {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}
.congrats-banner .xp.neg {
  background: linear-gradient(135deg, #fecaca, #f87171);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.congrats-banner.is-penalty {
  border-color: rgba(248, 113, 113, 0.45);
}
.card-actions-spacer { width: 0; min-width: 0; overflow: hidden; }
.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.tier-badge.bonus-badge {
  color: #f9a8d4;
  border-color: rgba(244, 114, 182, 0.4);
  background: rgba(244, 114, 182, 0.12);
}
.card.tier-6 .card-xp {
  color: #fff7d6;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}
.card.tier-6 .tier-badge.bonus-badge {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}
.tier-badge {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.16);
  color: #ddd6fe;
  letter-spacing: 0;
}
.card-index { font-size: 0.66rem; color: var(--ink-faint); }
.card-actions { display: flex; opacity: 0; transition: opacity 0.15s; }
.card:hover .card-actions, .card:focus-within .card-actions { opacity: 1; }
.card-actions button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.card-actions button:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.card.tier-6 .card-actions button { color: rgba(255, 255, 255, 0.75); }
.card.tier-6 .card-actions button:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.card-actions svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.empty {
  text-align: center;
  padding: 28px 16px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: var(--surface-muted);
}
.empty h3 { font-size: 1.05rem; margin: 8px 0; }
.empty p { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.55; margin-bottom: 14px; }
.empty.quiet {
  padding: 40px 18px;
  border-style: dashed;
  background: transparent;
}
.empty.quiet p {
  margin: 0;
  letter-spacing: 0.02em;
}
.empty.quiet .empty-lead {
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--ink-soft);
}
.empty.quiet .empty-sub {
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--ink-faint);
  line-height: 1.45;
}
.igniters { display: flex; flex-direction: column; gap: 8px; }
.igniter {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}
.igniter:hover { border-color: rgba(109,79,214,0.3); background: rgba(109,79,214,0.06); }
.igniter small { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 0.72rem; }

/* FX */
.burst-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti {
  position: absolute; top: -12px;
  width: 8px; height: 12px; border-radius: 2px;
  opacity: 0;
  animation: confetti-fall var(--dur,1.8s) cubic-bezier(0.25,0.4,0.4,1) forwards;
  animation-delay: var(--delay,0s);
}
.confetti.round { width: 9px; height: 9px; border-radius: 50%; }
.confetti.ribbon { width: 4px; height: 14px; }
.confetti.coin {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 0 10px rgba(251,191,36,0.5);
}
@keyframes confetti-fall {
  0% { opacity: 0; transform: translate3d(0,-20px,0) rotate(0); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--dx),105vh,0) rotate(var(--rot)); }
}
.fx-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 38;
  opacity: 0; animation: glow 1.6s ease-out forwards;
  background: radial-gradient(ellipse 80% 50% at 50% 18%, rgba(167,139,250,0.22), transparent 65%);
}
.fx-glow.jackpot {
  background:
    radial-gradient(ellipse 90% 55% at 50% 12%, rgba(251,191,36,0.28), transparent 55%),
    radial-gradient(ellipse 60% 40% at 20% 40%, rgba(236,72,153,0.16), transparent 50%);
}
@keyframes glow { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }

.spin-overlay {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%);
  z-index: 46; pointer-events: none;
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 16px;
  background: rgba(28, 24, 18, 0.96);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  text-align: center;
  color: #fcd34d;
}
.spin-overlay .spin-label { font-size: 0.7rem; letter-spacing: 0; font-weight: 800; margin-bottom: 8px; }
.spin-reels { display: flex; justify-content: center; gap: 8px; font-size: 1.5rem; }
.spin-reels span {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 10px; background: #3a3018; border: 1px solid rgba(251,191,36,0.35);
  animation: reel 0.1s linear infinite;
}
@keyframes reel { 50% { transform: translateY(2px); filter: blur(0.6px); } }

.congrats-banner {
  position: fixed; left: 50%; top: 15%; transform: translateX(-50%);
  z-index: 48; pointer-events: none;
  width: min(260px, calc(100vw - 40px));
  padding: 16px 18px 14px;
  border-radius: 18px;
  text-align: center;
  background: rgba(36, 40, 56, 0.97);
  border: 1.5px solid rgba(167, 139, 250, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  animation: pop-toast 3.6s cubic-bezier(0.22,1,0.36,1) forwards;
  color: var(--ink);
}
.congrats-banner.compact { /* 入账结算气泡 */ }
.congrats-banner.rarity-uncommon { border-color: rgba(52, 211, 153, 0.45); }
.congrats-banner.rarity-rare { border-color: rgba(34, 211, 238, 0.45); }
.congrats-banner.rarity-epic { border-color: rgba(167, 139, 250, 0.5); }
.congrats-banner.rarity-legendary,
.congrats-banner.rarity-jackpot {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(165deg, #3a3220, #3a2a30 40%, #302438);
}
.congrats-banner .emoji {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 4px;
  line-height: 1.1;
}
.congrats-banner .title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink-soft);
  margin-bottom: 8px;
  line-height: 1.2;
}
.congrats-banner .xp-block {
  margin: 0 0 6px;
  padding: 8px 10px 6px;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
}
.congrats-banner .xp-label {
  font-size: 0.68rem;
  font-weight: 750;
  color: #fcd34d;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.congrats-banner .xp {
  font-size: 2.1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  background: linear-gradient(135deg, #fde68a, #fbbf24, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.congrats-banner .xp-detail {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-faint);
  line-height: 1.35;
  margin-bottom: 4px;
}
.congrats-banner .sub {
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.35;
  font-weight: 650;
  margin-top: 2px;
}
.rarity-pill,
.payout-row,
.congrats-banner .spark { display: none; }
.payout-chip {
  font-size: 0.7rem; font-weight: 800;
  padding: 4px 9px; border-radius: 999px;
  background: #0f172a; color: #fde68a;
}
.payout-chip.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; }
.payout-chip.multi { background: linear-gradient(135deg, #7c3aed, #db2777); color: #fff; }
@keyframes pop-toast {
  0% { opacity: 0; transform: translate(-50%, -12px) scale(0.92); }
  6% { opacity: 1; transform: translate(-50%, 2px) scale(1.03); }
  12% { transform: translate(-50%, 0) scale(1); }
  /* 中段长时间停留，够看清积分 */
  82% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -8px) scale(0.98); }
}

.toast {
  position: fixed; left: 50%; bottom: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(16px);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 0.86rem; font-weight: 700;
  padding: 11px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: 0.25s ease; z-index: 55;
  max-width: calc(100% - 32px);
  box-shadow: 0 10px 28px rgba(99,102,241,0.28);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 7, 14, 0.62);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(440px, 100%);
  max-height: min(86vh, 720px);
  max-height: min(86dvh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 20px;
  margin: 0;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.5);
}
@media (min-width: 520px) {
  .modal-backdrop { align-items: center; }
}
.modal h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.modal > p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.55; margin-bottom: 12px; }
.modal-rule { padding: 12px 0; border-bottom: 1px solid var(--line); }
.modal-rule:last-child { border-bottom: none; }
.modal-rule h4 { font-size: 0.88rem; margin-bottom: 4px; }
.modal-rule p { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.55; }
.modal-rule code {
  font-family: var(--mono); font-size: 0.72rem;
  background: rgba(167,139,250,0.16); color: #ddd6fe;
  padding: 1px 5px; border-radius: 4px;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.modal-tag {
  font-size: 0.7rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(167,139,250,0.16); color: #ddd6fe;
}
.modal-tag.amber { background: rgba(251,191,36,0.14); color: #fcd34d; }
.modal-tag.pink { background: rgba(244,114,182,0.14); color: #f9a8d4; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.modal-actions button {
  appearance: none; border: 1px solid var(--line);
  background: var(--panel-solid); color: var(--ink);
  font: inherit; font-size: 0.88rem; padding: 10px 14px;
  border-radius: 12px; cursor: pointer;
}
.modal-actions button.primary {
  border: none;
  background: linear-gradient(135deg, #6d4fd6, #5558d9);
  color: #fff; font-weight: 700;
}
.modal-actions button.danger { border: none; background: #d11f45; color: #fff; }
.edit-input {
  width: 100%; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px;
  font: inherit; font-size: 0.95rem;
  background: var(--surface-muted); color: var(--ink);
  margin-bottom: 12px; outline: none;
}
.edit-input:focus { border-color: rgba(124,58,237,0.4); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }

.pull-line {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.pull-line strong { color: #f9a8d4; }

.count.pop { animation: pop 0.45s cubic-bezier(0.22,1.3,0.36,1); }
@keyframes pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* —— 手机 / 平板竖屏：时间线优先 + 输入条吸底 —— */
@media (max-width: 899px) {
  .app {
    padding: 10px 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-top: max(10px, env(safe-area-inset-top));
    /* 给 fixed 输入条留空，避免遮挡时间线 */
    padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px));
  }

  .layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  /* 手机优先：时间线 + 入账，进度/展馆往下翻 */
  .col-right { order: 1; }
  .col-left { order: 2; }

  .hud {
    margin-bottom: 10px;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 6px 0 8px;
    background: linear-gradient(180deg, rgba(23, 26, 38, 0.96) 60%, rgba(23, 26, 38, 0.72) 100%);
    backdrop-filter: blur(10px);
  }

  .timeline-panel {
    min-height: 0;
    padding: 10px;
  }
  .timeline-scroll {
    min-height: 220px;
    max-height: none;
    /* 手机上让时间线随页面滚，而不是再套一层矮滚动区 */
    overflow: visible;
  }

  /* 输入区吸底：单手可写，键盘弹起时也更容易够到 */
  .composer-wrap:not(.hidden) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(
      to top,
      rgba(23, 26, 38, 0.98) 70%,
      rgba(23, 26, 38, 0.94)
    );
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
  }
  .composer-wrap .tag-row {
    gap: 8px;
    margin-bottom: 8px;
  }
  .tag-chip {
    min-height: 44px;
    font-size: 0.84rem;
    padding: 10px 8px;
  }
  .composer {
    padding: 8px;
    border-radius: 16px;
  }
  .composer input {
    font-size: 16px;
    padding: 12px 8px;
  }
  .composer button {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  .next-nudge .kbd { display: none; }

  .toast {
    bottom: calc(152px + env(safe-area-inset-bottom, 0px));
    z-index: 56;
  }

  .player {
    padding: 12px;
    margin-bottom: 10px;
    gap: 10px;
  }
  .avatar {
    width: 46px;
    height: 46px;
    font-size: 1.35rem;
    border-radius: 14px;
  }
  .player-title { font-size: 0.9rem; }
  .player-meta {
    gap: 6px 10px;
    font-size: 0.7rem;
  }

  .closure { padding: 12px; margin-bottom: 10px; }
  .ring-wrap,
  .ring-wrap svg {
    width: 58px;
    height: 58px;
  }

  .diff-rail { gap: 5px; }
  .diff-card {
    padding: 8px 3px 7px;
    min-height: 64px;
  }

  .loot-panel { margin-bottom: 10px; }
  .calendar { margin-bottom: 0; }

  .card-actions { opacity: 1; }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .readonly-banner {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .app {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-bottom: calc(176px + env(safe-area-inset-bottom, 0px));
  }
  .hud-gift {
    width: min(168px, 46vw);
    max-width: 168px;
    flex-basis: 168px;
    padding: 4px 8px;
    gap: 4px;
  }
  .hud-gift-gap { display: none; }
  .brand h1 { font-size: 1.05rem; }
  .icon-btn { width: 36px; height: 36px; }

  .diff-card .diff-n { display: none; }
  .diff-card { padding: 7px 3px 6px; gap: 2px; }
  .diff-card .diff-name { font-size: 0.68rem; }
  .diff-card .diff-icon { font-size: 0.98rem; }
  .gift-pedestal { width: 26px; height: 26px; font-size: 0.85rem; }
  .gift-case { padding: 6px 6px 5px; column-gap: 5px; }
  .day-chip { min-height: 74px; padding: 5px 2px 6px; }
  .heat-bar { min-height: 40px; max-height: 50px; width: 48%; }
  .day-chip .dom { font-size: 0.66rem; }

  .composer-wrap:not(.hidden) {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .toast {
    bottom: calc(160px + env(safe-area-inset-bottom, 0px));
    font-size: 0.82rem;
    padding: 10px 14px;
  }

  /* 极窄屏：顶栏图标可横滑，避免挤爆 */
  .hud-actions {
    max-width: none;
  }
  .player-meta span {
    white-space: nowrap;
  }
  .section-title h2 { font-size: 0.84rem; }
  .list-meta-btn {
    font-size: 0.7rem;
    padding: 5px 8px;
  }
}

/* 横屏手机：输入条别占太多高度 */
@media (max-width: 899px) and (max-height: 480px) and (orientation: landscape) {
  .app {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }
  .composer-wrap:not(.hidden) {
    padding-top: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .composer-wrap .next-nudge { display: none; }
  .tag-chip {
    min-height: 38px;
    padding: 6px 6px;
    font-size: 0.78rem;
  }
  .toast {
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }
}

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