/* ==========================================================================
   shelf - section screens (Library, Up next, Upcoming, Ratings, Search,
   Stats, Profile) in both looks. Shared bits first, then per screen.
   ========================================================================== */

/* the old page title on rebuilt screens is replaced by the header + sub-tabs */
.i { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.i > svg { display: block; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiet-note { margin: 24px var(--gutter); text-align: center; color: var(--muted); font-size: 14px; }

/* section header (fold on tap; chevron only while folded) */
.section-h.foldable { cursor: pointer; user-select: none; -webkit-user-select: none; }
body:not(.page-full) .section-h { padding-left: 0; padding-right: 0; }
.section-h .count { margin-right: auto; }
.section-h.folded { opacity: .75; }
[data-look="soft"] .section-h { gap: 8px; }
[data-look="marquee"] .section-h .count { margin-left: auto; margin-right: 0; }
[data-look="marquee"] .section-h.foldable .i { margin-left: 6px; }

/* ---------- library toolbar ---------------------------------------------- */
.libbar { display: flex; align-items: center; gap: 6px; margin: 4px 0 4px; }
.libbar-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.libbar-sum b { color: var(--text); }
[data-look="soft"] .libbar-sum b { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.libbar-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text); position: relative; }
.libbar-btn.on::after { content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
[data-look="soft"] .libbar-btn { width: 50px; height: 50px; background: var(--tone); }
.seg2 { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; }
.seg2 button { width: 42px; height: 38px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.seg2 button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
[data-look="marquee"] .seg2 { box-shadow: inset 0 0 0 1.5px var(--line); }
[data-look="soft"] .seg2 { background: var(--tone); padding: 4px; }
[data-look="soft"] .seg2 button { width: 46px; height: 44px; color: var(--text); }

/* ---------- poster tiles -------------------------------------------------- */
.ptiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.ptiles.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-look="soft"] .ptiles { gap: 16px 10px; }
[data-look="soft"] .ptiles.small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ptiles.games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ptiles.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ptile { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; text-align: left; color: var(--text); }
.pt-art { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-art); }
.ptile.wide .pt-art { aspect-ratio: 16 / 10; }
.pt-art > img { width: 100%; height: 100%; object-fit: cover; }
.pt-noart { position: absolute; inset: 0; padding: 10px; display: flex; flex-direction: column; justify-content: flex-end; }
.pt-noart b { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: .95; text-transform: var(--display-transform); letter-spacing: var(--display-tracking); word-break: break-word; }
.pt-noart small { font-size: 11px; color: var(--muted); margin-top: 4px; }
[data-look="marquee"] .pt-art.noart { background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); }
[data-look="soft"] .pt-art.noart { background: var(--tone); }
.pt-badge { position: absolute; top: 6px; left: 6px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgba(10,10,12,.78); color: #fff; }
.pt-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pt-rating { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 3px; font-weight: 800; }
.pt-rating .i { color: var(--accent); }
.pt-over { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; padding: 30px 8px 9px; color: #fff; background: linear-gradient(to top, rgba(5,5,8,.85), rgba(5,5,8,0)); pointer-events: none; }
.pt-num { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: .9; letter-spacing: var(--display-tracking); }
.pt-code { font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.pt-bar { display: block; height: 3px; overflow: hidden; }
.pt-bar i { display: block; height: 100%; background: var(--accent-fill); }
.pt-bar.in { position: absolute; left: 8px; right: 8px; bottom: 4px; z-index: 2; background: rgba(255,255,255,.28); border-radius: 2px; }
.pt-name { font-size: 14px; font-weight: 700; margin-top: 4px; }
.pt-sub { font-size: 12px; color: var(--muted); }
.pt-check { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 6px 14px -6px rgba(0,0,0,.6); }
[data-accent-kind="textured"] .pt-check .i { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-plate); color: var(--on-plate); }
.pt-add { justify-content: flex-start; }
.pt-add .pt-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.pt-add-ic { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }

/* Marquee: art carries the numbers; titles live on the poster */
[data-look="marquee"] .ptiles:not(.games) .pt-name, [data-look="marquee"] .ptiles:not(.games) .pt-sub { display: none; }
[data-look="marquee"] .pt-bar.out { display: none; }
[data-look="marquee"] .pt-rating { right: 8px; bottom: 9px; color: #fff; font-family: var(--font-display); font-size: 22px; }
[data-look="marquee"] .pt-rating + .pt-over { padding-right: 52px; }
[data-look="marquee"] .pt-add .pt-art { border: 1.5px dashed var(--line); }
[data-look="marquee"] .pt-add-ic { box-shadow: inset 0 0 0 1.5px var(--line); }
[data-look="marquee"] .ptiles.games .pt-name { font-size: 15px; }

/* Soft: rounded art, bar under it, title + count below */
[data-look="soft"] .pt-art { border-radius: 18px; }
[data-look="soft"] .ptiles.small .pt-art, [data-look="soft"] .ptiles.mini .pt-art { border-radius: 14px; }
[data-look="soft"] .pt-over, [data-look="soft"] .pt-bar.in { display: none; }
[data-look="soft"] .pt-bar.out { height: 5px; margin-top: 4px; border-radius: 999px; background: var(--tone); }
[data-look="soft"] .pt-bar.out i { border-radius: 999px; background: var(--accent-fill); }
[data-look="soft"] .pt-badge { top: 8px; left: 8px; height: 26px; padding: 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; background: var(--surface); color: var(--text); }
[data-look="soft"] .pt-rating { top: 8px; left: 8px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; background: var(--surface); }
[data-look="soft"] .pt-badge + .pt-rating { display: none; }
[data-look="soft"] .pt-add .pt-art { border-radius: 18px; box-shadow: inset 0 0 0 1.5px var(--line); }
[data-look="soft"] .pt-add-ic { background: var(--tone); }
[data-look="soft"] .ptiles.games .pt-art { border-radius: 20px; }
[data-look="soft"] .ptiles.games.feature { grid-template-columns: 1fr; }
[data-look="soft"] .ptiles.feature .pt-art { aspect-ratio: 16 / 9; border-radius: 24px; }
[data-look="soft"] .ptiles.feature .pt-over { display: flex; padding: 40px 72px 14px 16px; }
[data-look="soft"] .ptiles.feature .pt-num { display: none; }
[data-look="soft"] .ptiles.feature .ptile { position: relative; }
[data-look="soft"] .ptiles.feature .pt-name { position: absolute; left: 16px; right: 72px; bottom: 34px; z-index: 2; color: #fff; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
[data-look="soft"] .ptiles.feature .pt-sub { position: absolute; left: 16px; right: 72px; bottom: 14px; z-index: 2; color: rgba(255,255,255,.85); }

/* ---------- media rows ---------------------------------------------------- */
.mrows { display: flex; flex-direction: column; }
.mrow { display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--text); }
.mrow-art { flex: none; object-fit: cover; background: var(--surface-2); }
.mrow-noart { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.mrow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mrow-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 700; }
.mrow-flag { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.mrow-flag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.mrow-sub { font-size: 12px; color: var(--muted); }
.mrow-barline { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.mrow-bar { flex: 1; height: 3px; background: var(--line); overflow: hidden; }
.mrow-bar i { display: block; height: 100%; background: var(--text); }
.mrow-count { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mrow-stat { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.mrow-stat b { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; }
.mrow-stat small { font-size: 11px; color: var(--muted); }
.mrow-act { flex: none; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

[data-look="marquee"] .mrow { padding: 8px 0; }
[data-look="marquee"] .mrow-art { width: 36px; height: 54px; border-radius: 2px; }
[data-look="marquee"] .mrow-count { display: none; }
[data-look="marquee"] .mrow-bar i { background: var(--text); }
[data-look="marquee"] .mrows .mrow-act { display: none; }

[data-look="soft"] .mrows { gap: 8px; }
[data-look="soft"] .mrow { min-height: 72px; padding: 8px 8px 8px 8px; border-radius: 999px; background: var(--surface); }
[data-look="soft"] .mrow-art { width: 54px; height: 54px; border-radius: 50%; }
[data-look="soft"] .mrow-title { font-size: 16px; }
[data-look="soft"] .mrow-bar { height: 5px; border-radius: 999px; background: var(--tone); }
[data-look="soft"] .mrow-bar i { border-radius: 999px; background: var(--accent-fill); }
[data-look="soft"] .mrow-stat { display: none; }
[data-look="soft"] .mrow-flag { text-transform: none; letter-spacing: 0; font-size: 11px; }
[data-look="soft"] .mrow-act { width: 52px; height: 52px; background: var(--tone); color: var(--accent); }
[data-look="soft"] .mrow-act.on { background: var(--accent-fill); color: var(--on-accent); }

/* ---------- caught up / finished pair -------------------------------------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.duo-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.duo-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; font-family: var(--font-display); font-weight: var(--section-weight); text-transform: var(--section-transform); letter-spacing: var(--display-tracking); font-size: var(--fs-section); }
.duo-row { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.duo-row img, .duo-noart { width: 36px; height: 50px; flex: none; object-fit: cover; background: var(--surface-2); }
.duo-body { display: flex; flex-direction: column; min-width: 0; }
.duo-name { font-size: 14px; font-weight: 700; }
.duo-sub { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.duo-star { display: inline-flex; align-items: center; gap: 2px; color: var(--text); font-weight: 700; }
.duo-star .i { color: var(--accent); }
[data-look="marquee"] .duo-h .count { margin-left: auto; color: var(--muted); }
[data-look="marquee"] .duo-col + .duo-col { border-left: 1px solid var(--line); padding-left: 14px; }
[data-look="marquee"] .duo-row img { border-radius: 2px; }
[data-look="soft"] .duo-h { font-size: 18px; }
[data-look="soft"] .duo-h .count { font-family: var(--font-body); font-size: 12px; height: 24px; min-width: 24px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; }
[data-look="soft"] .duo:not(.tiles) .duo-row { padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); }
[data-look="soft"] .duo-row img, [data-look="soft"] .duo-noart { width: 44px; height: 44px; border-radius: 50%; }
[data-look="soft"] .duo.tiles { margin-top: 16px; }

/* ---------- options sheet (sort / filter) ---------------------------------- */
.opt-sheet { max-height: 86vh; display: flex; flex-direction: column; }
.opt-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.opt-sheet-body { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; }
.opt-sheet-body .set-label { margin-top: 8px; }
.chip-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text); }
[data-look="marquee"] .chip-opt { box-shadow: inset 0 0 0 1.5px var(--line); }
[data-look="soft"] .chip-opt { background: var(--surface-2); }
.chip-opt[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.opt-range-row { display: flex; align-items: center; gap: 12px; }
.opt-range { flex: 1; accent-color: var(--accent); }

/* ---------- empty + loading ------------------------------------------------ */
.empty-block { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px var(--gutter) 24px; }
.empty-block h3 { margin: 8px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: var(--display-tracking); text-transform: var(--display-transform); }
.empty-block p { margin: 0; max-width: 260px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.empty-block .btn { margin-top: 10px; }
.empty-art { position: relative; width: 200px; height: 150px; display: block; }
.empty-card { position: absolute; top: 10px; width: 92px; height: 130px; }
.empty-card.c1 { left: 24px; transform: rotate(-8deg); }
.empty-card.c2 { right: 24px; transform: rotate(8deg); }
.empty-plus { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 50px; height: 50px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-fill); color: var(--on-accent); }
[data-look="marquee"] .empty-card { border-radius: 3px; background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); }
[data-look="marquee"] .empty-plus { background: var(--text); color: var(--bg); box-shadow: 0 0 0 6px var(--accent); }
[data-look="soft"] .empty-card { border-radius: 18px; background: var(--tone); }
[data-look="soft"] .empty-card.c1 { background: var(--surface); box-shadow: var(--shadow-float); z-index: 1; }
[data-look="soft"] .empty-plus { z-index: 2; }
[data-look="soft"] .seg2 button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.pt-code { white-space: nowrap; }
[data-look="marquee"] .pt-check { display: none; }
.pt-badge { white-space: nowrap; max-width: calc(100% - 12px); overflow: hidden; }

/* ---------- toast with undo ---------------------------------------------- */
.toast button { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.toast button span { flex: none; }

/* ---------- Up next -------------------------------------------------------- */
main#view .upnext { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
.next-card { cursor: pointer; }
.next-noart { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
/* Marquee "Not started": two tiles with the check on the art */
[data-look="marquee"] .upnext.compact { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 var(--gutter); }
[data-look="marquee"] .upnext.compact .next-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 0; }
[data-look="marquee"] .upnext.compact .next-media { width: 100%; height: auto; aspect-ratio: 16 / 10; }
[data-look="marquee"] .upnext.compact .check-btn { position: absolute; right: 8px; top: calc((100% - 50px) * 0); margin-top: 0; }
[data-look="marquee"] .upnext.compact .next-card { position: relative; }
[data-look="marquee"] .upnext.compact .check-btn { top: auto; bottom: auto; }
[data-look="marquee"] .upnext.compact .next-ep { display: none; }
[data-look="marquee"] .upnext.compact .next-meta { display: block; }
[data-look="marquee"] .upnext.compact .next-body { gap: 1px; }
[data-look="marquee"] .upnext.compact .check-btn { position: absolute; right: 8px; width: 40px; height: 40px; border: 0; background: rgba(10,10,12,.55); color: #fff; }
[data-look="marquee"] .upnext.compact .check-btn .plate { color: #fff; }
[data-look="marquee"] .upnext.compact .next-media + .next-body { margin-top: 2px; }
.upnext.compact .next-card .check-btn { }
/* games in Up next keep landscape art */
[data-look="soft"] .upnext.games-next .next-media { height: 150px; }
[data-look="soft"] .upnext.games-next .check-btn { top: 94px; }
[data-look="soft"] .upnext.games-next .next-ep { display: block; }
/* Soft list rows for games: square art, platforms, then playtime and year */
[data-look="soft"] .upnext.games-next.list .next-media { width: 60px; height: 60px; }
[data-look="soft"] .upnext.games-next.list .next-meta { display: block; margin: 2px 0 0; font-size: 11px; color: var(--muted); }
[data-look="soft"] .upnext.games-next.list .next-meta:empty { display: none; }

/* caught up */
.caught-row { display: flex; flex-wrap: wrap; gap: 8px; }
.caught-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; text-align: left; color: var(--text); }
.caught-chip img, .caught-chip .duo-noart { width: 32px; height: 32px; flex: none; object-fit: cover; }
.caught-body { display: flex; flex-direction: column; min-width: 0; font-size: 14px; font-weight: 700; }
.caught-body small { font-size: 12px; font-weight: 500; color: var(--muted); }
[data-look="soft"] .caught-chip { height: 40px; padding: 0 14px 0 4px; border-radius: 999px; background: var(--surface); }
[data-look="soft"] .caught-chip img { border-radius: 50%; }
[data-look="marquee"] .caught-row { flex-direction: column; gap: 6px; }
[data-look="marquee"] .caught-chip img { width: 36px; height: 50px; border-radius: 2px; }

.mrow-when { flex: none; font-size: 12px; color: var(--muted); padding-right: 8px; }
[data-look="marquee"] .mrows .mrow-when { display: inline; }
.empty-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.next-title, .ptile h3 { font-family: var(--font-body); letter-spacing: 0; text-transform: none; }

/* ---------- search results ------------------------------------------------- */
.search-page .results { margin: 0 var(--gutter); }
.sr-group { margin-bottom: 8px; }
.sr-h { padding: 14px 0 8px !important; }
.sr-h .count { margin-right: auto; }
.sr-note { margin: -6px 0 6px; font-size: 13px; color: var(--muted); }
.sr-h-ic { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-fill); color: var(--on-accent); }
.sr-h-ic.plus { background: none; color: var(--text); }
mark { background: none; color: inherit; box-shadow: inset 0 -3px 0 var(--accent); }
.results .mrow-art { display: block; }
.mrow.cat .mrow-act { display: inline-flex !important; }
.mrow-act.busy { opacity: .5; }
.cat-noart { position: relative; overflow: hidden; align-items: flex-end; justify-content: flex-start; padding: 4px; }
.cat-noart b { font-family: var(--font-display); font-weight: 800; font-size: 11px; line-height: 1; text-transform: var(--display-transform); color: var(--text); text-align: left; word-break: break-word; }
[data-look="marquee"] .cat-noart { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); }
[data-look="marquee"] .sr-group.lib { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; background: var(--surface-2); }
[data-look="marquee"] .mrow.cat .mrow-act { box-shadow: inset 0 0 0 1.5px var(--line); }
[data-look="marquee"] .mrow.cat .mrow-act.on { background: var(--text); color: var(--bg); box-shadow: none; }
[data-look="marquee"] .search-page .mrow-art { width: 52px; height: 76px; }
[data-look="soft"] .sr-group.lib { padding: 4px 10px 10px; border-radius: 28px; background: var(--surface-2); }
[data-look="soft"] .search-page .mrow { border-radius: 24px; }
[data-look="soft"] .search-page .mrow-art { width: 56px; height: 80px; border-radius: 14px; }
[data-look="soft"] .cat-noart { background: var(--tone); }
[data-look="soft"] .mrow.cat.added { box-shadow: inset 0 0 0 2px var(--accent); background: var(--tone); }
[data-look="soft"] .mrow.cat.added .mrow-act { background: var(--accent-fill); color: var(--on-accent); }
[data-look="soft"] .mrow.cat .mrow-act { color: var(--text); }
[data-look="soft"] .search-page .mrow-flag { text-transform: none; }

/* ---------- Upcoming agenda ------------------------------------------------ */
.agenda { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.ag-day { display: grid; grid-template-columns: 54px 1fr; gap: 12px; }
.ag-date { display: flex; flex-direction: column; align-items: center; padding-top: 4px; line-height: 1; }
.ag-date b { font-family: var(--font-display); font-weight: 800; font-size: 34px; }
.ag-date span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.ag-date small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.ag-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ag-rel { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.ag-day.today .ag-rel { color: var(--text); }
.ag-day.today .ag-rel::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.ag-row { display: flex; align-items: center; gap: 10px; min-height: 60px; cursor: pointer; min-width: 0; }
.ag-row img, .ag-noart { width: 40px; height: 58px; flex: none; object-fit: cover; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.ag-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-text b { font-size: 15px; }
.ag-text span { font-size: 12px; color: var(--muted); }
.ag-time { flex: none; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-look="marquee"] .ag-day { border-top: 1px solid var(--line); padding-top: 10px; }
[data-look="marquee"] .ag-row img { border-radius: 2px; }
[data-look="soft"] .ag-date { width: 54px; height: 74px; border-radius: 18px; background: var(--surface); justify-content: center; padding: 0; }
[data-look="soft"] .ag-day.today .ag-date { background: var(--accent-fill); color: var(--on-accent); }
[data-look="soft"] .ag-day.today .ag-date small { color: inherit; opacity: .8; }
[data-look="soft"] .ag-row { padding: 6px 12px 6px 6px; border-radius: 22px; background: var(--surface); }
[data-look="soft"] .ag-row img, [data-look="soft"] .ag-noart { border-radius: 14px; }
[data-look="soft"] .ag-time { padding: 0 10px; height: 28px; border-radius: 999px; background: var(--tone); display: inline-flex; align-items: center; }

/* ---------- Ratings -------------------------------------------------------- */
.rt-mode { margin: 6px 0 10px; }
.rt-filter, .rt-tools { margin-bottom: 10px; flex-wrap: nowrap; }
.chip-n { margin-left: 6px; font-size: 12px; font-weight: 800; opacity: .7; }
.chipbar-chip { display: inline-flex; align-items: center; gap: 4px; flex: none; }
[data-look="marquee"] .chipbar-chip { background: none; box-shadow: inset 0 0 0 1.5px var(--line); }
[data-look="marquee"] .chipbar-chip[aria-selected="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.chipbar-chip.hot { box-shadow: inset 0 0 0 2px var(--accent); }
.quiet-sub { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.filter-field { height: 44px; margin-bottom: 10px; }
.filter-field input { padding: 0; border: 0; box-shadow: none; background: none; }
.rate-pill { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--text); }
.rate-pill .i { color: var(--muted); }
.rate-pill.on .i { color: var(--accent); }
[data-look="marquee"] .rate-pill { box-shadow: inset 0 0 0 1.5px var(--line); }
[data-look="marquee"] .rate-pill.on { box-shadow: none; font-family: var(--font-display); font-size: 22px; padding: 0 6px; }
[data-look="soft"] .rate-pill { background: var(--tone); }
[data-look="soft"] .rate-pill.on { background: var(--surface-2); }
.rank-num { flex: none; width: 30px; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--muted); }
.rank-row .rank-num { order: -1; }
.rank-acts { display: inline-flex; flex: none; color: var(--muted); }
.rank-acts .icon-btn { width: 38px; height: 38px; }
[data-look="soft"] .rank-row { padding-left: 14px; }
[data-look="soft"] .rank-num { font-size: 15px; width: 20px; }

/* ---------- Stats ---------------------------------------------------------- */
.st-switch { margin: 6px 0 14px; }
.big-time { display: inline-flex; align-items: baseline; font-family: var(--font-display); font-weight: 800; line-height: .9; letter-spacing: -.01em; }
.big-time b { font-size: 1em; }
.big-time i { font-style: normal; font-size: .42em; margin-left: 2px; opacity: .8; }
.st-hero { position: relative; overflow: hidden; padding: 18px; min-height: 210px; display: flex; align-items: flex-end; }
.st-wall { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 50%; opacity: .32; }
.st-wall img { width: 100%; height: 100%; object-fit: cover; }
.st-hero-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.st-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.st-hero .big-time { font-size: 88px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip { display: inline-flex; align-items: baseline; gap: 3px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; align-items: center; }
.st-chip b { font-weight: 800; }
[data-look="marquee"] .st-hero { background: #0E0E10; color: #fff; border-radius: var(--radius-art); }
[data-look="marquee"] .st-wall { opacity: .28; filter: grayscale(.2); }
[data-look="marquee"] .st-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,5,8,.92), rgba(5,5,8,.35)); }
[data-look="marquee"] .st-chips { align-items: baseline; }   /* every chip sits on the same text baseline */
[data-look="marquee"] .st-chip { padding: 0 4px 0 0; height: auto; align-items: baseline; line-height: 1; }
[data-look="marquee"] .st-chip b { font-family: var(--font-display); font-size: 30px; margin-right: 2px; }
[data-look="marquee"] .st-chip.accent { padding: 7px 12px 6px; height: auto; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--accent); }
[data-look="marquee"] .st-chip.accent b { font-size: 20px; }
[data-look="soft"] .st-hero { border-radius: 30px; background: var(--accent-fill); color: var(--on-accent); }
[data-look="soft"] .st-wall { display: none; }
[data-look="soft"] .st-kicker { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
[data-look="soft"] .st-hero .big-time { font-size: 60px; }
[data-look="soft"] .st-chip { background: color-mix(in oklab, var(--on-accent) 16%, transparent); }
[data-accent-kind="textured"][data-look="soft"] .st-hero { color: #fff; }
[data-accent-kind="textured"][data-look="soft"] .st-hero-body { text-shadow: 0 1px 6px rgba(0,0,0,.4); }

.st-card { position: relative; }
.st-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.st-dial { --p: 0; position: relative; width: 132px; height: 132px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; }
.st-dial::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--tone) 0); -webkit-mask: radial-gradient(circle, transparent 54px, #000 55px); mask: radial-gradient(circle, transparent 54px, #000 55px); }
.st-dial b { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; }
.st-dial small { font-size: 11px; color: var(--muted); text-align: center; max-width: 80px; }
.st-left { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.st-left-num .big-time { font-size: 46px; }
.st-left-bar { display: block; height: 4px; background: var(--line); }
.st-left-bar i { display: block; height: 100%; background: var(--text); }
.st-left-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.st-note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.st-under { font-size: 13px; color: var(--muted); text-align: center; }
[data-look="marquee"] .st-dial::before { background: repeating-conic-gradient(var(--text) 0 1.6deg, transparent 1.6deg 7.2deg); -webkit-mask: radial-gradient(circle, transparent 50px, #000 51px); mask: radial-gradient(circle, transparent 50px, #000 51px); }
[data-look="marquee"] .st-dial::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(transparent calc(var(--p) * 1%), var(--bg) 0); opacity: .75; -webkit-mask: radial-gradient(circle, transparent 50px, #000 51px); mask: radial-gradient(circle, transparent 50px, #000 51px); }
[data-look="marquee"] .st-dial b, [data-look="marquee"] .st-dial small { position: relative; z-index: 1; }
[data-look="marquee"] .st-dial small { display: none; }
[data-look="soft"] .st-card { padding: 16px; border-radius: var(--radius-card); background: var(--surface); }
[data-look="soft"] .st-progress .st-card { display: flex; flex-direction: column; align-items: center; gap: 8px; }
[data-look="soft"] .st-dial { width: 110px; height: 110px; }
[data-look="soft"] .st-dial::before { -webkit-mask: radial-gradient(circle, transparent 44px, #000 45px); mask: radial-gradient(circle, transparent 44px, #000 45px); }
[data-look="soft"] .st-dial small { display: none; }
[data-look="soft"] .st-left-ic { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--tone); }
[data-look="soft"] .st-left-num .big-time { font-size: 34px; }
.st-genres, .st-status, .st-topcard { margin-top: 14px; }
.st-card .section-h { padding-top: 6px; }
.st-bars { display: flex; flex-direction: column; gap: 10px; }
.st-bar { display: grid; grid-template-columns: 86px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.st-bar-t { height: 12px; background: var(--surface-2); overflow: hidden; }
.st-bar-t i { display: block; height: 100%; background: var(--text); }
.st-bar.top .st-bar-t i { background: var(--accent-fill); }
.st-bar-v { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
[data-look="soft"] .st-bar { grid-template-columns: 1fr auto; row-gap: 6px; }
[data-look="soft"] .st-bar-l { font-weight: 600; }
[data-look="soft"] .st-bar-t { grid-column: 1 / -1; grid-row: 2; height: 10px; border-radius: 999px; background: var(--tone); }
[data-look="soft"] .st-bar-t i { border-radius: 999px; background: var(--accent-fill); }
[data-look="soft"] .st-bar-v { grid-row: 1; grid-column: 2; color: var(--muted); }
.st-stack { display: flex; gap: 4px; height: 34px; margin-bottom: 12px; }
.st-stack i { min-width: 30px; border-radius: 999px; display: flex; align-items: center; padding-left: 12px; font-style: normal; font-size: 12px; font-weight: 800; }
.st-stack .s0, .st-dot.s0 { background: var(--accent-fill); color: var(--on-accent); }
.st-stack .s1, .st-dot.s1 { background: color-mix(in oklab, var(--accent) 45%, var(--surface)); color: var(--text); }
.st-stack .s2, .st-dot.s2 { background: var(--tone); color: var(--text); }
.st-stack .s3, .st-dot.s3 { background: var(--text); color: var(--bg); }
.st-stack .s4, .st-dot.s4 { background: var(--line); color: var(--text); }
.st-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.st-leg { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.st-leg-l { flex: 1; min-width: 0; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
[data-look="marquee"] .st-legend { grid-template-columns: 1fr; gap: 0; }
[data-look="marquee"] .st-leg { min-height: 40px; border-bottom: 1px solid var(--line); font-size: 14px; }
[data-look="marquee"] .st-dot { display: none; }
.st-leg-n { width: 26px; font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.st-leg-imgs { display: flex; gap: 2px; }
.st-leg-imgs img { width: 20px; height: 30px; object-fit: cover; }
.st-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st-top-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.st-top-n { width: 20px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.st-top-row img, .st-top-noart { width: 36px; height: 52px; object-fit: cover; flex: none; background: var(--surface-2); }
.st-top-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.st-top-name { font-weight: 700; font-size: 15px; }
.st-top-bar { display: block; height: 4px; background: var(--surface-2); overflow: hidden; }
.st-top-bar i { display: block; height: 100%; background: var(--text); }
.st-top-v { flex: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.st-sub { font-size: 13px; color: var(--muted); margin-right: auto; }
[data-look="marquee"] .st-top-n { font-family: var(--font-display); font-size: 24px; }
[data-look="marquee"] .st-top-row.first img { width: 84px; height: 124px; }
[data-look="marquee"] .st-top-row.first .st-top-n { position: absolute; margin: 0 0 96px -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 18px; display: inline-flex; align-items: center; justify-content: center; z-index: 1; }
[data-look="marquee"] .st-top-row.first { position: relative; }
[data-look="marquee"] .st-top-row.first .st-top-bar i { background: var(--accent-fill); }
[data-look="marquee"] .st-top-row.first .st-top-v.not-first-m { display: none; }
.st-top-big .big-time { font-size: 54px; }
.st-top-row small { font-size: 12px; color: var(--muted); }
[data-look="soft"] .st-top-row { padding: 8px 10px; border-radius: 20px; }
[data-look="soft"] .st-top-row.first { background: var(--tone); }
[data-look="soft"] .st-top-row img { border-radius: 10px; width: 42px; height: 56px; }
[data-look="soft"] .st-top-bar { height: 6px; border-radius: 999px; background: var(--tone); }
[data-look="soft"] .st-top-bar i { border-radius: 999px; background: var(--accent-fill); }
[data-look="soft"] .st-top-v { font-weight: 800; }
.st-facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.st-fact { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 120px; padding: 12px; }
.st-fact b { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: .9; }
.st-fact span { font-size: 12px; line-height: 1.25; }
[data-look="marquee"] .st-fact { box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
[data-look="marquee"] .st-fact.f0 { background: #0E0E10; color: #fff; box-shadow: none; }
[data-look="marquee"] .st-fact.f0 b { color: var(--accent); }
[data-look="soft"] .st-fact { border-radius: 24px; background: var(--surface); }
[data-look="soft"] .st-fact.f1 { background: var(--accent-fill); color: var(--on-accent); }
.section-h > .i + h2 { margin-right: auto; }
.big-time i { margin-right: .12em; }

/* ---------- Profile -------------------------------------------------------- */
.profile { padding-bottom: 16px; }
.pf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; }
.pf-avatar { position: relative; width: 76px; height: 76px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 40px; background: var(--text); color: var(--bg); }
.pf-badge { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 0 0 3px var(--bg); }
.pf-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pf-name { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: .9; text-transform: var(--display-transform); letter-spacing: var(--display-tracking); }
.pf-email { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pf-sync { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.pf-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.pf-count { height: 56px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--tone); color: var(--text); }
.pf-count b { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.pf-acts { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.pf-pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--tone); color: var(--text); }
.pf-pill.quiet { background: var(--surface-2); }
[data-look="soft"] .pf-head { padding: 16px; border-radius: 28px; background: var(--surface); }
[data-look="soft"] .pf-avatar { width: 64px; height: 64px; font-size: 30px; background: var(--accent-fill); color: var(--on-accent); }
[data-look="soft"] .pf-name { font-size: 28px; }
.pf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.pf-card { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 150px; padding: 14px; text-align: left; background: var(--surface); color: var(--text); }
.pf-card > .fan { width: 100%; height: 70px; }
.pf-card-big .big-time { font-size: 40px; }
.pf-card-bar { display: block; height: 4px; background: var(--line); }
.pf-card-bar i { display: block; height: 100%; background: var(--text); }
.pf-card-foot { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--font-display); font-weight: 800; font-size: 22px; text-transform: uppercase; }
.pf-card-foot span { color: var(--muted); }
.pgroup { display: flex; flex-direction: column; }
.prow { display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%; text-align: left; color: var(--text); }
.prow-ic { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.prow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prow-text b { font-size: 15px; font-weight: 600; }
.prow-text small { font-size: 12px; color: var(--muted); }
.prow-val { font-size: 13px; color: var(--muted); }
.prow > .i:last-child { color: var(--muted); }
.prow-look { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.prow-swatch { width: 14px; height: 14px; border-radius: 50%; }
[data-look="marquee"] .prow { border-bottom: 1px solid var(--line); }
[data-look="marquee"] .prow-ic { width: 26px; }
[data-look="soft"] .pgroup { padding: 6px 12px; border-radius: 26px; background: var(--surface); }
[data-look="soft"] .prow-ic { background: var(--tone); }
[data-look="soft"] .prow-val { height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; color: var(--text); }
[data-look="soft"] .prow-look { height: 30px; padding: 0 10px 0 4px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-weight: 600; }
[data-look="soft"] .prow-look .prow-swatch { width: 22px; height: 22px; }
.pf-signout { display: flex; margin: 22px auto 0; padding: 0 22px; }
[data-look="marquee"] .pf-signout { background: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.pf-signin { margin-top: 22px; }
.pf-version { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.pf-version .i { color: var(--accent); }

/* ---------- sign-in gate ----------------------------------------------------- */
#gate { align-items: stretch; padding: 0; overflow-y: auto; background: var(--bg); color: var(--text); font-family: var(--font-body); }
#gate .gate-card { max-width: 430px; margin: 0 auto; min-height: 100%; padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); gap: 12px; justify-content: flex-start; }
#gate .gate-brand { display: none; }
.gate-panel { gap: 12px; }
.gate-top { display: flex; align-items: center; justify-content: space-between; height: 48px; margin-left: -8px; }
.gate-title { margin: 6px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: .9; letter-spacing: var(--display-tracking); text-transform: var(--display-transform); }
[data-look="soft"] .gate-title { font-size: 40px; }
#gate .gate-sub { text-align: left; font-size: 15px; margin: 0 0 8px; }
#gate .field { height: 52px; border-radius: var(--radius-control); background: var(--surface); border: 1.5px solid var(--line); padding: 0 18px; font-size: 16px; }
#gate .field:focus { border-color: var(--text); }
[data-look="soft"] #gate .field:focus { border-color: var(--accent); }
#gate .pw-wrap .field { padding-right: 48px; }
#gate .pw-eye { right: 10px; }
#gate .sso-btn { height: 52px; border-radius: var(--radius-control); background: var(--surface); border: 1.5px solid var(--line); color: var(--text); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; }
[data-look="soft"] #gate #gate-apple { background: var(--text); color: var(--bg); border-color: var(--text); }
#gate .or-div { color: var(--muted); }
#gate .gate-check { color: var(--muted); }
#gate .gate-switch { text-align: center; }
#gate .gate-switch a { color: var(--text); font-weight: 700; }
.go-btn { height: 56px; justify-content: space-between; padding: 0 6px 0 22px; }
.go-ic { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
[data-look="soft"] .go-btn .go-ic { background: rgba(255,255,255,.22); }
[data-look="marquee"] .go-btn .go-ic { box-shadow: 0 0 0 3px var(--accent); background: #0E0E10; color: #fff; }
/* welcome */
#gate.welcome .gate-card { padding: 0 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
/* the card adds 24px + the bottom bar inset below the panel, so the panel leaves that room
   (otherwise "Get started" sat under Android's 3-button bar in the app) */
.welcome-panel { min-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)); justify-content: flex-end; gap: 14px; padding: 0 var(--gutter); }
/* in the Android app the art runs under the status bar: a soft shade keeps its white icons readable */
.native-app .welcome-art::before { content: ''; position: absolute; z-index: 1; inset: 0 0 auto 0; height: calc(env(safe-area-inset-top, 0px) + 36px); background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,0)); pointer-events: none; }
.welcome-art { position: relative; flex: 1; min-height: 360px; margin: 0 calc(-1 * var(--gutter)); overflow: hidden; }
.welcome-art > .mosaic { position: absolute; inset: -40px -60px 0; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; transform: rotate(-8deg); gap: 6px; background: none; }
.welcome-art > .mosaic img { border-radius: var(--radius-art); }
.welcome-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, var(--bg) 96%); }
.welcome-art > .fan { position: absolute; left: 0; right: 0; bottom: 30px; height: 330px; }
[data-look="soft"] .welcome-art { background: radial-gradient(ellipse at 50% 70%, var(--tone) 0 45%, transparent 46%); }
[data-look="soft"] .welcome-art::after { display: none; }
[data-look="soft"] .welcome-art .fan-card { border-radius: 22px; }
.welcome-brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.welcome-brand .logo-mark { height: 46px; color: var(--accent); }
.welcome-brand .logo-word { height: 38px; }
[data-look="soft"] .welcome-brand { justify-content: center; }
.welcome-tag { margin: 0 0 10px; font-size: 18px; line-height: 1.35; }
[data-look="soft"] .welcome-tag { text-align: center; color: var(--muted); }
/* verify */
.verify-art { display: flex; justify-content: center; margin: 28px 0 10px; }
.verify-env { width: 140px; height: 110px; display: inline-flex; align-items: center; justify-content: center; }
[data-look="marquee"] .verify-env { background: #0E0E10; color: var(--accent); border-radius: 3px; }
[data-look="soft"] .verify-env { width: 96px; height: 96px; border-radius: 50%; background: var(--tone); color: var(--accent); }
#gate #verify-panel .gate-title { text-align: left; }

/* sign in: social first, then email (as designed) */
#signin-panel > * { order: 10; }
#signin-panel > .gate-top, #signin-panel > .gate-title, #signin-panel > .gate-sub { order: 0; }
#signin-panel > #gate-google { order: 1; }
#signin-panel > #gate-apple { order: 2; }
#signin-panel > .or-div { order: 3; }
#signin-panel > .gate-switch { order: 20; }

/* ---------- first-run tour --------------------------------------------------- */
.tour-in { max-width: 430px; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); }
.tour-top { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: width var(--dur-pill) var(--ease-pill); }
.tour-dots i.on { width: 24px; background: var(--text); }
[data-look="soft"] .tour-dots i.on { background: var(--accent-fill); }
.tour-art { flex: 1; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.tour-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: .92; letter-spacing: var(--display-tracking); text-transform: var(--display-transform); }
[data-look="soft"] .tour-title { font-size: 34px; }
.tour-text { margin: 0 0 10px; font-size: 16px; line-height: 1.45; color: var(--muted); }
.tour-foot { display: grid; grid-template-columns: 56px 1fr; gap: 10px; }
.tour-foot .btn-quiet { height: 56px; padding: 0; }
.tour-foot > span:empty { display: block; }
.tour-card { width: 290px; display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); box-shadow: var(--shadow-float), 0 0 0 1px var(--line); }
[data-look="soft"] .tour-card { border-radius: 28px; }
.tour-poster { width: 64px; height: 92px; flex: none; background: var(--tone); border-radius: var(--radius-art); }
.tour-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tour-lines i { display: block; height: 10px; border-radius: 999px; background: var(--surface-2); }
.tour-lines i.short { width: 60%; }
.tour-bar { display: block; height: 6px; border-radius: 999px; background: var(--tone); overflow: hidden; }
.tour-bar b { display: block; width: 62%; height: 100%; background: var(--accent-fill); }
.tour-check { width: 52px; height: 52px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-fill); color: var(--on-accent); animation: check-pop 1.4s var(--ease-pill) infinite alternate; }
.tour-trio { display: flex; gap: 12px; padding: 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-float), 0 0 0 1px var(--line); }
.tour-chip { width: 76px; height: 64px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.tour-chip.on { background: var(--nav-pill); color: var(--nav-pill-text); }
.tour-stack { position: relative; width: 220px; height: 240px; }
.tour-stack span { position: absolute; width: 150px; height: 210px; border-radius: var(--radius-art); }
.tour-stack .c1 { left: 0; top: 20px; transform: rotate(-10deg); background: var(--tone); }
.tour-stack .c2 { right: 0; top: 20px; transform: rotate(10deg); background: var(--surface-2); }
.tour-stack .c3 { left: 35px; top: 0; display: flex; align-items: center; justify-content: center; background: var(--surface); box-shadow: var(--shadow-float), 0 0 0 1px var(--line); color: var(--accent); }
[data-look="soft"] .tour-stack span { border-radius: 24px; }

/* ---------- Marquee "ticket" swipe on Up next ------------------------------- */
.ticket { position: relative; overflow: hidden; }
.ticket-bg { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 0 var(--gutter);
  background: var(--accent-fill); color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0,0,0,.25); opacity: 0; transition: opacity .15s ease; }
.ticket.dragging .ticket-bg, .ticket.armed .ticket-bg { opacity: 1; }
.ticket-check { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.85); transition: background .15s ease, color .15s ease; }
.ticket.armed .ticket-check { background: #fff; color: var(--accent); text-shadow: none; }
[data-accent-kind="textured"] .ticket-bg > span:last-child { padding: 4px 10px; border-radius: 999px; background: var(--accent-plate); text-shadow: none; }
.ticket > .next-card { position: relative; z-index: 1; background: var(--bg); touch-action: pan-y; will-change: transform; user-select: none; -webkit-user-select: none; }
.ticket.dragging > .next-card { box-shadow: -10px 0 24px -10px rgba(0,0,0,.35); }
[data-look="marquee"] .upnext:not(.compact) .ticket.hero { margin: 0 var(--gutter) 6px; border-radius: var(--radius-art); }
[data-look="marquee"] .upnext:not(.compact) .ticket.hero > .next-card.hero { margin: 0; }
[data-look="marquee"] .upnext.compact .ticket { border-radius: var(--radius-art); }
[data-look="marquee"] .upnext.compact .ticket-bg { font-size: 13px; padding: 0 12px; flex-direction: column; justify-content: center; align-items: flex-start; }
/* Soft Stack: rounded accent card under the row, dark-on-accent label, plain check */
[data-look="soft"] .ticket { overflow: visible; border-radius: 18px; }
[data-look="soft"] .ticket-bg { border-radius: 18px; background: var(--accent-fill); color: var(--on-accent); text-shadow: none; font-size: 14px; font-weight: 700; padding: 0 20px; }
[data-look="soft"] .ticket-check { width: auto; height: auto; border: 0; transition: transform .2s var(--ease-pill); }
[data-look="soft"] .ticket.armed .ticket-check { background: none; color: inherit; transform: scale(1.15); }
[data-look="soft"][data-accent-kind="textured"] .ticket-bg > span:last-child { color: var(--on-plate); }
[data-look="soft"] .ticket.dragging > .next-card { box-shadow: -8px 0 20px -10px rgba(20,10,40,.35); }

/* ---------- grid/list toggle: one highlight that slides (switchLibView) ---------- */
.seg2 { position: relative; }
.seg2 .seg2-thumb { position: absolute; left: 3px; top: 3px; width: 42px; height: 38px; border-radius: 999px; background: var(--text); pointer-events: none;
  transition: transform var(--dur-pill) var(--ease-pill); }
.seg2 { view-transition-name: lib-seg; }   /* shown live during grid <-> list, so its highlight just slides */
.seg2.is-list .seg2-thumb { transform: translateX(44px); }
[data-look="soft"] .seg2 .seg2-thumb { left: 4px; top: 4px; width: 46px; height: 44px; }
[data-look="soft"] .seg2.is-list .seg2-thumb { transform: translateX(48px); }
.seg2 button { position: relative; z-index: 1; transition: color var(--dur-pill) ease; }
[data-look] .seg2 button[aria-pressed="true"] { background: transparent; }

/* view transition timing (grid <-> list) */
::view-transition-group(*) { animation-duration: .34s; animation-timing-function: cubic-bezier(.2, 0, 0, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
::view-transition-old(*), ::view-transition-new(*) { height: 100%; object-fit: cover; }
/* Soft cards (tile <-> rounded row): drawn at their real size from the top-left and
   revealed by the reshaping box, so text never stretches; the old one hands over quickly */
::view-transition-old(*.lib-card), ::view-transition-new(*.lib-card) { width: 100%; height: 100%; object-fit: none; object-position: left top; overflow: clip; }
::view-transition-old(*.lib-card) { animation-duration: .16s; }
::view-transition-new(*.lib-card) { animation-duration: .26s; }
::view-transition-group(lib-seg), ::view-transition-new(lib-seg) { animation: none; }
::view-transition-old(lib-seg) { display: none; }

/* ---------- Forgot password (docs/PRD/forgot-password.md) ---------- */
#gate .gate-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gate-forgot { font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: none; white-space: nowrap; }
.gate-forgot:hover, .gate-forgot:focus-visible, .gate-forgot:active { color: var(--accent); }
#gate .rs-hint { font-size: 13px; color: var(--muted); }
#reset-sent-panel .gate-title, #reset-panel .gate-title { text-align: left; }
.rs-card { width: min(400px, 100%); text-align: left; align-items: stretch; display: flex; flex-direction: column; gap: 12px; }
.rs-card h2 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: var(--display-tracking); text-transform: var(--display-transform); }
.rs-card .gate-brand { display: flex; justify-content: center; }
.rs-card .gate-brand .logo-full { width: 120px; height: auto; color: var(--text); }
.rs-form { display: flex; flex-direction: column; gap: 10px; }
.rs-card .gate-sub { text-align: left; margin: 0; font-size: 15px; }
.prow.danger, .prow.danger .prow-text b { color: var(--danger); }
.prow.danger .prow-ic { color: var(--danger); }
/* iPhone app: Sign in with Apple leads (App Store guideline 4.8 / Apple HIG) */
.native-ios #signin-panel > #gate-apple { order: 1; }
.native-ios #signin-panel > #gate-google { order: 2; }

/* Finished 100%: the game's art gets an outline in the user's accent (gradient and metallic accents
   included) and a "100%" badge in the same colour - an achievement, not just a status. */
.ptile.is100 .pt-art, .mrow.is100 .mrow-art { border: 4px solid transparent; background: var(--accent-fill) border-box;
  box-shadow: 0 8px 22px -10px var(--accent); }
.mrow.is100 .mrow-art { border-width: 3px; box-shadow: 0 4px 12px -5px var(--accent); }
.ptile.is100 .pt-art > img { border-radius: calc(var(--radius-art) - 4px); }
[data-look="soft"] .ptile.is100 .pt-art > img { border-radius: 14px; }
.ptile.is100 .pt-badge { background: var(--accent-fill); color: var(--on-accent); font-weight: 800; }
.mrow.is100 .mrow-flag { padding: 2px 7px; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); }

/* Owned Wishlist games: a small bag on the poster / next to the title (docs/PRD/games-owned.md) */
.pt-owned { position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,10,12,.72); color: #fff; }
[data-look="soft"] .pt-owned { top: 8px; right: 8px; background: var(--surface); color: var(--text); }
.mrow-owned { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.wl-groups { display: flex; flex-direction: column; gap: 10px; }
.wl-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.wl-label .count { font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text); }
[data-look="marquee"] .wl-label { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.ag-tbd .ag-date b { font-size: 20px; }
.mrow-flag:has(.mrow-owned)::before { display: none; }
