:root {
  --bg: #0b0e14;
  --bg-elev: #12171f;
  --bg-soft: #18202b;
  --border: #243041;
  --border-strong: #314057;
  --text: #e8eef7;
  --muted: #8b9bb0;
  --accent: #4cc9f0;
  --accent-dim: #1a6f8a;
  --win: #3dd68c;
  --loss: #f07178;
  --sleep: #7aa2ff;
  --sleep-deep: #5b7fd4;
  --break: #e6b450;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(76, 201, 240, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(122, 162, 255, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 70% 80%, rgba(230, 180, 80, 0.04), transparent 55%),
    linear-gradient(rgba(36, 48, 65, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 48, 65, 0.35) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a6f8a, #0d2a36);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}
.logo .icon-logo { width: 22px; height: 22px; }
.brand h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.sub { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.top-meta { display: flex; align-items: center; gap: 10px; }

/* Shared icon primitives */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon-inline {
  width: 1.05em;
  height: 1.05em;
  margin-right: 6px;
  vertical-align: -0.2em;
  color: var(--muted);
}
.card-head h3 {
  display: flex;
  align-items: center;
}

.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
}
.badge-live {
  color: var(--win);
  border-color: rgba(61, 214, 140, 0.35);
  background: rgba(61, 214, 140, 0.08);
}
.badge-mock {
  color: var(--break);
  border-color: rgba(230, 180, 80, 0.35);
  background: rgba(230, 180, 80, 0.08);
}
.badge-cached {
  color: #7eb8ff;
  border-color: rgba(126, 184, 255, 0.4);
  background: rgba(126, 184, 255, 0.1);
}
.badge-stale {
  color: #c9a0ff;
  border-color: rgba(201, 160, 255, 0.4);
  background: rgba(201, 160, 255, 0.1);
}

.btn {
  font: inherit;
  font-weight: 560;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: #1e2836; border-color: var(--accent-dim); }
.btn:disabled { opacity: 0.55; cursor: wait; }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ——— HERO (primary) ——— */
.hero {
  margin-bottom: 22px;
  padding: 22px 24px 20px;
  background:
    linear-gradient(135deg, rgba(76, 201, 240, 0.07), transparent 40%),
    linear-gradient(210deg, rgba(122, 162, 255, 0.08), transparent 45%),
    var(--bg-elev);
  border-color: rgba(76, 201, 240, 0.22);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(76, 201, 240, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.hero.hero-asleep {
  border-color: rgba(122, 162, 255, 0.45);
  background:
    linear-gradient(145deg, rgba(90, 120, 220, 0.16), transparent 42%),
    linear-gradient(220deg, rgba(40, 50, 100, 0.25), transparent 55%),
    var(--bg-elev);
  box-shadow:
    var(--shadow),
    0 0 40px rgba(90, 120, 220, 0.12),
    inset 0 1px 0 rgba(160, 180, 255, 0.06);
}

.hero-head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
}
.hero-identity h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.riot-id {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.date-label {
  margin: 10px 0 4px;
  font-size: 1.02rem;
  color: var(--text);
}
.muted { color: var(--muted); font-size: 0.88rem; }
.hero-identity .muted { margin: 0; }

/* Mood badge in hero head */
.mood {
  display: flex;
  min-width: 120px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.mood-label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mood-emoji {
  font-family: var(--mono);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.12em;
}
.mood-happy { border-color: rgba(61, 214, 140, 0.45); background: rgba(61, 214, 140, 0.08); }
.mood-happy .mood-emoji, .mood-happy #mood-text { color: var(--win); }
.mood-neutral { border-color: rgba(230, 180, 80, 0.45); background: rgba(230, 180, 80, 0.08); }
.mood-neutral .mood-emoji, .mood-neutral #mood-text { color: var(--break); }
.mood-sad { border-color: rgba(240, 113, 120, 0.45); background: rgba(240, 113, 120, 0.08); }
.mood-sad .mood-emoji, .mood-sad #mood-text { color: var(--loss); }
#mood-text {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ——— ASLEEP NOW status box ——— */
.asleep-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(122, 162, 255, 0.5);
  background:
    linear-gradient(120deg, rgba(70, 95, 190, 0.28), rgba(20, 28, 55, 0.55) 55%, rgba(10, 14, 28, 0.7));
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(122, 162, 255, 0.12),
    0 16px 40px rgba(40, 60, 140, 0.25);
}
.asleep-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(140, 170, 255, 0.35), transparent 65%);
  pointer-events: none;
  animation: asleep-pulse 4.5s ease-in-out infinite;
}
.asleep-icon-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(180, 200, 255, 0.25), rgba(30, 40, 80, 0.5));
  border: 1px solid rgba(160, 185, 255, 0.35);
  color: #c5d4ff;
  z-index: 1;
}
.icon-moon-lg {
  width: 36px;
  height: 36px;
  color: #d4e0ff;
  filter: drop-shadow(0 0 10px rgba(140, 170, 255, 0.55));
}
.asleep-z {
  position: absolute;
  font-family: var(--mono);
  font-weight: 600;
  color: rgba(180, 200, 255, 0.85);
  animation: asleep-z 2.8s ease-in-out infinite;
  pointer-events: none;
}
.asleep-z.z1 { top: 6px; right: 10px; font-size: 0.72rem; animation-delay: 0s; }
.asleep-z.z2 { top: 0; right: 22px; font-size: 0.9rem; animation-delay: 0.45s; }
.asleep-z.z3 { top: -6px; right: 36px; font-size: 1.05rem; animation-delay: 0.9s; }

@keyframes asleep-z {
  0%, 100% { opacity: 0.15; transform: translateY(4px) scale(0.9); }
  40% { opacity: 1; transform: translateY(-2px) scale(1); }
  70% { opacity: 0.55; transform: translateY(-6px) scale(1.05); }
}
@keyframes asleep-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

.asleep-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}
.asleep-kicker {
  margin: 0 0 2px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 650;
  color: #a8bcff;
}
.asleep-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e8eeff;
}
.asleep-detail {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: #c0cdf0;
}
.asleep-meta {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #8fa0cc;
}

/* Sleep / breaks / mood pulse cards */
.life-pulses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.pulse {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 92px;
}
.pulse-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 650;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pulse-kicker .icon {
  width: 14px;
  height: 14px;
}
.pulse-value {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.pulse-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: auto;
}
.pulse-sleep {
  border-color: rgba(122, 162, 255, 0.4);
  background: linear-gradient(160deg, rgba(122, 162, 255, 0.14), rgba(0, 0, 0, 0.2));
}
.pulse-sleep .pulse-kicker,
.pulse-sleep .pulse-value { color: var(--sleep); }
.pulse-asleep-now {
  border-color: rgba(140, 175, 255, 0.65);
  background: linear-gradient(160deg, rgba(100, 130, 230, 0.28), rgba(20, 28, 55, 0.45));
  box-shadow: 0 0 20px rgba(90, 120, 220, 0.18);
}
.pulse-asleep-now .pulse-value {
  color: #d4e0ff;
}
.pulse-break {
  border-color: rgba(230, 180, 80, 0.4);
  background: linear-gradient(160deg, rgba(230, 180, 80, 0.12), rgba(0, 0, 0, 0.2));
}
.pulse-break .pulse-kicker,
.pulse-break .pulse-value { color: var(--break); }
.pulse-mood.mood-happy {
  border-color: rgba(61, 214, 140, 0.4);
  background: linear-gradient(160deg, rgba(61, 214, 140, 0.12), rgba(0, 0, 0, 0.2));
}
.pulse-mood.mood-happy .pulse-kicker,
.pulse-mood.mood-happy .pulse-value { color: var(--win); }
.pulse-mood.mood-neutral {
  border-color: rgba(230, 180, 80, 0.4);
  background: linear-gradient(160deg, rgba(230, 180, 80, 0.1), rgba(0, 0, 0, 0.2));
}
.pulse-mood.mood-neutral .pulse-kicker,
.pulse-mood.mood-neutral .pulse-value { color: var(--break); }
.pulse-mood.mood-sad {
  border-color: rgba(240, 113, 120, 0.4);
  background: linear-gradient(160deg, rgba(240, 113, 120, 0.12), rgba(0, 0, 0, 0.2));
}
.pulse-mood.mood-sad .pulse-kicker,
.pulse-mood.mood-sad .pulse-value { color: var(--loss); }
.pulse-mood-face {
  font-family: var(--mono);
  letter-spacing: -0.06em;
}
.pulse-mood-word {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
  margin-left: 4px;
}

.life-head {
  margin-bottom: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(36, 48, 65, 0.9);
}

/* Vertical life timeline */
.life-timeline {
  list-style: none;
  margin: 0;
  padding: 4px 0 2px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.life-event {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  position: relative;
  padding: 10px 0;
}
.life-event:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -2px;
  width: 2px;
  background: linear-gradient(180deg, var(--border-strong), transparent);
  opacity: 0.85;
}
.life-rail {
  display: flex;
  justify-content: center;
  padding-top: 2px;
  z-index: 1;
}
.life-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--muted);
}
.life-dot .icon {
  width: 14px;
  height: 14px;
}
.life-sleep .life-dot,
.life-asleep .life-dot {
  color: var(--sleep);
  border-color: rgba(122, 162, 255, 0.55);
  background: rgba(122, 162, 255, 0.15);
  box-shadow: 0 0 16px rgba(122, 162, 255, 0.25);
}
.life-asleep .life-dot {
  border-color: rgba(160, 185, 255, 0.7);
  background: rgba(100, 130, 230, 0.28);
  box-shadow: 0 0 20px rgba(120, 150, 255, 0.4);
}
.life-break .life-dot {
  color: var(--break);
  border-color: rgba(230, 180, 80, 0.55);
  background: rgba(230, 180, 80, 0.12);
}
.life-session .life-dot {
  color: var(--accent);
  border-color: rgba(76, 201, 240, 0.55);
  background: rgba(76, 201, 240, 0.12);
}
.life-gap .life-dot,
.life-empty .life-dot {
  color: var(--muted);
}

.life-body {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 0;
}
.life-sleep .life-body,
.life-asleep .life-body {
  border-color: rgba(122, 162, 255, 0.28);
  background: rgba(122, 162, 255, 0.06);
}
.life-asleep .life-body {
  border-color: rgba(150, 175, 255, 0.45);
  background: linear-gradient(120deg, rgba(90, 120, 220, 0.18), rgba(122, 162, 255, 0.06));
}
.life-break .life-body {
  border-color: rgba(230, 180, 80, 0.28);
  background: rgba(230, 180, 80, 0.05);
}
.life-session .life-body {
  border-color: rgba(76, 201, 240, 0.22);
}
.life-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
}
.life-title {
  font-weight: 650;
  font-size: 0.95rem;
}
.life-sleep .life-title,
.life-asleep .life-title { color: var(--sleep); }
.life-asleep .life-title { color: #c8d6ff; }
.life-break .life-title { color: var(--break); }
.life-when {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: auto;
}
.life-wl {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
}
.life-wl .w { color: var(--win); }
.life-wl .l { color: var(--loss); }
.life-detail {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.life-empty {
  color: var(--muted);
  padding: 8px 2px;
  list-style: none;
}

/* ——— SECONDARY ——— */
.secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.secondary > .card-head h3,
.secondary .eyebrow-sec {
  color: var(--muted);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 10px;
  padding: 14px 16px;
}
.stat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}
.stat .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat .value {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.stat .value.win { color: var(--win); }
.stat .value.loss { color: var(--loss); }

.warning {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(230, 180, 80, 0.4);
  background: rgba(230, 180, 80, 0.1);
  color: #f0d9a0;
  font-size: 0.9rem;
}
.hidden { display: none !important; }

.grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  align-items: start;
}
.stack { display: flex; flex-direction: column; gap: 16px; }

.timeline { display: flex; flex-direction: column; gap: 14px; }

.session {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  overflow: hidden;
}
.session-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
.session-title {
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.session-title .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}
.session-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.wl {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
}
.wl .w { color: var(--win); }
.wl .l { color: var(--loss); }

.games { list-style: none; margin: 0; padding: 0; }
.game {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid rgba(36, 48, 65, 0.7);
  font-size: 0.9rem;
}
.game:first-child { border-top: none; }
.game .time {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.game .champ { font-weight: 560; }
.game .kda {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.pill-win {
  color: var(--win);
  background: rgba(61, 214, 140, 0.12);
  border: 1px solid rgba(61, 214, 140, 0.3);
}
.pill-loss {
  color: var(--loss);
  background: rgba(240, 113, 120, 0.12);
  border: 1px solid rgba(240, 113, 120, 0.3);
}

.gap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  color: var(--muted);
  font-size: 0.82rem;
}
.gap-row .line {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--border-strong),
    var(--border-strong) 4px,
    transparent 4px,
    transparent 8px
  );
}
.gap-row.sleep { color: var(--sleep); }
.gap-row.break { color: var(--break); }
.gap-row.asleep-trail {
  color: #c5d4ff;
  padding: 8px 6px;
}
.gap-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.gap-tag .icon {
  width: 12px;
  height: 12px;
}

.champs { display: flex; flex-direction: column; gap: 8px; }
.champ-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.champ-row .name { font-weight: 560; }
.champ-row .games-n {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.champ-row .wr {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  min-width: 3.2em;
  text-align: right;
}
.champ-row .wr.win { color: var(--win); }
.champ-row .wr.loss { color: var(--loss); }

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px 2px;
}

.foot {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}
.foot code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
}

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .life-pulses { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .game { grid-template-columns: 64px 1fr auto; }
  .game .kda { display: none; }
  .hero-identity h2 { font-size: 1.65rem; }
  .life-when { margin-left: 0; width: 100%; }
  .asleep-box { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* Multi-day session grouping */
.day-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.65rem;
  color: var(--muted, #8b93a7);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.day-divider::before,
.day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 147, 167, 0.35), transparent);
}
.day-divider:first-child {
  margin-top: 0.25rem;
}

/* —— Ranked solo/duo · Diamond goal —— */
.rank-box {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 6px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(24, 32, 43, 0.95), rgba(18, 23, 31, 0.9));
  overflow: hidden;
}
.rank-box.hidden { display: none; }
.rank-glow {
  position: absolute;
  inset: -40% auto auto -20%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, rgba(122, 162, 255, 0.18), transparent 65%);
  pointer-events: none;
}
.rank-box.rank-goal-met {
  border-color: rgba(61, 214, 140, 0.45);
  background: linear-gradient(135deg, rgba(30, 60, 48, 0.55), rgba(18, 23, 31, 0.95));
}
.rank-box.rank-goal-met .rank-glow {
  background: radial-gradient(circle, rgba(61, 214, 140, 0.28), transparent 65%);
}
.rank-box.rank-climbing {
  border-color: rgba(122, 162, 255, 0.35);
}
.rank-main { position: relative; z-index: 1; flex: 1; min-width: 0; }
.rank-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.rank-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.rank-detail {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}
.rank-progress-wrap { max-width: 360px; }
.rank-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(36, 48, 65, 0.9);
  border: 1px solid var(--border);
  overflow: hidden;
}
.rank-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b7fd4, #4cc9f0);
  transition: width 0.45s ease;
}
.rank-box.rank-goal-met .rank-progress-fill {
  background: linear-gradient(90deg, #2f9e6a, #3dd68c);
}
.rank-progress-label {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
}
.rank-goal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 110px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(11, 14, 20, 0.45);
  border: 1px solid var(--border);
  text-align: center;
}
.rank-box.rank-goal-met .rank-goal {
  border-color: rgba(61, 214, 140, 0.4);
  background: rgba(61, 214, 140, 0.1);
}
.rank-goal-emoji { font-size: 1.6rem; line-height: 1; }
.rank-goal-text {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text);
}
.rank-box.rank-goal-met .rank-goal-text { color: var(--win); }

@media (max-width: 640px) {
  .rank-box {
    flex-direction: column;
    align-items: stretch;
  }
  .rank-goal {
    flex-direction: row;
    justify-content: flex-start;
    min-width: 0;
  }
}
