{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"breath-pacer-ring","type":"registry:component","title":"Breath Pacer Ring","description":"A breathing guide in soft light: a grained halo swells as you breathe in and settles as you breathe out, a thin ring traces each phase and the seconds count down; it starts only when asked.","dependencies":[],"registryDependencies":[],"files":[{"path":"components/viberdy/breath-pacer-ring.tsx","content":"\"use client\";\n\nimport { useEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { CSSProperties, PointerEvent as ReactPointerEvent, ReactNode } from \"react\";\n\n/**\n * BreathPacer — a breathing guide in soft light.\n *\n * A grained halo swells as you breathe in and settles as you breathe out\n * (four in, six out by default, with an optional hold), a thin ring traces\n * each phase and the seconds count down in the middle. It starts only when\n * asked, pauses and resumes where it was, and rests after the set number of\n * breaths. Each phase is announced once for screen readers; under reduced\n * motion the halo stays still and the words and count guide the breath.\n *\n * Part of the Diffused Glow kit: a warm bone day (#f6f1e6) and a jade room\n * (#0b120f); soft, grained halos in gold, rose or jade (or any #rrggbb), at\n * most two per view; a serif through var(--font-serif) over Geist. Respects\n * prefers-reduced-motion. No dependencies beyond React. Paste it as its own\n * file: it repeats the kit's small helpers, which would clash in one module.\n * For the serif, load Fraunces with next/font (variable: \"--font-serif\") on a parent.\n */\n\nconst SANS = 'var(--font-sans, \"Geist\", \"Inter\", ui-sans-serif, system-ui, sans-serif)';\n\nconst MONO = 'var(--font-mono, \"Geist Mono\", ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace)';\n\nconst SERIF = 'var(--font-serif, \"Fraunces\", \"Iowan Old Style\", \"Palatino Linotype\", Georgia, serif)';\n\nconst EASE = \"cubic-bezier(0.22, 1, 0.36, 1)\";\n\nconst HEX = /^#[0-9a-fA-F]{6}$/;\n\n/** The two grounds the kit is set on: the warm day and the jade room. */\nconst TONES = {\n  day: {\n    ground: \"#f6f1e6\",\n    panel: \"#efe7d6\",\n    raised: \"#fbf8f1\",\n    ink: \"rgba(34,31,26,0.92)\",\n    ink2: \"rgba(34,31,26,0.58)\",\n    ink3: \"rgba(34,31,26,0.4)\",\n    line: \"rgba(34,31,26,0.09)\",\n    line2: \"rgba(34,31,26,0.18)\",\n    shadow: \"0 30px 80px -20px rgba(40,30,10,0.14)\",\n  },\n  jewel: {\n    ground: \"#0b120f\",\n    panel: \"#101c17\",\n    raised: \"#16261f\",\n    ink: \"rgba(243,237,226,0.94)\",\n    ink2: \"rgba(243,237,226,0.63)\",\n    ink3: \"rgba(243,237,226,0.4)\",\n    line: \"rgba(243,237,226,0.08)\",\n    line2: \"rgba(243,237,226,0.16)\",\n    shadow: \"0 40px 100px -24px rgba(0,0,0,0.5)\",\n  },\n} as const;\n\nexport type DgTone = keyof typeof TONES;\n\n/** The bronze accent, used only as light. */\nconst BRONZE = \"#c9a15e\";\n\n/** The one filled action in the kit: booking. */\nconst JADE_FILL = \"#2f6f57\";\n\n/** Halo colours. Gold and rose belong to the jade room; jade is the day's own light. */\nexport const DG_GLOWS = {\n  gold: \"#f5c48c\",\n  rose: \"#f2a39a\",\n  jade: \"#bcd9c8\",\n} as const;\n\nfunction own<T extends object>(map: T, key: string): key is Extract<keyof T, string> {\n  return Object.prototype.hasOwnProperty.call(map, key);\n}\n\n/** A named glow or a #rrggbb; anything else falls back to gold. */\nfunction glowHex(value: string): string {\n  if (own(DG_GLOWS, value)) return DG_GLOWS[value];\n  return HEX.test(value) ? value : DG_GLOWS.gold;\n}\n\nfunction toneOf(value: string) {\n  return own(TONES, value) ? TONES[value] : TONES.day;\n}\n\nfunction rgbOf(hex: string): [number, number, number] {\n  const n = parseInt(hex.slice(1), 16);\n  return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n}\n\nfunction rgba(hex: string, a: number): string {\n  const [r, g, b] = rgbOf(hex);\n  return `rgba(${r},${g},${b},${a})`;\n}\n\n/**\n * Grain as an SVG turbulence tile. It is only ever laid inside a light (masked\n * to the halo's shape), never over the whole page: grain belongs to the glow.\n */\nconst GRAIN_URL = `url(\"data:image/svg+xml,${encodeURIComponent(\n  \"<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0.9 0'/></filter><rect width='160' height='160' filter='url(#g)'/></svg>\",\n)}\")`;\n\n/** Links: strip tabs and newlines, refuse backslashes, allow http(s), mailto, tel and same-site paths. */\nfunction safeHref(raw: string): string {\n  const v = raw.replace(/[\\t\\n\\r]/g, \"\").trim();\n  if (!v || v.includes(\"\\\\\")) return \"#\";\n  if (/^(https?:|mailto:|tel:)/i.test(v)) return v;\n  if (/^[/#?]/.test(v) && !/^\\/\\//.test(v)) return v;\n  return \"#\";\n}\n\nfunction subscribeMotion(cb: () => void) {\n  const m = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n  m.addEventListener(\"change\", cb);\n  return () => m.removeEventListener(\"change\", cb);\n}\n\n/** True when the visitor asked for reduced motion. False on the server. */\nfunction useReducedMotion(): boolean {\n  return useSyncExternalStore(\n    subscribeMotion,\n    () => window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches,\n    () => false,\n  );\n}\n\n// Each part carries only the CSS it needs, so any one of them works on its own.\n// Nothing is interpolated into these sheets; colours arrive as CSS variables.\n// revert-layer keeps an element's own rounded corners when a host page's focus rule flattens them.\nconst FOCUS_CSS = \".dg-scope :focus-visible,.dg-scope:focus-visible{outline:2px solid var(--dg-ring);outline-offset:3px;border-radius:revert-layer}\";\n\n/** The focus ring colour for a ground: bronze light on the jade room, jade on the day. */\nfunction ringVar(tone: string): CSSProperties {\n  return { \"--dg-ring\": tone === \"jewel\" ? BRONZE : JADE_FILL } as CSSProperties;\n}\n\n// Registered, so the inner light glides in CSS (a soft 600ms settle) without a render per pointer move.\nconst GLOW_BTN_CSS =\n  \"@property --dg-gx{syntax:'<percentage>';inherits:true;initial-value:30%}\" +\n  \"@property --dg-gy{syntax:'<percentage>';inherits:true;initial-value:30%}\" +\n  \".dg-glow{transition:--dg-gx 600ms \" + EASE + \",--dg-gy 600ms \" + EASE + \",transform 420ms \" + EASE + \",background-color 300ms ease}\" +\n  \".dg-glow:active{transform:scale(0.97)}\" +\n  \".dg-glow .dg-bloom{opacity:0;transform:scale(0.85);transition:opacity 450ms \" + EASE + \",transform 450ms \" + EASE + \"}\" +\n  \".dg-glow:hover .dg-bloom,.dg-glow:focus-visible .dg-bloom{opacity:1;transform:scale(1)}\" +\n  \"@keyframes dg-exhale{from{transform:translate(-50%,-50%) scale(0.3);opacity:0.9}to{transform:translate(-50%,-50%) scale(1.6);opacity:0}}\" +\n  \"@media (prefers-reduced-motion: reduce){.dg-glow,.dg-glow .dg-bloom{transition:none}.dg-glow:active{transform:none}.dg-exhale{display:none}}\";\n\nexport type SoftGlowButtonProps = {\n  children: ReactNode;\n  /** Renders a link when set, else a button. */\n  href?: string;\n  onClick?: () => void;\n  /** The ground it sits on: \"jewel\" (the dark jade room) or \"day\" (warm bone). */\n  tone?: DgTone;\n  /** \"solid\": the one booking action. \"quiet\": a hairline pill for the second action. */\n  variant?: \"solid\" | \"quiet\";\n  /** The light's colour: gold, rose, jade or a #rrggbb. */\n  glow?: string;\n  size?: \"md\" | \"lg\";\n  type?: \"button\" | \"submit\";\n  disabled?: boolean;\n  className?: string;\n};\n\n/**\n * A pill with a light inside it. A soft, grained glow follows the pointer\n * across the pill with a slow settle (eased in CSS through registered custom\n * properties, so moving costs no renders), and a diffused bloom rises behind\n * it on hover or focus. A press sinks the pill slightly and the light exhales:\n * a soft ring spreads from where you pressed and fades. Solid is jade on the\n * day ground and lit glass in the jade room; quiet is a hairline pill whose\n * light only wakes under the pointer.\n */\nexport function SoftGlowButton({\n  children,\n  href,\n  onClick,\n  tone = \"day\",\n  variant = \"solid\",\n  glow,\n  size = \"md\",\n  type = \"button\",\n  disabled,\n  className,\n}: SoftGlowButtonProps) {\n  const t = toneOf(tone);\n  const light = glowHex(glow ?? (tone === \"jewel\" ? \"gold\" : \"jade\"));\n  const [exhales, setExhales] = useState<{ id: number; x: number; y: number }[]>([]);\n  const nextId = useRef(0);\n  const solid = variant === \"solid\";\n  const dark = tone === \"jewel\";\n\n  const onMove = (e: ReactPointerEvent<HTMLElement>) => {\n    const r = e.currentTarget.getBoundingClientRect();\n    e.currentTarget.style.setProperty(\"--dg-gx\", `${(((e.clientX - r.left) / (r.width || 1)) * 100).toFixed(1)}%`);\n    e.currentTarget.style.setProperty(\"--dg-gy\", `${(((e.clientY - r.top) / (r.height || 1)) * 100).toFixed(1)}%`);\n  };\n  const onDown = (e: ReactPointerEvent<HTMLElement>) => {\n    const r = e.currentTarget.getBoundingClientRect();\n    const id = ++nextId.current;\n    setExhales((all) => [...all.slice(-2), { id, x: e.clientX - r.left, y: e.clientY - r.top }]);\n  };\n\n  const h = size === \"lg\" ? 54 : 46;\n  const fill = solid ? (dark ? \"rgba(243,237,226,0.08)\" : JADE_FILL) : \"transparent\";\n  const style: CSSProperties = {\n    ...ringVar(tone),\n    height: h,\n    padding: size === \"lg\" ? \"0 30px\" : \"0 22px\",\n    fontFamily: SANS,\n    fontSize: size === \"lg\" ? 16 : 15,\n    fontWeight: 500,\n    color: solid && !dark ? \"#f6f1e6\" : t.ink,\n    backgroundColor: fill,\n    boxShadow: solid\n      ? dark\n        ? `inset 0 0 0 1px ${t.line2}, inset 0 1px 0 rgba(243,237,226,0.12)`\n        : \"inset 0 1px 0 rgba(255,255,255,0.18), 0 18px 40px -18px rgba(47,111,87,0.6)\"\n      : `inset 0 0 0 1px ${t.line2}`,\n    opacity: disabled ? 0.5 : 1,\n    cursor: disabled ? \"not-allowed\" : \"pointer\",\n  };\n  const inner = (\n    <>\n      {/* The bloom behind the pill. */}\n      <span\n        aria-hidden\n        className=\"dg-bloom pointer-events-none absolute -inset-x-[30%] -inset-y-[90%] -z-10 rounded-full\"\n        style={{ background: `radial-gradient(closest-side, ${rgba(light, dark ? 0.32 : 0.45)}, ${rgba(light, 0)})`, filter: \"blur(6px)\" }}\n      />\n      {/* The light inside it, grained, following the pointer. */}\n      <span aria-hidden className=\"pointer-events-none absolute inset-0 overflow-hidden rounded-full\">\n        <span\n          className=\"absolute inset-0\"\n          style={{\n            background: `radial-gradient(60% 120% at var(--dg-gx) var(--dg-gy), ${rgba(light, solid ? (dark ? 0.42 : 0.5) : 0.3)}, ${rgba(light, 0)} 70%)`,\n            opacity: solid ? 1 : 0.9,\n          }}\n        />\n        <span\n          className=\"absolute inset-0\"\n          style={{\n            backgroundImage: GRAIN_URL,\n            mixBlendMode: \"overlay\",\n            opacity: 0.5,\n            WebkitMaskImage: \"radial-gradient(60% 120% at var(--dg-gx) var(--dg-gy), #000, transparent 70%)\",\n            maskImage: \"radial-gradient(60% 120% at var(--dg-gx) var(--dg-gy), #000, transparent 70%)\",\n          }}\n        />\n        {exhales.map((x) => (\n          <span\n            key={x.id}\n            className=\"dg-exhale absolute rounded-full\"\n            onAnimationEnd={() => setExhales((all) => all.filter((y) => y.id !== x.id))}\n            style={{\n              left: x.x,\n              top: x.y,\n              width: h * 3,\n              height: h * 3,\n              background: `radial-gradient(closest-side, ${rgba(light, 0.55)}, ${rgba(light, 0)})`,\n              animation: `dg-exhale 900ms ${EASE} forwards`,\n            }}\n          />\n        ))}\n      </span>\n      <span className=\"relative inline-flex items-center gap-2\">{children}</span>\n    </>\n  );\n  const cls =\n    \"dg-scope dg-glow relative isolate inline-flex select-none items-center justify-center whitespace-nowrap rounded-full\" +\n    (className ? \" \" + className : \"\");\n  return (\n    <>\n      <style>{GLOW_BTN_CSS + FOCUS_CSS}</style>\n      {href && !disabled ? (\n        <a href={safeHref(href)} onClick={onClick} onPointerMove={onMove} onPointerDown={onDown} className={cls} style={style}>\n          {inner}\n        </a>\n      ) : (\n        <button type={type} onClick={onClick} onPointerMove={onMove} onPointerDown={disabled ? undefined : onDown} disabled={disabled} className={cls} style={style}>\n          {inner}\n        </button>\n      )}\n    </>\n  );\n}\n\ntype BreathPhase = \"in\" | \"hold\" | \"out\";\n\nexport type BreathPacerProps = {\n  /** Seconds breathing in, holding and breathing out. 4 / 0 / 6 is a calm, common count. */\n  inhale?: number;\n  hold?: number;\n  exhale?: number;\n  /** How many breaths before it rests. */\n  cycles?: number;\n  tone?: DgTone;\n  glow?: string;\n  /** Diameter of the pacer in px. */\n  size?: number;\n  labels?: { in: string; hold: string; out: string; begin: string; pause: string; again: string; done: string };\n  className?: string;\n};\n\n/**\n * A breathing guide: a soft, grained halo that swells as you breathe in and\n * settles as you breathe out, with a thin ring tracing each phase and the\n * seconds counting down in the middle. It only starts when asked (Begin),\n * pauses and resumes where it was, and rests after the set number of breaths.\n * The phase is announced once per change for screen readers. Under reduced\n * motion the halo stays still and the words and count still guide the\n * breath.\n */\nexport function BreathPacer({\n  inhale = 4,\n  hold = 0,\n  exhale = 6,\n  cycles = 6,\n  tone = \"day\",\n  glow,\n  size = 280,\n  labels = { in: \"Breathe in\", hold: \"Hold\", out: \"Breathe out\", begin: \"Begin\", pause: \"Pause\", again: \"Once more\", done: \"That is enough. Come in when you are ready.\" },\n  className,\n}: BreathPacerProps) {\n  const t = toneOf(tone);\n  const light = glowHex(glow ?? (tone === \"jewel\" ? \"gold\" : \"jade\"));\n  const reduced = useReducedMotion();\n  const [running, setRunning] = useState(false);\n  const [phase, setPhase] = useState<BreathPhase | \"rest\" | \"done\">(\"rest\");\n  const [count, setCount] = useState(0);\n  const [cycle, setCycle] = useState(0);\n  const haloRef = useRef<HTMLSpanElement>(null);\n  const ringRef = useRef<SVGCircleElement>(null);\n  const clock = useRef({ offset: 0, since: 0 });\n  const R = 46;\n  const C = 2 * Math.PI * R;\n\n  useEffect(() => {\n    if (!running) return;\n    const inS = Math.max(1, Math.min(30, inhale));\n    const holdS = Math.max(0, Math.min(30, hold));\n    const outS = Math.max(1, Math.min(30, exhale));\n    const len = inS + holdS + outS;\n    const total = Math.max(1, Math.min(100, cycles));\n    const ck = clock.current;\n    ck.since = performance.now();\n    let raf = 0;\n    let lastPhase = \"\";\n    let lastCount = -1;\n    let lastCycle = -1;\n    const ease = (p: number) => 0.5 - 0.5 * Math.cos(Math.PI * p);\n    const step = () => {\n      const elapsed = ck.offset + (performance.now() - ck.since) / 1000;\n      const c = Math.floor(elapsed / len);\n      if (c >= total) {\n        ck.offset = 0;\n        setRunning(false);\n        setPhase(\"done\");\n        if (haloRef.current) haloRef.current.style.transform = \"scale(0.7)\";\n        if (ringRef.current) ringRef.current.style.strokeDashoffset = String(C);\n        return;\n      }\n      const w = elapsed - c * len;\n      let ph: BreathPhase;\n      let p: number;\n      let left: number;\n      if (w < inS) {\n        ph = \"in\";\n        p = w / inS;\n        left = inS - w;\n      } else if (w < inS + holdS) {\n        ph = \"hold\";\n        p = (w - inS) / holdS;\n        left = inS + holdS - w;\n      } else {\n        ph = \"out\";\n        p = (w - inS - holdS) / outS;\n        left = len - w;\n      }\n      const scale = ph === \"in\" ? 0.55 + 0.45 * ease(p) : ph === \"hold\" ? 1 : 1 - 0.45 * ease(p);\n      if (haloRef.current && !reduced) haloRef.current.style.transform = `scale(${scale.toFixed(4)})`;\n      if (ringRef.current) ringRef.current.style.strokeDashoffset = (C * (1 - p)).toFixed(2);\n      if (ph !== lastPhase) {\n        lastPhase = ph;\n        setPhase(ph);\n      }\n      const secs = Math.ceil(left);\n      if (secs !== lastCount) {\n        lastCount = secs;\n        setCount(secs);\n      }\n      if (c !== lastCycle) {\n        lastCycle = c;\n        setCycle(c);\n      }\n      raf = requestAnimationFrame(step);\n    };\n    raf = requestAnimationFrame(step);\n    return () => {\n      cancelAnimationFrame(raf);\n      // Keep where we were, so Begin resumes.\n      ck.offset += (performance.now() - ck.since) / 1000;\n    };\n  }, [running, inhale, hold, exhale, cycles, reduced, C]);\n\n  const toggle = () => {\n    if (phase === \"done\") {\n      clock.current.offset = 0;\n      setCycle(0);\n    }\n    setRunning((r) => !r);\n  };\n\n  const word = phase === \"in\" ? labels.in : phase === \"hold\" ? labels.hold : phase === \"out\" ? labels.out : \"\";\n  return (\n    <div className={\"dg-scope flex flex-col items-center\" + (className ? \" \" + className : \"\")} style={{ ...ringVar(tone), color: t.ink, fontFamily: SANS }}>\n      <style>{FOCUS_CSS}</style>\n      <div className=\"relative grid place-items-center\" style={{ width: size, height: size }}>\n        <span aria-hidden className=\"absolute inset-0 rounded-full\" style={{ boxShadow: `inset 0 0 0 1px ${t.line2}` }} />\n        <span ref={haloRef} aria-hidden className=\"absolute inset-[6%] rounded-full\" style={{ transform: \"scale(0.7)\", willChange: \"transform\" }}>\n          <span className=\"absolute inset-0 rounded-full\" style={{ background: `radial-gradient(closest-side, ${rgba(light, tone === \"jewel\" ? 0.8 : 0.85)}, ${rgba(light, 0.25)} 60%, ${rgba(light, 0)})` }} />\n          <span\n            className=\"absolute inset-0 rounded-full\"\n            style={{ backgroundImage: GRAIN_URL, mixBlendMode: \"overlay\", opacity: 0.65, WebkitMaskImage: \"radial-gradient(closest-side, #000, transparent)\", maskImage: \"radial-gradient(closest-side, #000, transparent)\" }}\n          />\n        </span>\n        <svg aria-hidden viewBox=\"0 0 100 100\" className=\"absolute inset-0 h-full w-full -rotate-90\">\n          <circle ref={ringRef} cx=\"50\" cy=\"50\" r={R} fill=\"none\" stroke={tone === \"jewel\" ? \"rgba(243,237,226,0.7)\" : \"rgba(34,31,26,0.55)\"} strokeWidth=\"0.6\" strokeDasharray={C} strokeDashoffset={C} strokeLinecap=\"round\" />\n        </svg>\n        <div className=\"relative text-center\">\n          {phase === \"rest\" || phase === \"done\" ? (\n            <p className=\"m-0 text-[12px] uppercase tracking-[0.16em]\" style={{ fontFamily: MONO, color: t.ink2 }}>\n              In for {inhale}\n              {hold > 0 ? ` · hold ${hold}` : \"\"} · out for {exhale}\n            </p>\n          ) : (\n            <p className=\"m-0 text-[30px] italic leading-none\" style={{ fontFamily: SERIF, fontWeight: 360 }}>\n              {word}\n            </p>\n          )}\n          {running && (\n            <p className=\"m-0 mt-3 text-[13px] tabular-nums\" style={{ fontFamily: MONO, color: t.ink2 }}>\n              {count}\n            </p>\n          )}\n        </div>\n      </div>\n      <p role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n        {phase === \"done\" ? labels.done : running ? word : \"\"}\n      </p>\n      {phase === \"done\" && (\n        <p className=\"m-0 mt-6 max-w-[30ch] text-center text-[15px] leading-relaxed\" style={{ color: t.ink2 }}>\n          {labels.done}\n        </p>\n      )}\n      <div className=\"mt-6 flex items-center gap-4\">\n        <SoftGlowButton tone={tone} variant=\"quiet\" glow={glow} onClick={toggle}>\n          {running ? labels.pause : phase === \"done\" ? labels.again : labels.begin}\n        </SoftGlowButton>\n        {(running || (phase !== \"rest\" && phase !== \"done\")) && (\n          <span className=\"text-[12px] uppercase tracking-[0.16em]\" style={{ fontFamily: MONO, color: t.ink3 }}>\n            {Math.min(cycle + 1, Math.max(1, cycles))} / {Math.max(1, cycles)}\n          </span>\n        )}\n      </div>\n    </div>\n  );\n}\n","type":"registry:component","target":"components/viberdy/breath-pacer-ring.tsx"}],"meta":{"tier":"free","tags":["breathing","meditation","wellness","animation","timer","guide","glow","svg"],"href":"https://viberdy.dev/library/breath-pacer-ring","aiPrompt":"Build a React + Tailwind component, `BreathPacer({ inhale, hold, exhale, cycles, tone, glow, size, labels })`, a breathing guide in soft light.\n\nA square stage (`size` px): a hairline circle, a halo span at inset 6% (a closest-side radial in the light colour plus a masked grain tile) scaled 0.55 to 1.0, an SVG ring (r 46 in a 100 viewBox, rotated -90deg, 0.6 stroke) whose dash offset traces the current phase, and centred text (the phase word in italic serif, the seconds in mono; at rest a mono line 'In for 4 · out for 6'). Below, a quiet SoftGlowButton (Begin / Pause / Once more) and a mono 'n / total'. While running, one rAF loop reads performance.now() (one clock), splits the cycle into in, hold and out, sets the halo's scale with a sine ease (0.55 + 0.45 ease on the inhale, 1 during the hold, back down on the exhale) and the ring's dash offset, and sets state only when the phase, the whole second or the cycle changes. Keep an elapsed offset in a ref so Pause resumes; after `cycles` breaths stop and show the closing line. Announce each phase once in a polite sr-only status. Reduced motion: no scaling.\n\nDiffused Glow grammar: two grounds, a warm bone day (#f6f1e6; panels #efe7d6, raised #fbf8f1; ink #221f1a at 92/58/40%; hairlines at 9% and 18%) and a near-black jade room (#0b120f; panels #101c17 and #16261f; ink #f3ede2 at 94/63/40%). Light is soft and grained: halos in gold #f5c48c, rose #f2a39a and, on the day ground, jade #bcd9c8 (or any #rrggbb validated against /^#[0-9a-fA-F]{6}$/), never more than two per view, each a wide gaussian skirt with a warmer core, and the grain lives inside the light (an SVG feTurbulence tile masked to the halo, or noise in the shader), never as a page overlay. In the jade room light is added (screen blend); on the day ground it pools as colour (the paper takes the tint). One bronze accent #c9a15e used as light and one jade fill #2f6f57 kept for the booking action; one filled action per view. A serif (Fraunces by default, through var(--font-serif, \"Fraunces\", Georgia, serif)) at 340-400 for display with 0.98-1.04 leading and *italic* accents, over Geist for UI and Geist Mono uppercase captions. Radii 24-28px on panels, pills for controls; feathered shadows only. Motion is slow: halos breathe on about 10s, drift on 36s or longer and settle toward the pointer over about 900ms (1 - e^(-3dt)); resolves run 700-1100ms out of a blur on cubic-bezier(0.16, 1, 0.3, 1); hovers under 450ms. Keyframes and a focus ring (a .dg-scope rule with border-radius: revert-layer) live in a small static <style> the component renders itself; nothing is interpolated into it. Respect prefers-reduced-motion. No dependencies beyond React.","license":"https://viberdy.dev/license"}}