/* Reprise UI kit v2. Every class is rp-*. Every colour, size, radius, shadow and duration is a token from tokens.css. Two registers: calm (paper chrome, status, settings) and stage (dark, expressive: share, story, hero moments). */
@font-face { font-family: "lucide"; src: url("../fonts/lucide.woff2") format("woff2"); font-display: block; }
.rp { font-family: var(--font-sans); color: var(--text); -webkit-font-smoothing: antialiased; }
.rp *, .rp *::before, .rp *::after { box-sizing: border-box; }
.rp button { font-family: inherit; cursor: pointer; }
.i { font-family: "lucide"; font-style: normal; font-weight: 400; line-height: 1; display: inline-block; font-size: 20px; -webkit-font-smoothing: antialiased; }
.rp-tab { font-variant-numeric: tabular-nums; }
.rp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Type (only these; never a raw font-size in features) ---------- */
.t-display, .t-title-1, .t-title-2, .t-title-3, .t-headline, .t-stat-xl, .t-stat, .t-stat-sm { font-family: var(--font-display); margin: 0; color: var(--text); }
.t-display { font-size: 56px; line-height: 1; letter-spacing: -1.12px; font-weight: 700; }
.t-title-1 { font-size: 36px; line-height: 1.08; letter-spacing: -0.54px; font-weight: 700; }
.t-title-2 { font-size: 28px; line-height: 1.12; letter-spacing: -0.28px; font-weight: 700; }
.t-title-3 { font-size: 22px; line-height: 1.2; font-weight: 700; }
.t-headline { font-size: 18px; line-height: 1.25; font-weight: 600; }
.t-stat-xl { font-size: 64px; line-height: 0.95; letter-spacing: -1.6px; font-weight: 800; font-variant-numeric: tabular-nums lining-nums; }
.t-stat { font-size: 40px; line-height: 1; letter-spacing: -0.8px; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.t-stat-sm { font-size: 26px; line-height: 1; letter-spacing: -0.26px; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.t-body-lg { font-size: 17px; line-height: 1.5; margin: 0; }
.t-body { font-size: 15px; line-height: 1.5; margin: 0; }
.t-body-sm { font-size: 14px; line-height: 1.45; margin: 0; }
.t-label { font-size: 15px; line-height: 1.2; font-weight: 600; }
.t-label-sm { font-size: 13px; line-height: 1.2; font-weight: 600; }
.t-caption { font-size: 12px; line-height: 1.35; font-weight: 500; }
.t-overline { font-size: 11px; line-height: 1.2; letter-spacing: 1.32px; font-weight: 700; text-transform: uppercase; color: var(--accent-text); }
.t-italic { font-style: italic; }
.c-2 { color: var(--text-secondary); } .c-3 { color: var(--text-tertiary); } .c-accent { color: var(--accent-text); } .c-sent { color: var(--status-sent-text); } .c-failed { color: var(--status-failed-text); } .c-on-stage { color: var(--on-stage); } .c-on-stage-2 { color: var(--on-stage-muted); }

/* ---------- Screen + layout ---------- */
.rp-screen { position: relative; width: 390px; background: var(--surface); color: var(--text); overflow: hidden; }
.rp-body { padding-top: 100px; display: flex; flex-direction: column; gap: var(--section-gap); padding-bottom: 220px; }
.rp-section { padding: 0 var(--gutter); display: flex; flex-direction: column; gap: var(--space-4); }
.rp-section-head { display: flex; align-items: flex-end; gap: var(--space-2); min-height: 44px; }
.rp-section-head__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.rp-section-head__title { font-family: var(--font-display); font-size: 22px; line-height: 1.2; font-weight: 700; margin: 0; }
.rp-stack { display: flex; flex-direction: column; gap: var(--space-3); }
.rp-hstack { display: flex; align-items: center; gap: var(--space-3); }
.rp-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.rp-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.rp-rail { display: flex; gap: var(--space-4); overflow: hidden; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.rp-divider { height: 1px; background: var(--divider); }
.rp-spacer { flex: 1; }

/* ---------- Chrome (Liquid Glass, navigation layer only) ---------- */
.rp-appbar { position: absolute; left: 0; right: 0; top: 0; height: 100px; padding: 54px 16px 0; display: flex; align-items: center; gap: var(--space-3); z-index: 5; background: linear-gradient(var(--surface) 60%, transparent); }
.rp-appbar__title { flex: 1; text-align: center; font-size: 17px; font-weight: 600; color: var(--text); }
.rp-appbar__lead { display: flex; align-items: center; gap: var(--space-2); min-width: 44px; }
.rp-glass { background: var(--glass-fill); border: 1px solid var(--glass-stroke); box-shadow: var(--elev-3); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); }
.rp-appbar__group { display: flex; align-items: center; padding: 2px; border-radius: var(--r-pill); }
.rp-appbar__btn { width: 44px; height: 40px; border-radius: var(--r-pill); display: grid; place-items: center; color: var(--text); background: none; border: 0; }
.rp-appbar__btn .i { font-size: 19px; }
.rp-back { background: none; display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 12px 0 6px; border-radius: var(--r-pill); color: var(--text); font-size: 15px; font-weight: 600; border: 0; }
.rp-back .i { font-size: 22px; }
.rp-tabbar { position: absolute; left: 20px; right: 20px; bottom: 26px; height: 64px; border-radius: var(--r-pill); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; padding: 4px; z-index: 6; }
.rp-tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 56px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 600; color: var(--text-secondary); background: none; border: 0; }
.rp-tabbar__item .i { font-size: 22px; }
.rp-tabbar__item--on { color: var(--accent-text); background: var(--accent-soft); }
.rp-dock { position: absolute; left: 12px; right: 12px; bottom: 100px; z-index: 5; display: flex; flex-direction: column; gap: var(--space-2); }

/* ---------- Buttons: one shape (pill) on both platforms ---------- */
.rp-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 48px; min-width: 44px; padding: 0 22px; border-radius: var(--r-pill); border: 0; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; transition: transform var(--dur-fast) var(--ease-standard); }
.rp-btn .i { font-size: 18px; }
.rp-btn--primary { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--elev-1); }
.rp-btn--secondary { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rp-btn--tonal { background: var(--accent-soft); color: var(--accent-press); }
.rp-btn--quiet { background: transparent; color: var(--accent-text); padding: 0 14px; }
.rp-btn--stage { background: var(--on-stage); color: var(--stage); }
.rp-btn--danger { background: var(--status-failed-bg); color: var(--status-failed-text); }
.rp-btn--sm { height: 44px; padding: 0 16px; font-size: 14px; }
.rp-btn--lg { height: 56px; padding: 0 28px; font-size: 17px; }
.rp-btn--block { width: 100%; }
.rp-btn--loading { color: transparent; position: relative; }
.rp-btn--loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--text-on-accent) transparent var(--text-on-accent) var(--text-on-accent); animation: rp-spin 900ms linear infinite; }
.rp-btn[disabled], .rp-btn--disabled { opacity: 0.45; box-shadow: none; }
.rp-btn:focus-visible, .rp-icon-btn:focus-visible, .rp-chip:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Icon buttons: 44 minimum everywhere (the v1 34px share button is gone) */
.rp-icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--text); }
.rp-icon-btn .i { font-size: 19px; }
.rp-icon-btn--soft { background: var(--surface-sunken); color: var(--text); }
.rp-icon-btn--tonal { background: var(--accent-soft); color: var(--accent-press); }
.rp-icon-btn--accent { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--elev-accent); }
.rp-icon-btn--stage { background: rgba(243,238,227,0.12); color: var(--on-stage); }
.rp-icon-btn--fab { width: 56px; height: 56px; }
.rp-icon-btn--fab .i { font-size: 24px; }

/* ---------- Chip: the one pill (tags, badges, status, deltas, Pro) ---------- */
.rp-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 0; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; background: var(--surface-sunken); color: var(--text-secondary); }
.rp-chip .i { font-size: 14px; }
.rp-chip--sm { height: 24px; padding: 0 9px; font-size: 11.5px; gap: 4px; }
.rp-chip--sm .i { font-size: 12px; }
.rp-chip--tap { height: 44px; padding: 0 16px; font-size: 14px; }
.rp-chip--selected { background: var(--text); color: var(--surface); }
.rp-chip--accent { background: var(--accent-soft); color: var(--accent-press); }
.rp-chip--sent { background: var(--status-sent-bg); color: var(--status-sent-text); }
.rp-chip--queued { background: var(--status-queued-bg); color: var(--status-queued-text); }
.rp-chip--sending { background: var(--status-sending-bg); color: var(--status-sending-text); }
.rp-chip--failed { background: var(--status-failed-bg); color: var(--status-failed-text); }
.rp-chip--up { background: var(--status-sent-bg); color: var(--status-sent-text); }
.rp-chip--down { background: var(--status-failed-bg); color: var(--status-failed-text); }
.rp-chip--pro { background: var(--stage); color: var(--stage-accent); letter-spacing: 1.1px; font-weight: 800; }
.rp-chip--stage { background: rgba(243,238,227,0.12); color: var(--on-stage); }
.rp-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Status glyph (queue rows) */
.rp-status { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; }
.rp-status .i { font-size: 14px; }
.rp-status--sent { background: var(--status-sent-bg); color: var(--status-sent-text); }
.rp-status--queued { background: var(--status-queued-bg); color: var(--status-queued-text); }
.rp-status--sending { background: var(--status-sending-bg); color: var(--status-sending-text); }
.rp-status--failed { background: var(--status-failed-bg); color: var(--status-failed-text); }

/* Health chip: the trust signal in the app bar, tied to the real queue */
.rp-health { background: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--text); border: 0; }
.rp-health__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status-sent); box-shadow: 0 0 0 3px var(--status-sent-bg); }
.rp-health--queued .rp-health__dot { background: var(--status-queued); box-shadow: 0 0 0 3px var(--status-queued-bg); }
.rp-health--sending .rp-health__dot { background: var(--status-sending); box-shadow: 0 0 0 3px var(--status-sending-bg); }
.rp-health--failed .rp-health__dot { background: var(--status-failed); box-shadow: 0 0 0 3px var(--status-failed-bg); }

/* ---------- Media ---------- */
.rp-art { position: relative; flex: none; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: var(--elev-2); }
.rp-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 26% 18%, var(--a), transparent 55%), radial-gradient(circle at 82% 92%, var(--b), transparent 60%), radial-gradient(circle at 28% 16%, rgba(255,255,255,0.22), transparent 45%); }
.rp-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, transparent 62%, rgba(0,0,0,0.18) 100%); }
.rp-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.rp-art--circle { border-radius: 50%; overflow: visible; }
.rp-art--circle img, .rp-art--circle::before, .rp-art--circle::after { border-radius: 50%; }
.rp-art--circle .rp-rank-badge { top: 2px; left: 2px; box-shadow: 0 0 0 2px var(--surface); }
.rp-art--sm { border-radius: var(--r-sm); }
.rp-art--lg { border-radius: var(--r-lg); }
.rp-art--flat { box-shadow: none; }
.p1 { --a: #d98c6a; --b: #6e4b8a; } .p2 { --a: #c19a57; --b: #3a5a6b; } .p3 { --a: #a86b4c; --b: #2e2a22; } .p4 { --a: #7f8aa0; --b: #2a3340; } .p5 { --a: #b8915a; --b: #5a3a3a; } .p6 { --a: #6e9466; --b: #2e3a28; } .p7 { --a: #caa15e; --b: #7a3b2e; }
.rp-vinyl { position: relative; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 38%, var(--vinyl-sheen) 0%, var(--vinyl-base) 45%, var(--vinyl-base) 100%); box-shadow: var(--elev-2); }
.rp-vinyl::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 210deg, transparent 0%, rgba(255,255,255,0.14) 8%, transparent 19%, transparent 50%, rgba(255,255,255,0.09) 58%, transparent 69%), repeating-radial-gradient(circle, var(--vinyl-groove) 0 0.7px, transparent 0.7px 2.4px); -webkit-mask: radial-gradient(circle, transparent 22%, #000 23%, #000 95%, transparent 96%); mask: radial-gradient(circle, transparent 22%, #000 23%, #000 95%, transparent 96%); }
.rp-vinyl__label { position: absolute; left: 29%; top: 29%; width: 42%; height: 42%; border-radius: 50%; background: radial-gradient(circle at 38% 28%, rgba(255,255,255,0.24), transparent 62%), var(--label, var(--accent)); box-shadow: 0 0 0 4px var(--vinyl-base); overflow: hidden; }
.rp-vinyl__label .rp-art { width: 100%; height: 100%; border-radius: 50%; box-shadow: none; }
.rp-vinyl::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--vinyl-base); z-index: 2; }
.rp-vinyl--spin { animation: rp-spin var(--dur-vinyl) linear infinite; }
@keyframes rp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rp-vinyl--spin, .rp-btn--loading::after { animation: none; } }
.rp-avatar { flex: none; border-radius: 50%; background: var(--surface-sunken); color: var(--text-secondary); display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.rp-avatar--ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }

/* ---------- Cards ---------- */
.rp-card { background: var(--surface-2); border-radius: var(--r-lg); box-shadow: var(--elev-2); padding: var(--card-pad); }
.rp-card--flat { box-shadow: none; background: var(--surface-sunken); }
.rp-card--tap { display: block; text-align: left; border: 0; width: 100%; color: inherit; }
.rp-card--stage { background: radial-gradient(120% 90% at 85% 0%, var(--stage-glow), transparent 60%), var(--stage); color: var(--on-stage); box-shadow: var(--elev-stage); }
.rp-card--stage .t-overline { color: var(--stage-accent); }
.rp-card--stage .t-display, .rp-card--stage .t-title-1, .rp-card--stage .t-title-2, .rp-card--stage .t-title-3, .rp-card--stage .t-headline, .rp-card--stage .t-stat-xl, .rp-card--stage .t-stat, .rp-card--stage .t-stat-sm { color: var(--on-stage); }
.rp-card__foot { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }

/* Metric hero: one number, its change, its shape, and how we count it */
.rp-metric { display: flex; flex-direction: column; gap: var(--space-2); }
.rp-metric__row { display: flex; align-items: flex-end; gap: var(--space-3); }
.rp-metric__spark { flex: 1; height: 44px; min-width: 0; }
.rp-spark { width: 100%; height: 100%; display: block; overflow: visible; }
.rp-spark__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rp-spark__area { fill: var(--accent-soft); stroke: none; opacity: 0.8; }
.rp-spark__dot { fill: var(--accent); stroke: var(--surface-2); stroke-width: 2.5; }
.rp-card--stage .rp-spark__line { stroke: var(--stage-accent); }
.rp-card--stage .rp-spark__area { fill: var(--stage-glow); }
.rp-card--stage .rp-spark__dot { fill: var(--stage-accent); stroke: var(--stage); }
.rp-how { display: inline-flex; align-items: center; gap: 5px; height: 44px; font-size: 12px; font-weight: 500; color: var(--text-tertiary); background: none; border: 0; padding: 0; }
.rp-how .i { font-size: 13px; }
.rp-card--stage .rp-how { color: var(--on-stage-muted); }

/* Stat strip: three compact numbers (replaces five identical cards) */
.rp-stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface-2); border-radius: var(--r-lg); box-shadow: var(--elev-1); }
.rp-stat-strip__cell { padding: 16px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rp-stat-strip__cell + .rp-stat-strip__cell { box-shadow: inset 1px 0 0 var(--divider); }

/* Ranked row: the spine of every list */
.rp-rank-row { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: 8px 0; }
.rp-rank-row__rank { width: 28px; flex: none; text-align: center; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.rp-rank-row__rank--top { color: var(--accent-text); }
.rp-rank-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rp-rank-row__title { font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-rank-row__sub { font-size: 13px; line-height: 1.3; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-rank-row__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.rp-rank-row__count { font-size: 13px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.rp-move { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rp-move .i { font-size: 12px; }
.rp-move--up { color: var(--status-sent-text); } .rp-move--down { color: var(--status-failed-text); } .rp-move--same { color: var(--text-tertiary); } .rp-move--new { color: var(--accent-text); letter-spacing: 0.6px; }
.rp-bar { height: 4px; border-radius: 2px; background: var(--surface-sunken); overflow: hidden; }
.rp-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.rp-list { background: var(--surface-2); border-radius: var(--r-lg); box-shadow: var(--elev-1); padding: 4px 16px; }
.rp-list > * + * { box-shadow: inset 0 1px 0 var(--divider); }

/* Tiles for rails */
.rp-tile { width: 128px; flex: none; display: flex; flex-direction: column; gap: var(--space-2); }
.rp-tile--artist { align-items: center; text-align: center; }
.rp-tile__title { font-size: 14px; font-weight: 600; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; }
.rp-tile__sub { font-size: 12px; color: var(--text-secondary); line-height: 1.3; }
.rp-rank-badge { position: absolute; top: 8px; left: 8px; z-index: 2; min-width: 26px; height: 26px; padding: 0 7px; border-radius: var(--r-pill); background: var(--stage); color: var(--on-stage); display: grid; place-items: center; font-family: var(--font-display); font-size: 13px; font-weight: 800; line-height: 1; }
.rp-rank-badge--top { background: var(--accent); color: var(--text-on-accent); }

/* ---------- Identity, memory, streak (the habit + self-disclosure loop) ---------- */
.rp-identity { display: flex; flex-direction: column; gap: var(--space-3); }
.rp-identity__label { font-family: var(--font-display); font-style: italic; font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: -0.3px; }
.rp-identity__facts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.rp-memory { display: flex; gap: var(--space-4); align-items: center; }
.rp-streak { display: flex; align-items: center; gap: var(--space-4); }
.rp-streak__flame { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-press); }
.rp-streak__flame .i { font-size: 24px; }
.rp-streak__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: var(--space-3); }
.rp-streak__day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-tertiary); }
.rp-streak__pip { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); color: var(--text-tertiary); }
.rp-streak__pip .i { font-size: 13px; }
.rp-streak__pip--on { background: var(--accent); color: var(--text-on-accent); }
.rp-streak__pip--freeze { background: var(--status-queued-bg); color: var(--status-queued-text); }
.rp-streak__pip--today { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--accent); }

/* ---------- Pro (honest: real data, real features) ---------- */
.rp-pro-teaser { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); box-shadow: var(--elev-2); }
.rp-pro-teaser__clear { padding: var(--card-pad) var(--card-pad) 0; }
.rp-pro-teaser__fog { padding: 0 var(--card-pad); filter: blur(6px); opacity: 0.55; pointer-events: none; }
.rp-pro-teaser__cta { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px var(--card-pad) var(--card-pad); background: linear-gradient(transparent, var(--surface-2) 45%); display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.rp-plan { display: flex; align-items: center; gap: var(--space-3); padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.rp-plan--on { box-shadow: inset 0 0 0 2.5px var(--accent); background: var(--surface-2); }
.rp-plan__radio { width: 24px; height: 24px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--border-strong); display: grid; place-items: center; }
.rp-plan--on .rp-plan__radio { background: var(--accent); box-shadow: none; color: var(--text-on-accent); }
.rp-plan__radio .i { font-size: 14px; }
.rp-plan__name { font-size: 15px; font-weight: 600; }
.rp-plan__price { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.rp-plan__per { font-size: 13px; color: var(--text-secondary); }
.rp-perk { display: flex; gap: var(--space-3); align-items: flex-start; }
.rp-perk__icon { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-press); }
.rp-perk__icon .i { font-size: 17px; }
.rp-card--stage .rp-perk__icon { background: rgba(243,238,227,0.10); color: var(--stage-accent); }

/* ---------- Share + story (stage register; 9:16 first) ---------- */
.rp-story { position: relative; width: 270px; height: 480px; border-radius: var(--r-xl); overflow: hidden; color: var(--on-stage); background: radial-gradient(110% 70% at 80% 0%, var(--stage-glow), transparent 60%), radial-gradient(90% 60% at 0% 100%, rgba(193,154,87,0.16), transparent 70%), var(--stage); box-shadow: var(--elev-stage); display: flex; flex-direction: column; padding: 22px 20px 18px; }
.rp-story__progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.rp-story__progress span { height: 3px; border-radius: 2px; background: rgba(243,238,227,0.25); }
.rp-story__progress .on { background: var(--on-stage); }
.rp-story__brand { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 10px; font-weight: 800; letter-spacing: 2px; color: var(--stage-accent); }
.rp-story__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; color: var(--on-stage-muted); }
.rp-story__cta { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: var(--on-stage); color: var(--stage); font-size: 11px; font-weight: 700; }
.rp-share-target { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; font-size: 12px; font-weight: 600; color: var(--text-secondary); background: none; border: 0; }
.rp-share-target__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); color: var(--text); }
.rp-share-target__icon .i { font-size: 22px; }
.rp-share-target--primary .rp-share-target__icon { background: var(--accent); color: var(--text-on-accent); }

/* ---------- Compare (the free viral loop) ---------- */
.rp-score { position: relative; width: 168px; height: 168px; flex: none; }
.rp-score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rp-score__track { fill: none; stroke: rgba(243,238,227,0.14); stroke-width: 12; }
.rp-score__fill { fill: none; stroke: var(--stage-accent); stroke-width: 12; stroke-linecap: round; }
.rp-score__value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rp-duo { display: flex; align-items: center; }
.rp-duo > * + * { margin-left: -12px; }

/* ---------- Data viz ---------- */
.rp-heat { display: grid; grid-template-columns: 28px repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; font-size: 11px; font-weight: 600; color: var(--text-tertiary); }
.rp-heat__cell { height: 28px; border-radius: 6px; background: var(--data-0); }
.rp-heat__cell.d1 { background: var(--data-1); } .rp-heat__cell.d2 { background: var(--data-2); } .rp-heat__cell.d3 { background: var(--data-3); } .rp-heat__cell.d4 { background: var(--data-4); }
.rp-cols { display: flex; align-items: flex-end; gap: 4px; height: 96px; }
.rp-cols > span { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--data-2); }
.rp-cols > span.peak { background: var(--data-4); }
.rp-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-tertiary); }
.rp-legend span { width: 14px; height: 10px; border-radius: 3px; }

/* ---------- Now playing ---------- */
.rp-np { display: flex; align-items: center; gap: var(--space-3); height: 64px; padding: 0 6px 0 8px; border-radius: var(--r-2xl); }
.rp-np__text { flex: 1; min-width: 0; }
.rp-np__title { font-family: var(--font-display); font-size: 16px; line-height: 1.15; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-np__artist { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; width: 16px; flex: none; }
.rp-eq span { width: 3px; border-radius: 2px; background: var(--accent); }

/* ---------- Controls ---------- */
.rp-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: 40px; padding: 3px; border-radius: var(--r-pill); background: var(--surface-sunken); }
.rp-seg__item { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--text-secondary); background: none; border: 0; }
.rp-seg__item--on { background: var(--surface-2); color: var(--text); box-shadow: var(--elev-2); }
.rp-seg--glass { height: 48px; padding: 4px; border-radius: var(--r-pill); background: var(--glass-fill); }
.rp-seg--glass .rp-seg__item--on { background: var(--text); color: var(--surface); box-shadow: none; }
.rp-tabs { display: flex; gap: var(--space-5); }
.rp-tabs__item { height: 44px; display: flex; align-items: center; font-size: 15px; font-weight: 600; color: var(--text-tertiary); background: none; border: 0; padding: 0; box-shadow: inset 0 -2px 0 transparent; }
.rp-tabs__item--on { color: var(--text); box-shadow: inset 0 -2.5px 0 var(--accent); }
.rp-switch { width: 51px; height: 31px; border-radius: 16px; background: var(--border-strong); position: relative; flex: none; }
.rp-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #ffffff; box-shadow: var(--elev-2); }
.rp-switch--on { background: var(--accent); }
.rp-switch--on::after { left: 22px; }
.rp-field { display: flex; flex-direction: column; gap: 6px; }
.rp-field__label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.rp-input { height: 52px; width: 100%; padding: 0 16px; border-radius: var(--r-md); border: 0; background: var(--surface-sunken); color: var(--text); font-family: var(--font-sans); font-size: 16px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--border); }
.rp-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.rp-input-group { display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 6px 0 16px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.rp-input-group input { flex: 1; min-width: 0; border: 0; background: none; font-family: var(--font-sans); font-size: 16px; font-weight: 500; color: var(--text); outline: none; }

/* ---------- Feedback ---------- */
.rp-banner { display: flex; gap: var(--space-3); align-items: flex-start; padding: 14px 8px 14px 16px; border-radius: var(--r-md); background: var(--surface-sunken); }
.rp-banner > .i { font-size: 20px; margin-top: 1px; }
.rp-banner--failed { background: var(--status-failed-bg); } .rp-banner--failed > .i { color: var(--status-failed-text); }
.rp-banner--queued { background: var(--status-queued-bg); } .rp-banner--queued > .i { color: var(--status-queued-text); }
.rp-banner--accent { background: var(--accent-soft); } .rp-banner--accent > .i { color: var(--accent-press); }
.rp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: 40px var(--gutter); }
.rp-shimmer { background: linear-gradient(90deg, var(--surface-sunken) 30%, var(--surface-2) 50%, var(--surface-sunken) 70%); background-size: 300% 100%; border-radius: var(--r-sm); }

/* ---------- Overlays ---------- */
.rp-scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 8; }
.rp-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--surface-2); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--elev-4); padding: 10px var(--gutter) 34px; display: flex; flex-direction: column; gap: var(--space-4); }
.rp-sheet--stage { background: var(--stage); color: var(--on-stage); }
.rp-grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 0 auto 4px; }
.rp-sheet__head { display: flex; align-items: flex-start; gap: var(--space-3); }
.rp-sheet__head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Settings list ---------- */
.rp-group { display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--gutter); }
.rp-group__label { padding-left: 4px; }
.rp-group__card { background: var(--surface-2); border-radius: var(--r-lg); box-shadow: var(--elev-1); overflow: hidden; }
.rp-group__foot { padding: 0 4px; font-size: 12px; line-height: 1.4; color: var(--text-tertiary); }
.rp-srow { display: flex; align-items: center; gap: var(--space-3); padding: 10px 16px; min-height: 60px; position: relative; }
.rp-srow + .rp-srow::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--divider); }
.rp-srow__tile { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; background: var(--surface-sunken); color: var(--text-secondary); }
.rp-srow__tile .i { font-size: 18px; }
.rp-srow__tile--accent { background: var(--accent-soft); color: var(--accent-press); }
.rp-srow__tile--danger { background: var(--status-failed-bg); color: var(--status-failed-text); }
.rp-srow__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-srow__title { font-size: 15px; font-weight: 600; }
.rp-srow__sub { font-size: 13px; line-height: 1.35; color: var(--text-secondary); }
.rp-srow__trail { color: var(--text-tertiary); font-size: 18px; flex: none; }
.rp-srow__value { font-size: 14px; color: var(--text-secondary); flex: none; }
/* Lucide icon map (ISC licence). Usage: <i class="i i-heart" aria-hidden="true"></i> */
.i-heart::before{content:"\e0f2"}
.i-share::before{content:"\e155"}
.i-share-2::before{content:"\e156"}
.i-check::before{content:"\e06c"}
.i-check-check::before{content:"\e38e"}
.i-rotate-ccw::before{content:"\e148"}
.i-settings::before{content:"\e154"}
.i-house::before{content:"\e0f5"}
.i-chart-column::before{content:"\e2a3"}
.i-chart-bar::before{content:"\e2a2"}
.i-search::before{content:"\e151"}
.i-user::before{content:"\e19f"}
.i-users::before{content:"\e1a4"}
.i-flame::before{content:"\e0d2"}
.i-calendar::before{content:"\e063"}
.i-calendar-days::before{content:"\e2b9"}
.i-disc::before{content:"\e0af"}
.i-disc-3::before{content:"\e494"}
.i-mic::before{content:"\e118"}
.i-sparkles::before{content:"\e412"}
.i-sparkle::before{content:"\e47e"}
.i-lock::before{content:"\e10b"}
.i-lock-open::before{content:"\e10c"}
.i-play::before{content:"\e13c"}
.i-clock::before{content:"\e087"}
.i-layout-grid::before{content:"\e0ff"}
.i-trending-up::before{content:"\e191"}
.i-trending-down::before{content:"\e190"}
.i-external-link::before{content:"\e0b9"}
.i-chevron-left::before{content:"\e06e"}
.i-chevron-right::before{content:"\e06f"}
.i-chevron-down::before{content:"\e06d"}
.i-chevron-up::before{content:"\e070"}
.i-x::before{content:"\e1b2"}
.i-link::before{content:"\e102"}
.i-radio::before{content:"\e142"}
.i-music::before{content:"\e122"}
.i-music-2::before{content:"\e34a"}
.i-smartphone::before{content:"\e163"}
.i-pencil::before{content:"\e1f9"}
.i-square-pen::before{content:"\e172"}
.i-zap::before{content:"\e1b4"}
.i-trash-2::before{content:"\e18e"}
.i-skip-forward::before{content:"\e160"}
.i-triangle-alert::before{content:"\e193"}
.i-wifi-off::before{content:"\e1af"}
.i-wifi::before{content:"\e1ae"}
.i-activity::before{content:"\e038"}
.i-shield-check::before{content:"\e1ff"}
.i-bell::before{content:"\e059"}
.i-bell-ring::before{content:"\e224"}
.i-trophy::before{content:"\e373"}
.i-log-out::before{content:"\e10e"}
.i-plus::before{content:"\e13d"}
.i-minus::before{content:"\e11c"}
.i-cake::before{content:"\e344"}
.i-file-text::before{content:"\e0cc"}
.i-download::before{content:"\e0b2"}
.i-info::before{content:"\e0f9"}
.i-mail::before{content:"\e10f"}
.i-bug::before{content:"\e20c"}
.i-crown::before{content:"\e1d6"}
.i-sliders-horizontal::before{content:"\e29a"}
.i-user-x::before{content:"\e1a3"}
.i-user-plus::before{content:"\e1a2"}
.i-eye-off::before{content:"\e0bb"}
.i-arrow-right::before{content:"\e049"}
.i-arrow-up-right::before{content:"\e04d"}
.i-arrow-up::before{content:"\e04a"}
.i-arrow-down::before{content:"\e042"}
.i-loader-circle::before{content:"\e10a"}
.i-copy::before{content:"\e09e"}
.i-send::before{content:"\e152"}
.i-image::before{content:"\e0f6"}
.i-palette::before{content:"\e1dd"}
.i-headphones::before{content:"\e0f1"}
.i-award::before{content:"\e04f"}
.i-medal::before{content:"\e36f"}
.i-star::before{content:"\e176"}
.i-gift::before{content:"\e0e1"}
.i-ellipsis::before{content:"\e0b6"}
.i-history::before{content:"\e1f5"}
.i-repeat-2::before{content:"\e411"}
.i-shuffle::before{content:"\e15e"}
.i-hourglass::before{content:"\e296"}
.i-target::before{content:"\e180"}
.i-gauge::before{content:"\e1bf"}
.i-sun::before{content:"\e178"}
.i-moon::before{content:"\e11e"}
.i-list-music::before{content:"\e2e0"}
.i-audio-lines::before{content:"\e55a"}
.i-radio-tower::before{content:"\e404"}
.i-cloud-off::before{content:"\e08d"}
.i-refresh-cw::before{content:"\e145"}
.i-circle-check::before{content:"\e226"}
.i-circle-alert::before{content:"\e077"}
.i-badge-check::before{content:"\e241"}
.i-quote::before{content:"\e239"}
.i-ticket::before{content:"\e20f"}
.i-snowflake::before{content:"\e165";}
.i-chart-line::before{content:"\e2a5";}
.i-chart-spline::before{content:"\e60d";}
.i-message-circle::before{content:"\e116";}
.i-camera::before{content:"\e064";}
.i-at-sign::before{content:"\e04e";}
.i-infinity::before{content:"\e1e7";}
.i-layers::before{content:"\e529";}
.i-user-round-plus::before{content:"\e46c";}
.i-circle-help::before{content:"\e082";}
.i-scan-line::before{content:"\e258";}
.i-calendar-clock::before{content:"\e304";}
.i-party-popper::before{content:"\e343";}
.i-rewind::before{content:"\e147";}
.i-waves::before{content:"\e283";}
.i-sunrise::before{content:"\e179";}
.i-moon-star::before{content:"\e410";}
.i-compass::before{content:"\e09b";}
.i-orbit::before{content:"\e3e7";}
