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AW,UAAW,KAAIhE,EAAE+P,EAAe,EAAC,SA8JjE,IAAA/L,EAAE,iBAAiB,EAQ8B,IAAAA,EAAE,OAAO,EA4G5B,IAAAA,EAAE,WAAW,eA3HvD/C,GAAA,IAAAlB,EAIgB+N,KAAgBA,CAAY,CAAA,CAAA,aAoG7CzC,GAAA,IAIAmD,IAAanB,CAAW,EAAArN,EAAEsN,CAAS,EAAA,CAAAtN,EAAGiN,CAAY,IAAEW,CAAa,CAAA,CAAA,wBAtUhE","names":["gap","showArrows","edgeFade","bleed","$.prop","$$props","scroller","$.state","canPrev","canNext","updateNav","$.set","$.get","scrollByAmount","dir","amt","div","root","div_1","root_1","$.template_effect","$.set_style","$.append","$$anchor","$$render","consequent","div_2","root_2","consequent_1","button","root_4","consequent_2","button_1","root_5","consequent_3","consequent_4","div_3","$.sibling","node_2","node_5","$.child","$.reset","$$value","$.set_class","$.set_attribute","$.event","safe","sanitizeBeatFormat","span","text","format","isMine","membersOnly","commentCount","commentPreview","isTeam","triedOriginal","SvelteSet","gaveUp","untransformed","url","swapped","path","query","kept","p","srcA","$.derived","srcB","onImgError","total","pctA","pctB","closesIso","commenterName","c","t","fmtAge","d","ms","m","h","currentIdx","visible","$.user_effect","cycle","currentComment","a","img","$.replay_events","d_1","video","$.first_child","fragment","root_3","alternate","div_4","node","$0","$.set_text","span_1","node_1","div_5","img_1","root_6","d_2","video_1","fragment_1","div_6","root_8","div_7","root_9","consequent_6","alternate_1","div_8","span_2","root_10","text_2","consequent_7","span_3","node_3","div_9","VSBadge","node_4","div_10","div_11","span_4","root_11","CountdownTimer","node_6","consequent_8","BeatFormatBadge","node_7","span_5","root_12","text_4","consequent_9","span_6","root_13","text_5","consequent_10","div_12","span_7","span_8","div_13","root_14","div_14","node_11","getAvatarUrl","DuelAvatar","span_9","span_10","span_11","p_1","classes","text_7","div_15","root_15","p_2","text_10","consequent_11","alternate_2","cell","$.noop","mediaType","empty","tally","count","pct","picked","text_1","voted","boosted","vA","$.proxy","vB","myVote","voting","isLive","isPending","vote","side","pa","pb","$.update","res","body","countBeatVote","goto","openBeat","text_3","consequent_5","button_2","button_3","$1","$.delegated","seed","href","BASE","i","particles","$.each","imgFailed","videoFailed","aspect","styles","isTie","aWon","bWon","root_7","LIVE_SORT_OPTIONS","msg","FINISHED_OPTION","embedded","onMount","activeMode","trackBeatListingView","fired","onScroll","bottom","trackBeatListingScrolled50","showOnlyMine","liveFeed","liveHasMore","loadingMore","currentSort","hideVoted","switching","currentKind","DEFAULT_BEAT_KIND","startHref","KIND_SWITCH_LABELS","currentFormat","FORMAT_FILTER_LABELS","sortMenuOpen","sortMenuEl","sortTriggerEl","sortMenuAnchor","sortOptions","currentSortLabel","o","isFinishedView","chooseSort","s","applyFilters","onPointerDown","e","onKey","raf","buildQuery","sort","hide","mineOnly","params","qs","page","feedSectionEl","nextSort","nextHide","nextMine","nextFormat","prevSort","LIVE_PAGE","loadMore","next","seen","liveFiltered","pendingFiltered","pendingGhostCount","spotlightGhostCount","$$element","BeatTabs","section","nav","VISIBLE_BEAT_KINDS","k","beatLobbyHref","$$element_1","a_1","section_1","header","p_3","Carousel","BeatSpotlightCard","_","BeatSpotlightGhostCard","section_2","header_1","p_4","p_5","p_6","node_9","node_10","BeatPendingCard","node_12","node_13","BeatGhostCard","section_3","node_8","header_2","p_7","text_11","text_12","text_13","text_14","h2","node_16","text_15","text_16","text_17","svg","node_17","root_21","opt","idx","root_23","node_18","svg_1","root_24","root_25","consequent_12","node_20","BEAT_FORMAT_FILTERS","f","button_4","root_26","text_23","div_16","root_28","p_8","div_17","root_29","BeatClosedCard","consequent_13","div_18","root_31","p_9","a_2","text_26","div_19","fragment_18","$2","BeatLiveCard","div_20","root_34","button_5","node_24","text_27","text_28","consequent_16","alternate_3","consequent_17","consequent_14","consequent_15","alternate_4","section_4","root_37","div_21","p_10","h2_1","text_30","ol","li","div_22","p_11","p_12","li_1","div_23","p_13","p_14","li_2","div_24","p_15","p_16","span_12","text_37","p_17","$.index","part","a_3","root_39","lhref","a_4","root_40","text_41","consequent_18","consequent_19","alternate_5","consequent_20","$4"],"sources":["../../../../../../src/lib/components/Carousel.svelte","../../../../../../src/lib/components/beat/BeatFormatBadge.svelte","../../../../../../src/lib/components/beat/BeatLiveCard.svelte","../../../../../../src/lib/components/beat/BeatSpotlightCard.svelte","../../../../../../src/lib/components/beat/BeatSpotlightGhostCard.svelte","../../../../../../src/lib/components/beat/BeatPendingCard.svelte","../../../../../../src/lib/components/beat/BeatGhostCard.svelte","../../../../../../src/lib/components/beat/BeatClosedCard.svelte","../../../../../../src/lib/components/beat/BeatLobby.svelte"],"sourcesContent":["<script lang=\"ts\">\n\timport type { Snippet } from 'svelte';\n\n\tinterface Props {\n\t\tchildren: Snippet;\n\t\tgap?: string;\n\t\tshowArrows?: boolean;\n\t\tlabel?: string;\n\t\t/** Edge fade width in pixels. Renders only on the side that actually has\n\t\t *  off-screen content; conditional on canPrev / canNext to avoid the\n\t\t *  \"ghost gradient\" cutting into the first item. */\n\t\tedgeFade?: number;\n\t\t/** Mobile bleed: break out of the parent's px-5 and re-pad inside so the\n\t\t *  first item lines up with the title while scrolled items run to the\n\t\t *  screen edge (no hard clip at 20px). Neutralised at md+. */\n\t\tbleed?: boolean;\n\t}\n\n\tlet {\n\t\tchildren,\n\t\tgap = 'gap-3',\n\t\tshowArrows = true,\n\t\tlabel,\n\t\tedgeFade = 96,\n\t\tbleed = false\n\t}: Props = $props();\n\n\tlet scroller: HTMLDivElement | undefined = $state();\n\tlet canPrev = $state(false);\n\tlet canNext = $state(true);\n\n\tfunction updateNav() {\n\t\tif (!scroller) return;\n\t\tcanPrev = scroller.scrollLeft > 8;\n\t\tcanNext = scroller.scrollLeft + scroller.clientWidth < scroller.scrollWidth - 8;\n\t}\n\n\tfunction scrollByAmount(dir: 1 | -1) {\n\t\tif (!scroller) return;\n\t\tconst amt = scroller.clientWidth * 0.8 * dir;\n\t\tscroller.scrollBy({ left: amt, behavior: 'smooth' });\n\t}\n</script>\n\n<div class=\"relative {bleed ? '-mx-5 md:mx-0' : ''}\">\n\t<!-- Edge fades only render when the corresponding direction has content\n\t     to scroll into. Pure conditional so there's no ghost gradient at\n\t     scrollLeft=0 / scrollRight=max. -->\n\t{#if edgeFade > 0 && canPrev}\n\t\t<div\n\t\t\tclass=\"pointer-events-none absolute inset-y-0 left-0 z-10 hidden bg-gradient-to-r from-bg to-transparent md:block\"\n\t\t\tstyle=\"width: {edgeFade}px\"\n\t\t\taria-hidden=\"true\"\n\t\t></div>\n\t{/if}\n\t{#if edgeFade > 0 && canNext}\n\t\t<div\n\t\t\tclass=\"pointer-events-none absolute inset-y-0 right-0 z-10 hidden bg-gradient-to-l from-bg to-transparent md:block\"\n\t\t\tstyle=\"width: {edgeFade}px\"\n\t\t\taria-hidden=\"true\"\n\t\t></div>\n\t{/if}\n\n\t{#if showArrows}\n\t\t{#if canPrev}\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tonclick={() => scrollByAmount(-1)}\n\t\t\t\taria-label=\"previous\"\n\t\t\t\tclass=\"absolute top-1/2 left-2 z-20 hidden h-9 w-9 -translate-y-1/2 items-center justify-center rounded-full border border-border bg-bg/90 text-text backdrop-blur md:flex\"\n\t\t\t>\n\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t<polyline points=\"15 18 9 12 15 6\"></polyline>\n\t\t\t\t</svg>\n\t\t\t</button>\n\t\t{/if}\n\t\t{#if canNext}\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tonclick={() => scrollByAmount(1)}\n\t\t\t\taria-label=\"next\"\n\t\t\t\tclass=\"absolute top-1/2 right-2 z-20 hidden h-9 w-9 -translate-y-1/2 items-center justify-center rounded-full border border-border bg-bg/90 text-text backdrop-blur md:flex\"\n\t\t\t>\n\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t<polyline points=\"9 18 15 12 9 6\"></polyline>\n\t\t\t\t</svg>\n\t\t\t</button>\n\t\t{/if}\n\t{/if}\n\n\t<!-- No scroll-snap. On mobile pagination snap was annoying (\"4-et lapoz\");\n\t     on desktop arrows + smooth scroll cover the navigation case. Plain\n\t     overflow-x-auto = native momentum scroll on touch. -->\n\t<div\n\t\tbind:this={scroller}\n\t\tonscroll={updateNav}\n\t\taria-label={label}\n\t\trole=\"region\"\n\t\tclass=\"flex overflow-x-auto overscroll-x-contain scroll-smooth pb-2 {bleed\n\t\t\t? 'px-5 md:px-0'\n\t\t\t: ''} {gap} [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\"\n\t>\n\t\t{@render children()}\n\t</div>\n</div>\n","<script lang=\"ts\">\n\t// RAT-419: mini format badge for beat cards. Only renders for team battles\n\t// (2v2 / 4v4) — 1v1 gets nothing, keeping the classic cards unchanged. Solid\n\t// yellow pill so a team fight pops in the lobby without a neon glow.\n\timport { sanitizeBeatFormat } from '$lib/types/beat';\n\n\tlet { format }: { format: string } = $props();\n\n\tconst safe = $derived(sanitizeBeatFormat(format));\n</script>\n\n{#if safe !== '1v1'}\n\t<span\n\t\tclass=\"pointer-events-none inline-flex items-center rounded-md bg-yellow px-1.5 py-0.5 text-[10px] font-bold tracking-tight text-bg\"\n\t>\n\t\t{safe}\n\t</span>\n{/if}\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport VSBadge from '$lib/components/duel/VSBadge.svelte';\n\timport CountdownTimer from '$lib/components/duel/CountdownTimer.svelte';\n\timport DuelAvatar from '$lib/components/duel/DuelAvatar.svelte';\n\timport BeatFormatBadge from '$lib/components/beat/BeatFormatBadge.svelte';\n\timport { getAvatarUrl } from '$lib/avatar';\n\timport { SvelteSet } from 'svelte/reactivity';\n\n\ttype CommentPreview = {\n\t\tid: string;\n\t\tnickname: string | null;\n\t\tliveNickname: string | null;\n\t\tavatarPath: string | null;\n\t\tbody: string;\n\t\tcreatedAt: Date | string;\n\t};\n\n\tinterface Props {\n\t\tcode: string;\n\t\tkind?: string; // RAT-380: 'cockcompare' | 'cumshot'\n\t\tformat?: string; // RAT-419: '1v1' | '2v2' | '4v4' — team battles get a badge\n\t\turlA: string | null;\n\t\turlB: string | null;\n\t\tmediaTypeA: string | null;\n\t\tmediaTypeB: string | null;\n\t\tvotesA: number;\n\t\tvotesB: number;\n\t\tclosesAt: Date | string | null;\n\t\tisMine?: boolean;\n\t\t// Creator gated voting to signed-in users — surfaced as a \"members only\" chip.\n\t\tmembersOnly?: boolean;\n\t\t// RAT-217: optional comment preview block at the bottom of the card.\n\t\t// Server ships up to 5; the card cycles them one-at-a-time with a fade.\n\t\tcommentCount?: number;\n\t\tcommentPreview?: CommentPreview[];\n\t}\n\n\tlet {\n\t\tcode,\n\t\tkind = 'cockcompare',\n\t\tformat = '1v1',\n\t\turlA,\n\t\turlB,\n\t\tmediaTypeA,\n\t\tmediaTypeB,\n\t\tvotesA,\n\t\tvotesB,\n\t\tclosesAt,\n\t\tisMine = false,\n\t\tmembersOnly = false,\n\t\tcommentCount = 0,\n\t\tcommentPreview = []\n\t}: Props = $props();\n\n\t// RAT-419: team battles read as team fights from the collage cover + badge; a\n\t// subtle elevation (see .team-elevate) is the only extra cue.\n\tconst isTeam = $derived(format === '2v2' || format === '4v4');\n\n\t// ── Image fallback ─────────────────────────────────────────────────────────\n\t// Feed thumbnails are signed render-transform / CDN URLs. Supabase's render\n\t// pipeline occasionally fails on an image the object store still holds fine, so\n\t// a broken transform URL used to just show a broken <img>. Fall back in two\n\t// steps: first retry the untransformed original (Supabase render URLs share the\n\t// same token as their object URL), then, if that also fails, degrade to the\n\t// gradient placeholder instead of a broken image.\n\t//\n\t// State is keyed by the source URL (not by side) so it resets automatically\n\t// when the feed reloads a fresh signed URL for this card — no $effect resync.\n\tconst triedOriginal = new SvelteSet<string>();\n\tconst gaveUp = new SvelteSet<string>();\n\n\t// Best-effort untransformed original for a Supabase render-transform URL.\n\t// Returns null for anything else (e.g. a Bunny CDN URL whose token is bound to\n\t// the resize params — stripping them wouldn't validate), so those go straight\n\t// to the placeholder rather than firing a doomed extra request.\n\tfunction untransformed(url: string): string | null {\n\t\tif (!url.includes('/render/image/sign/')) return null;\n\t\tconst swapped = url.replace('/render/image/sign/', '/object/sign/');\n\t\tconst [path, query] = swapped.split('?');\n\t\tif (!query) return swapped;\n\t\t// Drop the resize params; the signed token stays valid on the object route.\n\t\tconst kept = query.split('&').filter((p) => !/^(?:width|height|resize|quality)=/.test(p));\n\t\treturn kept.length ? `${path}?${kept.join('&')}` : path;\n\t}\n\n\tconst srcA = $derived(urlA && triedOriginal.has(urlA) ? (untransformed(urlA) ?? urlA) : urlA);\n\tconst srcB = $derived(urlB && triedOriginal.has(urlB) ? (untransformed(urlB) ?? urlB) : urlB);\n\n\tfunction onImgError(url: string | null) {\n\t\tif (!url) return;\n\t\tif (!triedOriginal.has(url) && untransformed(url)) triedOriginal.add(url);\n\t\telse gaveUp.add(url);\n\t}\n\n\tconst total = $derived(votesA + votesB);\n\tconst pctA = $derived(total ? (votesA / total) * 100 : 50);\n\tconst pctB = $derived(100 - pctA);\n\tconst closesIso = $derived(\n\t\tclosesAt ? (typeof closesAt === 'string' ? closesAt : closesAt.toISOString()) : null\n\t);\n\n\tfunction commenterName(c: CommentPreview): string {\n\t\treturn c.liveNickname || c.nickname || t('someone');\n\t}\n\n\tfunction fmtAge(d: Date | string): string {\n\t\tconst ms = Date.now() - new Date(d).getTime();\n\t\tif (ms < 60_000) return t('just now');\n\t\tconst m = Math.floor(ms / 60_000);\n\t\tif (m < 60) return `${m}m`;\n\t\tconst h = Math.floor(m / 60);\n\t\tif (h < 24) return `${h}h`;\n\t\treturn `${Math.floor(h / 24)}d`;\n\t}\n\n\t// RAT-217: one-at-a-time fade rotator. 4s visible, 250ms cross-fade. No\n\t// rotation if there's only one comment to show — the effect just leaves\n\t// it pinned.\n\tlet currentIdx = $state(0);\n\tlet visible = $state(true);\n\t$effect(() => {\n\t\tif (commentPreview.length <= 1) {\n\t\t\tcurrentIdx = 0;\n\t\t\tvisible = true;\n\t\t\treturn;\n\t\t}\n\t\tconst cycle = setInterval(() => {\n\t\t\tvisible = false;\n\t\t\tsetTimeout(() => {\n\t\t\t\tcurrentIdx = (currentIdx + 1) % commentPreview.length;\n\t\t\t\tvisible = true;\n\t\t\t}, 250);\n\t\t}, 4000);\n\t\treturn () => clearInterval(cycle);\n\t});\n\tconst currentComment = $derived(commentPreview[currentIdx]);\n</script>\n\n<a\n\thref=\"/b/{code}\"\n\tclass=\"beat-card group relative block overflow-hidden rounded-xl bg-surface no-underline {isMine\n\t\t? 'ring-1 ring-yellow/60 ring-inset'\n\t\t: 'ring-1 ring-border ring-inset'}{isTeam ? ' team-elevate' : ''}\"\n\taria-label={commentCount > 0\n\t\t? t('open beat {code}, {n} comments', { code, n: commentCount })\n\t\t: t('open beat {code}', { code })}\n>\n\t<!-- Photo-forward: cards are 100% media, with overlays for context. The\n\t     4:3 outer aspect makes each side ~2:3 portrait — much closer to phone\n\t     photo proportions than the 16:10 wide split, so vertical photos crop\n\t     a lot less aggressively. -->\n\t<div class=\"relative grid aspect-[4/3] grid-cols-2 bg-bg\">\n\t\t<div class=\"relative overflow-hidden\">\n\t\t\t{#if mediaTypeA === 'image' && srcA && !(urlA && gaveUp.has(urlA))}\n\t\t\t\t<img\n\t\t\t\t\tsrc={srcA}\n\t\t\t\t\talt=\"\"\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\tonerror={() => onImgError(urlA)}\n\t\t\t\t\tclass=\"beat-media h-full w-full object-cover\"\n\t\t\t\t/>\n\t\t\t{:else if mediaTypeA === 'video' && urlA}\n\t\t\t\t<!-- First-frame preview (#t=0.1) so the card shows what's on the clip;\n\t\t\t\t\t play badge marks it as a video. Faststart clip → cheap seek. -->\n\t\t\t\t<!-- svelte-ignore a11y_media_has_caption -->\n\t\t\t\t<video src=\"{urlA}#t=0.1\" preload=\"metadata\" muted playsinline class=\"beat-media h-full w-full object-cover\"></video>\n\t\t\t\t<span class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t<span class=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/55 backdrop-blur\">\n\t\t\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-white\">\n\t\t\t\t\t\t\t<path d=\"M8 5v14l11-7z\"/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t{:else if mediaTypeA === 'video'}\n\t\t\t\t<div class=\"flex h-full w-full items-center justify-center bg-gradient-to-br from-coral/30 via-coral/10 to-bg\">\n\t\t\t\t\t<div class=\"flex h-9 w-9 items-center justify-center rounded-full bg-bg/70\">\n\t\t\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-text\">\n\t\t\t\t\t\t\t<path d=\"M8 5v14l11-7z\"/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t{:else}\n\t\t\t\t<div class=\"h-full w-full bg-gradient-to-br from-coral/15 to-coral/5\"></div>\n\t\t\t{/if}\n\t\t\t<!-- Bottom-up gradient under each side's vote chip — protects legibility\n\t\t\t     on bright photos without bleeding heavy black across the card. -->\n\t\t\t<div class=\"pointer-events-none absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-black/75 via-black/20 to-transparent\"></div>\n\t\t\t<div class=\"absolute bottom-3 left-3 flex flex-col items-start gap-1\">\n\t\t\t\t{#if isTeam}\n\t\t\t\t\t<span class=\"rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-bold tracking-wide text-blue backdrop-blur\">{t('team a')}</span>\n\t\t\t\t{/if}\n\t\t\t\t<span class=\"font-display text-2xl font-bold text-text tabular-nums leading-none drop-shadow-[0_2px_8px_rgba(0,0,0,0.6)]\">{votesA}</span>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"relative overflow-hidden\">\n\t\t\t{#if mediaTypeB === 'image' && srcB && !(urlB && gaveUp.has(urlB))}\n\t\t\t\t<img\n\t\t\t\t\tsrc={srcB}\n\t\t\t\t\talt=\"\"\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\tonerror={() => onImgError(urlB)}\n\t\t\t\t\tclass=\"beat-media h-full w-full object-cover\"\n\t\t\t\t/>\n\t\t\t{:else if mediaTypeB === 'video' && urlB}\n\t\t\t\t<!-- svelte-ignore a11y_media_has_caption -->\n\t\t\t\t<video src=\"{urlB}#t=0.1\" preload=\"metadata\" muted playsinline class=\"beat-media h-full w-full object-cover\"></video>\n\t\t\t\t<span class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t<span class=\"flex h-9 w-9 items-center justify-center rounded-full bg-black/55 backdrop-blur\">\n\t\t\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-white\">\n\t\t\t\t\t\t\t<path d=\"M8 5v14l11-7z\"/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t{:else if mediaTypeB === 'video'}\n\t\t\t\t<div class=\"flex h-full w-full items-center justify-center bg-gradient-to-br from-blue/30 via-blue/10 to-bg\">\n\t\t\t\t\t<div class=\"flex h-9 w-9 items-center justify-center rounded-full bg-bg/70\">\n\t\t\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-text\">\n\t\t\t\t\t\t\t<path d=\"M8 5v14l11-7z\"/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t{:else}\n\t\t\t\t<div class=\"h-full w-full bg-gradient-to-br from-blue/15 to-blue/5\"></div>\n\t\t\t{/if}\n\t\t\t<div class=\"pointer-events-none absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-black/75 via-black/20 to-transparent\"></div>\n\t\t\t<div class=\"absolute right-3 bottom-3 flex flex-col items-end gap-1\">\n\t\t\t\t{#if isTeam}\n\t\t\t\t\t<span class=\"rounded bg-black/60 px-1.5 py-0.5 text-[10px] font-bold tracking-wide text-coral backdrop-blur\">{t('team b')}</span>\n\t\t\t\t{/if}\n\t\t\t\t<span class=\"font-display text-2xl font-bold text-text tabular-nums leading-none drop-shadow-[0_2px_8px_rgba(0,0,0,0.6)]\">{votesB}</span>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t<VSBadge />\n\t\t</div>\n\n\t\t<!-- Top overlay: countdown chip + category badge (left stack) + optional\n\t\t     yours marker (right). RAT-380 added the badge under the countdown. -->\n\t\t<div class=\"pointer-events-none absolute inset-x-0 top-0 flex items-start justify-between p-3\">\n\t\t\t<div class=\"flex flex-col items-start gap-1.5\">\n\t\t\t\t{#if closesIso}\n\t\t\t\t\t<span class=\"inline-flex items-center rounded-md bg-black/65 px-2.5 py-1 backdrop-blur\">\n\t\t\t\t\t\t<CountdownTimer expiresAt={closesIso} />\n\t\t\t\t\t</span>\n\t\t\t\t{/if}\n\t\t\t\t<BeatFormatBadge {format} />\n\t\t\t\t{#if membersOnly}\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"inline-flex items-center gap-1 rounded-md bg-black/65 px-2 py-1 font-mono text-[9px] font-bold tracking-[0.12em] text-yellow uppercase backdrop-blur\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg class=\"h-2.5 w-2.5\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path d=\"M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm3 8H9V6a3 3 0 0 1 6 0v3z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t{t('members only')}\n\t\t\t\t\t</span>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t\t{#if isMine}\n\t\t\t\t<span class=\"rounded bg-yellow/95 px-1.5 py-0.5 text-[9px] font-bold tracking-[0.18em] text-bg uppercase\">{t('★ yours')}</span>\n\t\t\t{/if}\n\t\t</div>\n\n\t\t<!-- Ratio bar pinned to the very bottom edge — 4px so the colors are\n\t\t     readable from a glance, animated with custom easing so live deltas\n\t\t     slide rather than snap. -->\n\t\t<div class=\"absolute inset-x-0 bottom-0 flex h-1\">\n\t\t\t<span class=\"bg-coral transition-all duration-700\" style=\"width: {pctA}%; transition-timing-function: var(--ease-out-expo);\"></span>\n\t\t\t<span class=\"bg-blue transition-all duration-700\" style=\"width: {pctB}%; transition-timing-function: var(--ease-out-expo);\"></span>\n\t\t</div>\n\t</div>\n\n\t<!-- RAT-217: comment preview block. One comment at a time, fade-rotated.\n\t\t Tappable as part of the whole-card anchor → /b/[code]. -->\n\t{#if commentCount > 0 && currentComment}\n\t\t<div class=\"border-t border-border/60 px-4 py-3\">\n\t\t\t<div\n\t\t\t\tclass=\"flex min-h-[24px] items-center gap-2 transition-opacity duration-200\"\n\t\t\t\tclass:opacity-0={!visible}\n\t\t\t>\n\t\t\t\t<DuelAvatar\n\t\t\t\t\tnickname={commenterName(currentComment)}\n\t\t\t\t\tavatarUrl={getAvatarUrl(currentComment.avatarPath)}\n\t\t\t\t\tsize={20}\n\t\t\t\t\tlink={false}\n\t\t\t\t/>\n\t\t\t\t<span class=\"shrink-0 font-display text-[12px] font-bold tracking-tight text-text\">\n\t\t\t\t\t{commenterName(currentComment)}\n\t\t\t\t</span>\n\t\t\t\t<span class=\"truncate text-[12px] text-muted/85\">{currentComment.body}</span>\n\t\t\t\t<span class=\"ml-auto shrink-0 text-[10px] text-muted/45 tabular-nums\">\n\t\t\t\t\t{fmtAge(currentComment.createdAt)}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<p class=\"mt-2 font-mono text-[10px] tracking-[0.22em] text-muted/60 uppercase\">\n\t\t\t\t{commentCount === 1 ? t('see all 1 comment →') : t('see all {n} comments →', { n: commentCount })}\n\t\t\t</p>\n\t\t</div>\n\t{:else}\n\t\t<div class=\"border-t border-border/60 px-4 py-2.5\">\n\t\t\t<p class=\"font-mono text-[10px] tracking-[0.22em] text-muted/50 uppercase\">\n\t\t\t\t{t('be the first to comment →')}\n\t\t\t</p>\n\t\t</div>\n\t{/if}\n</a>\n\n<style>\n\t/* Team battles (2v2 / 4v4) read as team fights from the 4-up collage cover +\n\t   the yellow format badge — no coloured frame needed. A slightly deeper\n\t   resting elevation is the only extra cue, so the card feels a touch lifted\n\t   without any arcade border. */\n\t.team-elevate {\n\t\tbox-shadow: 0 14px 34px -20px rgb(0 0 0 / 0.75);\n\t}\n\t.beat-card {\n\t\ttransition:\n\t\t\ttransform 0.5s var(--ease-out-expo),\n\t\t\tbox-shadow 0.5s var(--ease-out-expo),\n\t\t\toutline-color 0.4s var(--ease-out-quart);\n\t\toutline: 1px solid transparent;\n\t}\n\t.beat-card:hover {\n\t\ttransform: translateY(-3px);\n\t\tbox-shadow: 0 18px 40px -20px rgb(0 0 0 / 0.6);\n\t}\n\t.beat-media {\n\t\ttransition: transform 0.7s var(--ease-out-expo);\n\t}\n\t.beat-card:hover .beat-media {\n\t\ttransform: scale(1.03);\n\t}\n</style>\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\t/**\n\t * Spotlight rail card (/b top). Shows both sides of the matchup (A | B) with\n\t * per-side vote counts, so it reads fair at a glance. On a live beat each half\n\t * is tappable → casts a real vote (one per device, anon cookie — no login) via\n\t * the shared vote API, bringing the vote loop right onto the rail. Pending /\n\t * already-voted / own-beat taps fall through to the full beat page.\n\t */\n\timport { goto } from '$app/navigation';\n\timport { countBeatVote } from '$lib/beat-voter-next';\n\n\tinterface Props {\n\t\tcode: string;\n\t\tstatus: string;\n\t\tmediaTypeA: string | null;\n\t\tmediaTypeB: string | null;\n\t\turlA: string | null;\n\t\turlB: string | null;\n\t\tvotesA: number;\n\t\tvotesB: number;\n\t\tboostCount: number;\n\t\tnickname: string | null;\n\t\t/** the viewer's existing vote (from the load) — seeds the voted state so a\n\t\t *  reload shows the result, not the vote buttons again. */\n\t\tvoted?: 'a' | 'b' | null;\n\t\t/** RAT-528: false for a live beat filling the rail nobody boosted — no 🔥. */\n\t\tboosted?: boolean;\n\t}\n\tlet {\n\t\tcode,\n\t\tstatus,\n\t\turlA,\n\t\turlB,\n\t\tmediaTypeA,\n\t\tmediaTypeB,\n\t\tvotesA,\n\t\tvotesB,\n\t\tboostCount,\n\t\tnickname,\n\t\tvoted = null,\n\t\tboosted = true\n\t}: Props = $props();\n\n\t// local, mutable tallies so a vote updates the card without a reload.\n\tlet vA = $state(votesA);\n\tlet vB = $state(votesB);\n\tlet myVote = $state<'a' | 'b' | null>(voted);\n\tlet voting = $state(false);\n\n\tconst isLive = $derived(status === 'live');\n\tconst isPending = $derived(status === 'pending');\n\tconst total = $derived(vA + vB);\n\tconst pctA = $derived(total ? Math.round((vA / total) * 100) : 50);\n\tconst pctB = $derived(100 - pctA);\n\n\tasync function vote(side: 'a' | 'b') {\n\t\tif (voting || myVote) return;\n\t\tvoting = true;\n\t\tconst pa = vA;\n\t\tconst pb = vB;\n\t\tmyVote = side; // optimistic\n\t\tif (side === 'a') vA++;\n\t\telse vB++;\n\t\ttry {\n\t\t\tconst res = await fetch(`/api/beat/${code}/vote`, {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\t\tbody: JSON.stringify({ side, source: 'beat_spotlight' })\n\t\t\t});\n\t\t\tconst body = (await res.json().catch(() => null)) as {\n\t\t\t\tok?: boolean;\n\t\t\t\tvotesA?: number;\n\t\t\t\tvotesB?: number;\n\t\t\t\tmySide?: 'a' | 'b' | null;\n\t\t\t} | null;\n\t\t\tif (res.ok && body?.ok) {\n\t\t\t\tcountBeatVote();\n\t\t\t\tvA = body.votesA ?? vA;\n\t\t\t\tvB = body.votesB ?? vB;\n\t\t\t\tif (body.mySide) myVote = body.mySide;\n\t\t\t} else {\n\t\t\t\t// own beat (403) / no longer live (409) / error → revert; open the beat.\n\t\t\t\tmyVote = null;\n\t\t\t\tvA = pa;\n\t\t\t\tvB = pb;\n\t\t\t\tif (res.status === 403 || res.status === 409) goto(`/b/${code}`);\n\t\t\t}\n\t\t} catch {\n\t\t\tmyVote = null;\n\t\t\tvA = pa;\n\t\t\tvB = pb;\n\t\t}\n\t\tvoting = false;\n\t}\n\n\tfunction openBeat() {\n\t\tgoto(`/b/${code}`);\n\t}\n</script>\n\n{#snippet cell(url: string | null, mediaType: string | null, empty: boolean)}\n\t{#if url && mediaType === 'video'}\n\t\t<!-- svelte-ignore a11y_media_has_caption -->\n\t\t<video src=\"{url}#t=0.1\" preload=\"metadata\" muted playsinline class=\"h-full w-full object-cover\"></video>\n\t\t<span class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t<span class=\"flex h-7 w-7 items-center justify-center rounded-full bg-black/55 backdrop-blur\">\n\t\t\t\t<svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-white\">\n\t\t\t\t\t<path d=\"M8 5v14l11-7z\" />\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t</span>\n\t{:else if url}\n\t\t<img src={url} alt=\"\" loading=\"lazy\" class=\"h-full w-full object-cover\" />\n\t{:else if empty}\n\t\t<div\n\t\t\tclass=\"flex h-full w-full items-center justify-center bg-surface text-[9px] font-bold tracking-widest text-muted/70 uppercase\"\n\t\t>\n\t\t\t{t('empty')}\n\t\t</div>\n\t{:else}\n\t\t<div class=\"flex h-full w-full items-center justify-center text-xl text-muted\">▶</div>\n\t{/if}\n{/snippet}\n\n{#snippet tally(count: number, pct: number, picked: boolean)}\n\t<div\n\t\tclass=\"pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-between gap-1 bg-gradient-to-t from-black/80 via-black/25 to-transparent px-1.5 pt-6 pb-1.5\"\n\t>\n\t\t<span\n\t\t\tclass=\"font-display text-sm leading-none font-bold tabular-nums text-text drop-shadow-[0_1px_3px_rgba(0,0,0,.8)]\"\n\t\t\t>{count}</span\n\t\t>\n\t\t<span class=\"text-[9px] font-semibold {picked ? 'text-yellow' : 'text-text/65'}\"\n\t\t\t>{pct}%{picked ? ' ✓' : ''}</span\n\t\t>\n\t</div>\n{/snippet}\n\n<div\n\tclass=\"w-36 shrink-0 snap-start overflow-hidden rounded-xl border border-border bg-surface transition-colors hover:border-yellow/50 sm:w-44\"\n>\n\t<div class=\"relative grid aspect-square grid-cols-2 overflow-hidden bg-bg\">\n\t\t<!-- SIDE A: the cell is an \"open beat\" layer; the explicit vote button on\n\t\t\t top is the only thing that casts a vote (siblings, not nested). -->\n\t\t<div class=\"relative overflow-hidden {myVote === 'a' ? 'ring-2 ring-yellow ring-inset' : ''}\">\n\t\t\t{@render cell(urlA, mediaTypeA, false)}\n\t\t\t{#if isLive}{@render tally(vA, pctA, myVote === 'a')}{/if}\n\t\t\t<button type=\"button\" onclick={openBeat} aria-label={t('open beat')} class=\"absolute inset-0\"></button>\n\t\t\t{#if isLive && !myVote}\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonclick={() => vote('a')}\n\t\t\t\t\taria-label={t('vote left')}\n\t\t\t\t\tclass=\"absolute top-1/2 left-1/2 z-10 -translate-x-1/2 -translate-y-1/2 rounded-full bg-yellow px-3 py-1 font-display text-[10px] font-bold tracking-wide text-bg uppercase shadow-[0_4px_12px_-2px_rgba(0,0,0,.5)] transition-transform active:scale-95\"\n\t\t\t\t\t>{t('vote')}</button\n\t\t\t\t>\n\t\t\t{/if}\n\t\t</div>\n\t\t<!-- SIDE B -->\n\t\t<div class=\"relative overflow-hidden {myVote === 'b' ? 'ring-2 ring-yellow ring-inset' : ''}\">\n\t\t\t{@render cell(urlB, mediaTypeB, isPending)}\n\t\t\t{#if isLive}{@render tally(vB, pctB, myVote === 'b')}{/if}\n\t\t\t<button type=\"button\" onclick={openBeat} aria-label={t('open beat')} class=\"absolute inset-0\"></button>\n\t\t\t{#if isLive && !myVote}\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonclick={() => vote('b')}\n\t\t\t\t\taria-label={t('vote right')}\n\t\t\t\t\tclass=\"absolute top-1/2 left-1/2 z-10 -translate-x-1/2 -translate-y-1/2 rounded-full bg-yellow px-3 py-1 font-display text-[10px] font-bold tracking-wide text-bg uppercase shadow-[0_4px_12px_-2px_rgba(0,0,0,.5)] transition-transform active:scale-95\"\n\t\t\t\t\t>{t('vote')}</button\n\t\t\t\t>\n\t\t\t{/if}\n\t\t</div>\n\n\t\t{#if boosted}\n\t\t\t<span\n\t\t\t\tclass=\"pointer-events-none absolute top-1.5 left-1.5 inline-flex items-center gap-1 rounded-full bg-black/70 px-1.5 py-0.5 font-display text-[10px] font-bold text-yellow backdrop-blur\"\n\t\t\t>\n\t\t\t\t🔥 {boostCount}\n\t\t\t</span>\n\t\t{/if}\n\t\t<span\n\t\t\tclass=\"pointer-events-none absolute top-1/2 left-1/2 flex h-7 w-7 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-border bg-bg font-display text-[10px] font-black tracking-tighter text-text\"\n\t\t>\n\t\t\tVS\n\t\t</span>\n\t</div>\n\t<a href=\"/b/{code}\" class=\"flex items-center justify-between gap-1 px-2 py-1.5 no-underline\">\n\t\t<span class=\"truncate text-[11px] font-semibold text-text\">\n\t\t\t{nickname ? '@' + nickname : t('beat me')}\n\t\t</span>\n\t\t<span class=\"shrink-0 text-[10px] text-muted\">\n\t\t\t{myVote ? t('voted ✓') : isPending ? t('open · accept') : t('{n} votes', { n: total })}\n\t\t</span>\n\t</a>\n</div>\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\t// Empty \"your shot\" slot for the spotlight rail — mirrors BeatSpotlightCard's\n\t// w-36/sm:w-44 footprint so it lines up with the real boosted cards, and\n\t// fills the row when only a few beats are boosted. Random-looking 🔥 emoji\n\t// particles drift inside (deterministic per `seed` → SSR-safe, no hydration\n\t// mismatch, and each slot looks a little different).\n\tinterface Props {\n\t\tseed?: number;\n\t\thref?: string;\n\t}\n\tlet { seed = 0, href = '/b/start' }: Props = $props();\n\n\ttype Particle = { x: number; y: number; size: number; dur: number; delay: number };\n\tconst BASE: Particle[] = [\n\t\t{ x: 18, y: 70, size: 16, dur: 5.2 },\n\t\t{ x: 72, y: 22, size: 22, dur: 6.1 },\n\t\t{ x: 44, y: 84, size: 13, dur: 4.4 },\n\t\t{ x: 84, y: 58, size: 18, dur: 5.8 },\n\t\t{ x: 30, y: 32, size: 12, dur: 4.9 },\n\t\t{ x: 60, y: 64, size: 15, dur: 6.6 },\n\t\t{ x: 10, y: 44, size: 11, dur: 5.5 }\n\t].map((p, i) => ({ ...p, delay: i * 0.55 }));\n\n\t// Deterministic per-slot jitter so neighbouring ghosts don't look identical.\n\tconst particles = $derived(\n\t\tBASE.map((p, i) => ({\n\t\t\t...p,\n\t\t\tx: ((p.x + seed * 17 + i * 7) % 84) + 8,\n\t\t\ty: ((p.y + seed * 23) % 74) + 12,\n\t\t\tdelay: (p.delay + seed * 0.31) % 3\n\t\t}))\n\t);\n</script>\n\n<a\n\t{href}\n\tclass=\"ghost group relative flex w-36 shrink-0 snap-start flex-col items-center justify-center overflow-hidden rounded-xl border border-dashed border-border/60 p-6 text-center no-underline sm:w-44\"\n>\n\t{#each particles as p, i (i)}\n\t\t<span\n\t\t\tclass=\"fire pointer-events-none absolute\"\n\t\t\tstyle=\"left:{p.x}%; top:{p.y}%; font-size:{p.size}px; animation-duration:{p.dur}s; animation-delay:{p.delay}s;\"\n\t\t\taria-hidden=\"true\">🔥</span\n\t\t>\n\t{/each}\n\n\t<div class=\"relative z-10 flex flex-col items-center\">\n\t\t<div\n\t\t\tclass=\"ghost-icon flex h-11 w-11 items-center justify-center rounded-full border border-dashed border-border/70 text-muted\"\n\t\t>\n\t\t\t<svg\n\t\t\t\twidth=\"14\"\n\t\t\t\theight=\"14\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tstroke-width=\"2.4\"\n\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t>\n\t\t\t\t<line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"></line>\n\t\t\t\t<line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n\t\t\t</svg>\n\t\t</div>\n\t\t<p class=\"mt-4 font-display text-sm font-bold tracking-tight text-text/85\">{t('your shot.')}</p>\n\t\t<p class=\"mt-1 text-[11px] text-muted\">{t('tap to start one')}</p>\n\t</div>\n</a>\n\n<style>\n\t.ghost {\n\t\ttransition:\n\t\t\tborder-color 0.4s var(--ease-out-expo),\n\t\t\tbackground-color 0.4s var(--ease-out-expo);\n\t\tbackground-color: rgb(20 20 20 / 0.3);\n\t}\n\t.ghost:hover {\n\t\tborder-color: rgb(255 255 255 / 0.35);\n\t\tbackground-color: rgb(255 255 255 / 0.04);\n\t}\n\t.ghost-icon {\n\t\ttransition:\n\t\t\tborder-color 0.4s var(--ease-out-expo),\n\t\t\tcolor 0.4s var(--ease-out-expo);\n\t}\n\t.ghost:hover .ghost-icon {\n\t\tborder-color: rgb(255 255 255 / 0.4);\n\t\tcolor: rgb(255 255 255 / 0.75);\n\t}\n\n\t/* Drifting ember particles — subtle, decorative. Each rises, fades, and\n\t   sways a touch; staggered per particle so the field never pulses in sync. */\n\t.fire {\n\t\topacity: 0;\n\t\tline-height: 1;\n\t\tfilter: saturate(0.9);\n\t\tanimation-name: ember;\n\t\tanimation-timing-function: ease-in-out;\n\t\tanimation-iteration-count: infinite;\n\t\twill-change: transform, opacity;\n\t}\n\t@keyframes ember {\n\t\t0% {\n\t\t\ttransform: translateY(6px) scale(0.85) rotate(-6deg);\n\t\t\topacity: 0;\n\t\t}\n\t\t25% {\n\t\t\topacity: 0.38;\n\t\t}\n\t\t50% {\n\t\t\ttransform: translateY(-8px) scale(1.05) rotate(6deg);\n\t\t\topacity: 0.28;\n\t\t}\n\t\t75% {\n\t\t\topacity: 0.34;\n\t\t}\n\t\t100% {\n\t\t\ttransform: translateY(6px) scale(0.85) rotate(-6deg);\n\t\t\topacity: 0;\n\t\t}\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t.fire {\n\t\t\tanimation: none;\n\t\t\topacity: 0.22;\n\t\t}\n\t}\n</style>\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport BeatFormatBadge from '$lib/components/beat/BeatFormatBadge.svelte';\n\n\tinterface Props {\n\t\tcode: string;\n\t\tkind?: string; // RAT-380: 'cockcompare' | 'cumshot'\n\t\tformat?: string; // RAT-419: '1v1' | '2v2' | '4v4' — team battles get a badge\n\t\turlA: string | null;\n\t\tmediaTypeA: string | null;\n\t\tcreatedAt: Date | string;\n\t\tisMine?: boolean;\n\t}\n\n\tlet {\n\t\tcode,\n\t\tkind = 'cockcompare',\n\t\tformat = '1v1',\n\t\turlA,\n\t\tmediaTypeA,\n\t\tcreatedAt,\n\t\tisMine = false\n\t}: Props = $props();\n\n\t// RAT-419: team battles read as team fights from the collage cover + badge; a\n\t// subtle elevation (see .team-elevate) is the only extra cue.\n\tconst isTeam = $derived(format === '2v2' || format === '4v4');\n\n\t// A broken/expired media URL should read as the empty-cover state, not a broken\n\t// image icon — on load error we fall through to the gradient placeholder below.\n\tlet imgFailed = $state(false);\n\tlet videoFailed = $state(false);\n\n\tfunction fmtAge(d: Date | string): string {\n\t\tconst ms = Date.now() - new Date(d).getTime();\n\t\tconst h = Math.floor(ms / 3600000);\n\t\tif (h < 1) return t('{n}m ago', { n: Math.max(1, Math.floor(ms / 60000)) });\n\t\tif (h < 24) return t('{n}h ago', { n: h });\n\t\treturn t('{n}d ago', { n: Math.floor(h / 24) });\n\t}\n</script>\n\n<a\n\thref=\"/b/{code}\"\n\tclass=\"beat-card group relative block overflow-hidden rounded-xl bg-surface no-underline {isMine\n\t\t? 'ring-1 ring-yellow/60 ring-inset'\n\t\t: 'ring-1 ring-border ring-inset'}{isTeam ? ' team-elevate' : ''}\"\n>\n\t<div class=\"relative aspect-[4/5] overflow-hidden bg-bg\">\n\t\t{#if mediaTypeA === 'image' && urlA && !imgFailed}\n\t\t\t<img\n\t\t\t\tsrc={urlA}\n\t\t\t\talt=\"\"\n\t\t\t\tloading=\"lazy\"\n\t\t\t\tonerror={() => (imgFailed = true)}\n\t\t\t\tclass=\"beat-media h-full w-full object-cover\"\n\t\t\t/>\n\t\t{:else if mediaTypeA === 'video' && urlA && !videoFailed}\n\t\t\t<!-- RAT-436: first-frame preview (#t=0.1) so the open challenge shows what's\n\t\t\t\t on the clip; play badge marks it as a video. Faststart clip → cheap seek.\n\t\t\t\t muted → no a11y caption warning. -->\n\t\t\t<video src=\"{urlA}#t=0.1\" preload=\"metadata\" muted playsinline onerror={() => (videoFailed = true)} class=\"beat-media h-full w-full object-cover\"></video>\n\t\t\t<span class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t<span class=\"flex h-12 w-12 items-center justify-center rounded-full bg-black/55 backdrop-blur\">\n\t\t\t\t\t<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-white\">\n\t\t\t\t\t\t<path d=\"M8 5v14l11-7z\"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t{:else if mediaTypeA === 'video'}\n\t\t\t<div class=\"flex h-full w-full items-center justify-center bg-gradient-to-br from-coral/30 via-coral/10 to-bg\">\n\t\t\t\t<div class=\"flex h-12 w-12 items-center justify-center rounded-full bg-bg/70\">\n\t\t\t\t\t<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-text\">\n\t\t\t\t\t\t<path d=\"M8 5v14l11-7z\"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t{:else}\n\t\t\t<div class=\"h-full w-full bg-gradient-to-br from-coral/25 to-bg\"></div>\n\t\t{/if}\n\n\t\t<!-- RAT-380: age chip + category badge stacked top-left -->\n\t\t<div class=\"pointer-events-none absolute top-3 left-3 flex flex-col items-start gap-1.5\">\n\t\t\t<span class=\"rounded-md bg-black/65 px-2 py-1 text-[11px] tabular-nums text-text backdrop-blur\">\n\t\t\t\t{fmtAge(createdAt)}\n\t\t\t</span>\n\t\t\t<BeatFormatBadge {format} />\n\t\t</div>\n\t\t{#if isMine}\n\t\t\t<span class=\"pointer-events-none absolute top-3 right-3 rounded bg-yellow/95 px-1.5 py-0.5 text-[9px] font-bold tracking-[0.18em] text-bg uppercase\">{t('★ yours')}</span>\n\t\t{/if}\n\n\t\t<!-- Bottom gradient + accept CTA — appears on hover via custom easing,\n\t\t     gives the card a moment of personality on interaction. -->\n\t\t<div class=\"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-bg/95 via-bg/60 to-transparent\">\n\t\t\t<div class=\"flex items-end justify-between gap-3 p-3 pt-12\">\n\t\t\t\t<span class=\"text-[11px] text-muted\">{t('first to upload accepts')}</span>\n\t\t\t\t<span class=\"beat-cta font-display text-[11px] font-bold tracking-[0.16em] text-yellow uppercase\">{t('accept →')}</span>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</a>\n\n<style>\n\t/* Team battles (2v2 / 4v4) read as team fights from the collage cover + the\n\t   yellow format badge — no coloured frame needed. A slightly deeper resting\n\t   elevation is the only extra cue. */\n\t.team-elevate {\n\t\tbox-shadow: 0 14px 34px -20px rgb(0 0 0 / 0.75);\n\t}\n\t.beat-card {\n\t\ttransition:\n\t\t\ttransform 0.5s var(--ease-out-expo),\n\t\t\tbox-shadow 0.5s var(--ease-out-expo);\n\t\toutline: 1px solid transparent;\n\t}\n\t.beat-card:hover {\n\t\ttransform: translateY(-3px);\n\t\tbox-shadow: 0 18px 40px -20px rgb(0 0 0 / 0.6);\n\t}\n\t.beat-media {\n\t\ttransition: transform 0.7s var(--ease-out-expo);\n\t}\n\t.beat-card:hover .beat-media {\n\t\ttransform: scale(1.04);\n\t}\n\t.beat-cta {\n\t\ttransition: transform 0.4s var(--ease-out-expo);\n\t}\n\t.beat-card:hover .beat-cta {\n\t\ttransform: translateX(3px);\n\t}\n</style>\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\tinterface Props {\n\t\taspect?: string;\n\t\tlabel?: string;\n\t\tcaption?: string;\n\t\thref?: string;\n\t}\n\n\tlet {\n\t\taspect = '4 / 5',\n\t\tlabel,\n\t\tcaption,\n\t\thref = '/b/start'\n\t}: Props = $props();\n</script>\n\n<a\n\t{href}\n\tstyle:aspect-ratio={aspect}\n\tclass=\"ghost-card group relative flex flex-col items-center justify-center rounded-xl border border-dashed border-border/60 p-6 text-center no-underline\"\n>\n\t<div class=\"ghost-icon flex h-11 w-11 items-center justify-center rounded-full border border-dashed border-border/70 text-muted\">\n\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t<line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"></line>\n\t\t\t<line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n\t\t</svg>\n\t</div>\n\t<p class=\"mt-4 font-display text-sm font-bold tracking-tight text-text/85\">{label ?? t('your shot.')}</p>\n\t<p class=\"mt-1 text-[11px] text-muted\">{caption ?? t('tap to start one')}</p>\n</a>\n\n<style>\n\t.ghost-card {\n\t\ttransition:\n\t\t\tborder-color 0.4s var(--ease-out-expo),\n\t\t\tbackground-color 0.4s var(--ease-out-expo);\n\t\tbackground-color: rgb(20 20 20 / 0.3);\n\t}\n\t/* No lift on hover — user feedback. Just brightens the dashed outline\n\t   and the surface tint so the card feels active without jumping. */\n\t.ghost-card:hover {\n\t\tborder-color: rgb(255 255 255 / 0.35);\n\t\tbackground-color: rgb(255 255 255 / 0.04);\n\t}\n\t.ghost-icon {\n\t\ttransition:\n\t\t\tborder-color 0.4s var(--ease-out-expo),\n\t\t\tcolor 0.4s var(--ease-out-expo);\n\t}\n\t.ghost-card:hover .ghost-icon {\n\t\tborder-color: rgb(255 255 255 / 0.4);\n\t\tcolor: rgb(255 255 255 / 0.75);\n\t}\n</style>\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport { SvelteSet } from 'svelte/reactivity';\n\n\tinterface Props {\n\t\tcode: string;\n\t\tkind?: string; // RAT-380: 'cockcompare' | 'cumshot'\n\t\turlA: string | null;\n\t\turlB: string | null;\n\t\tmediaTypeA: string | null;\n\t\tmediaTypeB: string | null;\n\t\tvotesA: number;\n\t\tvotesB: number;\n\t\twinnerSide: 'a' | 'b' | 'tie' | string | null;\n\t\tisMine?: boolean;\n\t}\n\n\tlet {\n\t\tcode,\n\t\tkind = 'cockcompare',\n\t\turlA,\n\t\turlB,\n\t\tmediaTypeA,\n\t\tmediaTypeB,\n\t\tvotesA,\n\t\tvotesB,\n\t\twinnerSide,\n\t\tisMine = false\n\t}: Props = $props();\n\n\tconst total = $derived(votesA + votesB);\n\tconst isTie = $derived(winnerSide === 'tie');\n\tconst aWon = $derived(winnerSide === 'a');\n\tconst bWon = $derived(winnerSide === 'b');\n\n\t// ── Image fallback ─────────────────────────────────────────────────────────\n\t// Thumbnails are signed render-transform URLs. Supabase's render pipeline\n\t// occasionally fails on an image the object store still holds fine, so a broken\n\t// transform URL used to show a torn-image icon on the finished-duels view. Same\n\t// two-step fallback BeatLiveCard already carries: retry the untransformed\n\t// original (shares the same token), then degrade to the gradient placeholder.\n\t// State keyed by source URL so it resets when the feed reloads a fresh URL.\n\tconst triedOriginal = new SvelteSet<string>();\n\tconst gaveUp = new SvelteSet<string>();\n\n\tfunction untransformed(url: string): string | null {\n\t\tif (!url.includes('/render/image/sign/')) return null;\n\t\tconst swapped = url.replace('/render/image/sign/', '/object/sign/');\n\t\tconst [path, query] = swapped.split('?');\n\t\tif (!query) return swapped;\n\t\tconst kept = query.split('&').filter((p) => !/^(?:width|height|resize|quality)=/.test(p));\n\t\treturn kept.length ? `${path}?${kept.join('&')}` : path;\n\t}\n\n\tconst srcA = $derived(urlA && triedOriginal.has(urlA) ? (untransformed(urlA) ?? urlA) : urlA);\n\tconst srcB = $derived(urlB && triedOriginal.has(urlB) ? (untransformed(urlB) ?? urlB) : urlB);\n\n\tfunction onImgError(url: string | null) {\n\t\tif (!url) return;\n\t\tif (!triedOriginal.has(url) && untransformed(url)) triedOriginal.add(url);\n\t\telse gaveUp.add(url);\n\t}\n</script>\n\n<a\n\thref=\"/b/{code}\"\n\tclass=\"group relative block overflow-hidden rounded-xl bg-surface no-underline {isMine\n\t\t? 'ring-1 ring-yellow/40 ring-inset'\n\t\t: 'ring-1 ring-border ring-inset hover:ring-muted/50'}\"\n>\n\t<div class=\"relative grid aspect-[5/4] grid-cols-2 bg-bg\">\n\t\t<div class=\"relative overflow-hidden {bWon ? 'opacity-45' : ''}\">\n\t\t\t{#if mediaTypeA === 'image' && srcA && !(urlA && gaveUp.has(urlA))}\n\t\t\t\t<img src={srcA} alt=\"\" loading=\"lazy\" onerror={() => onImgError(urlA)} class=\"h-full w-full object-cover\" />\n\t\t\t{:else if mediaTypeA === 'video'}\n\t\t\t\t<div class=\"flex h-full w-full items-center justify-center bg-gradient-to-br from-coral/30 to-bg\">\n\t\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-text/70\">\n\t\t\t\t\t\t<path d=\"M8 5v14l11-7z\"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t{:else}\n\t\t\t\t<div class=\"h-full w-full bg-gradient-to-br from-coral/20 to-coral/5\"></div>\n\t\t\t{/if}\n\t\t\t{#if aWon}\n\t\t\t\t<div class=\"pointer-events-none absolute inset-0 ring-1 ring-coral/70 ring-inset\"></div>\n\t\t\t\t<span class=\"absolute top-2 left-2 rounded bg-coral px-1.5 py-0.5 text-[9px] font-bold tracking-[0.18em] text-bg uppercase\">{t('won')}</span>\n\t\t\t{/if}\n\t\t</div>\n\t\t<div class=\"relative overflow-hidden {aWon ? 'opacity-45' : ''}\">\n\t\t\t{#if mediaTypeB === 'image' && srcB && !(urlB && gaveUp.has(urlB))}\n\t\t\t\t<img src={srcB} alt=\"\" loading=\"lazy\" onerror={() => onImgError(urlB)} class=\"h-full w-full object-cover\" />\n\t\t\t{:else if mediaTypeB === 'video'}\n\t\t\t\t<div class=\"flex h-full w-full items-center justify-center bg-gradient-to-br from-blue/30 to-bg\">\n\t\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"ml-0.5 text-text/70\">\n\t\t\t\t\t\t<path d=\"M8 5v14l11-7z\"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t{:else}\n\t\t\t\t<div class=\"h-full w-full bg-gradient-to-br from-blue/20 to-blue/5\"></div>\n\t\t\t{/if}\n\t\t\t{#if bWon}\n\t\t\t\t<div class=\"pointer-events-none absolute inset-0 ring-1 ring-blue/70 ring-inset\"></div>\n\t\t\t\t<span class=\"absolute top-2 right-2 rounded bg-blue px-1.5 py-0.5 text-[9px] font-bold tracking-[0.18em] text-bg uppercase\">{t('won')}</span>\n\t\t\t{/if}\n\t\t</div>\n\n\t\t{#if isTie}\n\t\t\t<div class=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t<span class=\"rounded-full bg-bg/85 px-3 py-1 text-[10px] font-bold tracking-[0.18em] text-yellow uppercase\">{t('tied')}</span>\n\t\t\t</div>\n\t\t{/if}\n\t</div>\n\n\t<div class=\"flex items-center justify-between px-3 py-2 text-[11px] text-muted\">\n\t\t<span class=\"tabular-nums\">{votesA} <span class=\"text-border\">·</span> {votesB}</span>\n\t\t<span>{total === 1 ? t('1 vote') : t('{n} votes', { n: total })}</span>\n\t</div>\n</a>\n","<script lang=\"ts\">\n\timport { t, lhref } from '$lib/i18n';\n\timport { msg } from '$lib/i18n/mark';\n\timport { onMount } from 'svelte';\n\timport { goto } from '$app/navigation';\n\timport { page } from '$app/state';\n\timport { trackBeatListingView, trackBeatListingScrolled50 } from '$lib/analytics';\n\timport Carousel from '$lib/components/Carousel.svelte';\n\timport BeatLiveCard from '$lib/components/beat/BeatLiveCard.svelte';\n\timport BeatSpotlightCard from '$lib/components/beat/BeatSpotlightCard.svelte';\n\timport BeatSpotlightGhostCard from '$lib/components/beat/BeatSpotlightGhostCard.svelte';\n\timport BeatPendingCard from '$lib/components/beat/BeatPendingCard.svelte';\n\timport BeatGhostCard from '$lib/components/beat/BeatGhostCard.svelte';\n\timport BeatClosedCard from '$lib/components/beat/BeatClosedCard.svelte';\n\timport BeatTabs from '$lib/components/beat/BeatTabs.svelte';\n\timport { activeMode } from '$lib/stores/activeMode';\n\timport {\n\t\ttype BeatKindFilter,\n\t\ttype BeatFormatFilter,\n\t\ttype BeatKind,\n\t\tBEAT_FORMAT_FILTERS,\n\t\tDEFAULT_BEAT_KIND,\n\t\tVISIBLE_BEAT_KINDS,\n\t\tbeatLobbyHref\n\t} from '$lib/types/beat';\n\timport type { BeatLobbyData } from '$lib/server/beat-lobby';\n\n\t// Kept in sync with the server union (`HubSort` in +page.server.ts) so\n\t// this kliens module doesn't pull server imports (drizzle, db) into the\n\t// bundle. RAT-233 added the 4 live sorts, RAT-234 appends `finished`\n\t// as a special view-switch entry — the dropdown still drives it.\n\ttype SortValue = 'closing-soon' | 'newest' | 'hottest' | 'close-fight' | 'finished';\n\tconst LIVE_SORT_OPTIONS: { value: SortValue; label: string }[] = [\n\t\t{ value: 'closing-soon', label: msg('closing soon') },\n\t\t{ value: 'newest', label: msg('newest') },\n\t\t{ value: 'hottest', label: msg('hottest') },\n\t\t{ value: 'close-fight', label: msg('close fight') }\n\t];\n\tconst FINISHED_OPTION: { value: SortValue; label: string } = {\n\t\tvalue: 'finished',\n\t\tlabel: msg('finished')\n\t};\n\n\t/**\n\t * The beat me lobby: /b, and since Epic R the beat section of /rate-my-boobs\n\t * and /rate-my-ass (`embedded`), each one category's lobby. Embedded, it is a\n\t * section of its rater's page: no tabs, an h2 instead of the page's h1, no\n\t * how-it-works, and the page keeps its own chrome and scroll tracking.\n\t */\n\tlet { data, embedded = false }: { data: BeatLobbyData; embedded?: boolean } = $props();\n\n\t// RAT-327: yellow chrome accent for the beat module.\n\tonMount(() => {\n\t\tif (embedded) return;\n\t\tactiveMode.set('beat');\n\t\treturn () => activeMode.set(null);\n\t});\n\n\tonMount(() => {\n\t\ttrackBeatListingView({\n\t\t\tlive: data.live.length,\n\t\t\tpending: data.pending.length,\n\t\t\tclosed: 0,\n\t\t\thasOwn: data.hasOwnSomewhere\n\t\t});\n\n\t\t// RAT-230: scroll-50% engagement signal for the post-update feedback\n\t\t// PostHog Survey. Fires once per mount; listener detaches itself. Half of\n\t\t// a rater's page is not half of the lobby, so embedded skips it.\n\t\tif (embedded) return;\n\t\tlet fired = false;\n\t\tfunction onScroll() {\n\t\t\tif (fired) return;\n\t\t\tconst total = document.documentElement.scrollHeight;\n\t\t\tconst bottom = window.scrollY + window.innerHeight;\n\t\t\tif (total > 0 && bottom / total >= 0.5) {\n\t\t\t\tfired = true;\n\t\t\t\ttrackBeatListingScrolled50();\n\t\t\t\twindow.removeEventListener('scroll', onScroll);\n\t\t\t}\n\t\t}\n\t\twindow.addEventListener('scroll', onScroll, { passive: true });\n\t\treturn () => window.removeEventListener('scroll', onScroll);\n\t});\n\n\t// RAT-234: server-side \"only mine\" filter (replaces the previous\n\t// kliens-side `.filter(c => c.isMine)` which broke under pagination).\n\t// Hydrated from server-decided `data.mine`.\n\tlet showOnlyMine = $state<boolean>(data.mine ?? false);\n\n\t// RAT-214: paginated Live feed — SSR ships the first page, \"show more\"\n\t// hits /api/beat/feed for the next chunk.\n\t//\n\t// RAT-216: state is seeded from `data` once at init, not via a $effect.\n\t// A reactive resync would re-fire after `loadMore()` appends a page (the\n\t// effect depends on `data.live`, which Svelte 5 reads through the deep\n\t// proxy on every render) and clobber the merged list — feed snapped\n\t// back to the first 6 rows on every load-more click.\n\t//\n\t// Trade-off: navigating back to /b after an invalidateAll() won't\n\t// refresh the visible feed until a hard reload. Fine for now — a\n\t// head-diff guard would re-introduce subtle bugs.\n\ttype LiveCard = (typeof data.live)[number];\n\tlet liveFeed = $state<LiveCard[]>(data.live);\n\tlet liveHasMore = $state(data.liveHasMore);\n\tlet loadingMore = $state(false);\n\n\t// RAT-233: user-driven sort + hide-voted. Mirrored from `data` on init\n\t// so the dropdown / toggle hydrate with the server-decided defaults.\n\tlet currentSort = $state<SortValue>((data.sort as SortValue) ?? 'closing-soon');\n\tlet hideVoted = $state<boolean>(data.hideVoted ?? false);\n\tlet switching = $state(false);\n\n\t// Category switcher (d / ass / boobs). The server defaults a missing\n\t// `?kind=` to the d category, so the lobby never mixes categories;\n\t// `cumshot` stays out of the switcher. Resynced from `data` so a\n\t// navigation or invalidateAll() doesn't leave it frozen (RAT-117).\n\tlet currentKind = $state<BeatKindFilter>(data.kind ?? DEFAULT_BEAT_KIND);\n\t$effect(() => {\n\t\tcurrentKind = data.kind ?? DEFAULT_BEAT_KIND;\n\t});\n\t// Every \"start a challenge\" entry carries the selected category, so the\n\t// new beat lands in the category the user was looking at.\n\tconst startHref = $derived(\n\t\tcurrentKind === DEFAULT_BEAT_KIND || currentKind === 'all'\n\t\t\t? '/b/start'\n\t\t\t: `/b/start?kind=${currentKind}`\n\t);\n\tconst KIND_SWITCH_LABELS: Partial<Record<BeatKind, string>> = {\n\t\tcockcompare: msg('dick'),\n\t\tass: msg('ass'),\n\t\tboobs: msg('boobs')\n\t};\n\n\t// RAT-419: format filter (1v1 / 2v2 / 4v4 / all), seeded from the server.\n\tlet currentFormat = $state<BeatFormatFilter>(data.format ?? 'all');\n\tconst FORMAT_FILTER_LABELS: Record<BeatFormatFilter, string> = {\n\t\tall: msg('all'),\n\t\t'1v1': '1v1',\n\t\t'2v2': '2v2',\n\t\t'4v4': '4v4'\n\t};\n\n\t// RAT-381: stash the active sort so the in-match next queue (/b/[code]) keeps\n\t// continuous-flow voting in the same order instead of resetting to\n\t// closing-soon. RAT-419: same for the format filter — swiping inside a beat\n\t// stays within the chosen format. Client-only — $effect never runs during SSR.\n\t$effect(() => {\n\t\ttry {\n\t\t\tsessionStorage.setItem('beat:sort', currentSort);\n\t\t\tsessionStorage.setItem('beat:format', currentFormat);\n\t\t} catch {\n\t\t\t// quota / privacy mode — next queue just falls back to unfiltered\n\t\t}\n\t});\n\n\t// Custom dropdown — the native <select> brought in OS chrome (white menu,\n\t// blue selected highlight) that clashed with the dark/brutal aesthetic.\n\t// This panel pattern matches the rest of the site's surfaces.\n\tlet sortMenuOpen = $state(false);\n\tlet sortMenuEl = $state<HTMLDivElement | null>(null);\n\tlet sortTriggerEl = $state<HTMLButtonElement | null>(null);\n\t// `right-0` anchors the panel to the trigger's right edge, which is the\n\t// natural choice when the trigger sits on the right of the header. On\n\t// narrow viewports the panel can overflow past the viewport's left edge,\n\t// so we measure after mount and flip the anchor to `left-0` (trigger's\n\t// left edge) when needed.\n\tlet sortMenuAnchor = $state<'right' | 'left'>('right');\n\n\t// Dropdown render list — live sorts + `finished` for everyone. Finished\n\t// is a public view now; combine with the `only mine` toggle to scope to\n\t// the viewer's own history.\n\tconst sortOptions: { value: SortValue; label: string }[] = [\n\t\t...LIVE_SORT_OPTIONS,\n\t\tFINISHED_OPTION\n\t];\n\n\tconst currentSortLabel = $derived(\n\t\tt(sortOptions.find((o) => o.value === currentSort)?.label ?? msg('sort'))\n\t);\n\n\tconst isFinishedView = $derived(currentSort === 'finished');\n\n\tfunction chooseSort(s: SortValue) {\n\t\tsortMenuOpen = false;\n\t\t// Picking `finished` only changes the view dimension; the `mine`\n\t\t// toggle carries over (the user might want their own finished, or\n\t\t// everyone's). `hideVoted` doesn't apply to settled beats — clear\n\t\t// it to keep the URL canonical.\n\t\tvoid applyFilters(s, s === 'finished' ? false : hideVoted, showOnlyMine, currentFormat);\n\t}\n\n\t$effect(() => {\n\t\tif (!sortMenuOpen) return;\n\t\t// Reset to the default anchor on every open. Without this the state\n\t\t// stays sticky from the previous open — a left-anchored measurement\n\t\t// would then mis-decide it can return to right, where it actually\n\t\t// overflows. RAF below then measures the right-anchored render and\n\t\t// flips to left only if overflow remains.\n\t\tsortMenuAnchor = 'right';\n\n\t\tfunction onPointerDown(e: PointerEvent) {\n\t\t\tconst t = e.target as Node;\n\t\t\tif (sortMenuEl?.contains(t) || sortTriggerEl?.contains(t)) return;\n\t\t\tsortMenuOpen = false;\n\t\t}\n\t\tfunction onKey(e: KeyboardEvent) {\n\t\t\tif (e.key === 'Escape') sortMenuOpen = false;\n\t\t}\n\t\t// Position fix: after the panel mounts measure its left edge against\n\t\t// the viewport. If it would overflow, flip the anchor. requestAnimation\n\t\t// Frame so the DOM has its measured rect ready before we check.\n\t\tconst raf = requestAnimationFrame(() => {\n\t\t\tif (!sortMenuEl) return;\n\t\t\tconst rect = sortMenuEl.getBoundingClientRect();\n\t\t\tconst VIEWPORT_PAD = 8;\n\t\t\tif (rect.left < VIEWPORT_PAD) {\n\t\t\t\tsortMenuAnchor = 'left';\n\t\t\t}\n\t\t});\n\t\twindow.addEventListener('pointerdown', onPointerDown);\n\t\twindow.addEventListener('keydown', onKey);\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(raf);\n\t\t\twindow.removeEventListener('pointerdown', onPointerDown);\n\t\t\twindow.removeEventListener('keydown', onKey);\n\t\t};\n\t});\n\n\t/** Build the canonical query string for the current sort + hideVoted +\n\t *  mine state. Defaults (`closing-soon`, both toggles off) are omitted\n\t *  so the canonical URL stays clean (`/b`, or the rater page it sits on).\n\t *  The category is the page's own (Epic R), so it never rides along. */\n\tfunction buildQuery(\n\t\tsort: SortValue,\n\t\thide: boolean,\n\t\tmineOnly: boolean,\n\t\tformat: BeatFormatFilter\n\t): string {\n\t\tconst params = new URLSearchParams();\n\t\tif (sort !== 'closing-soon') params.set('sort', sort);\n\t\tif (hide) params.set('hideVoted', '1');\n\t\tif (mineOnly) params.set('mine', '1');\n\t\tif (format !== 'all') params.set('format', format);\n\t\tconst qs = params.toString();\n\t\treturn qs ? `?${qs}` : page.url.pathname;\n\t}\n\n\t// Ref to the feed section so we can scroll the user back to it after a\n\t// view-mode change. Live ↔ finished restructures the page (carousel\n\t// disappears, feed body height changes), so the browser's scroll\n\t// position ends up wherever the new shorter page lets it — often the\n\t// top. Re-anchor to the feed section to keep the user where they\n\t// expect to be.\n\tlet feedSectionEl = $state<HTMLElement | null>(null);\n\n\tasync function applyFilters(\n\t\tnextSort: SortValue,\n\t\tnextHide: boolean,\n\t\tnextMine: boolean,\n\t\tnextFormat: BeatFormatFilter\n\t) {\n\t\tif (switching) return;\n\t\tconst prevSort = currentSort;\n\t\t// Optimistic UI: dropdown / pill flip immediately.\n\t\tcurrentSort = nextSort;\n\t\thideVoted = nextHide;\n\t\tshowOnlyMine = nextMine;\n\t\tcurrentFormat = nextFormat;\n\t\tswitching = true;\n\t\ttry {\n\t\t\tawait goto(buildQuery(nextSort, nextHide, nextMine, nextFormat), {\n\t\t\t\treplaceState: true,\n\t\t\t\tnoScroll: true,\n\t\t\t\tkeepFocus: true,\n\t\t\t\tinvalidateAll: true\n\t\t\t});\n\t\t\t// liveFeed is seeded once at init (RAT-216 comment below), so a\n\t\t\t// data refresh from goto() doesn't auto-flow into the visible\n\t\t\t// feed. Reset it manually with the freshly loaded data.\n\t\t\tliveFeed = data.live;\n\t\t\tliveHasMore = data.liveHasMore;\n\t\t} finally {\n\t\t\tswitching = false;\n\t\t}\n\n\t\t// Only scroll when crossing the live ↔ finished boundary. Within\n\t\t// the same view, the layout doesn't shift so noScroll: true keeps\n\t\t// the user where they were (the comfortable behavior the user\n\t\t// noticed for sort changes among live).\n\t\tconst crossedFinishedBoundary =\n\t\t\t(prevSort === 'finished') !== (nextSort === 'finished');\n\t\tif (crossedFinishedBoundary) {\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tfeedSectionEl?.scrollIntoView({ behavior: 'smooth', block: 'start' });\n\t\t\t});\n\t\t}\n\t}\n\n\tconst LIVE_PAGE = 6;\n\tasync function loadMore() {\n\t\tif (loadingMore || !liveHasMore) return;\n\t\tloadingMore = true;\n\t\ttry {\n\t\t\tconst params = new URLSearchParams({\n\t\t\t\toffset: String(liveFeed.length),\n\t\t\t\tlimit: String(LIVE_PAGE)\n\t\t\t});\n\t\t\tif (currentSort !== 'closing-soon' && currentSort !== 'finished')\n\t\t\t\tparams.set('sort', currentSort);\n\t\t\tif (hideVoted) params.set('hideVoted', '1');\n\t\t\tif (showOnlyMine) params.set('mine', '1');\n\t\t\tif (currentKind !== 'all') params.set('kind', currentKind);\n\t\t\tif (currentFormat !== 'all') params.set('format', currentFormat);\n\t\t\tconst res = await fetch(`/api/beat/feed?${params.toString()}`);\n\t\t\tif (!res.ok) return;\n\t\t\tconst next = (await res.json()) as { items: LiveCard[]; hasMore: boolean };\n\t\t\t// RAT-460: same hazard as the For You feed — this list is live-sorted, so\n\t\t\t// ordering shifts as beats close and as `hideVoted` flips, and offset\n\t\t\t// pagination can hand back a card we already hold. Two identical `c.code`\n\t\t\t// keys throw each_key_duplicate and kill the render.\n\t\t\tconst seen = new Set(liveFeed.map((c) => c.code));\n\t\t\tliveFeed = [...liveFeed, ...next.items.filter((c) => !seen.has(c.code))];\n\t\t\tliveHasMore = next.hasMore;\n\t\t} finally {\n\t\t\tloadingMore = false;\n\t\t}\n\t}\n\n\t// RAT-234: filters are now server-side, so the kliens just renders what\n\t// `data` returned. Kept the legacy names so the markup stays diff-light.\n\tconst liveFiltered = $derived(liveFeed);\n\tconst pendingFiltered = $derived(data.pending);\n\n\t// RAT-219: target 6 ghosts on desktop, 4 on mobile (extras get\n\t// `hidden lg:block` in the markup so they only show ≥1024px).\n\tconst pendingGhostCount = $derived(Math.max(0, 6 - pendingFiltered.length));\n\t// Fill the spotlight rail's trailing space with empty \"your shot\" slots so a\n\t// half-empty boosted row reads as an invitation, not a gap.\n\tconst spotlightGhostCount = $derived(Math.max(0, 6 - data.spotlight.length));\n</script>\n\n<svelte:element\n\tthis={embedded ? 'section' : 'main'}\n\tid={embedded ? 'beat' : undefined}\n\tclass=\"relative overflow-hidden {embedded\n\t\t? 'scroll-mt-16 border-t border-border pt-14 pb-20 md:pt-20'\n\t\t: 'pt-20 pb-32 md:pt-28'}\"\n>\n\t{#if !embedded}\n\t<!-- Background grid + accent blob, same recipe as /d and homepage. -->\n\t<div class=\"pointer-events-none absolute inset-0 bg-[linear-gradient(rgba(255,255,255,.005)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.005)_1px,transparent_1px)] bg-[size:60px_60px]\"></div>\n\t<div class=\"pointer-events-none absolute -top-32 right-[-20%] hidden h-[520px] w-[520px] rounded-full bg-coral/[.04] blur-[200px] md:block\"></div>\n\n\t<!-- RAT-386: beat me | bet tabs. Additive — the classic hero + feed below\n\t     render exactly as before. -->\n\t<BeatTabs active=\"beatme\" />\n\t{/if}\n\n\t<!-- ─── HERO (compact) ─── -->\n\t<!-- RAT-214: the old hero ate the fold with a clamp(3rem,11vw,8rem) h1.\n\t\t The feed below was getting buried. New hero is a single-row strip:\n\t\t eyebrow + tight h1 + CTA + activity stat — leaves the feed visible\n\t\t within the first scroll. -->\n\t<section class=\"relative\">\n\t\t<div class=\"mx-auto w-full max-w-5xl px-5 md:px-0\">\n\t\t\t<!-- Epic R: each category is a link to its own lobby — ass and boobs\n\t\t\t\t live on their rater's page (beatLobbyHref). -->\n\t\t\t<nav\n\t\t\t\taria-label={t('category')}\n\t\t\t\tclass=\"grid w-full max-w-sm grid-cols-3 gap-1 rounded-xl bg-surface p-1\"\n\t\t\t>\n\t\t\t\t{#each VISIBLE_BEAT_KINDS as k (k)}\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={beatLobbyHref(k)}\n\t\t\t\t\t\taria-current={currentKind === k ? 'page' : undefined}\n\t\t\t\t\t\tclass=\"flex min-h-11 items-center justify-center rounded-lg font-display text-[15px] font-bold tracking-tight no-underline transition-colors {currentKind ===\n\t\t\t\t\t\tk\n\t\t\t\t\t\t\t? 'bg-surface-2 text-text shadow-[0_1px_3px_rgba(0,0,0,0.5)]'\n\t\t\t\t\t\t\t: 'text-muted hover:text-text'}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{t(KIND_SWITCH_LABELS[k] ?? '')}\n\t\t\t\t\t</a>\n\t\t\t\t{/each}\n\t\t\t</nav>\n\t\t\t<svelte:element\n\t\t\t\tthis={embedded ? 'h2' : 'h1'}\n\t\t\t\tclass=\"mt-5 font-display text-[clamp(2.4rem,7vw,4.5rem)] font-bold leading-[0.92] tracking-[-0.02em]\"\n\t\t\t>\n\t\t\t\t{t('post it.')} <span class=\"text-muted\">{t('the mob decides.')}</span>\n\t\t\t</svelte:element>\n\t\t\t<p class=\"mt-3 max-w-md text-[15px] leading-snug text-muted\">\n\t\t\t\t{currentKind === 'cockcompare'\n\t\t\t\t\t? t('anonymous dick size comparison, one on one or in teams. anyone can vote for 24 hours — most votes wins.')\n\t\t\t\t\t: t('anonymous photo battles, one on one or in teams. anyone can vote for 24 hours — most votes wins.')}\n\t\t\t</p>\n\n\t\t\t<div class=\"mt-6 flex flex-col items-stretch gap-3 sm:flex-row sm:items-center\">\n\t\t\t\t<a\n\t\t\t\t\thref={startHref}\n\t\t\t\t\tclass=\"hero-cta inline-flex items-center justify-center rounded-xl bg-yellow px-7 py-3.5 font-display text-[15px] font-bold tracking-tight text-bg no-underline shadow-[0_8px_24px_-8px_rgba(255,229,0,0.5)]\"\n\t\t\t\t>\n\t\t\t\t\t{t('+ start a challenge')}\n\t\t\t\t</a>\n\t\t\t\t<p class=\"font-mono text-[10px] tracking-[0.18em] text-muted uppercase sm:ml-1\">\n\t\t\t\t\t{isFinishedView\n\t\t\t\t\t\t? t('{n} settled', { n: data.finished.length })\n\t\t\t\t\t\t: t('{live} live · {open} open', { live: data.liveTotal, open: pendingFiltered.length })}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\t</section>\n\n\t<!-- ─── SPOTLIGHT (boosted beats, horizontal scroll) ─── -->\n\t<!-- Stage 0 impulse layer: anyone can token-boost a live beat onto this rail\n\t\t (see /api/beat/[code]/boost). Boost buys exposure only — the vote tally\n\t\t stays earned. Hidden in the finished view only — otherwise ALWAYS shown\n\t\t (empty rail = \"your shot\" ghost slots inviting the first boost). -->\n\t{#if !isFinishedView}\n\t\t<section class=\"relative mt-9 md:mt-12\">\n\t\t\t<div class=\"mx-auto w-full max-w-5xl px-5 md:px-0\">\n\t\t\t\t<header class=\"mb-3 flex items-baseline justify-between gap-4\">\n\t\t\t\t\t<p class=\"font-mono text-[10px] tracking-[0.32em] text-yellow uppercase\">\n\t\t\t\t\t\t<!-- RAT-528: a rail of live fill says what it is: vote here. -->\n\t\t\t\t\t\t{data.spotlightBoosted === 0 && data.spotlight.length > 0\n\t\t\t\t\t\t\t? t('live now · tap a side to vote')\n\t\t\t\t\t\t\t: t('🔥 spotlight · boosted')}\n\t\t\t\t\t</p>\n\t\t\t\t\t<p class=\"shrink-0 text-[11px] text-muted\">\n\t\t\t\t\t\t{data.spotlightBoosted > 0 ? t('{n} boosted', { n: data.spotlightBoosted }) : t('boost yours to feature')}\n\t\t\t\t\t</p>\n\t\t\t\t</header>\n\t\t\t\t<Carousel label={t('spotlight')} bleed>\n\t\t\t\t\t{#each data.spotlight as s (s.code)}\n\t\t\t\t\t\t<BeatSpotlightCard\n\t\t\t\t\t\t\tcode={s.code}\n\t\t\t\t\t\t\tstatus={s.status}\n\t\t\t\t\t\t\tmediaTypeA={s.mediaTypeA}\n\t\t\t\t\t\t\tmediaTypeB={s.mediaTypeB}\n\t\t\t\t\t\t\turlA={s.urlA}\n\t\t\t\t\t\t\turlB={s.urlB}\n\t\t\t\t\t\t\tvotesA={s.votesA}\n\t\t\t\t\t\t\tvotesB={s.votesB}\n\t\t\t\t\t\t\tboostCount={s.boostCount}\n\t\t\t\t\t\t\tnickname={s.nickname}\n\t\t\t\t\t\t\tvoted={s.myVote}\n\t\t\t\t\t\t\tboosted={s.boosted}\n\t\t\t\t\t\t/>\n\t\t\t\t\t{/each}\n\t\t\t\t\t{#each Array(spotlightGhostCount) as _, i (`spot-ghost-${i}`)}\n\t\t\t\t\t\t<BeatSpotlightGhostCard seed={i} href={startHref} />\n\t\t\t\t\t{/each}\n\t\t\t\t</Carousel>\n\t\t\t</div>\n\t\t</section>\n\t{/if}\n\n\t<!-- ─── OPEN CHALLENGES (top horizontal scroll) ─── -->\n\t<!-- RAT-214: Open lifts to the top of the page — these are the duels\n\t\t looking for a second photo. Fast accept path. Always visible above\n\t\t the Live feed regardless of viewport.\n\t\t RAT-234: hidden in the finished view — no live action to surface. -->\n\t{#if !isFinishedView}\n\t\t<section class=\"relative mt-10 md:mt-14\">\n\t\t\t<div class=\"mx-auto w-full max-w-5xl px-5 md:px-0\">\n\t\t\t\t<header class=\"mb-4 flex items-baseline justify-between gap-4\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<p class=\"font-mono text-[10px] tracking-[0.32em] text-yellow uppercase\">\n\t\t\t\t\t\t\t{showOnlyMine ? t('your open challenges') : t('open challenges')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p class=\"mt-1.5 text-[13px] leading-tight text-muted md:text-sm\">\n\t\t\t\t\t\t\t{t('first to upload accepts. winner takes it from here.')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p class=\"shrink-0 text-[11px] text-muted\">\n\t\t\t\t\t\t{t('{n} waiting', { n: pendingFiltered.length })}\n\t\t\t\t\t</p>\n\t\t\t\t</header>\n\n\t\t\t\t<Carousel label={t('open challenges')} bleed>\n\t\t\t\t\t{#each pendingFiltered as c (c.code)}\n\t\t\t\t\t\t<div class=\"w-[60%] flex-none sm:w-[36%] md:w-[24%] lg:w-[15.5%]\">\n\t\t\t\t\t\t\t<BeatPendingCard\n\t\t\t\t\t\t\t\tcode={c.code}\n\t\t\t\t\t\t\t\tkind={c.kind}\n\t\t\t\t\t\t\t\tformat={c.format}\n\t\t\t\t\t\t\t\turlA={c.urlA}\n\t\t\t\t\t\t\t\tmediaTypeA={c.mediaTypeA}\n\t\t\t\t\t\t\t\tcreatedAt={c.createdAt}\n\t\t\t\t\t\t\t\tisMine={c.isMine}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/each}\n\t\t\t\t\t{#each Array(pendingGhostCount) as _, i (`ghost-${i}`)}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"flex-none w-[60%] sm:w-[36%] md:w-[24%] lg:w-[15.5%] {i >= 4\n\t\t\t\t\t\t\t\t? 'hidden lg:block'\n\t\t\t\t\t\t\t\t: ''}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BeatGhostCard aspect=\"4 / 5\" href={startHref} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/each}\n\t\t\t\t</Carousel>\n\t\t\t</div>\n\t\t</section>\n\t{/if}\n\n\t<!-- ─── LIVE FEED ─── -->\n\t<!-- RAT-234 follow-up: dropped the right sidebar (your-beats stats +\n\t\t top-winners placeholder). Stats only paid off when the user had\n\t\t no history (the CTA); the placeholder was wasted space. Single\n\t\t centered column reads better. -->\n\t<section bind:this={feedSectionEl} class=\"relative mt-12 px-5 md:mt-16\">\n\t\t<div class=\"mx-auto max-w-3xl\">\n\t\t\t<div class=\"min-w-0\">\n\t\t\t\t<header class=\"mb-5 flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<p class=\"font-mono text-[10px] tracking-[0.32em] uppercase {isFinishedView ? 'text-muted' : 'text-coral'}\">\n\t\t\t\t\t\t\t{#if !isFinishedView}\n\t\t\t\t\t\t\t\t<span class=\"relative mr-1 inline-flex h-1.5 w-1.5 align-middle\">\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-coral opacity-60\"\n\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t<span class=\"relative inline-flex h-1.5 w-1.5 rounded-full bg-coral\"></span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t{#if isFinishedView && showOnlyMine}\n\t\t\t\t\t\t\t\t{t('your history')}\n\t\t\t\t\t\t\t{:else if isFinishedView}\n\t\t\t\t\t\t\t\t{t('finished')}\n\t\t\t\t\t\t\t{:else if showOnlyMine}\n\t\t\t\t\t\t\t\t{t('your live duels')}\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t{t('live now')}\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\tclass=\"mt-2 font-display text-[clamp(1.6rem,3vw,2rem)] font-bold leading-tight tracking-tight\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if isFinishedView}\n\t\t\t\t\t\t\t\t{t('settled.')}\n\t\t\t\t\t\t\t{:else if showOnlyMine}\n\t\t\t\t\t\t\t\t{t('your fights.')}\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t{t('vote, or it dies.')}\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- RAT-233: sort + hide-voted controls.\n\t\t\t\t\t\t Custom dropdown panel (no native <select>) so the menu\n\t\t\t\t\t\t matches the dark/brutal surface aesthetic — OS chrome\n\t\t\t\t\t\t was breaking the look. Trigger is a chip; panel slides\n\t\t\t\t\t\t down on open with click-outside / Escape to close.\n\t\t\t\t\t\t Hide-voted is a pill toggle mirroring the existing\n\t\t\t\t\t\t \"only mine\" control. -->\n\t\t\t\t\t<div class=\"flex flex-wrap items-center gap-1.5 sm:gap-2\">\n\t\t\t\t\t\t<div class=\"relative\">\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tbind:this={sortTriggerEl}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tdisabled={switching}\n\t\t\t\t\t\t\t\tonclick={() => (sortMenuOpen = !sortMenuOpen)}\n\t\t\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t\t\t\taria-expanded={sortMenuOpen}\n\t\t\t\t\t\t\t\taria-label={t('sort live duels')}\n\t\t\t\t\t\t\t\tclass=\"sort-trigger inline-flex items-center gap-1.5 rounded-full border bg-surface px-2 py-1.5 text-[11px] transition-colors disabled:opacity-50 sm:gap-2 sm:px-3 {sortMenuOpen\n\t\t\t\t\t\t\t\t\t? 'border-muted/70 text-text'\n\t\t\t\t\t\t\t\t\t: 'border-border text-muted hover:border-muted/80'}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<!-- \"sort:\" prefix only on sm+: redundant on mobile where the\n\t\t\t\t\t\t\t\t\t chevron + value already signal a dropdown. Saves ~30px so\n\t\t\t\t\t\t\t\t\t all three filter pills fit one row on a 360px viewport. -->\n\t\t\t\t\t\t\t\t<span class=\"hidden whitespace-nowrap text-muted sm:inline\">{t('sort:')}</span>\n\t\t\t\t\t\t\t\t<span class=\"whitespace-nowrap text-text\">{currentSortLabel}</span>\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\tclass=\"text-muted transition-transform {sortMenuOpen ? 'rotate-180' : ''}\"\n\t\t\t\t\t\t\t\t\twidth=\"10\"\n\t\t\t\t\t\t\t\t\theight=\"10\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2.5\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<polyline points=\"6 9 12 15 18 9\"></polyline>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t{#if sortMenuOpen}\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tbind:this={sortMenuEl}\n\t\t\t\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t\t\t\taria-label={t('sort options')}\n\t\t\t\t\t\t\t\t\tclass=\"sort-menu absolute top-[calc(100%+6px)] z-50 min-w-[150px] max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl border border-border bg-surface/95 shadow-[0_18px_40px_-12px_rgba(0,0,0,0.6)] backdrop-blur-md\n\t\t\t\t\t\t\t\t\t\t{sortMenuAnchor === 'right' ? 'right-0' : 'left-0'}\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{#each sortOptions as opt, idx (opt.value)}\n\t\t\t\t\t\t\t\t\t\t{#if opt.value === 'finished' && idx > 0}\n\t\t\t\t\t\t\t\t\t\t\t<!-- Visual separator before `finished` — it switches\n\t\t\t\t\t\t\t\t\t\t\t\t the view rather than reordering live duels, so\n\t\t\t\t\t\t\t\t\t\t\t\t the divider hints at the different mode. -->\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"my-1 border-t border-border/60\" role=\"separator\"></div>\n\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\t\t\taria-selected={opt.value === currentSort}\n\t\t\t\t\t\t\t\t\t\t\tonclick={() => chooseSort(opt.value)}\n\t\t\t\t\t\t\t\t\t\t\tclass=\"sort-option flex w-full items-center justify-between gap-4 px-3.5 py-2 text-left text-[12px] transition-colors hover:bg-bg/50\n\t\t\t\t\t\t\t\t\t\t\t\t{opt.value === currentSort ? 'text-yellow' : 'text-text/85 hover:text-text'}\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"whitespace-nowrap\">{t(opt.label)}</span>\n\t\t\t\t\t\t\t\t\t\t\t{#if opt.value === currentSort}\n\t\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-3 w-3 shrink-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2.8\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{#if !isFinishedView}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tdisabled={switching}\n\t\t\t\t\t\t\t\tonclick={() =>\n\t\t\t\t\t\t\t\tapplyFilters(currentSort, !hideVoted, showOnlyMine, currentFormat)}\n\t\t\t\t\t\t\t\taria-pressed={hideVoted}\n\t\t\t\t\t\t\t\tclass=\"inline-flex items-center gap-1.5 rounded-full border border-border bg-surface px-2 py-1.5 text-[11px] text-muted transition-colors hover:border-muted/80 disabled:opacity-50 sm:gap-2 sm:px-3\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"relative h-3.5 w-6 rounded-full transition-colors {hideVoted\n\t\t\t\t\t\t\t\t\t\t? 'bg-yellow'\n\t\t\t\t\t\t\t\t\t\t: 'bg-border'}\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"absolute top-0.5 left-0.5 h-2.5 w-2.5 rounded-full transition-transform {hideVoted\n\t\t\t\t\t\t\t\t\t\t\t? 'translate-x-2.5 bg-bg'\n\t\t\t\t\t\t\t\t\t\t\t: 'translate-x-0 bg-muted'}\"\n\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"whitespace-nowrap text-text\">{t('hide voted')}</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t{/if}\n\n\t\t\t\t\t\t<!-- RAT-234: `only mine` lives next to sort + hide-voted so\n\t\t\t\t\t\t\t it's discoverable without needing prior history. Shown\n\t\t\t\t\t\t\t to all visitors — the hub server load mints the\n\t\t\t\t\t\t\t beat_token cookie on first visit so the filter is\n\t\t\t\t\t\t\t immediately functional. -->\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tdisabled={switching}\n\t\t\t\t\t\t\tonclick={() =>\n\t\t\t\t\t\t\tapplyFilters(currentSort, hideVoted, !showOnlyMine, currentFormat)}\n\t\t\t\t\t\t\taria-pressed={showOnlyMine}\n\t\t\t\t\t\t\tclass=\"inline-flex items-center gap-1.5 rounded-full border border-border bg-surface px-2 py-1.5 text-[11px] text-muted transition-colors hover:border-muted/80 disabled:opacity-50 sm:gap-2 sm:px-3\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass=\"relative h-3.5 w-6 rounded-full transition-colors {showOnlyMine\n\t\t\t\t\t\t\t\t\t? 'bg-yellow'\n\t\t\t\t\t\t\t\t\t: 'bg-border'}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"absolute top-0.5 left-0.5 h-2.5 w-2.5 rounded-full transition-transform {showOnlyMine\n\t\t\t\t\t\t\t\t\t\t? 'translate-x-2.5 bg-bg'\n\t\t\t\t\t\t\t\t\t\t: 'translate-x-0 bg-muted'}\"\n\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"whitespace-nowrap text-text\">{t('only mine')}</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</header>\n\n\t\t\t\t<!-- RAT-419: format filter — its own row so it always fits one\n\t\t\t\t\t mobile line (all / 1v1 / 2v2 / 4v4). -->\n\t\t\t\t<div class=\"mb-5 flex\">\n\t\t\t\t\t<div class=\"inline-flex rounded-full border border-border bg-surface p-0.5\">\n\t\t\t\t\t\t{#each BEAT_FORMAT_FILTERS as f (f)}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tdisabled={switching}\n\t\t\t\t\t\t\t\tonclick={() =>\n\t\t\t\t\t\t\t\t\tapplyFilters(currentSort, hideVoted, showOnlyMine, f)}\n\t\t\t\t\t\t\t\taria-pressed={currentFormat === f}\n\t\t\t\t\t\t\t\tclass=\"rounded-full px-3.5 py-1 font-mono text-[11px] font-semibold tracking-wide transition-colors disabled:opacity-50 {currentFormat ===\n\t\t\t\t\t\t\t\tf\n\t\t\t\t\t\t\t\t\t? 'bg-yellow text-bg'\n\t\t\t\t\t\t\t\t\t: 'text-muted hover:text-text'}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{t(FORMAT_FILTER_LABELS[f])}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{#if isFinishedView}\n\t\t\t\t\t<!-- RAT-234: settled history. Two-column grid on desktop —\n\t\t\t\t\t\t results are non-actionable, so let the user scan more\n\t\t\t\t\t\t without scrolling forever. -->\n\t\t\t\t\t{#if data.finished.length === 0}\n\t\t\t\t\t\t<div class=\"rounded-2xl bg-surface px-5 py-12 text-center ring-1 ring-border ring-inset\">\n\t\t\t\t\t\t\t<p class=\"text-sm text-muted\">\n\t\t\t\t\t\t\t\t{showOnlyMine\n\t\t\t\t\t\t\t\t\t? t(\"you haven't settled any beats yet.\")\n\t\t\t\t\t\t\t\t\t: t('no settled beats yet.')}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t<div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n\t\t\t\t\t\t\t{#each data.finished as c (c.code)}\n\t\t\t\t\t\t\t\t<BeatClosedCard\n\t\t\t\t\t\t\t\t\tcode={c.code}\n\t\t\t\t\t\t\t\t\tkind={c.kind}\n\t\t\t\t\t\t\t\t\turlA={c.urlA}\n\t\t\t\t\t\t\t\t\turlB={c.urlB}\n\t\t\t\t\t\t\t\t\tmediaTypeA={c.mediaTypeA}\n\t\t\t\t\t\t\t\t\tmediaTypeB={c.mediaTypeB}\n\t\t\t\t\t\t\t\t\tvotesA={c.votesA}\n\t\t\t\t\t\t\t\t\tvotesB={c.votesB}\n\t\t\t\t\t\t\t\t\twinnerSide={c.winnerSide}\n\t\t\t\t\t\t\t\t\tisMine={c.isMine}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\t\t\t\t{:else if liveFiltered.length === 0}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"rounded-2xl bg-surface px-5 py-12 text-center ring-1 ring-border ring-inset\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<p class=\"text-sm text-muted\">\n\t\t\t\t\t\t\t{showOnlyMine ? t(\"you don't have any live beats right now.\") : t('nothing live right now.')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref={startHref}\n\t\t\t\t\t\t\tclass=\"mt-3 inline-block font-mono text-[10px] tracking-[0.24em] text-yellow uppercase\"\n\t\t\t\t\t\t\t>{t('start one →')}</a\n\t\t\t\t\t\t>\n\t\t\t\t\t</div>\n\t\t\t\t{:else}\n\t\t\t\t\t<div class=\"flex flex-col gap-5 md:gap-6\">\n\t\t\t\t\t\t{#each liveFiltered as c (c.code)}\n\t\t\t\t\t\t\t<BeatLiveCard\n\t\t\t\t\t\t\t\tcode={c.code}\n\t\t\t\t\t\t\t\tkind={c.kind}\n\t\t\t\t\t\t\t\tformat={c.format}\n\t\t\t\t\t\t\t\turlA={c.urlA}\n\t\t\t\t\t\t\t\turlB={c.urlB}\n\t\t\t\t\t\t\t\tmediaTypeA={c.mediaTypeA}\n\t\t\t\t\t\t\t\tmediaTypeB={c.mediaTypeB}\n\t\t\t\t\t\t\t\tvotesA={c.votesA}\n\t\t\t\t\t\t\t\tvotesB={c.votesB}\n\t\t\t\t\t\t\t\tclosesAt={c.closesAt}\n\t\t\t\t\t\t\t\tisMine={c.isMine}\n\t\t\t\t\t\t\t\tmembersOnly={!c.allowAnonVotes}\n\t\t\t\t\t\t\t\tcommentCount={c.commentCount ?? 0}\n\t\t\t\t\t\t\t\tcommentPreview={c.commentPreview ?? []}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{#if liveHasMore}\n\t\t\t\t\t\t<div class=\"mt-6 flex justify-center md:mt-8\">\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tonclick={loadMore}\n\t\t\t\t\t\t\t\tdisabled={loadingMore}\n\t\t\t\t\t\t\t\tclass=\"load-more inline-flex items-center gap-2 rounded-full border border-muted/60 bg-surface px-8 py-3.5 font-mono text-xs font-semibold tracking-[0.22em] text-text uppercase transition-all hover:border-yellow hover:text-yellow disabled:opacity-50\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{#if loadingMore}\n\t\t\t\t\t\t\t\t\t{t('loading…')}\n\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t{t('show more')}\n\t\t\t\t\t\t\t\t\t<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t\t<polyline points=\"6 9 12 15 18 9\"></polyline>\n\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t</div>\n\t</section>\n\n\t<!-- ─── HOW IT WORKS ─── -->\n\t{#if !embedded}\n\t<section class=\"relative mt-20 md:mt-28\">\n\t\t<div class=\"mx-auto w-full max-w-5xl px-5 md:px-0\">\n\t\t\t<p class=\"font-mono text-[10px] tracking-[0.32em] text-muted uppercase\">\n\t\t\t\t{t('how it works')}\n\t\t\t</p>\n\t\t\t<h2\n\t\t\t\tclass=\"mt-2 font-display text-[clamp(1.8rem,4vw,3rem)] font-bold leading-[0.9] tracking-tighter\"\n\t\t\t>\n\t\t\t\t{t('three steps.')} <span class=\"text-muted\">{t(\"you'll figure it out.\")}</span>\n\t\t\t</h2>\n\n\t\t\t<!-- Editorial big-number pattern: huge translucent step numbers as\n\t\t\t     visual rhythm, no bordered cards, just typography breathing on\n\t\t\t     the page bg. Connectors between steps signal sequence. -->\n\t\t\t<ol class=\"mt-10 grid gap-10 md:mt-14 md:grid-cols-3 md:gap-0\">\n\t\t\t\t<li class=\"step-row group relative\">\n\t\t\t\t\t<span class=\"step-num text-coral\">01</span>\n\t\t\t\t\t<div class=\"step-body\">\n\t\t\t\t\t\t<p class=\"font-display text-lg font-bold tracking-tight md:text-xl\">{t('show it.')}</p>\n\t\t\t\t\t\t<p class=\"mt-2 text-[13px] leading-relaxed text-muted\">\n\t\t\t\t\t\t\t{t(\"ten seconds. anonymous. no signup, no excuses, no opt-out once it's up.\")}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"step-row group relative\">\n\t\t\t\t\t<span class=\"step-num text-yellow\">02</span>\n\t\t\t\t\t<div class=\"step-body\">\n\t\t\t\t\t\t<p class=\"font-display text-lg font-bold tracking-tight md:text-xl\">\n\t\t\t\t\t\t\t{t('find an opponent.')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p class=\"mt-2 text-[13px] leading-relaxed text-muted\">\n\t\t\t\t\t\t\t{t(\"share the link. first stranger to upload accepts. don't share — it dies in your dms within a week.\")}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"step-row group relative\">\n\t\t\t\t\t<span class=\"step-num text-blue\">03</span>\n\t\t\t\t\t<div class=\"step-body\">\n\t\t\t\t\t\t<p class=\"font-display text-lg font-bold tracking-tight md:text-xl\">\n\t\t\t\t\t\t\t{t('let the mob decide.')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p class=\"mt-2 text-[13px] leading-relaxed text-muted\">\n\t\t\t\t\t\t\t{t('twenty-four hours of public votes. winner walks.')}\n\t\t\t\t\t\t\t<span class=\"text-orange\">{t('arena swipes count too.')}</span> {t('loser closes the tab.')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ol>\n\t\t\t<!-- RAT-597: the size question a vote can't answer, and the score one can't give -->\n\t\t\t<p class=\"mt-14 max-w-2xl text-[13px] leading-relaxed text-muted\">\n\t\t\t\t{#each t('rather see it to scale? the {cmp} draws two sizes side by side. want a score instead of votes? {cock}: one pic, an honest AI rating in 10 seconds.').split(/(\\{cmp\\}|\\{cock\\})/) as part, i (i)}{#if part === '{cmp}'}<a href={lhref('/tools/penis-size-visualizer')} class=\"font-semibold text-text no-underline hover:text-yellow\">{t('cock size comparison')}</a\n\t\t\t\t\t>{:else if part === '{cock}'}<a href=\"/\" class=\"font-semibold text-text no-underline hover:text-yellow\">{t('rate my cock')}</a\n\t\t\t\t\t>{:else}{part}{/if}{/each}\n\t\t\t</p>\n\t\t</div>\n\t</section>\n\t{/if}\n</svelte:element>\n\n<style>\n\t.hero-cta {\n\t\ttransition:\n\t\t\ttransform 0.45s var(--ease-out-expo),\n\t\t\tbox-shadow 0.45s var(--ease-out-expo);\n\t}\n\t.hero-cta:hover {\n\t\ttransform: translateY(-2px);\n\t\tbox-shadow: 0 12px 32px -10px rgb(255 229 0 / 0.35);\n\t}\n\n\t/* RAT-233: subtle fade + slide on the sort menu. Keeps the open/close\n\t   feeling deliberate without an animation that fights the brutal voice. */\n\t.sort-menu {\n\t\ttransform-origin: top right;\n\t\tanimation: sort-menu-in 160ms var(--ease-out-expo);\n\t}\n\t@keyframes sort-menu-in {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(-4px) scale(0.98);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0) scale(1);\n\t\t}\n\t}\n\t.sort-trigger {\n\t\ttransition:\n\t\t\tborder-color 0.2s var(--ease-out-quart),\n\t\t\tbackground-color 0.2s var(--ease-out-quart);\n\t}\n\n\t/* Editorial step rows. Big translucent number as the visual anchor,\n\t   thin top divider for sequence on desktop, vertical divider between\n\t   columns. The whole row tilts up slightly on hover for tactility. */\n\t.step-row {\n\t\tpadding-top: 2rem;\n\t\tborder-top: 1px solid var(--color-border);\n\t\ttransition: transform 0.45s var(--ease-out-expo);\n\t}\n\t.step-row:hover {\n\t\ttransform: translateY(-2px);\n\t}\n\t.step-num {\n\t\tfont-family: var(--font-display);\n\t\tfont-weight: 700;\n\t\tfont-size: clamp(3.5rem, 9vw, 6.5rem);\n\t\tline-height: 0.85;\n\t\tletter-spacing: -0.04em;\n\t\tdisplay: block;\n\t}\n\t.step-body {\n\t\tmargin-top: 1.5rem;\n\t\tmax-width: 22rem;\n\t}\n\n\t@media (min-width: 768px) {\n\t\t.step-row {\n\t\t\tpadding: 2.5rem 1.75rem 0;\n\t\t}\n\t\t.step-row + .step-row {\n\t\t\tborder-left: 1px solid var(--color-border);\n\t\t}\n\t}\n</style>\n"],"version":3}