:root {
  --bg: #0a0a0f; --panel: #13131b; --panel2: #191924; --line: #262634; --line2: #33334a;
  --fg: #f5f3ef; --muted: #9b99a8; --dim: #5f5d6d;
  --cal: #ff6b3d; --pro: #5b8cff; --water: #22d3c5; --sleep: #f5c542; --move: #c084fc;
  --good: #4ade80; --bad: #ff5f6d;
  --grad: linear-gradient(100deg, #ff6b3d 0%, #ff3d8b 50%, #a855f7 100%);
  --rS: #ffd34d; --rA: #4ade80; --rB: #5b8cff; --rC: #f5a524; --rD: #ff5f6d;
  --r: 18px; --r-sm: 12px;
  --display: "Unbounded", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 107, 61, .13), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(168, 85, 247, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
h2 { font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 600; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: .8rem; margin-top: 4px; }
.eyebrow { margin: 0; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--cal); }
.lbl { font-size: .75rem; color: var(--muted); }
.num, .mega, .score b, .stat-num { font-variant-numeric: tabular-nums; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(14px, 4vw, 36px) 48px; display: grid; gap: clamp(22px, 4vw, 40px); }
.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(16px, 2.6vw, 26px); position: relative; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
.pill { font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--line); color: var(--fg); font-variant-numeric: tabular-nums; }

/* HUD */
.hud { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(14px, 4vw, 36px); background: rgba(10, 10, 15, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); margin-bottom: clamp(18px, 3vw, 30px); }
.hud-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hud-logo { font-size: 1.4rem; }
.hud-name { font-family: var(--display); font-size: .78rem; letter-spacing: .14em; white-space: nowrap; }
.hud-name b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hud-stats { display: flex; gap: 8px; align-items: center; }
.chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line2); font-size: .8rem; white-space: nowrap; }
.chip b { font-family: var(--display); font-variant-numeric: tabular-nums; }
.chip-sub { color: var(--muted); font-size: .72rem; }
.flame { display: inline-block; transform-origin: 50% 90%; }
.lvl { font-family: var(--display); font-size: .7rem; letter-spacing: .08em; }
.xpbar { width: clamp(60px, 12vw, 140px); height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.xpbar span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 12px rgba(255, 61, 139, .6); }
@media (max-width: 560px) { .hud-name { display: none; } .chip-level .chip-sub { display: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; overflow: hidden;
  padding: clamp(22px, 4.5vw, 48px);
  background: radial-gradient(90% 120% at 0% 0%, rgba(255, 107, 61, .18), transparent 55%), radial-gradient(80% 100% at 100% 100%, rgba(168, 85, 247, .2), transparent 55%), linear-gradient(180deg, var(--panel2), var(--panel)); }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } .hero-ipad { order: -1; } }
.hero h1 { font-family: var(--display); font-size: clamp(1.6rem, 4.2vw, 2.7rem); line-height: 1.08; letter-spacing: -.02em; margin-top: 10px; }
.countdown { display: flex; align-items: flex-end; gap: 14px; margin-top: clamp(18px, 3vw, 28px); }
.mega { font-family: var(--display); font-weight: 800; font-size: clamp(4.2rem, 12vw, 7.5rem); line-height: .85; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.countdown-sub { color: var(--muted); font-size: 1rem; line-height: 1.25; padding-bottom: 6px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.trio > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.trio .num { font-family: var(--display); font-size: clamp(1.2rem, 2.6vw, 1.6rem); }
.trio .goal { border-color: rgba(255, 107, 61, .55); box-shadow: inset 0 0 24px rgba(255, 107, 61, .12); }
.pace { margin: 16px 0 0; color: var(--muted); line-height: 1.5; }
.pace b { color: var(--fg); font-variant-numeric: tabular-nums; }
.hero-ipad { display: flex; justify-content: center; }
.ipad { width: min(100%, 300px); aspect-ratio: 3 / 4; }

/* Day */
.day { display: grid; gap: 14px; scroll-margin-top: 80px; }
.day-head { display: flex; align-items: center; gap: 10px; }
.day-title { flex: 1; min-width: 0; text-align: center; }
.day-title h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line2); background: var(--panel2); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: transform .15s, border-color .15s; }
.nav-btn:hover:not(:disabled) { transform: scale(1.06); border-color: var(--cal); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.today-btn { padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel2); font-weight: 600; font-size: .85rem; cursor: pointer; }
.today-btn[hidden] { display: none; }
.day-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; }
@media (max-width: 860px) { .day-grid { grid-template-columns: 1fr; } }

.rank-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; gap: 18px; align-items: center; align-content: space-around; }
.rank { width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center; position: relative; background: var(--line); }
.rank::before { content: ""; position: absolute; inset: 3px; border-radius: 21px; background: var(--panel); }
.rank-letter { position: relative; font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: 1; }
.rank[data-r="S"] { background: conic-gradient(from 0deg, #ffd34d, #ff6b3d, #ff3d8b, #a855f7, #5b8cff, #22d3c5, #ffd34d); box-shadow: 0 0 40px rgba(255, 211, 77, .35); }
.rank[data-r="S"] .rank-letter { background: linear-gradient(180deg, #fff3b0, #ffd34d 50%, #ff9d2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rank[data-r="A"] { background: var(--rA); box-shadow: 0 0 28px rgba(74, 222, 128, .25); } .rank[data-r="A"] .rank-letter { color: var(--rA); }
.rank[data-r="B"] { background: var(--rB); box-shadow: 0 0 28px rgba(91, 140, 255, .25); } .rank[data-r="B"] .rank-letter { color: var(--rB); }
.rank[data-r="C"] { background: var(--rC); } .rank[data-r="C"] .rank-letter { color: var(--rC); }
.rank[data-r="D"] { background: var(--rD); } .rank[data-r="D"] .rank-letter { color: var(--rD); }
.rank-meta p { margin: 0; }
.score { font-family: var(--display); }
.score b { font-size: 2.2rem; }
.score span { color: var(--muted); font-size: .9rem; margin-left: 4px; }
.day-xp { margin-top: 6px !important; font-weight: 700; font-size: .85rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rings { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 16px; align-items: center; }
.rings svg { width: 100%; height: auto; display: block; }
.ring-legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ring-legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.ring-legend i { width: 10px; height: 10px; border-radius: 50%; }
.ring-legend b { font-variant-numeric: tabular-nums; }
.ring-legend span.of { color: var(--muted); font-size: .78rem; }
@media (max-width: 480px) { .rings { grid-template-columns: 1fr; justify-items: center; } .rings svg { max-width: 220px; } .ring-legend { width: 100%; } }

.quests { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.quest { display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .025); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.quest .q-icon { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; background: var(--line); }
.quest .q-name { font-weight: 600; font-size: .92rem; }
.quest .q-val { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.quest .q-bar { grid-column: 2 / 4; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.quest .q-bar span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.quest.done { border-color: rgba(74, 222, 128, .45); background: rgba(74, 222, 128, .06); }
.quest.done .q-icon { background: var(--good); color: #062b14; }
.quest.over { border-color: rgba(255, 95, 109, .45); background: rgba(255, 95, 109, .06); }
.quest .q-xp { font-size: .7rem; font-weight: 700; color: var(--muted); margin-left: 6px; }
.quest.done .q-xp { color: var(--good); }

.fuel-card { display: grid; }
.meal { margin-top: 6px; }
.meal + .meal { margin-top: 18px; }
.meal-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.meal-head span { letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; font-weight: 600; }
.food { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(38, 38, 52, .6); position: relative; }
.food::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--w, 0); background: linear-gradient(90deg, var(--cal), transparent); opacity: .7; border-radius: 2px; }
.food .f-item { font-size: .95rem; line-height: 1.3; }
.food .f-cal { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.food .f-pro { font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(91, 140, 255, .14); color: var(--pro); white-space: nowrap; min-width: 52px; text-align: center; }
.food .f-water { margin-left: 8px; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(34, 211, 197, .14); color: var(--water); white-space: nowrap; font-variant-numeric: tabular-nums; }
.food.untracked .f-item { color: var(--muted); font-style: italic; }
.food.untracked::before { display: none; }
.meal-head b.h2o { color: var(--water); font-weight: 700; }
.h2o-bar { height: 6px; border-radius: 99px; background: rgba(34, 211, 197, .14); overflow: hidden; margin: 8px 0 2px; }
.h2o-bar span { display: block; height: 100%; background: var(--water); border-radius: 99px; box-shadow: 0 0 10px rgba(34, 211, 197, .6); }
.food .f-pro.zero { background: var(--line); color: var(--dim); }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }
.empty big { display: block; font-size: 2.2rem; margin-bottom: 8px; }
.day-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin-top: 18px; }
.day-extras:empty { display: none; }
.extra { padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.extra p { margin: 2px 0 0; font-weight: 600; }
.extra.note { grid-column: 1 / -1; }
.extra.note p { font-weight: 400; font-style: italic; color: #d9d6e3; }

/* Streaks */
.streaks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 124px), 1fr)); gap: 12px; }
.streak { padding: 16px; border-radius: var(--r); background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); position: relative; overflow: hidden; }
.streak .s-top { display: flex; justify-content: space-between; align-items: center; }
.streak .s-icon { font-size: 1.3rem; }
.streak .s-best { font-size: .72rem; color: var(--muted); }
.streak .stat-num { font-family: var(--display); font-size: 2.2rem; font-weight: 700; margin-top: 10px; display: block; line-height: 1; }
.streak .s-lbl { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.streak.hot { border-color: rgba(255, 107, 61, .55); }
.streak.hot::after { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 90%; background: radial-gradient(closest-side, rgba(255, 107, 61, .28), transparent); pointer-events: none; }
.streak.cold .stat-num { color: var(--dim); }

.habits { margin-top: 12px; }
.habit-grid { display: grid; grid-template-columns: minmax(120px, 1.2fr) repeat(7, minmax(0, 1fr)) 52px; gap: 8px 6px; align-items: center; }
.habit-grid .h-day { text-align: center; font-size: .68rem; color: var(--muted); letter-spacing: .06em; }
.habit-grid .h-day.today { color: var(--cal); font-weight: 700; }
.habit-grid .h-name { font-size: .88rem; font-weight: 600; display: flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.habit-grid .h-cell { height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.habit-grid .h-cell.on { border-color: transparent; }
.habit-grid .h-cell.pre { background: transparent; border-style: dashed; opacity: .35; }
.habit-grid .h-count { text-align: right; font-family: var(--display); font-size: .95rem; font-variant-numeric: tabular-nums; }
.habit-grid .h-count small { color: var(--muted); font-family: var(--sans); font-size: .7rem; }
@media (max-width: 520px) { .habit-grid { grid-template-columns: 92px repeat(7, minmax(0, 1fr)) 34px; gap: 6px 4px; } .habit-grid .h-name { font-size: .78rem; gap: 4px; } .habit-grid .h-cell { height: 22px; border-radius: 6px; } .habit-grid .h-count small { display: none; } }
.streak .s-week { font-size: .72rem; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.streak .s-week b { color: var(--fg); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(4px, 1vw, 8px); }
.cal .wd { text-align: center; font-size: .7rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; padding-bottom: 4px; }
.tile { aspect-ratio: 1 / 1.05; border-radius: clamp(8px, 1.4vw, 14px); border: 1px solid var(--line); background: rgba(255, 255, 255, .02); padding: clamp(4px, 1vw, 9px); display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; position: relative; min-width: 0; transition: transform .15s, border-color .15s; text-align: left; }
.tile:hover:not(.out) { transform: translateY(-2px); border-color: var(--line2); }
.tile .t-n { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile .t-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 2px; }
.tile .t-tags { font-size: clamp(.5rem, 1.3vw, .8rem); line-height: 1; letter-spacing: -.05em; }
.tile .t-rank { font-family: var(--display); font-weight: 800; font-size: clamp(1rem, 3.4vw, 1.9rem); line-height: 1; align-self: center; }
.tile .t-dots { display: flex; gap: 3px; justify-content: center; }
.tile .t-dots i { width: clamp(4px, .9vw, 7px); height: clamp(4px, .9vw, 7px); border-radius: 50%; background: var(--line2); }
.tile.out { opacity: .25; cursor: default; border-style: dashed; }
.tile.future { background: transparent; }
.tile.future .t-rank { color: var(--line2); font-size: clamp(.7rem, 2vw, 1rem); }
.tile.today { border-color: var(--cal); }
.tile.sel { outline: 2px solid var(--fg); outline-offset: 2px; }
.tile.r-S { background: linear-gradient(135deg, rgba(255, 211, 77, .25), rgba(255, 61, 139, .18), rgba(168, 85, 247, .22)); border-color: rgba(255, 211, 77, .6); box-shadow: 0 0 18px rgba(255, 211, 77, .2); }
.tile.r-A { background: rgba(74, 222, 128, .1); border-color: rgba(74, 222, 128, .35); }
.tile.r-B { background: rgba(91, 140, 255, .1); border-color: rgba(91, 140, 255, .35); }
.tile.r-C { background: rgba(245, 165, 36, .1); border-color: rgba(245, 165, 36, .3); }
.tile.r-D { background: rgba(255, 95, 109, .08); border-color: rgba(255, 95, 109, .3); }
.t-rank.r-S { background: linear-gradient(180deg, #fff3b0, #ffd34d 50%, #ff9d2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t-rank.r-A { color: var(--rA); } .t-rank.r-B { color: var(--rB); } .t-rank.r-C { color: var(--rC); } .t-rank.r-D { color: var(--rD); }
.tile.boss { background: linear-gradient(135deg, rgba(255, 107, 61, .3), rgba(168, 85, 247, .3)); border-color: rgba(255, 107, 61, .7); }
.tile.boss .t-rank { font-size: clamp(1rem, 3.4vw, 1.8rem); }
.tile .t-boss { font-size: clamp(.5rem, 1.2vw, .66rem); font-weight: 800; letter-spacing: .1em; text-align: center; color: var(--fg); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 0; padding: 0; font-size: .78rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { font-style: normal; font-family: var(--display); font-weight: 800; }
.legend i.r-S { color: var(--rS); } .legend i.r-A { color: var(--rA); } .legend i.r-B { color: var(--rB); } .legend i.r-C { color: var(--rC); } .legend i.r-D { color: var(--rD); }
.legend .dots-key i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 4px; }

@media (min-width: 720px) { .tile { aspect-ratio: 1.45 / 1; } }

.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cal-nav h3 { font-family: var(--display); font-size: 1rem; }
.cal-nav .nav-btn { width: 36px; height: 36px; font-size: 1.2rem; }
.tile.other { visibility: hidden; }

/* Quest log */
.questlog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.qlog { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--panel)); }
.qlog.cur { border-color: rgba(255, 107, 61, .55); box-shadow: inset 0 0 30px rgba(255, 107, 61, .08); }
.qlog.won { border-color: rgba(255, 211, 77, .55); }
.ql-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: var(--line); }
.qlog.won .ql-icon { background: linear-gradient(135deg, rgba(255, 211, 77, .35), rgba(255, 61, 139, .3)); }
.ql-main { display: grid; gap: 5px; min-width: 0; }
.ql-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ql-status { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: var(--line); color: var(--muted); white-space: nowrap; }
.ql-status.s-inprogress { background: rgba(255, 107, 61, .18); color: var(--cal); }
.ql-status.s-won { background: rgba(255, 211, 77, .18); color: var(--rS); }
.ql-status.s-upnext { background: rgba(91, 140, 255, .16); color: var(--pro); }
.ql-sub { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ql-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ql-bar span { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* Achievements */
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.badge { padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--panel)); display: grid; grid-template-columns: 48px 1fr; gap: 4px 12px; align-items: center; position: relative; overflow: hidden; }
.badge .b-icon { grid-row: 1 / 4; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--line); }
.badge .b-name { font-weight: 700; font-size: .9rem; }
.badge .b-desc { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.badge .b-meta { font-size: .7rem; font-weight: 700; color: var(--dim); display: flex; gap: 8px; align-items: center; }
.badge .b-bar { flex: 1; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.badge .b-bar span { display: block; height: 100%; background: var(--muted); border-radius: 99px; }
.badge.locked .b-icon { filter: grayscale(1); opacity: .45; }
.badge.locked .b-name { color: #c5c2cf; }
.badge.on { border-color: rgba(255, 211, 77, .45); background: radial-gradient(120% 100% at 0% 0%, rgba(255, 211, 77, .14), transparent 60%), linear-gradient(180deg, var(--panel2), var(--panel)); }
.badge.on .b-icon { background: linear-gradient(135deg, rgba(255, 211, 77, .35), rgba(255, 61, 139, .3)); box-shadow: 0 0 18px rgba(255, 211, 77, .25); }
.badge.on .b-meta { color: var(--rS); }
.badge.mystery { border-style: dashed; background: transparent; }
.badge.mystery .b-icon { background: transparent; border: 1px dashed var(--line2); }
.badge.mystery .b-name { color: #c5c2cf; }
.badge.fresh { animation: pop 1.2s cubic-bezier(.2, .8, .2, 1); }

/* Charts */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.chart { position: relative; min-height: 190px; margin-top: 10px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.tip { position: absolute; z-index: 5; pointer-events: none; background: #1f1f2c; border: 1px solid var(--line2); border-radius: 10px; padding: 6px 10px; font-size: .78rem; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-variant-numeric: tabular-nums; }
.tip .d { color: var(--muted); margin-bottom: 2px; }

.foot { text-align: center; color: var(--dim); font-size: .78rem; padding-top: 8px; }

/* Toasts + confetti */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: grid; gap: 10px; width: min(92vw, 420px); }
.toast { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: #1c1c28; border: 1px solid rgba(255, 211, 77, .5); box-shadow: 0 16px 50px rgba(0, 0, 0, .6), 0 0 30px rgba(255, 211, 77, .2); animation: toast-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.toast.out { animation: toast-out .4s ease-in both; }
.toast .t-ico { font-size: 1.8rem; text-align: center; }
.toast .t-kicker { font-size: .66rem; letter-spacing: .16em; font-weight: 800; color: var(--rS); text-transform: uppercase; }
.toast .t-msg { font-weight: 700; }

.skeleton { background: linear-gradient(90deg, var(--line), var(--line2), var(--line)); background-size: 200% 100%; animation: sk 1.4s linear infinite; border-radius: var(--r-sm); min-height: 120px; }
@keyframes sk { to { background-position: -200% 0; } }
@keyframes pop { 0% { transform: scale(.85); } 50% { transform: scale(1.04); } 100% { transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }
@keyframes flicker { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(4deg) scale(1.12); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 61, .5); } 50% { box-shadow: 0 0 0 6px rgba(255, 107, 61, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: no-preference) {
  .flame { animation: flicker 1.6s ease-in-out infinite; }
  .tile.today { animation: pulse 2.2s ease-in-out infinite; }
  .wrap > section { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
  .wrap > section:nth-child(2) { animation-delay: .06s; } .wrap > section:nth-child(3) { animation-delay: .12s; }
  .wrap > section:nth-child(4) { animation-delay: .18s; } .wrap > section:nth-child(n+5) { animation-delay: .24s; }
}
