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AAM,IAAK,QAAU,MAAS,EAmBvCR,EAAAoF,EAAA,YAAAhH,EAOWqD,CAAK,EAAC,MAAQ,MAAS,EAPlCzB,EAAAoF,EAAA,aAAAhH,EAQYqD,CAAK,EAAC,OAAS,MAAS,EARpCzB,EAAAoF,EAAA,WAAAhH,EASUqD,CAAK,EAAC,OAAS,MAAS,SAI/BA,CAAK,EAAC,MACL,QAAMrD,EACNqD,CAAK,EAAC,KACL,QACA,KAAK,EAOVzB,EAAA4F,EAAA,gBAAAxH,EAIe4E,CAAO,KAJtB4C,EAAA,aAMYlF,EAAA,EACT,eACAtC,EAAA+E,CAAA,EACqB,oBAAA/E,EAAAqD,CAAK,EAAC,MAAM,GACrB,WAAArD,EAAAqD,CAAK,EAAC,OAAO,MAyD5BgG,GAAA,gBAAArJ,EAIeqD,CAAK,EAAC,KAAK,cAvE1BmE,EAAA,IAAAtC,EAWgBN,KAAWA,CAAO,IAwDlC9C,EAAA,QAAAuH,GAAA,IAAA/F,EAAA,2BArJK,uCC1XR,eAAsBoL,IAAwC,CAC7D,OAAQ,MAAAC,GAAA,iCAAAC,CAAA,OAAM,QAAO,gBAAgC,0BAAAA,CAAA,8DAAG,gBACzD,CAWA,eAAsBC,IAAoD,CACzE,OAAQ,MAAMH,GAAA,CACf","names":["VIEWS","VIEW_LABEL","DIRECTOR","IDLE_CYCLE","shotOf","view","o","autoShot","c","DuetDirector","now","v","ms","s","her","held","back","q","i","MV","ROW","FIN","FIN_DEFAULT","CAPS","CAPTION","k","loadingHud","captionKey","e","n","TMAX","secsLeft","t","ROUND_MS","clock","angle","x","point","a","r","arc","a0","a1","x0","y0","x1","y1","TRACK","gaugeRest","gaugeGeom","b","tempo","bx","by","needleDeg","screenOf","phase","safeRectOf","vw","vh","tops","covers","OUTCOME_EYEBROW","moveOf","MOVE_LABEL","endView","end","server","labels","m","l","mismatched","SAVE_ERR","saveDuet","body","duetTimeout","j","roundKey","p","TICKET_REFRESH_MS","icon","id","$.noop","$$arg1","cls","svg","root_2","$.html","DUET_ICONS","$.clsx","$.get","uid","$.props_id","badge","$$anchor","go","dis","button","root_3","node","$.sibling","$.child","$$render","consequent","span","b_1","root_5","span_1","root_6","$.template_effect","$.set_text","text_1","consequent_2","b_2","root_7","PREF","consequent_3","$.reset","$.set_attribute","text","$.delegated","down","key0","$.append","mode","caption","screen","partner","free","SAY","badgeOf","state","fin","meta","f","st","label","takeShape","h","spent","cam","choice","shapeKey","shape","$$props","key","root","$.state","herEl","himEl","herBar","himBar","timeEl","cueEl","gaugeEl","bandEl","beatEl","needleEl","camEl","clitEl","pauseEl","pickEl","chipEl","badges","needle","lastWrite","camOpen","$.proxy","untrack","auto","$.derived","frame","$.set","write","$.user_effect","prop","el","name","attr","first","dt","time","g","pick","pickFree","outside","lastPhase","hadFin","pickKey","items","to","onKey","focus","div","$.first_child","fragment_1","div_1","div_2","node_3","span_2","i_1","$$value","div_3","node_4","span_3","consequent_4","span_4","i_2","div_4","div_5","button_1","span_5","node_6","small","root_11","text_5","consequent_6","text_4","consequent_5","alternate","node_10","node_11","div_6","root_12","button_2","node_12","node_13","div_7","$.each","button_3","root_13","text_6","button_4","root_14","node_15","node_16","consequent_7","consequent_8","div_8","button_5","span_6","node_18","button_6","root_15","span_7","button_7","root_16","span_8","button_8","root_17","span_9","consequent_9","consequent_10","consequent_11","button_9","root_18","consequent_12","button_10","root_19","consequent_13","i_3","root_20","consequent_14","div_9","node_24","div_10","root_22","b_3","small_1","root_23","text_8","consequent_15","text_7","consequent_16","p_1","root_24","consequent_17","div_11","root_25","div_12","button_11","button_12","div_13","root_26","p_2","p_3","div_14","text_9","div_15","root_28","p_4","root_29","b_4","consequent_20","p_5","root_30","consequent_21","svg_1","node_31","path","path_1","circle","line","node_32","p_6","root_32","consequent_22","div_16","node_33","consequent_23","consequent_18","consequent_19","alternate_1","node_35","div_17","root_34","div_18","h2","div_19","button_13","button_14","$.attach","consequent_24","$.set_class","loadEngine","__vitePreload","createDuetEngine","loadReplayEngine"],"sources":["../../../../../../src/lib/sculpt/render/duet-director.ts","../../../../../../src/lib/sculpt/duet-hud-state.ts","../../../../../../src/lib/components/sculpt/duet/hud.ts","../../../../../../src/lib/components/sculpt/duet/stage.ts","../../../../../../src/lib/components/sculpt/duet/DuetHud.svelte","../../../../../../src/lib/components/sculpt/duet/contract.ts"],"sourcesContent":["// PROTOTYPE: the duet's camera director. Pure (no three, no DOM): which view the camera is on and when\n// it changes. The page frames each view (the angle and what to fit) and reads `view` and `mode` for the\n// HUD's camera chip.\n//\n// Views: Behind, Close, Low, Under, Side, POV. Auto (the default) cuts to the action; picking a view\n// turns Auto off until Auto is picked again.\n// Auto:\n// - the round starts on Behind; nothing happening for 6-8 s steps on through Behind > Side > POV > Close\n// - Tease: Close. Clit rub and Balls deep: Under (his balls on her clit). Pound: Side, shaking.\n//   Spank: Side (the cheek's wobble). Between: POV (down onto her cleft)\n// - the position switch: Side. Back door: Close on her anus, then back to where it was\n// - her meter past `near`: POV, pushing in slowly (no idle steps from there)\n// - his finish: Close on the spurts (a cut, it never waits), then the wide end shot\n// A view a cue cut to holds at least holdMs: a cue during that hold waits, and the latest waiting cue\n// wins. Idle steps rank lowest: any cue cuts through an idle step's hold (and the round's opening shot's,\n// and Auto's when the player turns it back on). A cue for the shot already on screen changes nothing (its\n// hold and push-in run on) but resets the idle wait. A change glides over glideMs (the page eases it);\n// `cut` shots snap.\n\n/** The camera's views, in the picker's order. */\nexport type DuetView = 'behind' | 'close' | 'low' | 'under' | 'side' | 'pov';\nexport const VIEWS: readonly DuetView[] = ['behind', 'close', 'low', 'under', 'side', 'pov'];\nexport const VIEW_LABEL: Record<DuetView, string> = {\n\tbehind: 'Behind',\n\tclose: 'Close',\n\tlow: 'Low',\n\tunder: 'Under',\n\tside: 'Side',\n\tpov: 'POV'\n};\n\nexport const DIRECTOR = {\n\t/** a view stays on screen at least this long (ms) before Auto moves on */\n\tholdMs: 2500,\n\t/** a change of view glides this long (ms) */\n\tglideMs: 400,\n\t/** nothing happening this long (ms, the low end; each step adds up to 2 s) steps the view on */\n\tidleMs: 6000,\n\t/** her meter from here: POV with a slow push-in */\n\tnear: 0.85\n} as const;\n\n/** Where Auto steps when nothing happens. */\nconst IDLE_CYCLE: readonly DuetView[] = ['behind', 'side', 'pov', 'close'];\n\n/** What a shot frames on its view: the entrance (as the player sees it), her anus (Back door), his\n *  spurts (the finish), or wide (the end card). */\nexport type ShotFocus = 'entry' | 'anus' | 'spurts' | 'wide';\nexport interface DuetShot {\n\tview: DuetView;\n\tfocus: ShotFocus;\n\t/** a slow push-in while it holds (her last stretch) */\n\tpush: boolean;\n\t/** the hits shake the camera harder (Pound) */\n\tshake: boolean;\n\t/** snap to it, no glide (the finish) */\n\tcut: boolean;\n}\n\n/** What Auto reacts to: a move by name, the position switch, her last stretch ('near'), his finish\n *  and the end card. */\nexport type DirectorCue =\n\t| 'tease'\n\t| 'rub'\n\t| 'balls'\n\t| 'pound'\n\t| 'between'\n\t| 'spank'\n\t| 'back'\n\t| 'switch'\n\t| 'near'\n\t| 'finish'\n\t| 'end';\n\nconst shotOf = (view: DuetView, o: Partial<DuetShot> = {}): DuetShot => ({\n\tview,\n\tfocus: 'entry',\n\tpush: false,\n\tshake: false,\n\tcut: false,\n\t...o\n});\n\n/** Auto's shot for a cue. */\nfunction autoShot(c: DirectorCue): DuetShot {\n\tswitch (c) {\n\t\tcase 'tease':\n\t\t\treturn shotOf('close');\n\t\tcase 'rub':\n\t\tcase 'balls':\n\t\t\treturn shotOf('under');\n\t\tcase 'pound':\n\t\t\treturn shotOf('side', { shake: true });\n\t\tcase 'spank':\n\t\t\treturn shotOf('side');\n\t\tcase 'between':\n\t\t\treturn shotOf('pov');\n\t\tcase 'switch':\n\t\t\treturn shotOf('side');\n\t\tcase 'back':\n\t\t\treturn shotOf('close', { focus: 'anus' });\n\t\tcase 'near':\n\t\t\treturn shotOf('pov', { push: true });\n\t\tcase 'finish':\n\t\t\treturn shotOf('close', { focus: 'spurts', cut: true });\n\t\tcase 'end':\n\t\t\treturn shotOf('behind', { focus: 'wide' });\n\t}\n}\n\nexport class DuetDirector {\n\t/** Auto cuts to the action; off once the player picks a view */\n\tauto = true;\n\t/** the shot on screen and since when (ms, the page's clock) */\n\tshot: DuetShot = shotOf('behind');\n\tsince = 0;\n\t/** when something last happened (a cue, even one that kept the shot): the idle wait counts from here */\n\tprivate active = 0;\n\t/** the shot on screen came from nothing happening (an idle step, the round's start, Auto turned back\n\t *  on): the lowest rank, a cue cuts through its hold */\n\tprivate soft = true;\n\t/** a cue that came during the hold (the latest wins), with how long its moment lasts */\n\tprivate queued: { shot: DuetShot; ms: number } | null = null;\n\t/** Back door: the shot to go back to, and when */\n\tprivate ret: DuetShot | null = null;\n\tprivate retAt = 0;\n\t/** idle steps so far this round (they wait 6, 7, 8 s in turn) */\n\tprivate steps = 0;\n\t/** his finish or the end card: no idle steps, no waiting cues */\n\tprivate ending = false;\n\t/** the player's view while Auto is off */\n\tprivate picked: DuetView = 'behind';\n\n\t/** The view on screen (the HUD's \"Auto · Close\"). */\n\tget view() {\n\t\treturn this.shot.view;\n\t}\n\t/** 'auto' or the player's view (the HUD's chip). */\n\tget mode(): 'auto' | DuetView {\n\t\treturn this.auto ? 'auto' : this.picked;\n\t}\n\n\t/** A new round: Behind with Auto on, else the player's view. */\n\treset(now: number) {\n\t\tthis.queued = this.ret = null;\n\t\tthis.steps = 0;\n\t\tthis.ending = false;\n\t\tthis.shot = shotOf(this.auto ? 'behind' : this.picked);\n\t\tthis.since = this.active = now;\n\t\tthis.soft = true;\n\t}\n\n\t/** The player picks a view (Auto off) or Auto (on again, from the view on screen). */\n\tpick(v: DuetView | 'auto', now: number) {\n\t\tthis.queued = this.ret = null;\n\t\tif (v === 'auto') {\n\t\t\tif (this.auto) return;\n\t\t\t// Auto picks up from here: the idle wait starts over, the next cue cuts at once\n\t\t\tthis.auto = true;\n\t\t\tthis.since = this.active = now;\n\t\t\tthis.soft = true;\n\t\t\treturn;\n\t\t}\n\t\tthis.auto = false;\n\t\tthis.picked = v;\n\t\tif (v !== this.shot.view || this.shot.focus !== 'entry') this.set(shotOf(v), now);\n\t}\n\n\t/** Something happened. Auto only, except the end card (every mode frames it wide). `ms`: how long\n\t *  the moment lasts (Back door goes back after it). */\n\tcue(c: DirectorCue, now: number, ms = 0) {\n\t\tif (c === 'end' || (c === 'finish' && this.auto)) {\n\t\t\t// these cut, now: no hold, nothing waiting\n\t\t\tthis.ending = true;\n\t\t\tthis.queued = this.ret = null;\n\t\t\tthis.set(autoShot(c), now);\n\t\t\treturn;\n\t\t}\n\t\tif (!this.auto || this.ending) return;\n\t\tconst s = autoShot(c);\n\t\tif (!this.soft && now - this.since < DIRECTOR.holdMs) this.queued = { shot: s, ms };\n\t\telse this.apply(s, ms, now);\n\t}\n\n\t/** Advance to `now` (ms): a waiting cue once the hold is over, Back door's way back, her last\n\t *  stretch (`her`, her meter 0..1), the idle step. Returns the shot to frame. */\n\tupdate(now: number, her = 0): DuetShot {\n\t\tif (!this.auto || this.ending) return this.shot;\n\t\tconst held = now - this.since >= DIRECTOR.holdMs;\n\t\tif (this.ret) {\n\t\t\tif (held && now >= this.retAt) {\n\t\t\t\t// back where it was, unless something newer is waiting\n\t\t\t\tconst back = this.ret,\n\t\t\t\t\tq = this.queued;\n\t\t\t\tthis.ret = this.queued = null;\n\t\t\t\tif (q) this.apply(q.shot, q.ms, now);\n\t\t\t\telse this.set(back, now);\n\t\t\t}\n\t\t} else if (this.queued) {\n\t\t\tif (held) {\n\t\t\t\tconst q = this.queued;\n\t\t\t\tthis.queued = null;\n\t\t\t\tthis.apply(q.shot, q.ms, now);\n\t\t\t}\n\t\t} else if (her >= DIRECTOR.near && !this.shot.push) this.cue('near', now);\n\t\telse if (\n\t\t\t!this.shot.push &&\n\t\t\tnow - Math.max(this.since, this.active) >= DIRECTOR.idleMs + (this.steps % 3) * 1000\n\t\t) {\n\t\t\tconst i = IDLE_CYCLE.indexOf(this.shot.view);\n\t\t\tthis.steps++;\n\t\t\tthis.set(shotOf(IDLE_CYCLE[(i + 1) % IDLE_CYCLE.length]), now);\n\t\t\tthis.soft = true;\n\t\t}\n\t\treturn this.shot;\n\t}\n\n\tprivate apply(s: DuetShot, ms: number, now: number) {\n\t\t// Back door: back to the shot before it once the move is over\n\t\tif (s.focus === 'anus') {\n\t\t\tif (!this.ret) this.ret = this.shot;\n\t\t\tthis.retAt = now + Math.max(ms, DIRECTOR.holdMs);\n\t\t}\n\t\tthis.set(s, now);\n\t}\n\n\t/** A new shot on screen; the same shot again only counts as something happening (its hold and a\n\t *  push-in keep running). */\n\tprivate set(s: DuetShot, now: number) {\n\t\tthis.active = now;\n\t\tconst c = this.shot;\n\t\tif (\n\t\t\t!s.cut &&\n\t\t\ts.view === c.view &&\n\t\t\ts.focus === c.focus &&\n\t\t\ts.push === c.push &&\n\t\t\ts.shake === c.shake\n\t\t)\n\t\t\treturn;\n\t\tthis.shot = s;\n\t\tthis.since = now;\n\t\tthis.soft = false;\n\t}\n}\n","// The duet HUD's state: what the engine (render/duet-engine.ts) hands the HUD every frame, updated in\n// place, and the HUD's tables (the moves' row, the finish picks, the camera angles, the captions).\n// Pure: no DOM, no three. The HUD renders it (DuetHud.svelte on the page, the test page's hud.ts).\nimport { CAPTION, type DuetEvent } from './duet-game';\n\n/** The moves, in row order (the round's order: warm-up and stamina savers left, hard hitters right).\n *  A move the game doesn't have yet isn't sent: the row is data. */\nexport const MV: Record<string, { label: string; icon: string }> = {\n\ttease: { label: 'Tease', icon: 'tease' },\n\trub: { label: 'Clit rub', icon: 'rub' },\n\tbetween: { label: 'Between', icon: 'between' },\n\tspank: { label: 'Spank', icon: 'spank' },\n\tballs: { label: 'Balls deep', icon: 'balls' },\n\tback: { label: 'Back door', icon: 'back' },\n\tpound: { label: 'Pound', icon: 'pound' }\n};\nexport const ROW = Object.keys(MV);\nexport const FIN = [\n\t{ k: 'in', label: 'Inside', icon: 'fin-in' },\n\t{ k: 'back', label: 'On her back', icon: 'fin-back' },\n\t{ k: 'cheeks', label: 'On her cheeks', icon: 'fin-cheeks' }\n];\n/** his finish when he doesn't pick: on her back */\nexport const FIN_DEFAULT = 'back';\nexport const ANGLES = ['Behind', 'Close', 'Low', 'Under', 'Side', 'POV'];\n\nexport type Band = { lo: number; hi: number; centre: number };\nexport type MoveState = 'ready' | 'press' | 'hot' | 'active' | 'cool' | 'busy' | 'off';\nexport type MoveOpts = {\n\tcd?: number;\n\tsec?: number;\n\tp?: number;\n\tdeny?: boolean;\n\tdef?: boolean;\n\tpref?: string;\n};\nexport type MoveKey = [string, MoveState?, MoveOpts?];\nexport interface Cam {\n\tmode: string;\n\tnow: string;\n\topen?: boolean;\n}\n/** A caption: `n` counts up with each new one (the HUD plays it in again when n changes). */\nexport interface HudCaption {\n\tt: string;\n\tsub?: string;\n\tn: number;\n}\nexport interface HudState {\n\t/** the engine's phase ('ready' shows as 'pre': before the first round, or between rounds) */\n\tphase: string;\n\tt: number;\n\ther: number;\n\tstamina: number;\n\ttempo: number;\n\tband: Band;\n\t/** her hips rocking with him, 0..1 (eased): his tempo has held in her band (her pace, shown) */\n\tsync?: number;\n\tgrind?: boolean;\n\tout?: boolean;\n\tmoving?: boolean;\n\toutcome?: string | null;\n\tcue?: string;\n\thint?: boolean;\n\tmuted?: boolean;\n\tcam?: Cam;\n\tmoves: MoveKey[];\n\tchoice?: { p: number; press?: string } | null;\n\t/** what just happened (null: nothing on screen) */\n\tcaption?: HudCaption | null;\n\t/** her clit on screen (CSS px, the canvas's), while the \"tap her clit\" hint shows; else null */\n\tclit?: { x: number; y: number } | null;\n}\n\n/** Caption lines per moment, said in turn. Her reactions are the game's own (CAPTION). */\nexport const CAPS: Record<string, readonly string[]> = {\n\tslip: ['Slipped out!', 'Oops, wrong way', 'Whoa there'],\n\treenter: ['Back in business', 'And we are back', 'Found it'],\n\tmiss: ['Missed!', 'Aim, tiger', 'Not there'],\n\tdeep: ['Deep dive!', 'Combo x3', 'She likes that', 'All the way'],\n\tsplash: ['Splash zone', 'Making waves'],\n\tswitch: ['Switch it up', 'New angle'],\n\tedge: ['Easy, tiger', 'Hold it...', 'Careful now'],\n\tclit: ['Clit bonus', 'Right there', 'Good find', 'She noticed'],\n\tclimax: ['Perfect sync', 'She is there', 'Together'],\n\tearly: ['Too soon', 'Oops'],\n\tfinish: ['Finished on her', 'All over her', 'What a mess'],\n\tfinishIn: ['Inside her', 'Deep inside', 'Filled her up'],\n\ttease: ['Just the tip', 'Make her wait', 'Teasing her', 'Not yet'],\n\tballs: ['Balls deep', 'All the way in', 'Hilted', 'Deep and slow'],\n\tballsEarly: ['Easy, tiger', 'Warm her up first', 'Too much, too soon'],\n\tpound: ['Pound town', 'Full send', 'Harder!', 'No mercy'],\n\tpoundEarly: ['Save it for the finale', 'Easy on the gas', 'Running on empty'],\n\trub: ['Right there', 'Little circles', 'She likes that', 'Found the button'],\n\tbetween: ['Between her cheeks', 'Catch your breath', 'Easy glide', 'Cheeky'],\n\tspank: ['Spank!', 'She felt that', 'Red cheek', 'Smack'],\n\tback: ['Back door', 'Round the back', 'Bold move', 'Both ways'],\n\tbackEarly: ['Easy, tiger', 'Warm her up first', 'Not yet'],\n\t...Object.fromEntries(Object.entries(CAPTION).map(([k, v]) => [k, [v]]))\n};\n\n/** The HUD before a round can start: the scene is being set. */\nexport function loadingHud(): HudState {\n\treturn {\n\t\tphase: 'loading',\n\t\tt: 0,\n\t\ther: 0,\n\t\tstamina: 1,\n\t\ttempo: 0,\n\t\tband: { lo: 1.2, hi: 2, centre: 1.6 },\n\t\tcue: 'Setting the scene…',\n\t\thint: false,\n\t\tmuted: true,\n\t\tcam: { mode: 'auto', now: 'Behind' },\n\t\tmoves: [],\n\t\tchoice: null,\n\t\tcaption: null,\n\t\tclit: null\n\t};\n}\n\n/** The caption key for a game event (her reactions are their own), or null for none. */\nexport function captionKey(e: DuetEvent, her: number, n: (k: string) => number): string | null {\n\tswitch (e.kind) {\n\t\tcase 'move':\n\t\t\tif (!e.move) return null;\n\t\t\treturn e.flop ? (`${e.move}Early` in CAPS ? `${e.move}Early` : null) : e.move;\n\t\tcase 'reenter':\n\t\t\treturn her > 0.6 && n('reenter') % 2 ? 'splash' : 'reenter';\n\t\tcase 'deep':\n\t\t\treturn her > 0.6 && n('deep') % 3 === 2 ? 'splash' : 'deep';\n\t\tcase 'rub':\n\t\tcase 'slip':\n\t\tcase 'miss':\n\t\tcase 'switch':\n\t\tcase 'edge':\n\t\tcase 'clit':\n\t\t\treturn e.kind;\n\t\tdefault:\n\t\t\treturn e.kind in CAPTION ? e.kind : null;\n\t}\n}\n","// The duet HUD's rendering helpers (the gauge geometry, the clock). The HUD's state and tables (the\n// moves' row, the finish picks) are the engine's, in $lib/sculpt/duet-hud-state.ts, re-exported here.\nimport { ROUND_MS } from '$lib/sculpt/duet-game';\n\nexport {\n\tFIN,\n\tFIN_DEFAULT,\n\tMV,\n\ttype Band,\n\ttype Cam,\n\ttype HudCaption,\n\ttype HudState,\n\ttype MoveKey,\n\ttype MoveOpts,\n\ttype MoveState\n} from '$lib/sculpt/duet-hud-state';\nimport type { HudState } from '$lib/sculpt/duet-hud-state';\n\n/** the gauge's top tempo (taps/s) */\nexport const TMAX = 5;\n\nexport const secsLeft = (t: number) => Math.max(0, Math.ceil((ROUND_MS - t) / 1000));\nexport const clock = (t: number) => `0:${String(secsLeft(t)).padStart(2, '0')}`;\n\nconst angle = (x: number) => (-90 + 180 * Math.min(1, Math.max(0, x / TMAX))) * (Math.PI / 180);\nconst point = (a: number, r = 62) => [(Math.sin(a) * r).toFixed(1), (-Math.cos(a) * r).toFixed(1)];\nconst arc = (a0: number, a1: number) => {\n\tconst [x0, y0] = point(a0),\n\t\t[x1, y1] = point(a1);\n\treturn `M${x0} ${y0}A62 62 0 0 1 ${x1} ${y1}`;\n};\n/** the gauge's track: the half circle from SLOW to FAST */\nexport const TRACK = arc(-Math.PI / 2, Math.PI / 2);\n\n/** Slipped out, grinding, before the first tap, a move running: the band waits, the needle rests. */\nexport function gaugeRest(s: HudState): boolean {\n\treturn !!(s.out || s.grind || !s.tempo || s.phase !== 'play' || s.moving);\n}\n\n/** The gauge's live geometry: her band's arc, the beat at its centre, his tempo (the needle). */\nexport function gaugeGeom(s: HudState) {\n\tconst b = s.band;\n\tconst still = s.out || s.grind || !s.tempo || s.phase !== 'play';\n\tconst tempo = still ? 0 : s.tempo;\n\tconst [bx, by] = point(angle(b.centre));\n\treturn {\n\t\tband: arc(angle(b.lo), angle(b.hi)),\n\t\tbx,\n\t\tby,\n\t\ttempo,\n\t\tbeat: (1 / b.centre).toFixed(2),\n\t\tlabel: `Tempo ${tempo.toFixed(1)} taps a second, her band ${b.lo.toFixed(1)} to ${b.hi.toFixed(1)}`\n\t};\n}\n\n/** The needle's rotation (deg) for a tempo (taps/s). */\nexport const needleDeg = (tempo: number) => -90 + 180 * Math.min(1, Math.max(0, tempo / TMAX));\n","// The duet page's pure parts (fleet tasks/2026-11-27-sculpt-vulva-duet, PG2 / PG3): which screen the\n// round is on, the rect the scene may fill, the end card's content and the save call.\nimport { MOVE_LABEL, type DuetMove } from '$lib/sculpt/duet-game';\nimport { MV, type HudState } from './hud';\nimport { duetTimeout } from './net';\nimport type { DuetEndState, DuetLog, DuetPhase, DuetRound, DuetSaved } from './contract';\nimport type { SculptParams } from '$lib/sculpt/params';\nimport type { VulvaParams } from '$lib/sculpt/vulva-params';\n\n/** The page's own layer over the HUD: before the first tap, loading, a failed stage, the end. Null\n *  while a round runs (play, paused, her finish). */\nexport type DuetScreen = 'load' | 'pre' | 'err' | 'over' | null;\n\nexport function screenOf(phase: DuetPhase | null): DuetScreen {\n\tswitch (phase) {\n\t\tcase null:\n\t\tcase 'loading':\n\t\t\treturn 'load';\n\t\tcase 'ready':\n\t\t\treturn 'pre';\n\t\tcase 'failed':\n\t\t\treturn 'err';\n\t\tcase 'over':\n\t\t\treturn 'over';\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n/** The HUD before the engine exists (and the fake engine's start): the scene is being set. */\nexport function loadingHud(): HudState {\n\treturn {\n\t\tphase: 'loading',\n\t\tt: 0,\n\t\ther: 0,\n\t\tstamina: 1,\n\t\ttempo: 0,\n\t\tband: { lo: 1.2, hi: 2, centre: 1.6 },\n\t\tcue: 'Setting the scene…',\n\t\thint: false,\n\t\tmuted: true,\n\t\tcam: { mode: 'auto', now: 'Behind' },\n\t\tmoves: [\n\t\t\t['tease', 'off'],\n\t\t\t['rub', 'off'],\n\t\t\t['balls', 'off'],\n\t\t\t['pound', 'off']\n\t\t],\n\t\tchoice: null\n\t};\n}\n\nexport interface Rect {\n\tleft: number;\n\ttop: number;\n\tright: number;\n\tbottom: number;\n}\n\n/**\n * The CSS px rect the scene may fill: under the top controls, clear of what covers the stage (the\n * play cluster, the end card). A cover at least half the width wide bounds the bottom (a phone);\n * a narrower one on the right half bounds the right (a landscape phone's column, a desktop card).\n */\nexport function safeRectOf(\n\tvw: number,\n\tvh: number,\n\ttops: readonly Rect[],\n\tcovers: readonly Rect[]\n): { l: number; t: number; r: number; b: number } {\n\tlet t = 0,\n\t\tb = vh,\n\t\tr = vw;\n\tfor (const e of tops) if (e.bottom > t && e.bottom < vh / 2) t = e.bottom;\n\tfor (const c of covers) {\n\t\tif (c.right <= c.left || c.bottom <= c.top) continue; // hidden\n\t\tif (c.right - c.left >= vw / 2) b = Math.min(b, c.top);\n\t\telse if (c.left >= vw / 2) r = Math.min(r, c.left);\n\t}\n\t// never a sliver: a scene squeezed under 40% keeps 40% (the cover sits over its edge)\n\tif (b - t < vh * 0.4) b = Math.min(vh, t + vh * 0.4);\n\tif (r < vw * 0.4) r = vw * 0.4;\n\treturn { l: 0, t, r, b };\n}\n\n/** End-card eyebrows (copy deck ec.*). */\nexport const OUTCOME_EYEBROW: Record<DuetEndState['outcome'], string> = {\n\tclimax: 'She finished',\n\tearly: 'He finished first',\n\ttimeout: 'Time is up'\n};\n\nexport interface EndMove {\n\tk: string;\n\tlabel: string;\n\ticon: string | null;\n}\n\nexport interface EndView {\n\toutcome: DuetEndState['outcome'];\n\teyebrow: string;\n\t/** the game's title with a full stop, as the card shows it */\n\ttitle: string;\n\tscore: number;\n\trhythm: number;\n\tstamina: number;\n\tfit: string;\n\t/** her lines that aren't about a move (pace, clit): the moves show as chips */\n\tlines: string[];\n\tloved: EndMove[];\n\tnotInto: EndMove[];\n}\n\nconst moveOf = (k: DuetMove | string): EndMove => ({\n\tk,\n\tlabel: MV[k]?.label ?? MOVE_LABEL[k as DuetMove] ?? k,\n\ticon: MV[k]?.icon ?? null\n});\n\n/** The end card's content. `server` (after a save) replaces the numbers: the server's are the round's. */\nexport function endView(end: DuetEndState, server?: DuetSaved['result'] | null): EndView {\n\tconst r = server ?? { ...end.result, outcome: end.outcome };\n\tconst labels = [...Object.values(MOVE_LABEL), ...Object.values(MV).map((m) => m.label)];\n\treturn {\n\t\toutcome: r.outcome,\n\t\teyebrow: OUTCOME_EYEBROW[r.outcome],\n\t\ttitle: r.title ? `${r.title}.` : '',\n\t\tscore: r.score,\n\t\trhythm: r.rhythm,\n\t\tstamina: r.stamina,\n\t\tfit: end.summary.fitLine,\n\t\tlines: end.summary.lines.filter((l) => !labels.some((m) => l.includes(m))),\n\t\tloved: end.summary.favourites.map(moveOf),\n\t\tnotInto: end.summary.notInto.map(moveOf)\n\t};\n}\n\n/** The server's numbers differ from the round the player saw: the determinism canary. */\nexport function mismatched(end: DuetEndState, s: DuetSaved['result']): boolean {\n\treturn (\n\t\ts.score !== end.result.score ||\n\t\ts.rhythm !== end.result.rhythm ||\n\t\ts.stamina !== end.result.stamina ||\n\t\ts.outcome !== end.outcome ||\n\t\t// the server stores whole ms; the engine's clock is fractional\n\t\ts.endMs !== Math.round(end.endMs) ||\n\t\ts.finish !== end.finish\n\t);\n}\n\nexport type DuetSave =\n\t| { ok: true; saved: DuetSaved }\n\t| { ok: false; status: number; error: string; message: string };\n\nconst SAVE_ERR = \"Couldn't save. Try again.\";\n\n/** POST /api/sculpt/duet: the round as it was played (both snapshots, the log). The server scores it. */\nexport async function saveDuet(body: {\n\tticket: string;\n\tpenis: SculptParams;\n\tvulva: VulvaParams;\n\tlog: DuetLog;\n}): Promise<DuetSave> {\n\ttry {\n\t\tconst r = await fetch('/api/sculpt/duet', {\n\t\t\tmethod: 'POST',\n\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\tbody: JSON.stringify(body),\n\t\t\tsignal: duetTimeout()\n\t\t});\n\t\tconst j = await r.json().catch(() => ({}));\n\t\tif (r.ok && typeof j.code === 'string' && j.result) return { ok: true, saved: j as DuetSaved };\n\t\treturn {\n\t\t\tok: false,\n\t\t\tstatus: r.status,\n\t\t\terror: typeof j.error === 'string' ? j.error : 'error',\n\t\t\tmessage: typeof j.message === 'string' && j.message ? j.message : SAVE_ERR\n\t\t};\n\t} catch (e) {\n\t\t// the 15 s timeout (net.ts) aborts as a TimeoutError\n\t\tconst slow = (e as { name?: string })?.name === 'TimeoutError';\n\t\treturn {\n\t\t\tok: false,\n\t\t\tstatus: 0,\n\t\t\terror: 'network',\n\t\t\tmessage: slow ? 'That took too long. Try again.' : 'No connection. Try again.'\n\t\t};\n\t}\n}\n\n/** What a round plays: both sides as they are, her play, the partner. A new setup with the same key\n *  (only a fresh ticket) keeps the engine and the round going; a new key builds a new one. */\nexport function roundKey(r: DuetRound): string {\n\tconst p = r.partner;\n\treturn JSON.stringify([p.kind, p.nickname, r.playerBody, r.penis, r.vulva, r.herPlay]);\n}\n\n/** A round's ticket is good for 30 minutes (the server's); past this a new round fetches a new one\n *  first, so its save isn't refused. */\nexport const TICKET_REFRESH_MS = 20 * 60_000;\n","<script lang=\"ts\">\n\t// The duet HUD, direction B (\"Stacked\"), as the owner approved it and played it (fleet\n\t// tasks/2026-11-27-sculpt-vulva-duet: HUD B and the harness). Ported 1:1: the markup is the mock's\n\t// HUD TEMPLATES, the style block is hud.css verbatim, then the harness page's game-root rules and\n\t// its pause card.\n\t//\n\t// The engine updates `hud` in place every frame. Only the HUD's shape (the phase, each badge's\n\t// state, the finish choice, the camera) goes through $state: it is taken again when its key\n\t// changes, as the harness re-renders on its shape keys. What moves every frame (the bars, the\n\t// clock, the cue, the gauge, the recharge and progress fills) is written straight onto the\n\t// elements by `frame()`, which the page calls from the engine's frame callback. A refused press\n\t// comes back in `hud` as the badge's deny flag: the badge shakes.\n\timport { untrack, type Snippet } from 'svelte';\n\timport { VIEW_LABEL, VIEWS, type DuetView } from '$lib/sculpt/render/duet-director';\n\timport { DUET_ICONS } from './duet-icons';\n\timport {\n\t\tFIN,\n\t\tFIN_DEFAULT,\n\t\tMV,\n\t\tTRACK,\n\t\tclock,\n\t\tgaugeGeom,\n\t\tgaugeRest,\n\t\tneedleDeg,\n\t\tsecsLeft,\n\t\ttype HudState,\n\t\ttype MoveKey,\n\t\ttype MoveOpts,\n\t\ttype MoveState\n\t} from './hud';\n\timport { OUTCOME_EYEBROW } from './stage';\n\n\tinterface Props {\n\t\t/** the engine's HUD state: one object, updated in place every frame */\n\t\thud: HudState;\n\t\t/** replay: the meters, the gauge, the camera and the captions; no moves, no pause */\n\t\tmode?: 'live' | 'replay';\n\t\t/** what just happened; a new object plays the caption in again */\n\t\tcaption?: { t: string; sub?: string } | null;\n\t\t/** a move badge pressed (pointer down, Enter / Space on it, keys 1-7). The engine decides: a\n\t\t *  refused press comes back as the badge's deny flag. */\n\t\tonmove?: (kind: string, e: Event) => void;\n\t\t/** a finish spot picked in the finish choice */\n\t\tonfinish?: (spot: string, e: Event) => void;\n\t\t/** a camera view picked: Auto or one of the six */\n\t\tonview?: (view: DuetView | 'auto') => void;\n\t\tonsound?: () => void;\n\t\tonpause?: () => void;\n\t\t/** the pause card's Resume */\n\t\tonresume?: () => void;\n\t\t/** the pause card's End round */\n\t\tonquit?: () => void;\n\t\t/** the page's layer (stage.ts screenOf; pages mock \"round start\"): before the first tap the\n\t\t *  partner's name sits over the cue, Leave holds the pause slot and the gear shop chip shows;\n\t\t *  loading, the failed stage and the end keep Leave. Null while a round runs. */\n\t\tscreen?: 'load' | 'pre' | 'err' | 'over' | null;\n\t\t/** the partner's name for \"With {name}\" */\n\t\tpartner?: string;\n\t\tonleave?: () => void;\n\t\tongear?: () => void;\n\t\t/** the failed stage's Try again */\n\t\tonretry?: () => void;\n\t\t/** after the markup followed a new shape: the page tells the engine (relayout) */\n\t\tonshape?: () => void;\n\t\t/** the page's cards in the HUD root (the end card): its container queries are theirs */\n\t\tchildren?: Snippet;\n\t\t/** replay: Free is on (the canvas orbits, Auto's cuts are off): the chip and picker say so */\n\t\tfree?: boolean;\n\t\t/** replay: Free picked in the camera picker */\n\t\tonfree?: () => void;\n\t\t/** replay: full screen; leave it out where the browser has none (iPhone) */\n\t\tonfull?: () => void;\n\t\t/** live, before the first tap: the screen reader's way to start (the pad has no name) */\n\t\tonstart?: () => void;\n\t}\n\n\tlet {\n\t\thud,\n\t\tmode = 'live',\n\t\tcaption = null,\n\t\tonmove,\n\t\tonfinish,\n\t\tonview,\n\t\tonsound,\n\t\tonpause,\n\t\tonresume,\n\t\tonquit,\n\t\tscreen = null,\n\t\tpartner = '',\n\t\tonleave,\n\t\tongear,\n\t\tonretry,\n\t\tonshape,\n\t\tchildren,\n\t\tfree = false,\n\t\tonfree,\n\t\tonfull,\n\t\tonstart\n\t}: Props = $props();\n\n\tconst uid = $props.id();\n\n\t/** One move (or finish) badge, as drawn. */\n\tinterface Badge {\n\t\tk: string;\n\t\tlabel: string;\n\t\ticon: string | null;\n\t\t/** 'press' draws as 'ready', with data-press */\n\t\tst: Exclude<MoveState, 'press'>;\n\t\tpress: boolean;\n\t\tdef: boolean;\n\t\tdeny: boolean;\n\t\tsec?: number;\n\t\tpref?: string;\n\t\t/** the button's name: the label, then what its state means */\n\t\tname: string;\n\t}\n\n\tconst SAY: Partial<Record<MoveState, (o: MoveOpts) => string>> = {\n\t\thot: () => ', x2 now',\n\t\tcool: (o) => `, ready in ${o.sec || 1} seconds`,\n\t\tbusy: () => ', wait',\n\t\tactive: () => ', on'\n\t};\n\t/** her taste, once she has shown it this round */\n\tconst PREF: Record<string, string> = { loves: 'Loves', likes: 'Likes', not: 'Not into' };\n\n\tfunction badgeOf([k, state = 'ready', o = {}]: MoveKey, fin = false): Badge {\n\t\tconst meta = fin ? FIN.find((f) => f.k === k) : MV[k];\n\t\tconst st = state === 'press' ? 'ready' : state;\n\t\t// a move the table doesn't know yet still plays, under its key\n\t\tconst label = meta?.label ?? k;\n\t\treturn {\n\t\t\tk,\n\t\t\tlabel,\n\t\t\ticon: meta?.icon ?? null,\n\t\t\tst,\n\t\t\tpress: state === 'press',\n\t\t\tdef: !!o.def,\n\t\t\tdeny: !!o.deny,\n\t\t\tsec: o.sec,\n\t\t\tpref: o.pref,\n\t\t\tname: label + (SAY[st]?.(o) ?? '')\n\t\t};\n\t}\n\n\t/** Everything the markup depends on; the per-frame values are written by `write`. */\n\tfunction takeShape(h: HudState) {\n\t\tconst spent = h.outcome === 'early';\n\t\tconst cam = h.cam ?? { mode: 'auto', now: 'Behind' };\n\t\tconst choice = h.choice;\n\t\treturn {\n\t\t\tphase: h.phase,\n\t\t\tspent,\n\t\t\tedge: !spent && !h.outcome && h.stamina <= 0.2,\n\t\t\tgrind: !!h.grind,\n\t\t\tcamMode: cam.mode,\n\t\t\tcamNow: cam.now,\n\t\t\tmuted: !!h.muted,\n\t\t\thint: !!h.hint,\n\t\t\tclit: !!h.clit,\n\t\t\trest: gaugeRest(h),\n\t\t\tmoves: h.moves.map((m) => badgeOf(m)),\n\t\t\t// his pick comes every round: what ended it heads the choice (the harness's eyebrow)\n\t\t\tfinWhy:\n\t\t\t\tOUTCOME_EYEBROW[(h.outcome ?? 'climax') as keyof typeof OUTCOME_EYEBROW] ??\n\t\t\t\tOUTCOME_EYEBROW.climax,\n\t\t\tfin: choice\n\t\t\t\t? FIN.map((f) =>\n\t\t\t\t\t\tbadgeOf(\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\tf.k,\n\t\t\t\t\t\t\t\tchoice.press === f.k ? 'press' : 'ready',\n\t\t\t\t\t\t\t\tf.k === FIN_DEFAULT ? { def: true } : {}\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t: null\n\t\t};\n\t}\n\n\t/** The shape's key: when it changes, the markup follows (the harness's statusKey, ctlKey,\n\t *  playKey and badge keys in one). */\n\tfunction shapeKey(h: HudState): string {\n\t\tconst c = h.cam;\n\t\tlet k = `${h.phase}|${h.outcome ?? ''}|${h.stamina <= 0.2}|${!!h.grind}|${c?.mode}|${c?.now}|${!!h.muted}|${!!h.hint}|${!!h.clit}|${gaugeRest(h)}|${h.choice ? `c${h.choice.press ?? ''}` : ''}|`;\n\t\tfor (const [m, s = 'ready', o] of h.moves)\n\t\t\tk += `${m}:${s}:${o?.sec ?? ''}:${o?.pref ?? ''}:${o?.deny ? 1 : 0},`;\n\t\treturn k;\n\t}\n\n\t// a new engine (a new hud object) takes the shape again; frame() reassigns it when the key moves\n\tlet shape = $derived(takeShape(hud));\n\tlet key = '';\n\n\tlet root = $state<HTMLDivElement>();\n\tlet herEl = $state<HTMLDivElement>();\n\tlet himEl = $state<HTMLDivElement>();\n\tlet herBar = $state<HTMLElement>();\n\tlet himBar = $state<HTMLElement>();\n\tlet timeEl = $state<HTMLDivElement>();\n\tlet cueEl = $state<HTMLParagraphElement>();\n\tlet gaugeEl = $state<SVGSVGElement>();\n\tlet bandEl = $state<SVGPathElement>();\n\tlet beatEl = $state<SVGCircleElement>();\n\tlet needleEl = $state<SVGLineElement>();\n\tlet camEl = $state<HTMLDivElement>();\n\tlet clitEl = $state<HTMLElement>();\n\tlet pauseEl = $state<HTMLButtonElement>();\n\tlet pickEl = $state<HTMLDivElement>();\n\tlet chipEl = $state<HTMLButtonElement>();\n\t/** the badges in row order, found again after each shape change */\n\tlet badges: HTMLElement[] = [];\n\t/** the needle's eased tempo (taps/s) */\n\tlet needle = 0;\n\t/** the last write's time (ms); -1 before the first */\n\tlet lastWrite = -1;\n\n\t/** the camera picker (the HUD's own: the engine only hears the pick) */\n\tlet camOpen = $state(untrack(() => !!hud.cam?.open));\n\tconst auto = $derived(shape.camMode === 'auto');\n\n\t/** Call from the engine's frame callback, and once on a phase change (a paused engine draws no\n\t *  frames). A new shape re-renders; otherwise this frame's values go onto the elements. */\n\texport function frame() {\n\t\tconst k = shapeKey(hud);\n\t\tif (k !== key) {\n\t\t\tkey = k;\n\t\t\tshape = takeShape(hud);\n\t\t\treturn; // the effect below writes this frame's values once the markup has followed\n\t\t}\n\t\twrite(hud);\n\t}\n\n\t// after the markup follows a new shape (or a new hud, or mode): this frame's values onto the new\n\t// elements\n\t$effect(() => {\n\t\tvoid shape;\n\t\tvoid mode;\n\t\tvoid screen;\n\t\tuntrack(() => {\n\t\t\tkey = shapeKey(hud);\n\t\t\tbadges = root ? [...root.querySelectorAll<HTMLElement>('.dh-moves .dh-mv')] : [];\n\t\t\twrite(hud);\n\t\t\tonshape?.();\n\t\t});\n\t});\n\n\t/** Only what changed is written (a style or SVG attribute write restyles, iOS Safari included). */\n\tfunction prop(el: HTMLElement | SVGElement | null | undefined, name: string, v: string) {\n\t\tif (el && el.style.getPropertyValue(name) !== v) el.style.setProperty(name, v);\n\t}\n\tfunction attr(el: Element | null | undefined, name: string, v: string) {\n\t\tif (el && el.getAttribute(name) !== v) el.setAttribute(name, v);\n\t}\n\n\tfunction write(h: HudState) {\n\t\tconst now = performance.now();\n\t\t// the harness's step clamp (50 ms); the first write puts the needle straight on the tempo\n\t\tconst first = lastWrite < 0;\n\t\tconst dt = first ? 0 : Math.min(0.05, (now - lastWrite) / 1000);\n\t\tlastWrite = now;\n\t\tprop(herBar, '--v', h.her.toFixed(3));\n\t\tprop(himBar, '--v', h.stamina.toFixed(3));\n\t\tattr(herEl, 'aria-valuenow', String(Math.round(h.her * 100)));\n\t\tattr(himEl, 'aria-valuenow', String(Math.round(h.stamina * 100)));\n\t\t// the clock and the cue: text in elements the markup leaves empty, so Svelte owns none of it\n\t\tconst time = clock(h.t);\n\t\tif (timeEl && timeEl.textContent !== time) {\n\t\t\t// eslint-disable-next-line svelte/no-dom-manipulating -- the per-frame clock, see above\n\t\t\ttimeEl.textContent = time;\n\t\t\ttimeEl.setAttribute('aria-label', `${secsLeft(h.t)} seconds left`);\n\t\t}\n\t\t// eslint-disable-next-line svelte/no-dom-manipulating -- the per-frame cue, see above\n\t\tif (cueEl && cueEl.textContent !== (h.cue ?? '')) cueEl.textContent = h.cue ?? '';\n\t\tif (gaugeEl) {\n\t\t\tconst g = gaugeGeom(h);\n\t\t\tneedle = first ? g.tempo : needle + (g.tempo - needle) * (1 - Math.exp(-dt * 10));\n\t\t\tattr(bandEl, 'd', g.band);\n\t\t\tattr(beatEl, 'cx', g.bx);\n\t\t\tattr(beatEl, 'cy', g.by);\n\t\t\tattr(needleEl, 'transform', `rotate(${needleDeg(needle).toFixed(1)})`);\n\t\t\tprop(gaugeEl, '--beat', `${g.beat}s`);\n\t\t\tattr(gaugeEl, 'aria-label', g.label);\n\t\t}\n\t\t// the \"tap her clit\" ring follows her on screen (the canvas's px are the root's: both fill it)\n\t\tif (h.clit) {\n\t\t\tprop(clitEl, '--x', `${h.clit.x.toFixed(1)}px`);\n\t\t\tprop(clitEl, '--y', `${h.clit.y.toFixed(1)}px`);\n\t\t}\n\t\tif (h.choice) {\n\t\t\tprop(badges[FIN.findIndex((f) => f.k === FIN_DEFAULT)], '--p', h.choice.p.toFixed(3));\n\t\t\treturn;\n\t\t}\n\t\th.moves.forEach(([, , o], i) => {\n\t\t\tif (o?.cd != null) prop(badges[i], '--cd', o.cd.toFixed(3));\n\t\t\tif (o?.p != null) prop(badges[i], '--p', o.p.toFixed(3));\n\t\t});\n\t}\n\n\t/** Badges take the finger on pointer down, never as a rhythm tap; the click that follows is\n\t *  only for the keyboard (Enter / Space on a focused badge: detail 0). */\n\tfunction down(e: PointerEvent, go: (e: Event) => void) {\n\t\te.stopPropagation();\n\t\te.preventDefault();\n\t\tgo(e);\n\t}\n\tfunction key0(e: MouseEvent, go: (e: Event) => void) {\n\t\tif (e.detail === 0) go(e);\n\t}\n\n\tfunction pick(v: DuetView | 'auto') {\n\t\tcamOpen = false;\n\t\tonview?.(v);\n\t}\n\tfunction pickFree() {\n\t\tcamOpen = false;\n\t\tonfree?.();\n\t}\n\n\t// a touch anywhere else closes the picker, and only that (no stroke, no move)\n\tfunction outside(e: PointerEvent) {\n\t\tif (!camOpen || camEl?.contains(e.target as Node)) return;\n\t\tcamOpen = false;\n\t\te.stopPropagation();\n\t\te.preventDefault();\n\t}\n\n\t// keyboard focus follows the round: the picker's checked item when it opens, his default finish\n\t// when the choice comes, Pause again after a resume\n\tlet lastPhase = '';\n\tlet hadFin = false;\n\t$effect(() => {\n\t\tconst p = shape.phase;\n\t\tconst fin = !!shape.fin;\n\t\tuntrack(() => {\n\t\t\tif (mode === 'live' && lastPhase === 'paused' && p !== 'paused')\n\t\t\t\tpauseEl?.focus({ preventScroll: true });\n\t\t\tif (mode === 'live' && fin && !hadFin)\n\t\t\t\troot\n\t\t\t\t\t?.querySelector<HTMLElement>('.dh-moves[data-fin] [data-default]')\n\t\t\t\t\t?.focus({ preventScroll: true });\n\t\t\tlastPhase = p;\n\t\t\thadFin = fin;\n\t\t});\n\t});\n\t$effect(() => {\n\t\tif (camOpen && pickEl)\n\t\t\tuntrack(() =>\n\t\t\t\t(\n\t\t\t\t\tpickEl!.querySelector<HTMLElement>('[aria-checked=\"true\"]') ??\n\t\t\t\t\tpickEl!.querySelector<HTMLElement>('[role=\"menuitemradio\"]')\n\t\t\t\t)?.focus({ preventScroll: true })\n\t\t\t);\n\t});\n\t/** the picker's arrows: down / right forward, up / left back (wrapping), Home / End */\n\tfunction pickKey(e: KeyboardEvent) {\n\t\tconst items = [...(pickEl?.querySelectorAll<HTMLElement>('[role=\"menuitemradio\"]') ?? [])];\n\t\tconst i = items.indexOf(document.activeElement as HTMLElement);\n\t\tconst n = items.length;\n\t\tconst to =\n\t\t\te.key === 'ArrowDown' || e.key === 'ArrowRight'\n\t\t\t\t? (i + 1) % n\n\t\t\t\t: e.key === 'ArrowUp' || e.key === 'ArrowLeft'\n\t\t\t\t\t? (i - 1 + n) % n\n\t\t\t\t\t: e.key === 'Home'\n\t\t\t\t\t\t? 0\n\t\t\t\t\t\t: e.key === 'End'\n\t\t\t\t\t\t\t? n - 1\n\t\t\t\t\t\t\t: -1;\n\t\tif (to < 0 || !n) return;\n\t\te.preventDefault();\n\t\titems[to].focus();\n\t}\n\n\t// a desktop: keys 1-7 press the moves in row order; Escape pauses and resumes the round\n\tfunction onKey(e: KeyboardEvent) {\n\t\tif (e.key === 'Escape' && camOpen) {\n\t\t\tcamOpen = false;\n\t\t\tchipEl?.focus();\n\t\t\treturn;\n\t\t}\n\t\tif (e.key === 'Escape' && mode === 'live' && !screen) {\n\t\t\tif (hud.phase === 'play') {\n\t\t\t\te.preventDefault();\n\t\t\t\tonpause?.();\n\t\t\t} else if (hud.phase === 'paused') {\n\t\t\t\te.preventDefault();\n\t\t\t\tonresume?.();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (mode !== 'live' || hud.phase !== 'play' || e.repeat || e.metaKey || e.ctrlKey || e.altKey)\n\t\t\treturn;\n\t\tconst i = e.key.length === 1 ? '1234567'.indexOf(e.key) : -1;\n\t\tconst m = i < 0 ? undefined : hud.moves[i];\n\t\tif (!m) return;\n\t\te.preventDefault();\n\t\tonmove?.(m[0], e);\n\t}\n\n\tconst focus = (el: HTMLElement) => el.focus();\n</script>\n\n<svelte:window onkeydown={onKey} />\n<svelte:document onpointerdowncapture={outside} />\n\n{#snippet icon(id: string, cls = '')}\n\t<svg class={['ic', cls]} viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t<!-- eslint-disable-next-line svelte/no-at-html-tags -- constant paths from duet-icons.ts, never input -->\n\t\t{@html DUET_ICONS[id] ?? ''}\n\t</svg>\n{/snippet}\n\n{#snippet badge(b: Badge, go: (e: Event) => void)}\n\t{@const dis = b.st === 'cool' || b.st === 'busy' || b.st === 'off'}\n\t<button\n\t\tclass=\"dh-mv\"\n\t\ttype=\"button\"\n\t\tdata-k={b.k}\n\t\tdata-state={b.st}\n\t\tdata-press={b.press || undefined}\n\t\tdata-default={b.def || undefined}\n\t\tdata-deny={b.deny || undefined}\n\t\taria-disabled={dis ? 'true' : undefined}\n\t\taria-label={b.name}\n\t\tonpointerdown={(e) => down(e, go)}\n\t\tonclick={(e) => key0(e, go)}\n\t>\n\t\t<span class=\"dh-mv-key\"><i class=\"dh-mv-fill\"></i><i class=\"dh-mv-prog\"></i></span\n\t\t>{#if b.icon}{@render icon(b.icon, 'dh-mv-i')}{/if}<span class=\"dh-mv-l\">{b.label}</span\n\t\t>{#if b.st === 'hot'}<b class=\"dh-tag\">x2</b>{:else if b.st === 'cool'}<span class=\"dh-sec\"\n\t\t\t\t>{b.sec}s</span\n\t\t\t>{/if}{#if b.pref && PREF[b.pref]}<b class=\"dh-pref\" data-k={b.pref}>{PREF[b.pref]}</b>{/if}\n\t</button>\n{/snippet}\n\n<div\n\tclass={['dh', screen === 'err' && 'dh-dim']}\n\tdata-phase={shape.phase}\n\tdata-mode={mode}\n\taria-busy={screen === 'load' || undefined}\n\tbind:this={root}\n>\n\t<div class=\"dh-scrim\" aria-hidden=\"true\"></div>\n\n\t<div class=\"dh-status\" role=\"group\" aria-label=\"Round\">\n\t\t<div\n\t\t\tclass=\"dh-meter dh-her\"\n\t\t\trole=\"meter\"\n\t\t\taria-label=\"Her\"\n\t\t\taria-valuemin=\"0\"\n\t\t\taria-valuemax=\"100\"\n\t\t\taria-valuenow=\"0\"\n\t\t\tbind:this={herEl}\n\t\t>\n\t\t\t{@render icon('her', 'dh-i')}<span class=\"dh-ml\">Her</span><span class=\"dh-bar\"\n\t\t\t\t><i bind:this={herBar}></i></span\n\t\t\t>\n\t\t</div>\n\t\t<div\n\t\t\tclass=\"dh-meter dh-him\"\n\t\t\trole=\"meter\"\n\t\t\taria-label=\"His stamina\"\n\t\t\taria-valuemin=\"0\"\n\t\t\taria-valuemax=\"100\"\n\t\t\taria-valuenow=\"0\"\n\t\t\tdata-edge={shape.edge || undefined}\n\t\t\tdata-spent={shape.spent || undefined}\n\t\t\tdata-rec={shape.grind || undefined}\n\t\t\tbind:this={himEl}\n\t\t>\n\t\t\t{@render icon(shape.edge || shape.spent ? 'him-low' : 'him', 'dh-i')}<span class=\"dh-ml\"\n\t\t\t\t>{shape.spent\n\t\t\t\t\t? 'Spent'\n\t\t\t\t\t: shape.edge\n\t\t\t\t\t\t? 'Close'\n\t\t\t\t\t\t: 'Him'}{#if shape.grind && !shape.edge}{@render icon('up')}{/if}</span\n\t\t\t><span class=\"dh-bar\"><b class=\"dh-zone\"></b><i bind:this={himBar}></i></span>\n\t\t</div>\n\t\t<div class=\"dh-time\" role=\"timer\" bind:this={timeEl}></div>\n\t</div>\n\n\t<div class=\"dh-cam\" bind:this={camEl}>\n\t\t<button\n\t\t\tclass=\"dh-chip\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"menu\"\n\t\t\taria-expanded={camOpen}\n\t\t\tbind:this={chipEl}\n\t\t\taria-label={free\n\t\t\t\t? 'Camera: Free'\n\t\t\t\t: auto\n\t\t\t\t\t? `Camera: Auto, on ${shape.camNow}`\n\t\t\t\t\t: `Camera: ${shape.camMode}`}\n\t\t\tonclick={() => (camOpen = !camOpen)}\n\t\t\t><span\n\t\t\t\t>{#if free}{@render icon('orbit')}Free{:else}{@render icon('cam')}{auto\n\t\t\t\t\t\t? 'Auto'\n\t\t\t\t\t\t: shape.camMode}{#if auto}<small>· {shape.camNow}</small>{/if}{/if}{@render icon(\n\t\t\t\t\t'chev',\n\t\t\t\t\t'dh-chev'\n\t\t\t\t)}</span\n\t\t\t></button\n\t\t>\n\t\t{#if camOpen}\n\t\t\t<div\n\t\t\t\tclass=\"dh-pick\"\n\t\t\t\trole=\"menu\"\n\t\t\t\taria-label=\"Camera\"\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\tbind:this={pickEl}\n\t\t\t\tonkeydown={pickKey}\n\t\t\t>\n\t\t\t\t<button\n\t\t\t\t\tclass=\"dh-auto\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\taria-checked={auto && !free}\n\t\t\t\t\tonclick={() => pick('auto')}\n\t\t\t\t\t>{@render icon('cam')}<span><b>Auto</b><small>Cuts to the action</small></span\n\t\t\t\t\t>{@render icon('check', 'dh-ok')}</button\n\t\t\t\t>\n\t\t\t\t<p class=\"dh-pl\">Angle</p>\n\t\t\t\t<div class=\"dh-angles\">\n\t\t\t\t\t{#each VIEWS as v (v)}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\taria-checked={!auto && !free && shape.camMode === VIEW_LABEL[v]}\n\t\t\t\t\t\t\tdata-live={(auto && shape.camNow === VIEW_LABEL[v]) || undefined}\n\t\t\t\t\t\t\tonclick={() => pick(v)}>{VIEW_LABEL[v]}</button\n\t\t\t\t\t\t>\n\t\t\t\t\t{/each}\n\t\t\t\t</div>\n\t\t\t\t{#if mode === 'replay'}\n\t\t\t\t\t<!-- the seventh choice: the canvas's drag and pinch, nothing cutting away from it -->\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"dh-auto dh-free\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\taria-checked={free}\n\t\t\t\t\t\tonclick={pickFree}\n\t\t\t\t\t\t>{@render icon('orbit')}<span><b>Free</b><small>Drag to orbit</small></span\n\t\t\t\t\t\t>{@render icon('check', 'dh-ok')}</button\n\t\t\t\t\t>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t{/if}\n\t</div>\n\t<div class=\"dh-sys\">\n\t\t<button\n\t\t\tclass=\"dh-ib\"\n\t\t\ttype=\"button\"\n\t\t\taria-label=\"Sound\"\n\t\t\taria-pressed={!shape.muted}\n\t\t\tonclick={() => onsound?.()}\n\t\t\t><span>{@render icon(shape.muted ? 'snd-off' : 'snd-on')}</span></button\n\t\t>\n\t\t{#if mode === 'live' && screen}\n\t\t\t<!-- round start, loading, a failed stage, the end: Leave holds the pause slot -->\n\t\t\t<button class=\"dh-ib\" type=\"button\" aria-label=\"Leave\" onclick={() => onleave?.()}\n\t\t\t\t><span>{@render icon('close')}</span></button\n\t\t\t>\n\t\t{:else if mode === 'replay' && onfull}\n\t\t\t<button class=\"dh-ib\" type=\"button\" aria-label=\"Full screen\" onclick={() => onfull?.()}\n\t\t\t\t><span>{@render icon('full')}</span></button\n\t\t\t>\n\t\t{:else if mode === 'live'}\n\t\t\t<button\n\t\t\t\tclass=\"dh-ib\"\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-label=\"Pause\"\n\t\t\t\tbind:this={pauseEl}\n\t\t\t\tonclick={() => {\n\t\t\t\t\tcamOpen = false;\n\t\t\t\t\tonpause?.();\n\t\t\t\t}}><span>{@render icon('pause')}</span></button\n\t\t\t>\n\t\t{/if}\n\t</div>\n\t{#if mode === 'live' && screen === 'pre' && onstart}\n\t\t<!-- the pad starts on a tap; this is its name for a screen reader (Space works too) -->\n\t\t<button class=\"dh-sr\" type=\"button\" onclick={() => onstart?.()}>Start the round</button>\n\t{/if}\n\t{#if mode === 'live' && (screen === 'pre' || (!screen && shape.phase === 'play'))}\n\t\t<!-- before the first tap; it fades out with the first one -->\n\t\t<button\n\t\t\tclass=\"dh-chip dh-gear\"\n\t\t\ttype=\"button\"\n\t\t\taria-label=\"Open the gear shop\"\n\t\t\ttabindex={screen === 'pre' ? undefined : -1}\n\t\t\tonclick={() => ongear?.()}\n\t\t\t><span\n\t\t\t\t><span class=\"dh-sw3\" aria-hidden=\"true\"\n\t\t\t\t\t><i class=\"m-gold\"></i><i class=\"m-marble\"></i><i class=\"m-chrome\"></i></span\n\t\t\t\t>Gear shop</span\n\t\t\t></button\n\t\t>\n\t{/if}\n\n\t{#if mode === 'live' && shape.clit}\n\t\t<!-- \"tap her clit\": until the round's first clit tap (the engine clears hud.clit) -->\n\t\t<i class=\"dh-clit\" aria-hidden=\"true\" bind:this={clitEl}></i>\n\t{/if}\n\n\t<!-- what just happened: the plate plays in again for each new caption -->\n\t<div class=\"dh-cap\" aria-live=\"polite\">\n\t\t{#if caption}\n\t\t\t{#key caption}\n\t\t\t\t<div>\n\t\t\t\t\t<b>{caption.t}</b>{#if caption.sub}<small>{caption.sub}</small>{/if}\n\t\t\t\t</div>\n\t\t\t{/key}\n\t\t{/if}\n\t</div>\n\n\t{#if mode === 'replay' && free && !camOpen}\n\t\t<p class=\"dh-orbit\">\n\t\t\t<span class=\"dh-touch\">Drag to orbit · pinch to zoom</span><span class=\"dh-desk\"\n\t\t\t\t>Drag to orbit · scroll to zoom</span\n\t\t\t>\n\t\t</p>\n\t{/if}\n\n\t{#if screen === 'err'}\n\t\t<!-- the scene could not start: one card on the stage, nothing else to press -->\n\t\t<div class=\"dh-err on-light\" role=\"alert\">\n\t\t\t<p class=\"ec-eb\">Duet</p>\n\t\t\t<h2>The stage didn't start.</h2>\n\t\t\t<p>This browser stopped 3D on the page. Close a few tabs, then try again.</p>\n\t\t\t<div class=\"row\">\n\t\t\t\t<button class=\"b b-lite\" type=\"button\" onclick={() => onleave?.()}>Back</button>\n\t\t\t\t<button class=\"b b-ink\" type=\"button\" onclick={() => onretry?.()}>Try again</button>\n\t\t\t</div>\n\t\t</div>\n\t{:else if shape.fin && mode === 'live'}\n\t\t<!-- the round's end: the move row becomes his finish choice, same badges -->\n\t\t<div class=\"dh-play\">\n\t\t\t<p class=\"dh-fin-e\">{shape.finWhy}</p>\n\t\t\t<p class=\"dh-fin-q\" id=\"{uid}-fq\">Your turn. Where?</p>\n\t\t\t<div\n\t\t\t\tclass=\"dh-moves\"\n\t\t\t\tdata-n={shape.fin.length}\n\t\t\t\tdata-fin\n\t\t\t\trole=\"group\"\n\t\t\t\taria-labelledby=\"{uid}-fq\"\n\t\t\t>\n\t\t\t\t{#each shape.fin as b (b.k)}\n\t\t\t\t\t{@render badge(b, (e) => onfinish?.(b.k, e))}\n\t\t\t\t{/each}\n\t\t\t</div>\n\t\t\t<p class=\"dh-hint\">No pick: on her back</p>\n\t\t</div>\n\t{:else}\n\t\t<div class=\"dh-play\">\n\t\t\t{#if mode === 'live' && partner && (screen === 'pre' || screen === 'load')}\n\t\t\t\t<p class=\"dh-with\">With <b>{partner}</b></p>\n\t\t\t{/if}\n\t\t\t{#if mode === 'live'}<p class=\"dh-cue\" bind:this={cueEl}></p>{/if}\n\t\t\t<svg\n\t\t\t\tclass=\"dh-gauge\"\n\t\t\t\tviewBox=\"-76 -70 152 84\"\n\t\t\t\trole=\"img\"\n\t\t\t\tdata-rest={shape.rest || undefined}\n\t\t\t\tbind:this={gaugeEl}\n\t\t\t>\n\t\t\t\t<path class=\"trk\" d={TRACK} />\n\t\t\t\t<path class=\"band\" bind:this={bandEl} />\n\t\t\t\t<circle class=\"beat\" r=\"2.3\" bind:this={beatEl} />\n\t\t\t\t<line class=\"needle\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"-50\" bind:this={needleEl} />\n\t\t\t\t<circle class=\"hub\" r=\"5.5\" />\n\t\t\t\t<text x=\"-62\" y=\"13\" text-anchor=\"middle\">SLOW</text><text\n\t\t\t\t\tx=\"62\"\n\t\t\t\t\ty=\"13\"\n\t\t\t\t\ttext-anchor=\"middle\">FAST</text\n\t\t\t\t>\n\t\t\t</svg>\n\t\t\t{#if mode === 'live'}\n\t\t\t\t{#if shape.hint}<p class=\"dh-hint\">Tap to the rhythm · hold to grind</p>{/if}\n\t\t\t\t<div class=\"dh-moves\" data-n={shape.moves.length} role=\"group\" aria-label=\"Moves\">\n\t\t\t\t\t{#each shape.moves as b (b.k)}\n\t\t\t\t\t\t{@render badge(b, (e) => onmove?.(b.k, e))}\n\t\t\t\t\t{/each}\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t</div>\n\t{/if}\n\t{@render children?.()}\n</div>\n\n{#if mode === 'live' && shape.phase === 'paused'}\n\t<!-- the harness's pause card: the round waits -->\n\t<div class=\"card\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"{uid}-pause\">\n\t\t<div class=\"sheet\">\n\t\t\t<div class=\"eyebrow\">Paused</div>\n\t\t\t<h2 id=\"{uid}-pause\">Take a breath</h2>\n\t\t\t<p>The round waits for you.</p>\n\t\t\t<div class=\"btns\">\n\t\t\t\t<button class=\"alt\" type=\"button\" onclick={() => onquit?.()}>End round</button>\n\t\t\t\t<button class=\"main\" type=\"button\" onclick={() => onresume?.()} {@attach focus}\n\t\t\t\t\t>Resume</button\n\t\t\t\t>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n{/if}\n\n<style>\n\t/* =====================================================================================\n\t   DUET HUD, direction B (\"Stacked\"). Ports 1:1 into the duet page: everything under .dh is the\n\t   in-game HUD, nothing outside it.\n\n\t   Layout follows the HUD's own size, not the device: .dh is a size container (on the page it is\n\t   the fixed full-viewport game root), so the mock's phone frames and the real page share the\n\t   rules. Landscape phone = (orientation: landscape) and (max-height: 500px), as the harness.\n\n\t   Input: the stage and the rhythm pad under the HUD take the taps. Only the controls and the move\n\t   row take pointer events (the cue and the gauge let taps through).\n\n\t   Motion: transform and opacity only. Colour changes snap (they are state, not motion).\n\t   ===================================================================================== */\n\n\t.dh {\n\t\t/* site tokens (src/routes/layout.css @theme) */\n\t\t--f-d: 'Space Grotesk', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;\n\t\t--f-b: 'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;\n\t\t--ink: #141414; /* badges, text on the light stage (16:1 on the scrim) */\n\t\t--plate: rgba(14, 14, 14, 0.9); /* plates over the stage (#252525 on the studio) */\n\t\t--track: rgba(255, 255, 255, 0.16);\n\t\t--fg: #ffffff;\n\t\t--fg-2: #b8b8b8; /* labels on a plate, 7.7:1 */\n\t\t--her: #ff4d6d; /* --color-coral: her bar on a plate, 4.8:1 */\n\t\t--her-ink: #ff6b85; /* her icon on a plate, 5.6:1 */\n\t\t--her-deep: #d93254; /* --color-coral-dark: her band on the scrim 4.0:1; x2 badges (white on it 4.6:1) */\n\t\t--her-text: #b3223f; /* her colour as text on the scrim: 5.9:1, still 4.7:1 if the scene behind the scrim is black */\n\t\t--warn: #f5b50a; /* his edge (--color-token), 8.4:1 on a plate */\n\t\t--muted: #5c605e; /* microcopy on the scrim, 5.3:1 */\n\t\t--off: #7d7974; /* round over */\n\t\t--empty: #4a4744; /* a badge's empty part while it recharges */\n\t\t--scrim: 244, 243, 241; /* the studio backdrop (#f4f3f1) */\n\t\t--ease: cubic-bezier(0.25, 1, 0.5, 1); /* --ease-out-quart */\n\t\t/* safe areas: env() on the page (needs viewport-fit=cover), set per frame in the mock */\n\t\t--sat: env(safe-area-inset-top, 0px);\n\t\t--sab: env(safe-area-inset-bottom, 0px);\n\t\t--sal: env(safe-area-inset-left, 0px);\n\t\t--sar: env(safe-area-inset-right, 0px);\n\t\t--st-h: 62px; /* status plate */\n\t\t--key: 52px; /* a move badge */\n\n\t\tcontainer: dh / size;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tcolor: var(--fg);\n\t\tfont: 15px/1.35 var(--f-b);\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-webkit-user-select: none;\n\t\tuser-select: none;\n\t\t-webkit-touch-callout: none;\n\t}\n\t.dh *,\n\t.dh *::before,\n\t.dh *::after {\n\t\tbox-sizing: border-box;\n\t}\n\t.dh :where(p) {\n\t\tmargin: 0;\n\t}\n\t/* resets at zero specificity, so every component rule below wins on order */\n\t.dh :where(button) {\n\t\tfont: inherit;\n\t\tcolor: inherit;\n\t\t-webkit-tap-highlight-color: transparent;\n\t\ttouch-action: manipulation;\n\t\tcursor: pointer;\n\t}\n\t.dh svg {\n\t\tdisplay: block;\n\t\tflex: none;\n\t\toverflow: visible;\n\t}\n\t/* one icon grid: 24 x 24, 2 px stroke, round ends; the stroke stays 2 px at any rendered size */\n\t.dh .ic {\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tfill: none;\n\t\tstroke: currentColor;\n\t\tstroke-width: 2;\n\t\tstroke-linecap: round;\n\t\tstroke-linejoin: round;\n\t}\n\t/* (the icon's paths come in through {@html}: unscoped, so :global) */\n\t.dh .ic :global(*) {\n\t\tvector-effect: non-scaling-stroke;\n\t}\n\t.dh .ic :global(.f) {\n\t\tfill: currentColor;\n\t\tstroke: none;\n\t}\n\t/* keyboard focus: a 2 px ring on the visible shape (the pill, the badge), never the hit box */\n\t.dh :where(button):focus-visible {\n\t\toutline: none;\n\t}\n\t.dh :is(.dh-chip, .dh-ib):focus-visible > span,\n\t.dh .dh-mv:focus-visible .dh-mv-key {\n\t\toutline: 2px solid var(--ink);\n\t\toutline-offset: 3px;\n\t}\n\n\t/* ---------- the bottom scrim: the light studio fades up behind the play cluster ---------- */\n\t.dh-scrim {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\theight: calc(var(--sab) + 300px);\n\t\tpointer-events: none;\n\t\tbackground: linear-gradient(\n\t\t\tto top,\n\t\t\trgba(var(--scrim), 0.94) 0%,\n\t\t\trgba(var(--scrim), 0.9) 58%,\n\t\t\trgba(var(--scrim), 0) 100%\n\t\t);\n\t}\n\n\t/* =====================================================================================\n\t   STATUS: her heat and his charge stacked, the clock at the end\n\t   ===================================================================================== */\n\t.dh-status {\n\t\tposition: absolute;\n\t\tz-index: 3;\n\t\ttop: calc(var(--sat) + 8px);\n\t\tleft: calc(var(--sal) + 10px);\n\t\tright: calc(var(--sar) + 10px);\n\t\theight: var(--st-h);\n\t\tpadding: 0 12px 0 10px;\n\t\tborder-radius: 16px;\n\t\tbackground: var(--plate);\n\t\tbox-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);\n\t\tdisplay: grid;\n\t\tgrid-template-columns: minmax(0, 1fr) auto;\n\t\tgrid-template-rows: 20px 20px;\n\t\talign-content: center;\n\t\trow-gap: 6px;\n\t\tcolumn-gap: 12px;\n\t\tpointer-events: none;\n\t}\n\t.dh-meter {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 24px 50px minmax(0, 1fr);\n\t\talign-items: center;\n\t\tcolumn-gap: 6px;\n\t\tmin-width: 0;\n\t}\n\t.dh-her {\n\t\tgrid-area: 1 / 1;\n\t}\n\t.dh-him {\n\t\tgrid-area: 2 / 1;\n\t}\n\t.dh-ml {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 2px;\n\t\tmin-width: 0;\n\t\tfont: 700 11px/1 var(--f-b);\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tcolor: var(--fg-2);\n\t\twhite-space: nowrap;\n\t}\n\t.dh-ml .ic {\n\t\twidth: 13px;\n\t\theight: 13px;\n\t}\n\t.dh-her .dh-i {\n\t\tcolor: var(--her-ink);\n\t}\n\t.dh-her .dh-ml {\n\t\tcolor: #e9e9e9;\n\t}\n\t.dh-bar {\n\t\tposition: relative;\n\t\theight: 8px;\n\t\tborder-radius: 4px;\n\t\tbackground: var(--track);\n\t\toverflow: hidden;\n\t}\n\t/* his danger zone: the last 20% of his charge (his meter past EDGE = 0.8) */\n\t.dh-zone {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\twidth: 20%;\n\t\tbackground: rgba(245, 181, 10, 0.3);\n\t}\n\t/* the fill slides in (translate, never width): rounded ends stay round */\n\t.dh-bar > i {\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tbackground: var(--fg);\n\t\ttransform: translateX(calc((var(--v, 0) - 1) * 100%));\n\t\ttransition: transform 0.12s linear;\n\t}\n\t.dh-her .dh-bar > i {\n\t\tbackground: var(--her);\n\t}\n\t/* he is close: amber fill that throbs, and the label and icon change too (never colour alone) */\n\t.dh-him[data-edge] .dh-bar > i {\n\t\tbackground: var(--warn);\n\t\tanimation: dh-throb 0.55s ease-in-out infinite alternate;\n\t}\n\t.dh-him[data-edge] .dh-ml,\n\t.dh-him[data-edge] .dh-i {\n\t\tcolor: var(--warn);\n\t}\n\t.dh-him[data-edge] .dh-zone,\n\t.dh-him[data-spent] .dh-zone {\n\t\topacity: 0;\n\t}\n\t@keyframes dh-throb {\n\t\tto {\n\t\t\topacity: 0.45;\n\t\t}\n\t}\n\t.dh-time {\n\t\tgrid-area: 1 / 2 / 3 / 3;\n\t\talign-self: stretch;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-width: 62px;\n\t\tpadding-left: 12px;\n\t\tborder-left: 1px solid rgba(255, 255, 255, 0.12);\n\t\tfont: 700 22px/1 var(--f-d);\n\t\tletter-spacing: -0.02em;\n\t\tfont-variant-numeric: tabular-nums;\n\t\tcolor: var(--fg);\n\t}\n\n\t/* =====================================================================================\n\t   TOP CONTROLS: camera (a pop-up button), sound, pause\n\t   ===================================================================================== */\n\t.dh-cam,\n\t.dh-sys {\n\t\tposition: absolute;\n\t\tz-index: 4;\n\t\ttop: calc(var(--sat) + 10px + var(--st-h));\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\t.dh-cam {\n\t\tleft: calc(var(--sal) + 6px);\n\t}\n\t.dh-sys {\n\t\tright: calc(var(--sar) + 6px);\n\t}\n\t/* 44 px hit areas around smaller visible pills */\n\t.dh-chip,\n\t.dh-ib {\n\t\theight: 44px;\n\t\tpadding: 0 4px;\n\t\tborder: 0;\n\t\tbackground: none;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\t.dh-chip > span,\n\t.dh-ib > span {\n\t\tbackground: var(--plate);\n\t\tcolor: var(--fg);\n\t\tbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);\n\t\ttransition: transform 0.12s var(--ease);\n\t}\n\t.dh-chip > span {\n\t\theight: 36px;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 7px;\n\t\tpadding: 0 10px 0 9px;\n\t\tborder-radius: 999px;\n\t\tfont: 700 13.5px/1 var(--f-d);\n\t\tletter-spacing: -0.01em;\n\t\twhite-space: nowrap;\n\t}\n\t.dh-chip .ic {\n\t\twidth: 19px;\n\t\theight: 19px;\n\t}\n\t.dh-chip small {\n\t\tfont: 600 12.5px/1 var(--f-b);\n\t\tletter-spacing: 0;\n\t\tcolor: var(--fg-2);\n\t}\n\t.dh-chip .dh-chev {\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tcolor: var(--fg-2);\n\t}\n\t.dh-chip[aria-expanded='true'] .dh-chev {\n\t\ttransform: rotate(180deg);\n\t}\n\t.dh-ib {\n\t\twidth: 44px;\n\t\tjustify-content: center;\n\t\tpadding: 0;\n\t}\n\t.dh-ib > span {\n\t\twidth: 38px;\n\t\theight: 38px;\n\t\tborder-radius: 50%;\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\t.dh-ib .ic {\n\t\twidth: 20px;\n\t\theight: 20px;\n\t}\n\t.dh-chip:active > span,\n\t.dh-ib:active > span {\n\t\ttransform: scale(0.94);\n\t}\n\n\t/* the camera picker: one chip, seven mutually exclusive options (Auto + six angles) */\n\t.dh-pick {\n\t\tposition: absolute;\n\t\ttop: 46px;\n\t\tleft: 4px;\n\t\twidth: 272px;\n\t\tpadding: 8px;\n\t\tborder-radius: 18px;\n\t\tbackground: #141414;\n\t\tbox-shadow:\n\t\t\t0 18px 40px rgba(0, 0, 0, 0.32),\n\t\t\t0 2px 6px rgba(0, 0, 0, 0.18);\n\t\ttransform-origin: 24px 0;\n\t\tanimation: dh-pop 0.16s var(--ease);\n\t}\n\t@keyframes dh-pop {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(-4px) scale(0.97);\n\t\t}\n\t}\n\t.dh-pick button {\n\t\tposition: relative;\n\t\tborder: 0;\n\t\tbackground: #1f1f1f;\n\t\tcolor: #f0f0f0;\n\t}\n\t.dh-pick button[aria-checked='true'] {\n\t\tbackground: #fff;\n\t\tcolor: var(--ink);\n\t}\n\t.dh-pick button:focus-visible {\n\t\toutline: 2px solid #fff;\n\t\toutline-offset: 2px;\n\t}\n\t.dh-auto {\n\t\twidth: 100%;\n\t\tmin-height: 56px;\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 24px minmax(0, 1fr) 24px;\n\t\talign-items: center;\n\t\tgap: 10px;\n\t\tpadding: 8px 12px;\n\t\tborder-radius: 12px;\n\t\ttext-align: left;\n\t}\n\t.dh-auto b {\n\t\tdisplay: block;\n\t\tfont: 700 15px/1.1 var(--f-d);\n\t\tletter-spacing: -0.01em;\n\t}\n\t.dh-auto small {\n\t\tdisplay: block;\n\t\tmargin-top: 3px;\n\t\tfont: 500 12.5px/1.2 var(--f-b);\n\t\tcolor: #a3a3a3;\n\t}\n\t.dh-auto[aria-checked='true'] small {\n\t\tcolor: #57524c;\n\t}\n\t.dh-auto .dh-ok {\n\t\topacity: 0;\n\t}\n\t.dh-auto[aria-checked='true'] .dh-ok {\n\t\topacity: 1;\n\t}\n\t.dh-pl {\n\t\tmargin: 12px 6px 8px;\n\t\tfont: 700 11px/1 var(--f-b);\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tcolor: #8a8a8a;\n\t}\n\t.dh-angles {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(3, minmax(0, 1fr));\n\t\tgap: 6px;\n\t}\n\t.dh-angles button {\n\t\tmin-height: 44px;\n\t\tborder-radius: 12px;\n\t\tfont: 600 14px/1 var(--f-d);\n\t\tletter-spacing: -0.01em;\n\t}\n\t/* Auto on: a dot on the angle the director is on right now */\n\t.dh-angles button[data-live]::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: 7px;\n\t\tright: 7px;\n\t\twidth: 6px;\n\t\theight: 6px;\n\t\tborder-radius: 50%;\n\t\tbackground: #fff;\n\t}\n\n\t/* =====================================================================================\n\t   CAPTIONS (what just happened): one plate, two lines\n\t   ===================================================================================== */\n\t.dh-cap {\n\t\tposition: absolute;\n\t\tz-index: 2;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttop: calc(var(--sat) + var(--st-h) + 92px);\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tpadding: 0 20px;\n\t\tpointer-events: none;\n\t}\n\t.dh-cap > div {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tgap: 5px;\n\t\tpadding: 11px 18px 12px;\n\t\tborder-radius: 16px;\n\t\tbackground: var(--ink);\n\t\tbox-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);\n\t\tanimation: dh-cap-in 0.32s var(--ease);\n\t}\n\t.dh-cap b {\n\t\tfont: 700 30px/1 var(--f-d);\n\t\tletter-spacing: -0.035em;\n\t\tcolor: #fff;\n\t}\n\t.dh-cap small {\n\t\tfont: 700 11.5px/1 var(--f-b);\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tcolor: var(--her-ink);\n\t}\n\t@keyframes dh-cap-in {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.8);\n\t\t}\n\t}\n\n\t/* =====================================================================================\n\t   PLAY CLUSTER: cue, tempo gauge, first-round hint, moves\n\t   ===================================================================================== */\n\t.dh-play {\n\t\tposition: absolute;\n\t\tz-index: 3;\n\t\tleft: calc(var(--sal) + 12px);\n\t\tright: calc(var(--sar) + 12px);\n\t\tbottom: calc(var(--sab) + 10px);\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tpointer-events: none;\n\t}\n\t/* the cue and the gauge let taps through to the rhythm pad under them; only the keys take a finger */\n\t.dh-play .dh-moves {\n\t\tpointer-events: auto;\n\t}\n\t.dh-cue {\n\t\tmin-height: 20px;\n\t\tfont: 700 16px/1.2 var(--f-d);\n\t\tletter-spacing: -0.01em;\n\t\tcolor: var(--ink);\n\t\ttext-align: center;\n\t}\n\t.dh-gauge {\n\t\twidth: 152px;\n\t\theight: 80px;\n\t\tmargin-top: 4px;\n\t}\n\t.dh-gauge .trk {\n\t\tfill: none;\n\t\tstroke: rgba(20, 20, 20, 0.12);\n\t\tstroke-width: 7;\n\t\tstroke-linecap: round;\n\t}\n\t/* her sweet spot, in her colour, so the band reads as hers */\n\t.dh-gauge .band {\n\t\tfill: none;\n\t\tstroke: var(--her-deep);\n\t\tstroke-width: 7;\n\t\tstroke-linecap: round;\n\t}\n\t/* the beat: a dot at the band's centre that pulses at her tempo (period = 1 / centre s) */\n\t.dh-gauge .beat {\n\t\tfill: #fff;\n\t\ttransform-box: fill-box;\n\t\ttransform-origin: center;\n\t\tanimation: dh-beat var(--beat, 0.48s) linear infinite;\n\t}\n\t@keyframes dh-beat {\n\t\t0% {\n\t\t\ttransform: scale(1.9);\n\t\t\topacity: 1;\n\t\t}\n\t\t45%,\n\t\t100% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: 0.45;\n\t\t}\n\t}\n\t.dh-gauge .needle {\n\t\tstroke: var(--ink);\n\t\tstroke-width: 3;\n\t\tstroke-linecap: round;\n\t\ttransition: transform 0.1s linear;\n\t}\n\t.dh-gauge .hub {\n\t\tfill: var(--ink);\n\t}\n\t.dh-gauge text {\n\t\tfont: 700 10.5px var(--f-b);\n\t\tletter-spacing: 0.1em;\n\t\tfill: var(--muted);\n\t}\n\t/* slipped out, grinding, before the first tap: the band waits, the needle rests */\n\t.dh-gauge[data-rest] .band,\n\t.dh-gauge[data-rest] .beat {\n\t\topacity: 0.35;\n\t\tanimation: none;\n\t}\n\t.dh-hint {\n\t\tmargin-top: 8px;\n\t\tfont: 700 11px/1 var(--f-b);\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tcolor: var(--muted);\n\t\twhite-space: nowrap;\n\t}\n\n\t/* ---------- moves: round badges, a pictogram in each, the label under it ---------- */\n\t.dh-moves {\n\t\t--n: 4;\n\t\t--gap: 8px;\n\t\twidth: 100%;\n\t\tmax-width: 480px;\n\t\tmargin-top: 12px;\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(var(--n), minmax(0, 1fr));\n\t\tgap: var(--gap);\n\t\ttouch-action: manipulation;\n\t}\n\t.dh-moves[data-n='3'] {\n\t\t--n: 3;\n\t}\n\t.dh-moves[data-n='5'] {\n\t\t--n: 5;\n\t}\n\t.dh-moves[data-n='6'] {\n\t\t--n: 6;\n\t\t--gap: 6px;\n\t\t--key: 44px;\n\t}\n\t.dh-moves[data-n='7'] {\n\t\t--n: 7;\n\t\t--gap: 5px;\n\t\t--key: 44px;\n\t}\n\t.dh-mv {\n\t\tposition: relative;\n\t\tmin-width: 0;\n\t\tborder: 0;\n\t\tpadding: calc((var(--key) - 24px) / 2) 0 0;\n\t\tbackground: none;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tcolor: var(--ink);\n\t\tisolation: isolate;\n\t\ttransition:\n\t\t\ttransform 0.14s var(--ease),\n\t\t\topacity 0.14s var(--ease);\n\t}\n\t/* the badge: holds the refill and the progress, clips them */\n\t.dh-mv-key {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 50%;\n\t\twidth: var(--key);\n\t\theight: var(--key);\n\t\tmargin-left: calc(var(--key) / -2);\n\t\tborder-radius: 50%;\n\t\toverflow: hidden;\n\t\tbackground: var(--ink);\n\t\tbox-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);\n\t}\n\t.dh-mv-fill,\n\t.dh-mv-prog {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\theight: 100%;\n\t\tdisplay: none;\n\t\ttransform-origin: bottom;\n\t}\n\t.dh-mv-i {\n\t\tposition: relative;\n\t\tcolor: #fff;\n\t}\n\t.dh-mv-l {\n\t\tposition: relative;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t\tmargin-top: calc((var(--key) - 24px) / 2 + 6px);\n\t\tfont: 600 12px/1.12 var(--f-b);\n\t\tletter-spacing: -0.005em;\n\t\ttext-align: center;\n\t\twhite-space: nowrap;\n\t}\n\t/* six or seven moves: 44 px badges, labels on up to two lines (\"Between\" is 46 px wide at 11 px,\n\t   a seventh of the row is 48 px). One row, never two: a second row would sit where the thumb\n\t   taps the rhythm. */\n\t.dh-moves[data-n='6'] .dh-mv-l,\n\t.dh-moves[data-n='7'] .dh-mv-l {\n\t\tmargin-top: calc((var(--key) - 24px) / 2 + 5px);\n\t\tfont-size: 11px;\n\t\tline-height: 1.1;\n\t\tletter-spacing: -0.01em;\n\t\twhite-space: normal;\n\t}\n\n\t/* x2, seconds, her discovered taste: small tags pinned to the badge's corner (no reflow) */\n\t.dh-tag,\n\t.dh-sec,\n\t.dh-pref {\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\ttop: -5px;\n\t\theight: 20px;\n\t\tpadding: 0 6px;\n\t\tborder-radius: 10px;\n\t\tpointer-events: none;\n\t\twhite-space: nowrap;\n\t\ttext-align: center;\n\t\tbox-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);\n\t}\n\t.dh-tag,\n\t.dh-sec {\n\t\tright: calc(50% - var(--key) / 2 - 8px);\n\t\tmin-width: 26px;\n\t\tfont: 700 11.5px/20px var(--f-d);\n\t\tfont-variant-numeric: tabular-nums;\n\t}\n\t.dh-moves[data-n='6'] :is(.dh-tag, .dh-sec),\n\t.dh-moves[data-n='7'] :is(.dh-tag, .dh-sec) {\n\t\tright: calc(50% - var(--key) / 2 - 5px);\n\t}\n\t.dh-tag {\n\t\tbackground: #fff;\n\t\tcolor: var(--ink);\n\t\tanimation: dh-tag-in 0.2s var(--ease);\n\t}\n\t@keyframes dh-tag-in {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.6);\n\t\t}\n\t}\n\t.dh-sec {\n\t\tbackground: var(--ink);\n\t\tcolor: #fff;\n\t}\n\t.dh-pref {\n\t\tleft: calc(50% - var(--key) / 2 - 10px);\n\t\theight: 18px;\n\t\tbackground: #fff;\n\t\tcolor: var(--her-text);\n\t\tfont: 700 11px/18px var(--f-b);\n\t\tbox-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);\n\t}\n\t.dh-pref[data-k='not'] {\n\t\tbackground: #e7e3de;\n\t\tcolor: #57524c;\n\t\tbox-shadow: none;\n\t}\n\n\t/* states (data-state): ready | hot | active | cool | busy | off; data-press = finger down;\n\t   data-deny = a press that could not start (shake; the buzz is a no-op on iOS) */\n\t.dh-mv[data-state='hot'] .dh-mv-key {\n\t\tbackground: var(--her-deep);\n\t}\n\t.dh-mv[data-state='hot'] .dh-mv-l {\n\t\tcolor: var(--her-text);\n\t\tfont-weight: 700;\n\t}\n\t.dh-mv[data-state='active'] .dh-mv-key,\n\t.dh-mv[data-press] .dh-mv-key {\n\t\tbackground: #fff;\n\t\tbox-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);\n\t}\n\t.dh-mv[data-state='active'] .dh-mv-i,\n\t.dh-mv[data-press] .dh-mv-i {\n\t\tcolor: var(--ink);\n\t}\n\t/* running: the badge fills up from the bottom while the move plays out */\n\t.dh-mv[data-state='active'] .dh-mv-prog {\n\t\tdisplay: block;\n\t\tbackground: rgba(20, 20, 20, 0.12);\n\t\ttransform: scaleY(var(--p, 0));\n\t}\n\t.dh-mv[data-press] {\n\t\ttransform: scale(0.94);\n\t}\n\t/* recharging: the dark refills from the bottom, the seconds sit on the corner */\n\t.dh-mv[data-state='cool'] .dh-mv-key {\n\t\tbackground: var(--empty);\n\t}\n\t.dh-mv[data-state='cool'] .dh-mv-fill {\n\t\tdisplay: block;\n\t\tbackground: var(--ink);\n\t\ttransform: scaleY(calc(1 - var(--cd, 0)));\n\t}\n\t.dh-mv[data-state='cool'] .dh-mv-i {\n\t\topacity: 0.6;\n\t}\n\t/* a move is running, or he slipped out: every other move waits */\n\t.dh-mv[data-state='busy'] {\n\t\topacity: 0.38;\n\t}\n\t/* the round is over */\n\t.dh-mv[data-state='off'] {\n\t\tcursor: default;\n\t}\n\t.dh-mv[data-state='off'] .dh-mv-key {\n\t\tbackground: rgba(20, 20, 20, 0.07);\n\t\tbox-shadow: none;\n\t}\n\t.dh-mv[data-state='off'] .dh-mv-i,\n\t.dh-mv[data-state='off'] .dh-mv-l {\n\t\tcolor: var(--off);\n\t}\n\t.dh-mv[data-deny] {\n\t\tanimation: dh-deny 0.22s var(--ease);\n\t}\n\t@keyframes dh-deny {\n\t\t25% {\n\t\t\ttransform: translateX(-3px);\n\t\t}\n\t\t60% {\n\t\t\ttransform: translateX(3px);\n\t\t}\n\t}\n\n\t/* =====================================================================================\n\t   FINISH CHOICE: at her climax the move row becomes three choices, same badges\n\t   ===================================================================================== */\n\t.dh-fin-e {\n\t\tfont: 700 11px/1 var(--f-b);\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tcolor: var(--her-text);\n\t}\n\t.dh-fin-q {\n\t\tmargin-top: 6px;\n\t\tfont: 700 28px/1 var(--f-d);\n\t\tletter-spacing: -0.04em;\n\t\tcolor: var(--ink);\n\t}\n\t.dh-moves[data-fin] {\n\t\tmargin-top: 16px;\n\t}\n\t/* the default fills while her shudder runs (~3.4 s): untouched, he finishes there */\n\t.dh-mv[data-default] .dh-mv-prog {\n\t\tdisplay: block;\n\t\tbackground: rgba(255, 255, 255, 0.22);\n\t\ttransform: scaleY(var(--p, 0));\n\t}\n\t.dh-moves[data-fin] + .dh-hint {\n\t\tmargin-top: 14px;\n\t}\n\n\t/* =====================================================================================\n\t   LANDSCAPE PHONE: the plate top-left, the play cluster on the right, the stage clear\n\t   ===================================================================================== */\n\t@container dh (orientation: landscape) and (max-height: 500px) {\n\t\t.dh-scrim {\n\t\t\ttop: 0;\n\t\t\tleft: auto;\n\t\t\twidth: calc(var(--sar) + 390px);\n\t\t\theight: auto;\n\t\t\tbackground: linear-gradient(\n\t\t\t\tto left,\n\t\t\t\trgba(var(--scrim), 0.94) 0%,\n\t\t\t\trgba(var(--scrim), 0.9) 60%,\n\t\t\t\trgba(var(--scrim), 0) 100%\n\t\t\t);\n\t\t}\n\t\t.dh-status {\n\t\t\ttop: 8px;\n\t\t\tright: auto;\n\t\t\twidth: 330px;\n\t\t}\n\t\t.dh-cam {\n\t\t\ttop: calc(10px + var(--st-h));\n\t\t}\n\t\t.dh-sys {\n\t\t\ttop: 6px;\n\t\t}\n\t\t.dh-play {\n\t\t\tleft: auto;\n\t\t\twidth: 312px;\n\t\t\tright: calc(var(--sar) + 12px);\n\t\t\tbottom: calc(var(--sab) + 8px);\n\t\t}\n\t\t.dh-hint {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.dh-moves[data-fin] + .dh-hint {\n\t\t\tdisplay: block;\n\t\t\tmargin-top: 10px;\n\t\t}\n\t\t.dh-cue {\n\t\t\tfont-size: 15px;\n\t\t}\n\t\t.dh-gauge {\n\t\t\twidth: 136px;\n\t\t\theight: 72px;\n\t\t}\n\t\t.dh-moves,\n\t\t.dh-moves[data-n] {\n\t\t\t--key: 44px;\n\t\t\tmargin-top: 8px;\n\t\t}\n\t\t/* five to seven moves wrap to rows of four (the last row centred), labels on one line */\n\t\t.dh-moves:is([data-n='5'], [data-n='6'], [data-n='7']) {\n\t\t\t--gap: 6px;\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.dh-moves:is([data-n='5'], [data-n='6'], [data-n='7']) .dh-mv {\n\t\t\tflex: 0 0 calc((100% - 3 * var(--gap)) / 4);\n\t\t}\n\t\t.dh-moves:is([data-n='6'], [data-n='7']) .dh-mv-l {\n\t\t\tfont-size: 12px;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.dh-cap {\n\t\t\ttop: 74px;\n\t\t\tright: calc(var(--sar) + 320px);\n\t\t}\n\t\t.dh-fin-q {\n\t\t\tfont-size: 24px;\n\t\t}\n\t\t.dh-moves[data-fin] {\n\t\t\tmargin-top: 12px;\n\t\t}\n\t}\n\n\t/* =====================================================================================\n\t   DESKTOP (wide and tall): same layout, the plate held to a measure\n\t   ===================================================================================== */\n\t@container dh (min-width: 900px) and (min-height: 501px) {\n\t\t.dh-status {\n\t\t\tright: auto;\n\t\t\twidth: 420px;\n\t\t}\n\t\t.dh-scrim {\n\t\t\theight: 340px;\n\t\t}\n\t}\n\t@media (hover: hover) and (pointer: fine) {\n\t\t.dh-mv:not([data-state='off']):hover .dh-mv-key {\n\t\t\ttransform: translateY(-1px);\n\t\t}\n\t\t.dh-chip:hover > span,\n\t\t.dh-ib:hover > span {\n\t\t\tbackground: rgba(30, 30, 30, 0.94);\n\t\t}\n\t}\n\n\t/* =====================================================================================\n\t   REDUCED MOTION: no scaling, shaking or throbbing. The beat stays (it is the tempo cue), as a\n\t   fade only.\n\t   ===================================================================================== */\n\t@media (prefers-reduced-motion: reduce) {\n\t\t.dh *,\n\t\t.dh *::before,\n\t\t.dh *::after {\n\t\t\ttransition-duration: 0.01ms !important;\n\t\t}\n\t\t.dh-him[data-edge] .dh-bar > i,\n\t\t.dh-mv[data-deny],\n\t\t.dh-tag,\n\t\t.dh-pick {\n\t\t\tanimation: none;\n\t\t}\n\t\t.dh-cap > div {\n\t\t\tanimation-name: dh-fade;\n\t\t}\n\t\t.dh-gauge .beat {\n\t\t\tanimation-name: dh-beat-fade;\n\t\t}\n\t\t.dh-mv[data-press],\n\t\t.dh-chip:active > span,\n\t\t.dh-ib:active > span {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\t@keyframes dh-fade {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t}\n\t}\n\t@keyframes dh-beat-fade {\n\t\t0% {\n\t\t\topacity: 1;\n\t\t}\n\t\t45%,\n\t\t100% {\n\t\t\topacity: 0.35;\n\t\t}\n\t}\n\n\t/* =====================================================================================\n\t   THE PAGE AROUND IT (the harness the owner played, play/index.html): the HUD is the fixed,\n\t   full-viewport game root, and only its controls and the moves take a finger. Its pause card.\n\t   ===================================================================================== */\n\t.dh {\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tpointer-events: none;\n\t}\n\t.dh-cam,\n\t.dh-sys {\n\t\tpointer-events: auto;\n\t}\n\t/* the end card takes the play cluster's place (the pages mock: the caption goes too) */\n\t.dh[data-phase='over'] .dh-play,\n\t.dh[data-phase='over'] .dh-scrim,\n\t.dh[data-phase='over'] .dh-cap {\n\t\tvisibility: hidden;\n\t}\n\t.card {\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tz-index: 5;\n\t\tdisplay: flex;\n\t\talign-items: flex-end;\n\t\tjustify-content: center;\n\t\tbackground: rgba(20, 18, 17, 0.35);\n\t\tcolor: #1d1b1a;\n\t\tfont: 15px/1.35 var(--font-body);\n\t}\n\t.sheet {\n\t\twidth: 100%;\n\t\tmax-width: 480px;\n\t\tbackground: #fff;\n\t\tborder-radius: 20px 20px 0 0;\n\t\tpadding: 22px 20px calc(env(safe-area-inset-bottom) + 18px);\n\t\tbox-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);\n\t}\n\t/* (the harness's h1 was bold by default; the site's preflight resets headings) */\n\t.sheet h2 {\n\t\tmargin: 0 0 4px;\n\t\tfont-weight: 700;\n\t\tfont-size: 30px;\n\t\tline-height: 1.05;\n\t\tletter-spacing: -0.02em;\n\t}\n\t.sheet p {\n\t\tmargin: 0 0 16px;\n\t\tcolor: #5d5753;\n\t}\n\t.eyebrow {\n\t\tmargin-bottom: 6px;\n\t\tfont-size: 11px;\n\t\tfont-weight: 600;\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tcolor: #8a837e;\n\t}\n\t.btns {\n\t\tdisplay: flex;\n\t\tgap: 10px;\n\t}\n\t.btns button {\n\t\tflex: 1;\n\t\theight: 50px;\n\t\tborder: 0;\n\t\tborder-radius: 14px;\n\t\tfont: 600 16px/1 var(--font-body);\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t.main {\n\t\tbackground: #1d1b1a;\n\t\tcolor: #fff;\n\t}\n\t.alt {\n\t\tbackground: #f3f1ef;\n\t\tcolor: #1d1b1a;\n\t}\n\n\t/* =====================================================================================\n\t   ROUND START · the pages mock's additions to the HUD (duetpages/src/duet.css), 1:1. Before the first tap:\n\t   the close button holds the pause slot, the gear shop chip sits under the right cluster, the\n\t   partner's name sits over the cue. The first tap swaps close for pause and fades the chip.\n\t   ===================================================================================== */\n\t.dh-gear {\n\t\tposition: absolute;\n\t\tz-index: 4;\n\t\tright: calc(var(--sar) + 6px);\n\t\ttop: calc(var(--sat) + 10px + var(--st-h) + 46px);\n\t\tpointer-events: auto;\n\t}\n\t.dh-gear > span {\n\t\tgap: 8px;\n\t\tpadding: 0 12px 0 8px;\n\t}\n\t.dh-sw3 {\n\t\tdisplay: flex;\n\t}\n\t.dh-sw3 i {\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tmargin-left: -5px;\n\t\tborder-radius: 50%;\n\t\tbox-shadow: 0 0 0 1.5px #1c1c1c;\n\t}\n\t.dh-sw3 i:first-child {\n\t\tmargin-left: 0;\n\t}\n\t.dh-with {\n\t\tmargin-bottom: 6px;\n\t\tfont: 700 11.5px/1 var(--f-b);\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tcolor: var(--muted);\n\t}\n\t.dh-with b {\n\t\tcolor: var(--ink);\n\t}\n\t.dh[data-phase='play'] .dh-gear {\n\t\topacity: 0;\n\t\tvisibility: hidden;\n\t\ttransition:\n\t\t\topacity 0.2s var(--ease),\n\t\t\tvisibility 0s 0.2s;\n\t}\n\t/* the scene could not start: one card on the stage, nothing else to press */\n\t.dh-err {\n\t\tposition: absolute;\n\t\tz-index: 5;\n\t\tleft: calc(var(--sal) + 20px);\n\t\tright: calc(var(--sar) + 20px);\n\t\ttop: 50%;\n\t\ttranslate: 0 -50%;\n\t\tmax-width: 360px;\n\t\tmargin: 0 auto;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t\tpadding: 20px;\n\t\tborder-radius: 20px;\n\t\tbackground: #fff;\n\t\tcolor: var(--ink);\n\t\tbox-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);\n\t\tpointer-events: auto;\n\t}\n\t.dh-err h2 {\n\t\tmargin: 4px 0 0;\n\t\tfont: 700 24px/1.05 var(--f-d);\n\t\tletter-spacing: -0.03em;\n\t}\n\t.dh-err p {\n\t\tfont-size: 14.5px;\n\t\tline-height: 1.45;\n\t\tcolor: var(--ink-2, #57524c);\n\t}\n\t.dh-err .row {\n\t\tdisplay: flex;\n\t\tgap: 8px;\n\t\tmargin-top: 10px;\n\t}\n\t.dh-err .row .b {\n\t\tflex: 1;\n\t}\n\t@container dh (orientation: landscape) and (max-height: 500px) {\n\t\t.dh-gear {\n\t\t\ttop: 52px;\n\t\t}\n\t\t/* the end card's landscape panel takes the sound and close corner (it brings its own close) */\n\t\t.dh[data-phase='over'] .dh-sys {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t.dh-dim .dh-status,\n\t.dh-dim .dh-cam,\n\t.dh-dim .dh-sys {\n\t\topacity: 0.5;\n\t}\n\n\t/* visually hidden, still a control (the round's Start for a screen reader) */\n\t.dh-sr {\n\t\tposition: absolute;\n\t\twidth: 1px;\n\t\theight: 1px;\n\t\tpadding: 0;\n\t\tmargin: -1px;\n\t\toverflow: hidden;\n\t\tclip-path: inset(50%);\n\t\twhite-space: nowrap;\n\t\tborder: 0;\n\t\tpointer-events: auto;\n\t}\n\n\t/* the \"tap her clit\" hint: a thin ring on her, one soft pulse in, the HUD's coral at low alpha;\n\t   never in the way of the tap it asks for */\n\t.dh-clit {\n\t\tposition: absolute;\n\t\tz-index: 2;\n\t\tleft: -22px;\n\t\ttop: -22px;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tborder: 2px solid rgba(255, 77, 109, 0.5);\n\t\tborder-radius: 50%;\n\t\ttranslate: var(--x, -100px) var(--y, -100px);\n\t\tpointer-events: none;\n\t\tanimation: dh-clit-in 1.2s var(--ease);\n\t}\n\t@keyframes dh-clit-in {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t\tscale: 0.6;\n\t\t}\n\t\t45% {\n\t\t\topacity: 1;\n\t\t\tscale: 1.15;\n\t\t}\n\t\t100% {\n\t\t\tscale: 1;\n\t\t}\n\t}\n\t/* reduced motion: the ring only, still */\n\t@media (prefers-reduced-motion: reduce) {\n\t\t.dh-clit {\n\t\t\tanimation: none;\n\t\t}\n\t}\n\n\t/* =====================================================================================\n\t   REPLAY (pages mock: \"the replay's stage reuses the HUD's chip, picker and caption\"): the HUD\n\t   inside the replay box, not over the viewport; no status plate, no play cluster, the page's\n\t   transport in the root (children)\n\t   ===================================================================================== */\n\t.dh[data-mode='replay'] {\n\t\tposition: absolute;\n\t\t--sat: 0px;\n\t\t--sab: 0px;\n\t\t--sal: 0px;\n\t\t--sar: 0px;\n\t\t--st-h: 0px;\n\t\t-webkit-user-select: none;\n\t\tuser-select: none;\n\t}\n\t.dh[data-mode='replay'] :is(.dh-status, .dh-play, .dh-scrim) {\n\t\tdisplay: none;\n\t}\n\t.dh[data-mode='replay'] :is(.dh-cam, .dh-sys) {\n\t\ttop: 6px;\n\t}\n\t/* (the live end hides the sound corner on a landscape phone; a replay keeps it) */\n\t.dh[data-mode='replay'] .dh-sys {\n\t\tdisplay: flex;\n\t}\n\t.dh[data-mode='replay'] .dh-cap {\n\t\ttop: 64px;\n\t\tleft: 0;\n\t\tright: 0;\n\t}\n\t.dh[data-mode='replay'] .dh-cap b {\n\t\tfont-size: 24px;\n\t}\n\t/* Free: the seventh choice under the angles, Auto's shape */\n\t.dh-pick .dh-free {\n\t\tmargin-top: 6px;\n\t}\n\t.dh-orbit {\n\t\tposition: absolute;\n\t\tz-index: 3;\n\t\tleft: 50%;\n\t\tbottom: 126px;\n\t\ttranslate: -50% 0;\n\t\tmargin: 0;\n\t\tpadding: 8px 12px;\n\t\tborder-radius: 999px;\n\t\tbackground: rgba(255, 255, 255, 0.85);\n\t\twhite-space: nowrap;\n\t\tfont: 700 11px/1 var(--f-b);\n\t\tletter-spacing: 0.12em;\n\t\ttext-transform: uppercase;\n\t\tcolor: var(--muted);\n\t\tpointer-events: none;\n\t}\n\t.dh-desk {\n\t\tdisplay: none;\n\t}\n\t@media (hover: hover) and (pointer: fine) {\n\t\t.dh-touch {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.dh-desk {\n\t\t\tdisplay: inline;\n\t\t}\n\t}\n\t@container dh (min-width: 400px) {\n\t\t.dh-orbit {\n\t\t\tbottom: 76px;\n\t\t}\n\t}\n</style>\n","// The duet pages' side of the contracts (fleet tasks/2026-11-27-sculpt-vulva-duet/plan.md, \"### 2.\n// Input-log spec and DuetEngine contract\" and S2): the log, the live engine and the server's setup,\n// re-exported as the real ones, and `loadEngine`, the engine's lazy way in.\nimport type { DuetGate, DuetRoundResult, DuetSetup } from '$lib/server/sculpt-duet';\nimport type { DuetEngine, DuetEngineInit, DuetReplayEngine } from '$lib/sculpt/render/duet-engine';\n\n// ---------- the input log (duet-log.ts) ----------\n\nexport type { DuetLog, DuetLogEntry, FinishSpot } from '$lib/sculpt/duet-log';\n\n// ---------- the engine (render/duet-engine.ts) ----------\n\nexport type {\n\tDuetEndState,\n\tDuetEngine,\n\tDuetEngineInit,\n\tDuetFailure,\n\tDuetPhase,\n\tDuetReplayEngine\n} from '$lib/sculpt/render/duet-engine';\n\nexport type CreateDuetEngine = (init: DuetEngineInit) => DuetEngine;\n\n/** The engine module, lazily: its own chunk, so three never reaches SSR or the first paint. A chunk\n *  that doesn't load rejects, and the page shows the stage-error card (its Retry loads it again). */\nexport async function loadEngine(): Promise<CreateDuetEngine> {\n\treturn (await import('$lib/sculpt/render/duet-engine')).createDuetEngine;\n}\n\n// ---------- the replay (plan.md section 2, \"replay (mode 'replay')\"; E3) ----------\n\n/** The engine's speeds (the bar offers 0.5 / 1 / 2). */\nexport type DuetSpeed = Parameters<DuetReplayEngine['setSpeed']>[0];\n\nexport type CreateDuetReplayEngine = (init: DuetEngineInit) => DuetReplayEngine;\n\n/** The engine, for a replay: the same module and create (mode 'replay' gives both halves). A device\n *  without 3D throws on create, and the page shows \"can't play\". */\nexport async function loadReplayEngine(): Promise<CreateDuetReplayEngine> {\n\treturn (await loadEngine()) as CreateDuetReplayEngine;\n}\n\n// ---------- the server (sculpt-duet.ts, S2; types only, erased from the client build) ----------\n\nexport type {\n\tDuetCard,\n\tDuetCardSide,\n\tDuetGate,\n\tDuetPartner,\n\tDuetReplay,\n\tDuetSetup,\n\tDuetTarget\n} from '$lib/server/sculpt-duet';\n\n/** A ready round: S2's setup without a `gate` key (a refused one is only `{ gate }`). */\nexport type DuetRound = Exclude<DuetSetup, { gate: DuetGate }>;\n\n/** POST /api/sculpt/duet's answer. The server's numbers are the round's numbers. */\nexport interface DuetSaved {\n\tcode: string;\n\tresult: DuetRoundResult;\n}\n"],"version":3}