/* ============ WhiteCat Idle — design tokens ============ */
:root {
  /* Pastel palette: muted dusty rose / mauve / sage */
  --bg: #f7f1ee;
  --bg-2: #efe5e1;
  --surface: #fdfaf8;
  --surface-2: #f5ecea;
  --ink: #4a4147;
  --ink-soft: #8a7e85;
  --ink-mute: #b3a8af;
  --line: #e3d3d0;
  --line-soft: #ede1de;

  --pink: #d9a7b3;        /* dusty rose */
  --pink-deep: #a87584;   /* deeper mauve */
  --pink-soft: #e6c2cb;
  --pink-bg: #f1dfe2;
  --lav: #b9a8c4;         /* muted lavender */
  --lav-soft: #d4c6dc;
  --lav-bg: #e6dde9;
  --mint: #a8c4b3;        /* sage */
  --butter: #e8d8a8;      /* muted butter */
  --sky: #b8c8d6;         /* dusty sky */

  /* Structural tokens — shared by both themes */
  --shadow-sm: 0 1px 2px rgba(120, 100, 110, 0.06), 0 2px 6px rgba(120, 100, 110, 0.05);
  --shadow-md: 0 2px 6px rgba(120, 100, 110, 0.08), 0 8px 22px rgba(120, 100, 110, 0.08);
  --shadow-lg: 0 4px 10px rgba(120, 100, 110, 0.10), 0 18px 40px rgba(120, 100, 110, 0.12);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --font-display: "Fredoka", "Quicksand", system-ui, sans-serif;
  --font-body: "Quicksand", system-ui, sans-serif;
  /* Baloo 2 ships real tabular figures (tnum); Fredoka does not, so numeric
     counters use this to keep digit width fixed and stop the chip jittering. */
  --font-number: "Baloo 2", "Fredoka", system-ui, sans-serif;
}

[data-theme="dark"] {
  /* Dusky pastel night */
  --bg: #1f1a1f;
  --bg-2: #292229;
  --surface: #2a232b;
  --surface-2: #322a32;
  --ink: #ede2e8;
  --ink-soft: #b8a8b3;
  --ink-mute: #7e7079;
  --line: #3d3340;
  --line-soft: #352d38;

  --pink: #c08c9a;
  --pink-deep: #d9a7b3;
  --pink-soft: #6a4a55;
  --pink-bg: #3a2a30;
  --lav: #a892b8;
  --lav-soft: #5a4a68;
  --lav-bg: #322840;
  --mint: #88a896;
  --butter: #b8a878;
  --sky: #9aabbf;
}

* { box-sizing: border-box; }

/* ===== Accessible focus ===== */
:focus-visible {
  outline: 2px solid var(--pink-deep);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Mouse clicks must not leave a focus ring — keyboard focus keeps the styled one. */
:focus:not(:focus-visible) {
  outline: none;
}

/* sr-only: visually hidden but readable by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button { font-family: inherit; color: inherit; }

/* ===== App shell ===== */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--pink-bg) 0%, transparent 50%),
    radial-gradient(900px 500px at 110% 110%, var(--lav-bg) 0%, transparent 55%),
    var(--bg);
}

/* ===== Sidebar ===== */
.sidebar {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(6px);
  /* Full-height column. Only the nav scrolls (see .nav) so card glows aren't clipped. */
  position: sticky;
  top: 0;
  height: 100vh;
}
/* Everything except the nav keeps its natural size; only the nav shrinks/scrolls.
   Without this, a tall sidebar squashes the gacha card and clips it. */
.sidebar > *:not(.nav) { flex-shrink: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
}
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--pink-soft), var(--lav-soft));
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.2px;
  line-height: 1;
}
.brand-sub {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Auth block */
.auth-block { margin-bottom: 14px; }
.auth-login {
  display: block;
  text-align: center;
  padding: 10px 12px;
  background: linear-gradient(135deg, #ff66aa, #ff4488);
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.auth-login:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 68, 136, 0.4); }
.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--card-bg, rgba(255,255,255,0.05));
  border-radius: 10px;
}
.auth-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.auth-info { flex: 1; min-width: 0; }
.auth-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-logout {
  background: none;
  border: none;
  color: var(--ink-mute);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  margin-top: 2px;
}
.auth-logout:hover { color: var(--ink); }

/* ===== Top bar (resources + account) ===== */
.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 36px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-res {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.res-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
}
.res-chip-ico {
  width: 24px; height: 24px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.res-chip-ico.pp { background: var(--pink-bg); color: var(--pink-deep); }
.res-chip-ico.fish { background: var(--lav-bg); color: #8765a8; }
.res-chip-ico.cb { background: #fff4d6; color: #c79b22; }
.res-chip-val {
  font-family: var(--font-number);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.res-chip-rate {
  font-family: var(--font-number);
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.topbar-account {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.topbar-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
.topbar-logout {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.topbar-logout:hover { border-color: var(--pink); color: var(--ink); }

/* Nav */
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
  /* Natural height — does not stretch. Shrinks and scrolls only on short screens. */
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 35%, transparent);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}
.nav-item:hover { background: var(--bg-2); color: var(--ink); border-color: var(--line); }
.nav-item.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.nav-item .nav-ico {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--pink-deep);
}
.nav-item.active .nav-ico { color: var(--pink-deep); }

.nav-badge {
  margin-left: auto;
  background: var(--pink);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  letter-spacing: 0.4px;
}

/* ===== Grouped nav (Build / Progress / Records) ===== */
.nav-group { position: relative; }
.nav-group-trigger .nav-chevron {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.5;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-group-trigger .nav-badge + .nav-chevron { margin-left: 6px; }
.nav-group[data-open="true"] .nav-chevron {
  transform: rotate(90deg);
  opacity: 0.9;
}
.nav-group.active > .nav-group-trigger {
  background: color-mix(in srgb, var(--pink) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--pink) 22%, var(--line-soft));
  color: var(--ink);
}
.nav-group.active > .nav-group-trigger .nav-ico { color: var(--pink-deep); }

/* Inline accordion: children render under the trigger, in the rail itself.
   Sub-items get their own subdued styling — no double-border with the parent
   group's outline, and a left rail to read as "nested". */
.nav-subs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 4px 0 4px 14px;
  padding-left: 10px;
  border-left: 2px solid color-mix(in srgb, var(--pink) 35%, transparent);
}
.nav-sub {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  border-color: transparent;
  background: transparent;
}
.nav-sub:hover { border-color: var(--line-soft); }
.nav-sub .nav-ico { width: 18px; height: 18px; }
.nav-sub.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

@media (max-width: 760px) {
  .nav-subs { margin-left: 8px; padding-left: 8px; }
  .nav-group-trigger .nav-chevron { display: none; }
}
/* Daily Map — loud when a pull is ready */
.nav-item.gacha-ready {
  border-color: var(--pink);
  color: var(--ink);
  /* Pulse via background only — no outward box-shadow, so .nav overflow can't clip it. */
  animation: gachaGlow 1.8s ease-in-out infinite;
}
.nav-item.gacha-ready .nav-ico { color: var(--pink-deep); }
.nav-badge.gacha {
  background: var(--pink);
  color: #fff;
}
@keyframes gachaGlow {
  0%, 100% { background: color-mix(in srgb, var(--pink) 14%, var(--surface)); }
  50%      { background: color-mix(in srgb, var(--pink) 34%, var(--surface)); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-item.gacha-ready {
    animation: none;
    background: color-mix(in srgb, var(--pink) 24%, var(--surface));
  }
}
/* Daily Map — muted on cooldown, shows the reset timer */
.nav-item.gacha-cd { opacity: 0.55; }
.nav-timer {
  margin-left: auto;
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.sidebar-footer {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.icon-btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.12s ease;
}
.icon-btn:hover { border-color: var(--pink); color: var(--pink-deep); }
.play-nap .nap-btn { margin-top: 12px; }
.nap-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--lav-soft);
  background: linear-gradient(180deg, #f7eefb, #efe1f6);
  color: #6b4a82;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: var(--shadow-sm);
}
.nap-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.nap-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.nap-hint {
  text-align: center;
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 8px;
}

/* ===== Main ===== */
.main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.main-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 36px 40px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  line-height: 1;
}
.page-sub {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 6px;
}

/* ===== Play screen ===== */
/* Cat + Nap on the left, Helpers and Quests beside them — everything in one row,
   full width (the page header stays flush left like every other tab). */
.play-row {
  display: grid;
  grid-template-columns: 420px 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.play-col-cat {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cat-stage {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-shadow: var(--shadow-md);
}

.stage-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, var(--pink-bg) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, var(--lav-bg) 0%, transparent 45%),
    var(--surface-2);
  pointer-events: none;
}

.stage-floor {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 110px;
  background: linear-gradient(180deg, transparent, var(--pink-bg) 80%);
  pointer-events: none;
}

.cat-wrap {
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.08s ease;
  /* 330px by design, but shrinks to fit narrow screens (cat SVG has a viewBox). */
  width: 330px;
  max-width: 100%;
}
.cat-wrap > svg {
  width: 100%;
  height: auto;
  display: block;
}
.cat-wrap:active { transform: scale(0.96); }
.cat-wrap.purring { animation: purr 1.6s ease-in-out infinite; }

@keyframes purr {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.01); }
}

.cat-floater {
  position: absolute;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--pink-deep);
  animation: floatUp 1.1s ease-out forwards;
  z-index: 3;
}
@keyframes floatUp {
  0% { transform: translate(-50%, 0) scale(0.7); opacity: 0; }
  20% { opacity: 1; transform: translate(-50%, -10px) scale(1.1); }
  100% { transform: translate(-50%, -90px) scale(1); opacity: 0; }
}

.cat-heart {
  position: absolute;
  pointer-events: none;
  animation: heartUp 1.4s ease-out forwards;
  z-index: 3;
}
@keyframes heartUp {
  0% { transform: translate(-50%, 0) scale(0.5) rotate(-10deg); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(-50%, -100px) scale(1.1) rotate(10deg); opacity: 0; }
}

.stage-info {
  position: absolute;
  top: 22px; left: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.cat-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}
.cat-mood {
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mood-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }

.stage-level {
  position: absolute;
  top: 22px; right: 22px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.level-pill {
  background: var(--pink);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  display: flex; align-items: center; gap: 6px;
}
.xp-bar {
  width: 180px;
  height: 8px;
  background: var(--pink-bg);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--pink-deep));
  border-radius: var(--r-pill);
  transition: width 0.3s ease;
}
.xp-text {
  font-family: var(--font-number);
  font-size: 11px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.stage-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line-soft);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--ink-soft);
  backdrop-filter: blur(4px);
}

/* Play tab — Nap card sits under the cat, filling the cat column */
.play-nap { width: 100%; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.panel-sub { font-size: 11px; color: var(--ink-mute); }

/* Helpers list (Play side panel) */
.helpers { display: flex; flex-direction: column; gap: 10px; }
.helper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.helper:hover:not(.locked) { background: var(--pink-bg); border-color: var(--pink-soft); }
.helper.locked { opacity: 0.5; cursor: not-allowed; }
.helper-ico {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--pink-bg);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.helper-mid { flex: 1; min-width: 0; }
.helper-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.helper-meta { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.helper-cost {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: var(--pink-deep);
  white-space: nowrap;
}
.helper-cost.cant { color: var(--ink-mute); }
.helper-count {
  background: var(--lav-bg);
  color: #6b4a82;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}

/* Quests */
.quest {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.quest:last-child { border-bottom: none; padding-bottom: 0; }
.quest:first-child { padding-top: 0; }
.quest-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quest-name { font-size: 13px; font-weight: 600; }
.quest-reward { font-size: 11px; color: var(--pink-deep); font-weight: 600; }
.quest-prog {
  height: 6px;
  background: var(--bg-2);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.quest-prog-fill {
  height: 100%;
  background: var(--mint);
  border-radius: var(--r-pill);
}
.quest.done .quest-prog-fill { background: var(--lav); }
.quest-meta { font-size: 11px; color: var(--ink-mute); }

/* ===== Skill tree ===== */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-branch {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.branch-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.branch-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
}
.branch-ico.rhythm { background: var(--pink-bg); color: var(--pink-deep); }
.branch-ico.cute { background: var(--lav-bg); color: #8765a8; }
.branch-ico.luck { background: #fff4d6; color: #c79b22; }
.branch-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.branch-desc { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }

.skill-node {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}
.skill-node:hover { background: var(--surface-2); border-color: var(--line-soft); }
.skill-node.locked { opacity: 0.45; cursor: not-allowed; }
.skill-node.maxed { background: var(--bg-2); }
.skill-node.affordable { background: var(--pink-bg); border-color: var(--pink-soft); }

.skill-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  display: grid; place-items: center;
}
.skill-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.skill-desc { font-size: 11px; color: var(--ink-soft); margin-top: 2px; line-height: 1.35; }
.skill-pips { display: flex; gap: 3px; margin-top: 6px; }
.skill-pip {
  width: 14px; height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.skill-pip.on { background: var(--pink-deep); }
.skill-cost {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: var(--pink-deep);
  text-align: right;
}
.skill-cost.maxed { color: var(--lav); }
.skill-cost.locked { color: var(--ink-mute); }

.skill-points-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(120deg, var(--pink-bg), var(--lav-bg));
  border: 1px solid var(--pink-soft);
  border-radius: var(--r-lg);
  margin-bottom: 22px;
}
.sp-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--pink-deep);
  line-height: 1;
}
.sp-meta { flex: 1; }
.sp-meta-title { font-weight: 600; font-size: 14px; }
.sp-meta-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* ===== Outfits ===== */
.outfit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.outfit-grid-muted { opacity: 0.55; pointer-events: none; }
.outfit-skin-notice {
  background: color-mix(in srgb, var(--butter) 30%, var(--surface));
  border: 1px dashed color-mix(in srgb, var(--butter) 60%, var(--ink));
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  color: var(--ink-soft);
}
.outfit.outfit-muted { cursor: not-allowed; }
.outfit {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.outfit:hover:not(.locked) { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.outfit.locked { opacity: 0.55; cursor: not-allowed; }
.outfit.equipped { border-color: var(--pink); border-width: 2px; padding: 15px; }
.outfit-thumb {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  display: grid; place-items: center;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.outfit-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.outfit-bonus { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.outfit-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.tag-equipped { background: var(--pink); color: white; }
.tag-locked { background: var(--bg-2); color: var(--ink-mute); }
.tag-new { background: var(--mint); color: #2e6a55; }

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1;
}
.stat-trend { font-size: 11px; color: var(--mint); margin-top: 6px; }
.stat-trend.dim { color: var(--ink-mute); }

.stat-section {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-top: 18px;
  box-shadow: var(--shadow-sm);
}
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13px;
}
.stat-row:last-child { border-bottom: none; }
.stat-row .lbl { color: var(--ink-soft); }
.stat-row .val { font-family: var(--font-display); font-weight: 600; }

/* ===== Leaderboard ===== */
.stat-row.lb-me {
  background: linear-gradient(90deg, rgba(255, 200, 220, 0.18), transparent);
  border-radius: 6px;
  padding-left: 6px; padding-right: 6px;
}
.stat-row.lb-me .lbl { color: var(--ink); }

.lb-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  margin-bottom: 16px;
}
.lb-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.lb-tab:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.lb-tab.lb-tab-active {
  background: var(--ink);
  color: var(--bg);
}
.lb-tab.lb-tab-active:hover { background: var(--ink); }

/* ===== Nap modal ===== */
.modal-veil {
  position: fixed; inset: 0;
  background: rgba(20, 14, 18, 0.45);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 480px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-cat { margin: 0 auto 18px; }
.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}
.modal-body { color: var(--ink-soft); font-size: 14px; margin: 10px 0 22px; line-height: 1.5; }
.modal-stat {
  display: flex; justify-content: center; gap: 24px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  margin-bottom: 22px;
}
.modal-stat-item .lbl { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 1px; }
.modal-stat-item .val { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--pink-deep); margin-top: 4px; }
.modal-actions { display: flex; gap: 10px; }
.btn {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.btn:hover { background: var(--bg-2); }
.btn.primary {
  background: linear-gradient(180deg, var(--pink), var(--pink-deep));
  color: white;
  border-color: var(--pink-deep);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ===== Toast ===== */
.toast-stack {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
}
.toast {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease;
  max-width: 280px;
}
@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast .toast-ico {
  width: 28px; height: 28px;
  border-radius: 9px;
  background: var(--pink-bg);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.toast-title { font-weight: 600; font-size: 13px; }
.toast-sub { font-size: 11px; color: var(--ink-soft); margin-top: 1px; }

/* Sparkles in stage bg */
.sparkle {
  position: absolute;
  pointer-events: none;
  animation: sparkleFloat 6s ease-in-out infinite;
  opacity: 0.5;
}
@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(-12px) rotate(180deg); opacity: 0.8; }
}

/* ===== Perma upgrades ===== */
.perma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.perma {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.perma.owned { background: var(--bg-2); cursor: default; opacity: 0.85; }
.perma.affordable { background: var(--pink-bg); border-color: var(--pink-soft); }
.perma:hover:not(.owned) { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.perma-ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--lav-bg);
  color: var(--pink-deep);
  display: grid; place-items: center;
}
.perma-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.perma-desc { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.perma-effect { font-size: 11px; color: var(--pink-deep); font-weight: 600; margin-top: 4px; }
.perma-cost {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--pink-deep);
  white-space: nowrap;
}
.perma-cost.owned { color: var(--mint); }
.perma-cost.cant { color: var(--ink-mute); }

/* ===== Theme toggle ===== */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  margin-top: 4px;
}
.theme-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ===== Events ===== */
/* shared accent helpers — pulled from existing tokens */
.event-pink   { --ev: var(--pink); --ev-deep: var(--pink-deep); --ev-bg: var(--pink-bg); --ev-soft: var(--pink-soft); }
.event-lav    { --ev: var(--lav); --ev-deep: #8765a8; --ev-bg: var(--lav-bg); --ev-soft: var(--lav-soft); }
.event-mint   { --ev: var(--mint); --ev-deep: #4a8a72; --ev-bg: #dceee4; --ev-soft: #b8d8c6; }
.event-butter { --ev: var(--butter); --ev-deep: #c79b22; --ev-bg: #fff4d6; --ev-soft: #f0dc9a; }
[data-theme="dark"] .event-mint   { --ev-bg: #2a3a32; --ev-soft: #4a6a56; --ev-deep: #a8d8c0; }
[data-theme="dark"] .event-butter { --ev-bg: #3a3220; --ev-soft: #5a5030; --ev-deep: #e8c878; }

.events-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.event-chip {
  flex: 1 1 220px;
  min-width: 220px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--ev-soft, var(--line));
  border-left: 3px solid var(--ev, var(--pink));
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  animation: chipIn 0.3s ease;
}
@keyframes chipIn {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.event-chip-ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--ev-bg, var(--pink-bg));
  color: var(--ev-deep, var(--pink-deep));
  display: grid; place-items: center;
}
.event-chip-mid { min-width: 0; }
.event-chip-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.event-chip-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.1;
  color: var(--ink);
}
.event-chip-time {
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ev-deep, var(--pink-deep));
}
.event-chip-desc {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 1px;
}
.event-chip-bar {
  margin-top: 6px;
  height: 4px;
  background: var(--bg-2);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.event-chip-fill {
  height: 100%;
  background: var(--ev, var(--pink));
  border-radius: var(--r-pill);
  transition: width 0.1s linear;
}

/* Click-to-claim popup pinned inside the stage */
.event-popup {
  position: absolute;
  top: 70px;
  right: 22px;
  z-index: 5;
  width: 200px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--ev-soft, var(--pink-soft));
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), 0 0 0 4px color-mix(in srgb, var(--ev, var(--pink)) 18%, transparent);
  text-align: center;
  cursor: pointer;
  animation: popupIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), popupBob 2.4s ease-in-out 0.4s infinite;
  user-select: none;
}
.event-popup:hover { transform: translateY(-2px); }
.event-popup:active { transform: translateY(0) scale(0.97); }

@keyframes popupIn {
  from { transform: scale(0.7) translateY(-10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes popupBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.event-popup-burst {
  position: absolute;
  inset: -20px;
  border-radius: var(--r-xl);
  background: radial-gradient(circle, color-mix(in srgb, var(--ev, var(--pink)) 30%, transparent) 0%, transparent 65%);
  pointer-events: none;
  animation: burstPulse 2s ease-in-out infinite;
  z-index: -1;
}
@keyframes burstPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.event-popup-close {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--bg-2);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  padding: 0;
}
.event-popup-close:hover { background: var(--line); color: var(--ink); }

.event-popup-ico {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--ev-bg, var(--pink-bg));
  color: var(--ev-deep, var(--pink-deep));
  display: grid; place-items: center;
  margin: 4px auto 8px;
  box-shadow: var(--shadow-sm);
}
.event-popup-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.event-popup-desc {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 3px;
  line-height: 1.35;
}
.event-popup-cta {
  margin: 10px 0 8px;
  padding: 7px 12px;
  background: linear-gradient(180deg, var(--ev, var(--pink)), var(--ev-deep, var(--pink-deep)));
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  border-radius: var(--r-pill);
}
.event-popup-bar {
  height: 4px;
  background: var(--bg-2);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 6px;
}
.event-popup-fill {
  height: 100%;
  background: var(--ev, var(--pink));
  transition: width 0.1s linear;
}
.event-popup-timer {
  margin-top: 4px;
  font-family: var(--font-number);
  font-size: 10px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* ===== Debug trigger in sidebar ===== */
.debug-trigger {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  color: var(--ink-mute);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.debug-trigger:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
  background: var(--bg-2);
}

/* ===== Debug panel modal ===== */
.debug-veil {
  position: fixed; inset: 0;
  background: rgba(20, 14, 18, 0.55);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 120;
  animation: fadeIn 0.18s ease;
  padding: 24px;
}
.debug-panel {
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.debug-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.debug-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--pink-deep);
}
.debug-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin-top: 4px;
}
.debug-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.debug-close {
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 20px;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid; place-items: center;
  line-height: 1;
  padding: 0;
}
.debug-close:hover { background: var(--bg-2); color: var(--ink); }

.debug-section { margin-top: 18px; }
.debug-section:first-of-type { margin-top: 0; }
.debug-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.debug-pill {
  background: var(--bg-2);
  color: var(--ink-soft);
  padding: 1px 8px;
  border-radius: var(--r-pill);
  font-size: 10px;
  letter-spacing: 0.6px;
}

.debug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.debug-gacha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}
.debug-tier-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 2px solid var(--line-soft);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.debug-tier-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  filter: brightness(1.05);
}
.debug-tier-btn:disabled { opacity: .5; cursor: default; }
.debug-tier-btn.active {
  box-shadow: 0 0 0 2px rgba(255,255,255,.3) inset, 0 6px 18px rgba(0,0,0,.18);
}
.debug-tier-stars {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -1px;
}
.debug-tier-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  opacity: .9;
}
.debug-tier-clear {
  border-color: var(--line);
  color: var(--ink-soft);
}
.debug-event-btn {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--ev, var(--pink));
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  color: var(--ink);
}
.debug-event-btn:hover {
  background: var(--ev-bg, var(--pink-bg));
  border-color: var(--ev-soft, var(--pink-soft));
  border-left-color: var(--ev, var(--pink));
  transform: translateY(-1px);
}
.debug-event-ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--ev-bg, var(--pink-bg));
  color: var(--ev-deep, var(--pink-deep));
  display: grid; place-items: center;
}
.debug-event-text { display: flex; flex-direction: column; min-width: 0; }
.debug-event-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.1;
}
.debug-event-desc {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.debug-event-tag {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ev, var(--pink)) 22%, transparent);
  color: var(--ev-deep, var(--pink-deep));
  white-space: nowrap;
}

.debug-cheats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.debug-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s ease;
}
.debug-btn:hover {
  background: var(--pink-bg);
  border-color: var(--pink-soft);
  color: var(--pink-deep);
}
.debug-btn.danger {
  color: #b54a4a;
  border-color: #e8c4c4;
  background: #fbeded;
  margin-left: auto;
}
[data-theme="dark"] .debug-btn.danger {
  color: #ff9a9a;
  border-color: #5a3030;
  background: #3a2222;
}
.debug-btn.danger:hover { background: #f5d8d8; }
[data-theme="dark"] .debug-btn.danger:hover { background: #4a2828; }

.debug-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-soft);
  font-size: 11px;
  color: var(--ink-mute);
  text-align: center;
}

/* small responsive */
@media (max-width: 1100px) {
  .play-row { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .event-popup { top: auto; right: 22px; bottom: 80px; }
}

/* ============ Stage decorations (one per perma upgrade owned) ============ */
.stage-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.decor {
  position: absolute;
  filter: drop-shadow(0 4px 8px rgba(80, 60, 70, 0.10));
  animation: decorFloatIn 600ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes decorFloatIn {
  0%   { opacity: 0; transform: translateY(8px) scale(0.6); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Strong celebratory entrance on first-purchase */
.decor.decor-pop {
  animation: decorPop 1100ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 4;
}
@keyframes decorPop {
  0%   { opacity: 0; transform: translateY(-30px) scale(0.2) rotate(-12deg); }
  35%  { opacity: 1; transform: translateY(0) scale(1.25) rotate(6deg); }
  55%  { transform: translateY(0) scale(0.92) rotate(-3deg); }
  75%  { transform: translateY(0) scale(1.06) rotate(1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
/* shared shimmer ring during pop */
.decor.decor-pop::before {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 2px solid var(--pink-deep);
  opacity: 0;
  animation: decorRing 1100ms ease-out;
}
@keyframes decorRing {
  0%   { transform: scale(0.3); opacity: 0; }
  20%  { opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* —— Pro Tablet (bottom-left, on floor) —— */
.decor-tablet {
  bottom: 18px;
  left: 22px;
  width: 96px;
  height: 64px;
}
.d-tablet-pad {
  position: absolute;
  inset: 8px 0 0 0;
  background: linear-gradient(160deg, #3a3540, #25212a);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.04);
}
.d-tablet-active {
  position: absolute;
  inset: 6px 18px 6px 6px;
  background: linear-gradient(160deg, var(--lav-soft), var(--pink-soft));
  border-radius: 4px;
  opacity: 0.75;
}
.d-tablet-led {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #a8d4b0;
  box-shadow: 0 0 6px #a8d4b0;
  animation: ledPulse 1.8s ease-in-out infinite;
}
@keyframes ledPulse { 0%,100%{opacity:.6} 50%{opacity:1} }
.d-tablet-pen {
  position: absolute;
  left: 70px;
  top: -2px;
  width: 36px;
  height: 6px;
  background: linear-gradient(90deg, var(--pink-deep) 0%, var(--pink-deep) 70%, #6b5560 70%, #6b5560 100%);
  border-radius: 6px;
  transform: rotate(-22deg);
  transform-origin: left center;
}
.d-tablet-pen::before {
  content: "";
  position: absolute;
  right: -6px; top: 0;
  width: 0; height: 0;
  border-left: 6px solid #6b5560;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

/* —— Custom Skin (top-right, sticky-note style) —— */
.decor-skin {
  top: 100px;
  right: 28px;
  width: 78px;
  height: 32px;
  background: var(--butter);
  border-radius: 4px;
  transform: rotate(6deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(180, 140, 50, 0.18);
}
.d-skin-tape {
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 32px; height: 10px;
  background: rgba(255,255,255,0.55);
  border-radius: 2px;
}
.d-skin-name {
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 12px;
  font-weight: 600;
  color: #8a6a14;
  letter-spacing: 0.5px;
}

/* —— Studio Headphones (top-left, hanging from a hook) —— */
.decor-headphones {
  top: 62px;
  left: 28px;
  width: 56px;
  height: 56px;
}
.d-hp-hook {
  position: absolute;
  top: 0; left: 50%;
  width: 8px; height: 8px;
  background: var(--ink-soft);
  border-radius: 50%;
  transform: translateX(-50%);
}
.d-hp-cord {
  position: absolute;
  top: 6px; left: 50%;
  width: 2px; height: 14px;
  background: var(--ink-soft);
  transform: translateX(-50%);
}
.d-hp-band {
  position: absolute;
  top: 18px; left: 6px;
  width: 44px; height: 22px;
  border: 4px solid #2a232a;
  border-bottom: none;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}
.d-hp-cup {
  position: absolute;
  top: 32px;
  width: 16px;
  height: 20px;
  background: linear-gradient(180deg, #3a323a, #1f1a1f);
  border-radius: 5px;
}
.d-hp-cup-l { left: 4px; }
.d-hp-cup-r { right: 4px; }
.d-hp-cup::after {
  content: "";
  position: absolute;
  inset: 3px 3px 6px;
  background: var(--pink-deep);
  border-radius: 3px;
  opacity: 0.6;
}

/* —— Energy Drink (bottom-right, on floor) —— */
.decor-energy {
  bottom: 22px;
  right: 32px;
  width: 32px;
  height: 56px;
}
.d-can {
  position: absolute;
  inset: 4px 0 0 0;
  background: linear-gradient(160deg, var(--mint) 0%, #88a892 100%);
  border-radius: 5px;
  box-shadow: inset -3px 0 0 rgba(0,0,0,0.10), inset 3px 0 0 rgba(255,255,255,0.18);
}
.d-can-top {
  position: absolute;
  top: 0; left: 2px; right: 2px;
  height: 4px;
  background: #8e9e92;
  border-radius: 3px 3px 0 0;
}
.d-can-stripe {
  position: absolute;
  left: 0; right: 0; top: 38%;
  height: 9px;
  background: var(--surface);
}
.d-can-bolt {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 14px;
  background: var(--pink-deep);
  clip-path: polygon(55% 0, 0 60%, 45% 60%, 25% 100%, 100% 35%, 55% 35%);
}

/* —— Cloud Saves (top center, floating) —— */
.decor-cloud {
  top: 50px;
  left: 50%;
  width: 80px;
  height: 38px;
  transform: translateX(-50%);
  animation: decorFloatIn 600ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards,
             cloudDrift 6s ease-in-out infinite;
}
@keyframes cloudDrift {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-6px); }
}
.d-cloud { position: absolute; inset: 0; }
.d-cloud-puff {
  position: absolute;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: 0 2px 0 var(--line) inset;
}
.d-cloud-puff.p1 { left: 0;   bottom: 0; width: 28px; height: 28px; }
.d-cloud-puff.p2 { left: 18px; bottom: 8px; width: 36px; height: 30px; }
.d-cloud-puff.p3 { right: 0;   bottom: 0; width: 28px; height: 24px; }
.d-cloud-puff.p4 { left: 32px; bottom: 14px; width: 28px; height: 24px; }

/* —— Supporter Tag (middle-right wall pin) —— */
.decor-supporter {
  top: 200px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.d-pin {
  width: 34px; height: 34px;
  background: linear-gradient(160deg, var(--pink-deep), #864e60);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(120, 60, 80, 0.25), inset 0 -2px 4px rgba(0,0,0,0.15), inset 0 2px 3px rgba(255,255,255,0.25);
}
.d-pin-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--pink-deep);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
}

/* —— Legendary Tablet (behind cat, big golden glow) —— */
.decor-legendary {
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  z-index: 1; /* sits behind cat (z 2) */
  filter: drop-shadow(0 0 18px rgba(232, 191, 90, 0.55));
}
.d-legend-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(232, 191, 90, 0.65) 0%, rgba(232, 191, 90, 0) 65%);
  animation: legendGlow 2.8s ease-in-out infinite;
}
@keyframes legendGlow {
  0%, 100% { transform: scale(1);   opacity: 0.85; }
  50%      { transform: scale(1.18); opacity: 1; }
}
.d-legend-ring {
  position: absolute;
  inset: 20px;
  border: 2px dashed rgba(232, 191, 90, 0.6);
  border-radius: 50%;
  animation: legendSpin 14s linear infinite;
}
@keyframes legendSpin { to { transform: rotate(360deg); } }
.d-legend-trophy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c79b22;
  text-shadow: 0 0 12px rgba(199, 155, 34, 0.5);
}
.d-legend-spark {
  position: absolute;
  color: #e8c44a;
  animation: legendSpark 2s ease-in-out infinite;
}
.d-legend-spark.s1 { top: 8px;  left: 22px;  animation-delay: 0s; }
.d-legend-spark.s2 { top: 30px; right: 14px; animation-delay: 0.6s; }
.d-legend-spark.s3 { bottom: 18px; left: 38px; animation-delay: 1.2s; }
@keyframes legendSpark {
  0%, 100% { opacity: 0.2; transform: scale(0.6); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

/* —— First-purchase "New on stage" banner —— */
.decor-unlock-banner {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-md);
  animation: bannerIn 4200ms ease;
  z-index: 5;
}
.decor-unlock-banner .dub-spark {
  color: var(--pink-deep);
  font-size: 14px;
  animation: bannerSpin 1.2s ease-in-out infinite;
}
.decor-unlock-banner .dub-name {
  color: var(--pink-deep);
  background: var(--pink-bg);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
}
@keyframes bannerIn {
  0%   { opacity: 0; transform: translate(-50%, -16px); }
  10%  { opacity: 1; transform: translate(-50%, 0); }
  85%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}
@keyframes bannerSpin {
  0%, 100% { transform: scale(1) rotate(0); }
  50%      { transform: scale(1.3) rotate(180deg); }
}

/* ===== Beatmap Collection tab ===== */
.collection-tab { padding: 18px 22px 40px; }
.collection-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.collection-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--pink-deep);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 4px;
}
.collection-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}
.collection-stats { display: flex; gap: 16px; }
.cs-cell {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 8px 14px;
  text-align: center;
  min-width: 70px;
}
.cs-val { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.cs-lbl {
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-mute);
  margin-top: 2px;
}

.collection-filters {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
  align-items: center;
}
.coll-filter {
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  cursor: pointer;
  transition: transform .12s ease, filter .15s ease;
}
.coll-filter:hover { transform: translateY(-1px); filter: brightness(1.05); }
.coll-filter.active { color: #fff; }
.coll-sort {
  margin-left: auto;
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 2px;
}
.coll-sort-btn {
  padding: 4px 12px;
  background: transparent;
  border: none;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.coll-sort-btn.active {
  background: var(--pink-deep);
  color: #fff;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.coll-card {
  position: relative;
  background: var(--surface-2);
  border: 2px solid var(--pink);
  border-radius: var(--r-lg);
  padding: 14px 14px 12px;
  overflow: hidden;
  transition: transform .15s cubic-bezier(.34,1.4,.64,1), box-shadow .2s ease;
  cursor: default;
}
.coll-card:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 12px 28px var(--tier-glow), 0 0 0 1px var(--tier-color) inset;
}
.coll-card-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--tier-color) 16%, transparent),
    transparent 60%);
  pointer-events: none;
}
.coll-card-legendary {
  position: absolute;
  top: 8px; right: 10px;
  color: #ffd24a;
  font-size: 16px;
  text-shadow: 0 0 10px rgba(255, 210, 74, .8);
  z-index: 2;
  animation: collLegendaryGlow 2s ease-in-out infinite;
}
.coll-card.is-legendary {
  border-color: #ffd24a;
  box-shadow: 0 0 18px rgba(255, 138, 0, .25);
}
.coll-card-tier {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  font-weight: 700;
  margin-bottom: 8px;
}
.coll-card-stars { font-size: 18px; letter-spacing: -1px; }
.coll-card-tname {
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.coll-card-artist {
  position: relative;
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.coll-card-title {
  position: relative;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin: 2px 0;
}
.coll-card-title a { color: inherit; text-decoration: none; }
.coll-card-title a:hover { color: var(--tier-color); }
.coll-card-mapper {
  position: relative;
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.coll-card-meta {
  position: relative;
  display: flex; gap: 6px; align-items: center;
  font-family: var(--font-number);
  font-size: 11px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.coll-card-mod {
  background: var(--pink-bg);
  color: var(--pink-deep);
  padding: 1px 6px;
  border-radius: var(--r-pill);
  font-weight: 700;
  letter-spacing: .04em;
}
.coll-card-date {
  position: relative;
  font-family: var(--font-number);
  font-size: 10px;
  color: var(--ink-mute);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.collection-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  padding: 80px 20px;
  text-align: center;
  color: var(--ink-soft);
}
.collection-empty-ico { color: var(--pink); opacity: .5; margin-bottom: 8px; }
.collection-empty-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.collection-empty-sub { font-size: 13px; }

@keyframes collLegendaryGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 210, 74, .6); transform: scale(1); }
  50%      { text-shadow: 0 0 16px rgba(255, 210, 74, 1); transform: scale(1.15); }
}

/* ===== Daily Gacha ===== */
@property --gacha-ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.gacha-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  margin: 10px 0 14px;
  background:
    radial-gradient(circle at 18% 24%, rgba(228,74,131,.18) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 70%, rgba(192,116,255,.16) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 18%, rgba(255,210,74,.22) 0 1px, transparent 2px),
    linear-gradient(135deg, var(--pink-bg), var(--lav-bg));
  border: 2px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease, filter .2s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}
.gacha-card:active { transform: translateY(0) scale(.97) !important; transition: transform .05s ease; }

.gacha-card.ready {
  background:
    radial-gradient(circle at 18% 24%, rgba(228,74,131,.18) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 70%, rgba(192,116,255,.16) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 18%, rgba(255,210,74,.22) 0 1px, transparent 2px),
    linear-gradient(135deg, var(--pink-bg), #fff3f8, var(--lav-bg), var(--pink-bg)) padding-box,
    conic-gradient(from var(--gacha-ang),
      #ff7aa8, #c074ff, #66ccff, #7be4a3, #ffe066, #ffa86b, #ff7aa8) border-box;
  background-size: 100%, 100%, 100%, 280% 280%, 100%;
  box-shadow:
    0 6px 22px rgba(228,74,131,.28),
    0 0 0 1px rgba(255,255,255,.4) inset;
  animation:
    gachaIdle 6.5s ease-in-out infinite,
    gachaCardGradient 7s ease-in-out infinite,
    gachaBorderSpin 4s linear infinite;
}
.gacha-card.ready:hover {
  transform: translateY(-3px) scale(1.025) rotate(-.4deg);
  box-shadow:
    0 16px 38px rgba(228,74,131,.5),
    0 0 0 2px rgba(228,74,131,.25),
    0 0 24px rgba(192,116,255,.4);
  filter: saturate(1.15) brightness(1.04);
}
.gacha-card.ready::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 28%, rgba(255,255,255,.7) 50%, transparent 72%);
  animation: gachaShine 2.2s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.gacha-card.ready::after {
  content: "✦";
  position: absolute;
  bottom: 9px; right: 12px;
  color: #fff;
  font-size: 15px;
  opacity: .85;
  animation: gachaSparkleFloat 1.8s ease-in-out infinite;
  pointer-events: none;
  text-shadow:
    0 0 8px rgba(228,74,131,.9),
    0 0 16px rgba(192,116,255,.6);
}
.gacha-card.done {
  opacity: .68; cursor: default;
  border-color: var(--line);
  background: linear-gradient(135deg, var(--pink-bg), var(--lav-bg));
  animation: none;
}
.gacha-card-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.gacha-card-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--pink-deep); }
.gacha-card-streak {
  background: var(--butter); color: #8a6a14;
  padding: 1px 7px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0;
  text-transform: none;
}
.gacha-card-title {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  position: relative;
}
.gacha-card.ready .gacha-card-title {
  background: linear-gradient(90deg, #d62674, #c074ff, #66ccff, #ffe066, #d62674);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gachaTitleShimmer 5s linear infinite;
}
[data-theme="dark"] .gacha-card.ready .gacha-card-title {
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
  text-shadow:
    0 0 1px rgba(0,0,0,.8),
    0 1px 3px rgba(0,0,0,.7),
    0 0 12px rgba(228,74,131,.55);
  font-weight: 800;
}
[data-theme="dark"] .gacha-card.ready {
  background:
    radial-gradient(circle at 18% 24%, rgba(255,180,210,.22) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 70%, rgba(200,160,255,.2) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 18%, rgba(255,230,140,.25) 0 1px, transparent 2px),
    linear-gradient(135deg, #3a2535, #2c2440, #4a2c4a, #3a2535) padding-box,
    conic-gradient(from var(--gacha-ang),
      #ff7aa8, #c074ff, #66ccff, #7be4a3, #ffe066, #ffa86b, #ff7aa8) border-box;
  background-size: 100%, 100%, 100%, 280% 280%, 100%;
}
[data-theme="dark"] .gacha-card.ready .gacha-card-sub {
  color: #d8c0d0;
}
[data-theme="dark"] .gacha-card.ready .gacha-card-cta {
  color: #ff9ec0;
}
[data-theme="dark"] .gacha-card.ready .gacha-card-dot {
  background: #ff9ec0;
}
.gacha-card-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.gacha-card-foot { margin-top: 8px; font-size: 11px; }
.gacha-card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--pink-deep); font-weight: 700; letter-spacing: .12em;
  animation: gachaCtaShift 2.2s ease-in-out infinite;
}
.gacha-card-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pink-deep);
  box-shadow: 0 0 0 0 rgba(228,74,131,.7);
  animation: gachaPulse 1.2s ease-in-out infinite;
}
.gacha-card-timer { color: var(--ink-mute); }

@keyframes gachaShine {
  0% { transform: translateX(-120%); }
  60%, 100% { transform: translateX(120%); }
}
@keyframes gachaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(228,74,131,.75); transform: scale(1); }
  60%  { box-shadow: 0 0 0 10px rgba(228,74,131,0); transform: scale(1.25); }
  100% { box-shadow: 0 0 0 0 rgba(228,74,131,0); transform: scale(1); }
}
@keyframes gachaBreath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.012); }
}
@keyframes gachaIdle {
  0%, 84%, 100% { transform: scale(1) rotate(0deg); }
  46%           { transform: scale(1.018) rotate(0deg); }
  88%           { transform: scale(1.03) rotate(-2deg); }
  91%           { transform: scale(1.03) rotate(2.2deg); }
  94%           { transform: scale(1.03) rotate(-1.4deg); }
  97%           { transform: scale(1.02) rotate(.8deg); }
}
@keyframes gachaBorderSpin {
  to { --gacha-ang: 360deg; }
}
@keyframes gachaTitleShimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes gachaCardGradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes gachaSparkleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); opacity: .55; }
  50%      { transform: translateY(-3px) rotate(20deg) scale(1.25); opacity: 1; }
}
@keyframes gachaCtaShift {
  0%, 100% { color: var(--pink-deep); text-shadow: none; }
  50%      { color: #e44a83; text-shadow: 0 0 8px rgba(228,74,131,.4); }
}

/* Modal */
.gacha-veil {
  position: fixed; inset: 0;
  background: rgba(20, 14, 22, .55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 60;
  padding: 20px;
}
.gacha-modal {
  --tier-color: var(--pink-deep);
  --tier-glow: var(--pink);
  position: relative;
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  text-align: center;
}
.gacha-close {
  position: absolute; top: 10px; right: 12px;
  background: transparent; border: none;
  font-size: 22px; line-height: 1;
  color: var(--ink-soft); cursor: pointer;
}
.gacha-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--pink-deep);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 6px;
}
.gacha-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.gacha-body { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 14px; }

.gacha-odds {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin-bottom: 14px;
  text-align: left;
}
.gacha-odd-row {
  display: grid; grid-template-columns: 80px 1fr auto;
  align-items: center; gap: 8px;
  font-size: 12px;
}
.gacha-odd-stars { font-weight: 700; letter-spacing: -1px; }
.gacha-odd-name { color: var(--ink); }
.gacha-odd-weight { font-family: var(--font-number); color: var(--ink-mute); font-variant-numeric: tabular-nums; }

.gacha-streak-banner {
  background: var(--butter); color: #6a4f12;
  padding: 8px 12px; border-radius: var(--r-md);
  font-size: 12px; margin-bottom: 12px;
}

.gacha-pull-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 13px 16px;
  border: none; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--pink-deep), var(--lav), var(--pink-deep));
  background-size: 200% 100%;
  color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(168,117,132,.35);
  transition: transform .12s ease, box-shadow .2s ease;
  overflow: hidden;
  animation: gachaBtnGradient 4s ease-in-out infinite;
}
.gacha-pull-btn::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: gachaShine 2.8s ease-in-out infinite 1s;
  pointer-events: none;
}
.gacha-pull-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(228,74,131,.55);
}
.gacha-pull-btn:active { transform: translateY(0) scale(.98); transition: transform .05s ease; }
.gacha-claim-btn {
  background: linear-gradient(135deg, var(--tier-color), var(--tier-glow), var(--tier-color));
  background-size: 200% 100%;
}
@keyframes gachaBtnGradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ===== Spin phase — orb crescendo (anticipation → peak → burst) =====
   Pattern: slow charge builds dopamine, single peak shake locks tier color,
   one bright flash reveals card. No strobing, no constant tier flicker. */
.gacha-orb-stage {
  --final-color: #ff7aa8;
  --final-glow: #d62674;
  --neutral-color: #c8b6d4;
  --neutral-glow: #a875d4;
  position: relative;
  height: 260px;
  display: flex; align-items: center; justify-content: center;
  margin: 14px 0 10px;
  overflow: hidden;
  border-radius: var(--r-md);
}

/* Dimming veil — quiet the surroundings during charge */
.gacha-orb-veil {
  position: absolute; inset: -20px;
  background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(20,14,22,.55) 80%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease;
}
.sub-charge .gacha-orb-veil { opacity: .9; transition-duration: 1.4s; }
.sub-peak   .gacha-orb-veil { opacity: 1; }
.sub-burst  .gacha-orb-veil { opacity: 0; transition-duration: .15s; }

/* Core orb — single element, no swap, breathes during charge */
.gacha-orb-core {
  position: absolute;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%,
    #fff 0%,
    color-mix(in srgb, var(--orb-color, var(--neutral-color)) 60%, #fff) 18%,
    var(--orb-color, var(--neutral-color)) 55%,
    color-mix(in srgb, var(--orb-color, var(--neutral-color)) 60%, #000) 100%);
  box-shadow:
    0 0 30px var(--orb-glow, var(--neutral-glow)),
    0 0 0 1px rgba(255,255,255,.4) inset;
  transform: scale(0);
  opacity: 0;
  transition: background 1s ease, box-shadow .8s ease;
}
.sub-charge .gacha-orb-core {
  --orb-color: var(--neutral-color);
  --orb-glow: var(--neutral-glow);
  animation: orbCharge 3s cubic-bezier(.34,1.05,.64,1) forwards;
}
.sub-peak .gacha-orb-core {
  --orb-color: var(--final-color);
  --orb-glow: var(--final-glow);
  transform: scale(1.05);
  opacity: 1;
  animation: orbPeakShake .12s ease-in-out infinite;
  box-shadow:
    0 0 60px var(--final-glow),
    0 0 120px var(--final-glow),
    0 0 0 2px rgba(255,255,255,.5) inset;
}
.sub-burst .gacha-orb-core {
  --orb-color: var(--final-color);
  --orb-glow: var(--final-glow);
  animation: orbBurst .4s cubic-bezier(.55,0,.8,1) forwards;
}

/* Halo — soft glow behind orb, grows with charge */
.gacha-orb-halo {
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--halo-color, var(--neutral-glow)) 0%, transparent 65%);
  opacity: 0;
  transition: background .8s ease;
  filter: blur(8px);
  pointer-events: none;
}
.sub-charge .gacha-orb-halo {
  --halo-color: var(--neutral-glow);
  animation: orbHaloCharge 3s ease-out forwards;
}
.sub-peak .gacha-orb-halo {
  --halo-color: var(--final-glow);
  opacity: .55;
  animation: orbHaloPulse 1.4s ease-in-out infinite;
}
.sub-burst .gacha-orb-halo {
  --halo-color: var(--final-glow);
  animation: orbHaloBurst .4s ease-out forwards;
}

/* Ring — thin concentric circle, slowly tightens during charge */
.gacha-orb-ring {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid var(--ring-color, var(--neutral-glow));
  opacity: 0;
  transition: border-color .8s ease;
  pointer-events: none;
}
.sub-charge .gacha-orb-ring {
  --ring-color: var(--neutral-glow);
  animation: orbRingTighten 3s ease-out forwards;
}
.sub-peak .gacha-orb-ring {
  --ring-color: var(--final-color);
  opacity: .7;
  width: 110px; height: 110px;
}
.sub-burst .gacha-orb-ring { opacity: 0; }

/* Inward-converging particles — energy gathering into orb */
.gacha-orb-particles {
  position: absolute; inset: 0;
  pointer-events: none;
}
.gacha-orb-particle {
  position: absolute; top: 50%; left: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--particle-color, var(--neutral-glow));
  margin: -2px 0 0 -2px;
  opacity: 0;
  box-shadow: 0 0 6px currentColor;
  color: var(--particle-color, var(--neutral-glow));
  transition: background .6s ease;
}
.sub-charge .gacha-orb-particle {
  --particle-color: var(--neutral-glow);
  animation: orbParticleConverge 2.7s ease-in forwards;
}
.sub-peak .gacha-orb-particle,
.sub-burst .gacha-orb-particle { opacity: 0; }

.p-0 { --pa: 0deg;   animation-delay: 0s; }
.p-1 { --pa: 45deg;  animation-delay: .2s; }
.p-2 { --pa: 90deg;  animation-delay: .4s; }
.p-3 { --pa: 135deg; animation-delay: .1s; }
.p-4 { --pa: 180deg; animation-delay: .5s; }
.p-5 { --pa: 225deg; animation-delay: .25s; }
.p-6 { --pa: 270deg; animation-delay: .35s; }
.p-7 { --pa: 315deg; animation-delay: .15s; }

/* White flash at burst — one frame, single moment of payoff */
.gacha-orb-flash {
  position: absolute; inset: -40px;
  background: radial-gradient(circle, #fff 0%, color-mix(in srgb, var(--final-color) 70%, #fff) 30%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.sub-burst .gacha-orb-flash {
  animation: orbFlash .4s ease-out forwards;
}

.gacha-spin-hint {
  color: var(--ink-mute); font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  min-height: 18px;
  transition: color .3s ease;
}

/* ===== Keyframes ===== */
@keyframes orbCharge {
  0%   { transform: scale(0);    opacity: 0; }
  20%  { transform: scale(.65);  opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes orbHaloCharge {
  0%   { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1);  opacity: .55; }
}
@keyframes orbHaloPulse {
  0%, 100% { transform: scale(1);    opacity: .5; }
  50%      { transform: scale(1.12); opacity: .75; }
}
@keyframes orbHaloBurst {
  0%   { transform: scale(1);   opacity: .8; }
  100% { transform: scale(2.5); opacity: 0; }
}
@keyframes orbRingTighten {
  0%   { transform: scale(1.4); opacity: 0;   border-width: 2px; }
  60%  { opacity: .6; }
  100% { transform: scale(.7);  opacity: .7;  border-width: 1px; }
}
@keyframes orbPeakShake {
  0%, 100% { transform: scale(1.05) translate(0, 0); }
  25%      { transform: scale(1.06) translate(-1px, 1px); }
  50%      { transform: scale(1.07) translate(1px, -1px); }
  75%      { transform: scale(1.06) translate(-1px, -1px); }
}
@keyframes orbBurst {
  0%   { transform: scale(1.05); opacity: 1;   filter: brightness(1.5); }
  40%  { transform: scale(1.6);  opacity: 1;   filter: brightness(2.5); }
  100% { transform: scale(3.5);  opacity: 0;   filter: brightness(3); }
}
@keyframes orbFlash {
  0%   { opacity: 0;   transform: scale(.5); }
  20%  { opacity: .95; transform: scale(1.1); }
  100% { opacity: 0;   transform: scale(1.5); }
}
@keyframes orbParticleConverge {
  0% {
    transform: rotate(var(--pa)) translateX(140px) rotate(calc(var(--pa) * -1)) scale(1);
    opacity: 0;
  }
  20% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    transform: rotate(var(--pa)) translateX(0) rotate(calc(var(--pa) * -1)) scale(.4);
    opacity: 0;
  }
}

/* Reveal */
.gacha-burst {
  position: absolute; inset: -20px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, var(--tier-glow) 0%, transparent 55%);
  opacity: .35;
  animation: gachaBurst .9s ease-out;
}
.gacha-burst::before {
  content: "";
  position: absolute; inset: -10%;
  background: conic-gradient(from 0deg,
    transparent 0deg, var(--tier-color) 8deg, transparent 22deg,
    transparent 60deg, var(--tier-glow) 68deg, transparent 82deg,
    transparent 120deg, var(--tier-color) 128deg, transparent 142deg,
    transparent 180deg, var(--tier-glow) 188deg, transparent 202deg,
    transparent 240deg, var(--tier-color) 248deg, transparent 262deg,
    transparent 300deg, var(--tier-glow) 308deg, transparent 322deg);
  mask: radial-gradient(circle at 50% 38%, transparent 18%, #000 28%, #000 60%, transparent 75%);
  -webkit-mask: radial-gradient(circle at 50% 38%, transparent 18%, #000 28%, #000 60%, transparent 75%);
  opacity: .55;
  animation: gachaRays 1.6s ease-out, gachaSpin 8s linear infinite;
  filter: blur(2px);
}
@keyframes gachaBurst {
  from { transform: scale(.6); opacity: 0; }
  60%  { opacity: .55; }
  to   { transform: scale(1.0); opacity: .35; }
}
@keyframes gachaRays {
  0%   { transform: scale(.3) rotate(-30deg); opacity: 0; }
  30%  { opacity: .7; }
  100% { transform: scale(1) rotate(0deg); opacity: .55; }
}
.gacha-reveal-card {
  position: relative;
  border: 2px solid var(--tier-color);
  border-radius: var(--r-lg);
  padding: 18px 16px 14px;
  background: var(--surface-2);
  box-shadow: 0 0 30px var(--tier-glow);
  margin: 8px 0 14px;
  overflow: hidden;
}
.gacha-reveal-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tier-color) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.gacha-reveal-tier {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700;
}
.gacha-reveal-stars { font-size: 22px; letter-spacing: -1px; }
.gacha-reveal-tname { font-family: var(--font-display); font-size: 15px; text-transform: uppercase; letter-spacing: .12em; }
.gacha-reveal-artist {
  position: relative;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 8px;
}
.gacha-reveal-title {
  position: relative;
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  margin: 2px 0 2px;
  line-height: 1.15;
}
.gacha-reveal-version {
  position: relative;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}
.gacha-reveal-mapper { position: relative; color: var(--ink-soft); font-size: 12px; margin: 2px 0 12px; }
.gacha-reveal-meta {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 10px;
}
.grm-cell {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 6px 4px;
}
.grm-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); }
.grm-val { font-family: var(--font-display); font-weight: 700; font-size: 14px; margin-top: 2px; }
.grm-mod { color: var(--pink-deep); }
.gacha-reveal-flair {
  position: relative;
  font-style: italic; font-size: 12px;
}

.gacha-rewards {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 14px;
}
.gacha-reward {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 8px 12px;
  text-align: left;
}
.gacha-reward-hot {
  border-color: var(--tier-color);
  box-shadow: 0 0 14px var(--tier-glow);
}
.gr-ico { color: var(--pink-deep); display: flex; }
.gacha-reward-hot .gr-ico { color: var(--tier-color); }
.gr-val { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.gr-sub { font-size: 11px; color: var(--ink-soft); }

/* Legendary beatmap accents */
.gacha-reveal-card.is-legendary {
  box-shadow: 0 0 36px var(--tier-glow), 0 0 6px #ffd24a inset;
  animation: legendaryPulse 2.4s ease-in-out infinite;
}
.gacha-legendary-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: linear-gradient(135deg, #ffd24a, #ff8a00);
  color: #2a1a00;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .18em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 14px rgba(255, 138, 0, .5);
  z-index: 3;
}
@keyframes legendaryPulse {
  0%, 100% { box-shadow: 0 0 30px var(--tier-glow), 0 0 4px #ffd24a inset; }
  50%      { box-shadow: 0 0 48px var(--tier-glow), 0 0 10px #ffd24a inset; }
}

/* ============== Rank Up tab (Layer 2) ============== */
.rank-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.rank-stat {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.rank-stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--pink-deep);
}
.rank-stat-label {
  font-size: 12px;
  color: var(--ink);
  opacity: 0.6;
  margin-top: 4px;
}
.rank-gate {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}
.gate-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 13px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 600;
}
.gate-row.met {
  background: color-mix(in srgb, var(--mint) 22%, var(--surface));
  border-color: var(--mint);
}
.rank-btn { width: 100%; justify-content: center; }
.rank-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.profile-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--line-soft);
}
.profile-ico {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--pink-deep);
  flex-shrink: 0;
}
.profile-mid { flex: 1; min-width: 0; }
.profile-name { font-weight: 700; font-size: 14px; }
.profile-lvl {
  font-size: 12px;
  font-weight: 600;
  color: var(--pink-deep);
  margin-left: 6px;
}
.profile-desc { font-size: 12px; opacity: 0.6; margin-top: 2px; }
.profile-effect {
  font-size: 12px;
  font-weight: 600;
  color: var(--pink-deep);
  margin-top: 3px;
}
.profile-ctl { display: flex; gap: 6px; flex-shrink: 0; }
.prof-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s ease;
}
.prof-btn:hover:not(:disabled) {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}
.prof-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.skill-pip-more {
  font-size: 11px;
  font-weight: 600;
  color: var(--pink-deep);
  margin-left: 6px;
}

/* ============== Changelog modal ============== */
.changelog-modal {
  max-width: 460px;
  text-align: left;
}
.changelog-list {
  max-height: 56vh;
  overflow-y: auto;
  margin: 14px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.changelog-entry {
  border-left: 3px solid var(--pink);
  padding-left: 14px;
}
.changelog-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.changelog-ver {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--pink-deep);
}
.changelog-when {
  font-size: 12px;
  opacity: 0.55;
}
.changelog-entry-title {
  font-weight: 700;
  font-size: 14px;
  margin: 3px 0 6px;
}
.changelog-changes {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.changelog-changes li {
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.85;
}
.changelog-empty {
  font-size: 13px;
  opacity: 0.6;
  text-align: center;
  padding: 20px 0;
}

/* ============== What's New modal (WhatsNewKit style) ============== */
.whatsnew-modal {
  max-width: 440px;
  text-align: left;
}
.whatsnew-head {
  text-align: center;
  margin-bottom: 22px;
}
.whatsnew-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 27px;
  color: var(--ink);
}
.whatsnew-sub {
  font-size: 13px;
  color: var(--pink-deep);
  font-weight: 600;
  margin-top: 4px;
}
.whatsnew-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 2px;
}
.whatsnew-feature {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.whatsnew-ico {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--pink) 20%, var(--surface));
  color: var(--pink-deep);
}
.whatsnew-text {
  flex: 1;
  min-width: 0;
}
.whatsnew-feature-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.whatsnew-feature-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.62;
  margin-top: 3px;
}
.whatsnew-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.whatsnew-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--pink-deep);
  padding: 4px 8px;
}
.whatsnew-link:hover {
  text-decoration: underline;
}
.whatsnew-btn {
  width: 100%;
  justify-content: center;
}

/* ============== Tournament tab (Layer 3) ============== */
.bracket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bracket-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--line-soft);
}
.bracket-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bracket-mods { opacity: 0.7; }
.bracket-row.done {
  background: color-mix(in srgb, var(--mint) 20%, var(--surface));
  border-color: var(--mint);
}
.bracket-row.current {
  border-color: var(--pink);
}
.bracket-row.locked {
  opacity: 0.55;
}
.bracket-ico {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--pink-deep);
}
.bracket-mid { flex: 1; min-width: 0; }
.bracket-name { font-weight: 700; font-size: 14px; }
.bracket-meta { font-size: 12px; opacity: 0.6; margin-top: 2px; }
.bracket-tag {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.55;
  flex-shrink: 0;
}
.bracket-tag.done { color: var(--pink-deep); opacity: 1; }
.bracket-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--pink);
  background: var(--pink);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.bracket-btn:hover:not(:disabled) { background: var(--pink-deep); border-color: var(--pink-deep); }
.bracket-btn:disabled {
  background: transparent;
  color: var(--ink);
  opacity: 0.5;
  cursor: not-allowed;
}
.profile-stat.mappool-on {
  background: color-mix(in srgb, var(--pink) 16%, var(--surface));
  border-color: var(--pink);
}
.mappool-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.mappool-foot .btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============== Challenge mods (mod-rail) ============== */
.mod-rail {
  border-top: 1px dashed var(--line-soft);
  padding-top: 10px;
}
.mod-rail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.55;
  margin-bottom: 6px;
}
.mod-rail-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.mod-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.mod-btn:hover:not(:disabled) { border-color: var(--pink); }
.mod-btn .mod-tag {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 11px;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: var(--r-pill);
}
.mod-btn.mod-locked { opacity: 0.35; cursor: not-allowed; }
.mod-btn.mod-cleared { border-color: var(--mint); background: color-mix(in srgb, var(--mint) 14%, var(--surface)); }
.mod-btn.mod-armed { border-color: var(--pink-deep); background: var(--pink); color: #fff; }
.mod-btn.mod-armed .mod-tag { background: rgba(255,255,255,0.25); color: #fff; }
.mod-btn.mod-stackable { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pink) 50%, transparent); }
.mod-check { font-size: 11px; }
.mod-disarm {
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.75;
}
.mod-disarm:hover { opacity: 1; }
.mod-stacked {
  font-size: 12px;
  font-weight: 600;
  color: var(--pink-deep);
  padding: 0 6px;
}
.mod-rail-rule {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.75;
}

/* ============== Achievements tab ============== */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.ach-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  transition: all 0.12s ease;
}
.ach-card.ach-done {
  border-color: var(--mint);
  background: color-mix(in srgb, var(--mint) 12%, var(--surface));
}
.ach-card.ach-locked { opacity: 0.6; }
.ach-card.ach-hidden { font-style: italic; }
.ach-card.ach-mystery { opacity: 0.4; }
.ach-ico {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--pink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ach-mid { flex: 1; min-width: 0; }
.ach-name { font-weight: 700; font-size: 13px; }
.ach-desc { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.ach-reward {
  font-size: 11px;
  font-weight: 700;
  color: var(--pink-deep);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}

/* ============== Rival card (ghost rival above leaderboard) ============== */
.rival-card {
  border: 1px solid var(--pink);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: color-mix(in srgb, var(--pink) 8%, var(--surface));
  margin: 14px 0;
}
.rival-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rival-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rival-mid { flex: 1; min-width: 0; }
.rival-head { font-weight: 700; font-size: 14px; }
.rival-rank {
  font-family: var(--font-mono, monospace);
  color: var(--pink-deep);
  margin-right: 6px;
}
.rival-sub { font-size: 12px; opacity: 0.7; margin-top: 2px; }
.rival-eta {
  text-align: right;
  flex-shrink: 0;
}
.rival-eta-num { font-weight: 700; font-size: 16px; color: var(--pink-deep); }
.rival-eta-lbl { font-size: 11px; opacity: 0.6; }

/* ============== Skin selector (cosmetic skins above outfits) ============== */
.skin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px;
}
.skin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  min-width: 140px;
  transition: all 0.15s ease;
}
.skin-card:hover { border-color: var(--pink); }
.skin-card.equipped {
  border-color: var(--pink-deep);
  background: color-mix(in srgb, var(--pink) 10%, var(--surface));
}
.skin-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.skin-name { font-weight: 700; font-size: 13px; text-align: center; }

/* ============== Secret codes modal ============== */
.codes-modal {
  position: relative;
  width: min(460px, 92vw);
  min-height: 280px;
  text-align: center;
  overflow: hidden;
  transition: background 0.7s ease, color 0.7s ease;
}
.codes-modal.codes-phase-rain,
.codes-modal.codes-phase-submerge,
.codes-modal.codes-phase-emerge,
.codes-modal.codes-phase-done {
  min-height: min(440px, 90vh);
  max-height: calc(100vh - 24px);
  color: #eaffff;
}

/* Input — terminal feel */
.codes-prompt {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  text-align: left;
  opacity: 0.8;
}
.codes-prompt-prefix { color: var(--pink-deep); font-weight: 700; margin-right: 6px; }
.codes-input {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 18px;
  text-align: center;
  letter-spacing: 0.18em;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.codes-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 18%, transparent);
}
.codes-input.shake { animation: codeShake 0.45s ease; border-color: #d04040; }
.codes-err { margin-top: 8px; font-size: 13px; color: #d04040; }
.codes-history {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.55;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
@keyframes codeShake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-6px); }
  30%, 70% { transform: translateX(6px); }
}

/* ===== Cinematic stage: deep-water background, binary rain, water rise,
        bubble drift, light rays, jellyfish ascent. Pure CSS (no canvas). ===== */
.codes-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

/* Background gradient — fades from terminal-black (rain phase) to oceanic. */
.codes-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 110%, #0e3b6e 0%, #061325 60%, #02060f 100%);
  animation: codeBgRise 3.9s ease-out forwards;
}
@keyframes codeBgRise {
  0%   { background: radial-gradient(ellipse at 50% 110%, #03070f, #03070f 60%, #02060f); }
  40%  { background: radial-gradient(ellipse at 50% 90%,  #0a2848, #051a32 60%, #02060f); }
  100% { background: radial-gradient(ellipse at 50% 60%,  #1a5da0, #0a3568 60%, #02101f); }
}

/* Caustics: subtle moving light pattern, only visible after rain. */
.codes-caustics {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle 80px at 25% 35%, rgba(180,235,255,0.18), transparent 70%),
    radial-gradient(circle 60px at 70% 50%, rgba(180,235,255,0.14), transparent 70%),
    radial-gradient(circle 100px at 50% 80%, rgba(180,235,255,0.22), transparent 70%);
  opacity: 0;
  animation: codeCausticsIn 1.5s ease-out 1.5s forwards,
             codeCausticsDrift 6s ease-in-out 1.5s infinite alternate;
  mix-blend-mode: screen;
}
@keyframes codeCausticsIn  { to { opacity: 0.75; } }
@keyframes codeCausticsDrift {
  0%   { transform: translate(0,    0)   scale(1);    }
  100% { transform: translate(10px, -8px) scale(1.05); }
}

/* Binary rain columns. Each .rain-col falls from -100% → 120% Y. */
.codes-rain {
  position: absolute; inset: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #5cffd1;
  text-shadow: 0 0 6px rgba(92, 255, 209, 0.7);
  font-weight: 600;
}
.codes-rain.is-dissolving { animation: codeRainDissolve 0.7s ease-out forwards; }
@keyframes codeRainDissolve {
  0%   { opacity: 1; filter: blur(0); }
  100% { opacity: 0; filter: blur(6px); }
}
.rain-col {
  position: absolute;
  top: -120%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  line-height: 1;
  animation-name: rainFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.rain-col span { padding: 1px 0; opacity: 0.6; }
.rain-col .rain-head {
  color: #ffffff;
  text-shadow: 0 0 10px #aaffe5, 0 0 18px #5cffd1;
  opacity: 1;
}
.rain-col.rain-hero {
  color: #ffdf6a;
  text-shadow: 0 0 8px #ffdf6a, 0 0 22px rgba(255, 223, 106, 0.6);
  font-weight: 700;
  letter-spacing: 0.14em;
  animation-name: rainFallHero;
}
.rain-col.rain-hero .rain-head { color: #fff; }
@keyframes rainFall {
  0%   { transform: translate(-50%, -100%); }
  100% { transform: translate(-50%, 200%); }
}
@keyframes rainFallHero {
  0%   { transform: translate(-50%, -120%) scale(1);   opacity: 0; }
  20%  { opacity: 1; }
  60%  { transform: translate(-50%, 35%)   scale(1.1); }
  80%  { transform: translate(-50%, 80%)   scale(1.05); }
  100% { transform: translate(-50%, 200%)  scale(1);   opacity: 0; }
}

/* Water surface + body — rises from below, lingers under the cat. */
.codes-water {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0%;
  background:
    linear-gradient(to top,
      rgba(20, 70, 130, 0.85) 0%,
      rgba(40, 110, 180, 0.55) 50%,
      rgba(80, 170, 230, 0.18) 95%,
      rgba(80, 170, 230, 0) 100%);
  animation: codeWaterRise 1.4s ease-out forwards;
  pointer-events: none;
}
.codes-water::before {
  content: "";
  position: absolute; top: -8px; left: 0; right: 0; height: 16px;
  background:
    radial-gradient(circle 12px at 15% 50%, rgba(255,255,255,0.55), transparent 70%),
    radial-gradient(circle 16px at 45% 50%, rgba(255,255,255,0.5),  transparent 70%),
    radial-gradient(circle 10px at 75% 50%, rgba(255,255,255,0.45), transparent 70%);
  filter: blur(1px);
  animation: codeWaterRipple 2.4s ease-in-out infinite;
}
@keyframes codeWaterRise {
  0%   { height: 0%; }
  100% { height: 100%; }
}
@keyframes codeWaterRipple {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(8px); }
}

/* Bubble track — many small bubbles drifting upward at varied speeds. */
.codes-bubbles { position: absolute; inset: 0; overflow: hidden; }
.bubble {
  position: absolute; bottom: -10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #ffffff 0%, rgba(255,255,255,0.6) 35%, rgba(180,230,255,0.2) 70%, transparent 100%);
  box-shadow: 0 0 6px rgba(180, 230, 255, 0.4);
  animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
  0%   { transform: translate(0, 0)    scale(0.6); opacity: 0; }
  10%  { opacity: 0.85; }
  50%  { transform: translate(8px, -240px) scale(1); }
  100% { transform: translate(-6px, -480px) scale(1.1); opacity: 0; }
}

/* God rays — soft diagonal beams of light from the surface. */
.codes-rays {
  position: absolute; inset: 0;
  background:
    linear-gradient(170deg, rgba(255,255,255,0.10) 0%, transparent 14%),
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, transparent 12%),
    linear-gradient(190deg, rgba(255,255,255,0.08) 0%, transparent 14%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: codeRaysIn 1.5s ease-out 1.5s forwards;
}
@keyframes codeRaysIn { to { opacity: 0.9; } }

/* Jellyfish ascent — drifts up from below, scales in, idles afterward. */
.codes-emerge {
  position: absolute;
  left: 50%; bottom: 18%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.codes-emerge-glow {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,235,255,0.55) 0%, rgba(180,235,255,0) 70%);
  filter: blur(8px);
  animation: codeGlowPulse 2.2s ease-in-out infinite;
  z-index: 0;
}
.codes-emerge-cat {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 26px rgba(150, 220, 255, 0.85));
  animation:
    codeAscend 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) both,
    codeFloat  4s ease-in-out 1.5s infinite;
}
@keyframes codeAscend {
  0%   { transform: translateY(220px) scale(0.5); opacity: 0; }
  35%  { opacity: 1; }
  70%  { transform: translateY(-12px) scale(1.06); }
  100% { transform: translateY(0)     scale(1);    opacity: 1; }
}
@keyframes codeFloat {
  0%, 100% { transform: translateY(0)    rotate(0deg); }
  50%      { transform: translateY(-10px) rotate(1.2deg); }
}
@keyframes codeGlowPulse {
  0%, 100% { transform: scale(1);    opacity: 0.55; }
  50%      { transform: scale(1.12); opacity: 0.85; }
}

/* Radial sparkle bloom around the jellyfish */
.codes-sparkles {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
}
.codes-sparkle {
  position: absolute;
  left: 0; top: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #b8efff 50%, transparent 80%);
  box-shadow: 0 0 8px #ffffff;
  --i: 0;
  --angle: calc(var(--i) * 30deg);
  transform-origin: 0 0;
  animation: codeSparkleBloom 1.4s ease-out 1s forwards;
}
@keyframes codeSparkleBloom {
  0%   { transform: rotate(var(--angle)) translateX(0)     scale(0.4); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: rotate(var(--angle)) translateX(140px) scale(1);   opacity: 0; }
}

/* Caption — typewritten skin name with terminal caret, sits below the cat. */
.codes-caption {
  position: absolute;
  left: 50%; bottom: 6%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  animation: codeCaptionIn 0.5s ease-out both;
}
.codes-caption-name {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(180, 235, 255, 0.7);
}
.codes-caret {
  display: inline-block;
  color: #5cffd1;
  margin-left: 2px;
  animation: codeCaret 1s steps(2, end) infinite;
}
.codes-caption-sub {
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #b8e8ff;
  opacity: 0.75;
}
@keyframes codeCaptionIn {
  0%   { opacity: 0; transform: translate(-50%, 10px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes codeCaret { 50% { opacity: 0; } }

/* In-scene phases: drop the default cream modal background so the underwater
   stage shows through edge-to-edge once the scene is mounted. */
.codes-modal.codes-phase-rain,
.codes-modal.codes-phase-submerge,
.codes-modal.codes-phase-emerge,
.codes-modal.codes-phase-done {
  background: #02060f;
  border-color: transparent;
}

/* Floating close button on the done phase — corner overlay over the scene. */
.codes-close-floating {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(2, 16, 36, 0.55);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
  animation: codeCaptionIn 0.5s ease-out 0.2s both;
}
.codes-close-floating:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

/* ============== Trophy Tiers panel ============== */
.tier-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.tier-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  transition: all 0.12s ease;
}
.tier-row.unlocked {
  border-color: var(--pink);
  background: color-mix(in srgb, var(--pink) 10%, var(--surface));
}
.tier-row.locked { opacity: 0.5; }
.tier-row.next  { border-color: var(--pink); }
.tier-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, "Fredoka", sans-serif);
  font-weight: 700;
  color: var(--pink-deep);
  flex-shrink: 0;
}
.tier-row.unlocked .tier-badge { background: var(--pink); color: #fff; }
.tier-mid { flex: 1; min-width: 0; }
.tier-name { font-weight: 700; font-size: 13px; }
.tier-effect { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.tier-cost { font-size: 12px; opacity: 0.65; flex-shrink: 0; }

/* ============== Seeds Shop panel ============== */
.seeds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.seed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line-soft);
}
.seed-row.armed {
  border-color: var(--pink-deep);
  background: color-mix(in srgb, var(--pink) 14%, var(--surface));
}
.seed-ico {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--pink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.seed-mid { flex: 1; min-width: 0; }
.seed-name { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.seed-count { font-size: 11px; opacity: 0.7; font-family: ui-monospace, monospace; }
.seed-tag-armed {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--pink);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--r-pill);
}
.seed-desc { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.seed-ctl { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.seed-btn { font-size: 11px; padding: 5px 10px; }
.seeds-panel-locked { opacity: 0.55; }

/* ============== Jellyfish-cat idle animation (works anywhere the SVG renders) ============== */
.jellyfish-svg { transform-origin: 50% 60%; animation: jellyDrift 4s ease-in-out infinite; }
.jelly-bell {
  transform-origin: 130px 130px;
  animation: jellyBellPulse 3.2s ease-in-out infinite;
}
.jelly-tentacles-outer {
  transform-origin: 130px 168px;
  animation: jellyTentaclesA 3.2s ease-in-out infinite;
}
.jelly-tentacles-inner {
  transform-origin: 130px 174px;
  animation: jellyTentaclesB 3.2s ease-in-out 0.2s infinite;
}
@keyframes jellyDrift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(0.6deg); }
}
@keyframes jellyBellPulse {
  0%, 100% { transform: scale(1,    1);    }
  45%      { transform: scale(1.04, 0.94); }
  60%      { transform: scale(0.97, 1.05); }
}
@keyframes jellyTentaclesA {
  0%, 100% { transform: skewX(0deg)   translateY(0); }
  45%      { transform: skewX(-4deg)  translateY(2px); }
  60%      { transform: skewX(3deg)   translateY(-1px); }
}
@keyframes jellyTentaclesB {
  0%, 100% { transform: skewX(0deg)  translateY(0); }
  50%      { transform: skewX(5deg)  translateY(2px); }
}
/* ============== Guided tour ============== */
.tour-layer {
  position: fixed;
  inset: 0;
  z-index: 260;
}
.tour-dim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.tour-spotlight {
  position: fixed;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--pink-deep);
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
  pointer-events: none;
}
.tour-tip {
  position: fixed;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-lg);
}
.tour-tip-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.tour-tip-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.72;
  margin-top: 6px;
}
.tour-tip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.tour-step {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.5;
}
.tour-tip-btns {
  display: flex;
  gap: 8px;
}
.tour-btn {
  padding: 7px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.tour-btn.primary {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}
.tour-btn.primary:hover { background: var(--pink-deep); border-color: var(--pink-deep); }
.tour-btn:hover { border-color: var(--pink); }

/* ============== Journey tab ============== */
.journey-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.journey-stage {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 4px 0 16px;
}
.journey-line {
  position: absolute;
  left: 23px;
  top: 50px;
  bottom: -4px;
  width: 2px;
  background: var(--line);
}
.journey-stage.active .journey-line { background: var(--pink); }
.journey-dot {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--ink-soft);
  z-index: 1;
}
.journey-stage.active .journey-dot {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}
.journey-stage.next .journey-dot {
  border-color: var(--pink-deep);
  color: var(--pink-deep);
}
.journey-q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
}
.journey-body {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.journey-stage.next .journey-body { border-color: var(--pink-deep); }
.journey-stage.mystery .journey-body { background: var(--bg); opacity: 0.7; }
.journey-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.journey-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.journey-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.journey-pill.active { background: color-mix(in srgb, var(--mint) 30%, var(--surface)); color: var(--ink); }
.journey-pill.next { background: var(--pink); color: #fff; }
.journey-pill.mystery { background: var(--bg-2); color: var(--ink-mute); }
.journey-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.68;
  margin-top: 4px;
}
.journey-req { margin-top: 10px; }
.journey-bar {
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  overflow: hidden;
}
.journey-bar-fill {
  height: 100%;
  background: var(--pink);
  border-radius: var(--r-pill);
  transition: width 0.3s ease;
}
.journey-req-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pink-deep);
  margin-top: 5px;
}
.journey-open {
  margin-top: 10px;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.journey-open:hover { border-color: var(--pink); background: var(--surface); }

/* ============== Themed scrollbars ============== */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: var(--r-pill);
}
*::-webkit-scrollbar-thumb:hover { background: var(--pink); }

/* ============== Login gate ============== */
.login-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--pink-bg) 0%, transparent 50%),
    radial-gradient(900px 500px at 110% 110%, var(--lav-bg) 0%, transparent 55%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 36px 28px;
  box-shadow: var(--shadow-lg);
}
.login-cat { display: flex; justify-content: center; margin-bottom: 8px; }
.login-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--ink);
}
.login-sub {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.66;
  margin: 8px 0 22px;
}
.login-btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.14s ease;
}
.login-btn.osu {
  background: var(--pink);
  color: #fff;
  text-decoration: none;
}
.login-btn.osu:hover { background: var(--pink-deep); }
.login-btn.discord {
  margin-top: 10px;
  background: #5865F2;
  color: #fff;
  text-decoration: none;
}
.login-btn.discord:hover { background: #4752c4; }
.login-btn.dev {
  margin-top: 10px;
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}
.login-btn.dev:hover { border-color: var(--pink); color: var(--ink); }

/* ============== Narrow screens — sidebar collapses to an icon rail ============== */
@media (max-width: 700px) {
  .app { grid-template-columns: 60px 1fr; }
  .sidebar { padding: 14px 8px; gap: 10px; }
  .brand { justify-content: center; padding: 4px 0; }
  .brand > div:last-child { display: none; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .nav-label,
  .nav-badge,
  .nav-timer { display: none; }
  .sidebar-footer {
    flex-direction: column;
    align-items: center;
    border-top: none;
    padding-top: 8px;
  }
  .topbar { padding: 10px 14px; }
  .topbar-name { display: none; }
  .main-scroll { padding: 20px 14px 32px; }
  .cat-stage { min-height: 360px; padding: 18px; }
  .xp-bar { width: 100px; }
  .stage-info { top: 14px; left: 14px; }
  .stage-level { top: 14px; right: 14px; }
}

/* ===== Overflow safety — let the layout reflow down to the viewport width.
   grid/flex items default to min-width:auto and refuse to shrink past their
   content; min-width:0 frees the whole Play chain on narrow screens. ===== */
body { overflow-x: hidden; }
.main,
.main-scroll,
.play-row > * { min-width: 0; }
.modal { max-width: calc(100vw - 24px); }

/* ===== Talent Web ===== */
.talent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  margin-top: 8px;
}
.talent-branches {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.talent-branch {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--branch-color, var(--ink));
}
.talent-branch-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.talent-branch-ico {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--branch-color) 18%, transparent);
  color: var(--branch-color);
}
.talent-branch-info { flex: 1 1 auto; min-width: 0; }
.talent-branch-name { font-weight: 600; }
.talent-branch-desc { font-size: 12px; opacity: 0.7; }
.talent-branch-meta {
  font-size: 12px;
  opacity: 0.65;
  white-space: nowrap;
}
.talent-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.talent-node {
  position: relative;
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--branch-color) 65%, var(--card-border));
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-family: inherit;
  padding: 0;
}
.talent-node:hover { transform: translateY(-1px); }
.talent-node .talent-node-cost {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.talent-node .talent-node-star {
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  line-height: 1;
  color: var(--branch-color);
  pointer-events: none;
}
.talent-node.owned .talent-node-star { color: #fff; }
.talent-node.owned {
  background: var(--branch-color);
  border-color: color-mix(in srgb, var(--branch-color) 70%, black);
}
.talent-node.owned .talent-node-cost {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.talent-node.available {
  border-color: var(--branch-color);
  background: color-mix(in srgb, var(--branch-color) 14%, var(--card));
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--branch-color) 45%, transparent);
  animation: talent-pulse 1.6s ease-in-out infinite;
}
.talent-node.cant {
  opacity: 0.7;
  cursor: not-allowed;
  border-style: dashed;
}
.talent-node.locked {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--card-border);
}
.talent-node.locked .talent-node-cost { color: var(--ink-soft, var(--ink)); }
.talent-node.sel {
  outline: 2px solid var(--branch-color);
  outline-offset: 2px;
}
.talent-node.keystone {
  width: 52px; height: 52px;
  border-width: 3px;
}
@keyframes talent-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--branch-color) 35%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--branch-color) 0%, transparent); }
}

.talent-detail {
  position: sticky;
  top: 12px;
  align-self: start;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  border-top: 4px solid var(--branch-color, var(--card-border));
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.talent-detail.empty { color: var(--ink); opacity: 0.55; justify-content: center; }
.talent-detail-hint { text-align: center; font-size: 13px; }
.talent-detail-branch { font-size: 12px; opacity: 0.7; }
.talent-detail-name { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.talent-keystone-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--branch-color) 22%, transparent);
  color: var(--branch-color);
  font-weight: 600;
}
.talent-detail-desc { font-size: 13px; opacity: 0.85; line-height: 1.4; }
.talent-detail-cost {
  font-weight: 600;
  font-size: 14px;
  color: var(--branch-color);
}
.talent-detail-owned {
  background: color-mix(in srgb, var(--branch-color) 22%, transparent);
  color: var(--branch-color);
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  margin-top: 4px;
}
.talent-buy {
  margin-top: 4px;
  background: var(--branch-color);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: filter 0.12s ease;
}
.talent-buy:hover { filter: brightness(1.08); }
.talent-buy.disabled,
.talent-buy:disabled {
  background: var(--card-border);
  color: var(--ink);
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .talent-layout { grid-template-columns: 1fr; }
  .talent-detail { position: static; }
  .talent-node { width: 38px; height: 38px; }
  .talent-node.keystone { width: 46px; height: 46px; }
}

/* ============== Layer 4 — Endless Rivals ============== */
.l4-balance {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.l4-balance-pill {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  font-size: 12px;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.l4-balance-pill span { opacity: 0.7; }
.l4-balance-pill strong { font-weight: 700; }

.l4-rival-card {
  border: 1px solid var(--line-soft);
  border-left-width: 4px;
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: var(--surface);
  margin: 14px 0;
  display: grid;
  gap: 10px;
}
.l4-rival-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.l4-tier-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  color: #1a1a1a;
  letter-spacing: 0.05em;
}
.l4-rival-num {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  opacity: 0.7;
}
.l4-rival-name {
  font-weight: 700;
  font-size: 15px;
  min-width: 0;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.l4-rival-flag {
  font-size: 18px;
  flex-shrink: 0;
  /* Sit right next to the username; everything else (target / bar) wraps to
     the next line of the card. */
  margin-right: auto;
}
.l4-rival-target {
  font-size: 13px;
  opacity: 0.85;
}
.l4-log-bar {
  position: relative;
  height: 14px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.l4-log-bar-fill {
  height: 100%;
  transition: width 0.4s ease;
  border-radius: var(--r-pill);
}
.l4-log-bar-pct {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  text-shadow: 0 0 4px var(--surface);
}
.l4-rival-eta {
  font-size: 12px;
  opacity: 0.85;
}
.l4-rival-eta.dim { opacity: 0.45; }
.l4-overtake-btn {
  background: var(--accent, var(--pink));
  color: var(--surface);
  border: none;
  border-radius: var(--r-pill);
  padding: 8px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  justify-self: start;
}
.l4-overtake-btn:disabled {
  background: color-mix(in srgb, var(--ink) 15%, transparent);
  color: color-mix(in srgb, var(--ink) 40%, transparent);
  cursor: not-allowed;
}

.l4-shop {
  margin: 18px 0;
}
.l4-shop-head h2 {
  margin: 0 0 4px 0;
  font-size: 18px;
}
.l4-shop-sub {
  font-size: 12px;
  opacity: 0.65;
  margin-bottom: 10px;
}
.l4-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.l4-shop-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 12px;
  display: grid;
  gap: 6px;
  transition: border-color 0.2s ease;
}
.l4-shop-card.marginal-best {
  border-color: var(--accent, var(--pink));
  box-shadow: 0 0 0 1px var(--accent, var(--pink));
}
.l4-shop-icon {
  align-self: start;
  opacity: 0.85;
}
.l4-shop-name {
  font-weight: 700;
  font-size: 14px;
}
.l4-shop-desc {
  font-size: 11px;
  opacity: 0.65;
  line-height: 1.3;
}
.l4-shop-mul {
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
}
.l4-shop-arrow { opacity: 0.4; }
.l4-shop-nxt { font-weight: 700; }
.l4-shop-buy {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
.l4-shop-buy:hover:not(:disabled) {
  border-color: var(--accent, var(--pink));
}
.l4-shop-buy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.l4-hof {
  margin: 18px 0;
}
.l4-hof h2 {
  margin: 0 0 8px 0;
  font-size: 18px;
}
.l4-hof-count {
  font-size: 14px;
  opacity: 0.6;
  font-weight: 400;
}
.l4-hof-empty {
  font-size: 13px;
  opacity: 0.6;
  padding: 12px;
  border: 1px dashed var(--line-soft);
  border-radius: var(--r-md);
  text-align: center;
}
.l4-hof-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}
.l4-hof-entry {
  display: grid;
  grid-template-columns: 100px 80px 50px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  background: var(--surface);
  border: 1px solid transparent;
}
.l4-hof-entry:hover { border-color: var(--line-soft); }
.l4-hof-when { opacity: 0.6; }
.l4-hof-tier { font-weight: 700; opacity: 0.85; }
.l4-hof-num { font-family: var(--font-mono, monospace); opacity: 0.7; }
.l4-hof-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l4-hof-flag { font-size: 14px; }

.l4-reset {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--ink) 3%, var(--surface));
}
.l4-reset h2 {
  margin: 0 0 8px 0;
  font-size: 16px;
}
.l4-reset-body { display: grid; gap: 8px; }
.l4-reset-stat { font-size: 14px; }
.l4-reset-cap { opacity: 0.7; font-size: 12px; }
.l4-reset-wipe { font-size: 12px; opacity: 0.75; }
.l4-reset-keep { font-size: 12px; opacity: 0.6; }
.l4-reset-confirm {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.l4-reset-confirm input {
  flex: 1;
  min-width: 160px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono, monospace);
  font-size: 13px;
}
.l4-reset-confirm input::placeholder { color: color-mix(in srgb, var(--ink) 45%, transparent); }
.l4-reset-confirm input:disabled { opacity: 0.4; }
.l4-reset-btn {
  background: transparent;
  border: 1px solid var(--pink);
  color: var(--pink-deep, var(--pink));
  border-radius: var(--r-pill);
  padding: 6px 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.l4-reset-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .l4-rival-head { gap: 6px; }
  .l4-rival-name { font-size: 14px; }
  .l4-shop-grid { grid-template-columns: 1fr; }
  .l4-hof-entry {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name    flag"
      "meta    when";
  }
  .l4-hof-entry .l4-hof-name { grid-area: name; }
  .l4-hof-entry .l4-hof-flag { grid-area: flag; }
  .l4-hof-entry .l4-hof-when { grid-area: when; text-align: right; }
  .l4-hof-entry .l4-hof-tier,
  .l4-hof-entry .l4-hof-num {
    grid-area: meta;
    display: inline-block;
    margin-right: 6px;
  }
}

/* Daily login chest banner — second daily return hook on the Play screen. */
.daily-chest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(255,137,179,0.18), rgba(205,180,219,0.18));
  border: 1px solid rgba(255,137,179,0.45);
  box-shadow: 0 2px 14px rgba(255,137,179,0.18);
}
.daily-chest-banner .dc-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.daily-chest-banner .dc-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,137,179,0.22);
  animation: dc-pulse 1.8s ease-in-out infinite;
}
.daily-chest-banner .dc-title { font-weight: 700; }
.daily-chest-banner .dc-sub { font-size: 0.82em; opacity: 0.7; }
.daily-chest-banner .dc-btn {
  border: none;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(100deg, #ff89b3, #cdb4db);
  box-shadow: 0 2px 10px rgba(255,137,179,0.4);
  white-space: nowrap;
}
.daily-chest-banner .dc-btn:hover { filter: brightness(1.05); }
@keyframes dc-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
