-
discal.dev
-
Subscribe to Discord server events via ICS calendar feeds.
+
+
+
+
+
+ discal.dev
+
+
+ Subscribe to Discord server events via ICS calendar feeds.
+ Sync to Google Calendar, Apple Calendar, Outlook – and the atmosphere.
+
+
+ go to dashboard
+
+
+ get started
+
+
-
- How it works
-
- - Add the discal bot to your Discord server
- - Sign in and configure your timezone and calendar settings
- - Share the calendar URL — anyone can subscribe in Google Calendar, Apple Calendar, Outlook, etc.
- - Optionally connect your AT Protocol account to publish events to the atmosphere
+
+
+
+ how it works
+
+
+ -
+
+
+
+ {{ i + 1 }}
+
+
+
+ {{ step.title }}
+
+
+ {{ step.desc }}
+
+
+
+
+
-
- Features
-
- - Subscribable ICS calendar feed that auto-updates
- - Recurring events with proper timezone and DST handling
- - AT Protocol integration — publish events as
community.lexicon.calendar.event records
- - RSVP via AT Protocol — your attendance is stored in your own data repo
-
+
+
+
+ features
+
+
+
+
+ {{ feature.title }}
+
+
+ {{ feature.desc }}
+
+
+
-
- Get started
-
- Sign in with Discord
- to add your server and get a calendar feed.
-
+
+
+
+
+ get started
+
+
+ Sign in with Discord to add your server and get a calendar feed in seconds.
+
+
+ Sign in with Discord
+
+
diff --git a/nuxt.config.ts b/nuxt.config.ts
index a7db343..057bb32 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -3,6 +3,7 @@ export default defineNuxtConfig({
'@nuxt/eslint',
'@nuxtjs/html-validator',
'@nuxt/fonts',
+ '@nuxtjs/color-mode',
'nuxt-og-image',
'nuxt-auth-utils',
'reka-ui/nuxt',
@@ -19,6 +20,15 @@ export default defineNuxtConfig({
},
},
+ css: [
+ '@unocss/reset/tailwind-compat.css',
+ ],
+
+ colorMode: {
+ classSuffix: '',
+ preference: 'dark',
+ },
+
runtimeConfig: {
discordBotToken: '',
session: {
@@ -47,6 +57,7 @@ export default defineNuxtConfig({
experimental: {
typedPages: true,
+ viewTransition: true,
},
compatibilityDate: '2024-04-03',
diff --git a/package.json b/package.json
index 8904cc2..9dd2eb9 100644
--- a/package.json
+++ b/package.json
@@ -29,6 +29,7 @@
"@atproto/oauth-client-node": "^0.3.17",
"@nuxt/eslint": "^1.15.2",
"@nuxt/fonts": "^0.14.0",
+ "@nuxtjs/color-mode": "^4.0.0",
"@nuxtjs/html-validator": "^2.1.0",
"@takumi-rs/core": "1.0.0-beta.20",
"@touch4it/ical-timezones": "^1.9.0",
@@ -44,6 +45,7 @@
"devDependencies": {
"@nuxt/test-utils": "4.0.0",
"@playwright/test": "1.58.2",
+ "@unocss/reset": "^66.6.7",
"@upstash/redis": "^1.37.0",
"@vite-pwa/assets-generator": "^1.0.2",
"@vite-pwa/nuxt": "^1.1.1",
@@ -56,6 +58,7 @@
"playwright-core": "^1.58.2",
"simple-git-hooks": "2.13.1",
"typescript": "6.0.2",
+ "unocss": "^66.6.7",
"vitest": "^4.1.2",
"vue-tsc": "3.2.6"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index fcebc80..30dc173 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -20,6 +20,9 @@ importers:
'@nuxt/fonts':
specifier: ^0.14.0
version: 0.14.0(@upstash/redis@1.37.0)(db0@0.3.4)(ioredis@5.9.2)(magicast@0.5.2)(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.0)(yaml@2.8.2))
+ '@nuxtjs/color-mode':
+ specifier: ^4.0.0
+ version: 4.0.0(magicast@0.5.2)
'@nuxtjs/html-validator':
specifier: ^2.1.0
version: 2.1.0(magicast@0.5.2)(vitest@4.1.2)
@@ -60,6 +63,9 @@ importers:
'@playwright/test':
specifier: 1.58.2
version: 1.58.2
+ '@unocss/reset':
+ specifier: ^66.6.7
+ version: 66.6.7
'@upstash/redis':
specifier: ^1.37.0
version: 1.37.0
@@ -96,6 +102,9 @@ importers:
typescript:
specifier: 6.0.2
version: 6.0.2
+ unocss:
+ specifier: ^66.6.7
+ version: 66.6.7(@unocss/webpack@66.6.7(webpack@5.105.4(esbuild@0.27.2)))(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.0)(yaml@2.8.2))
vitest:
specifier: ^4.1.2
version: 4.1.2(@types/node@25.0.10)(@vitest/browser-playwright@4.1.2)(happy-dom@20.8.9)(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.32.0)(terser@5.46.0)(yaml@2.8.2))
@@ -1591,6 +1600,9 @@ packages:
'@nuxtjs/color-mode@3.5.2':
resolution: {integrity: sha512-cC6RfgZh3guHBMLLjrBB2Uti5eUoGM9KyauOaYS9ETmxNWBMTvpgjvSiSJp1OFljIXPIqVTJ3xtJpSNZiO3ZaA==}
+ '@nuxtjs/color-mode@4.0.0':
+ resolution: {integrity: sha512-xyaVR/TPLdMuRa2VOgH6b75jvmFEsn9QKL6ISldaAw38ooFJfWY1ts2F3ye43wcT/goCbcuvPuskF2f8yUZhlw==}
+
'@nuxtjs/html-validator@2.1.0':
resolution: {integrity: sha512-ldo8ioSsH3OEumtgwDMokTxlhjgO9FxjJWViAxisq5l/wjvaVX8SYTQ02wjtQcQQPSvS6BwgypAp400RlyFHng==}
@@ -9993,6 +10005,16 @@ snapshots:
transitivePeerDependencies:
- magicast
+ '@nuxtjs/color-mode@4.0.0(magicast@0.5.2)':
+ dependencies:
+ '@nuxt/kit': 4.4.2(magicast@0.5.2)
+ exsolve: 1.0.8
+ pathe: 2.0.3
+ pkg-types: 2.3.0
+ semver: 7.7.4
+ transitivePeerDependencies:
+ - magicast
+
'@nuxtjs/html-validator@2.1.0(magicast@0.5.2)(vitest@4.1.2)':
dependencies:
'@nuxt/kit': 3.21.2(magicast@0.5.2)
diff --git a/server/api/_cron/sync.ts b/server/api/_cron/sync.ts
index e3cc42d..bb04410 100644
--- a/server/api/_cron/sync.ts
+++ b/server/api/_cron/sync.ts
@@ -88,7 +88,8 @@ async function syncGuildEvents(h3Event: Parameters
if (!discordEventIds.has(storedId)) {
const stored = await getEvent(guildId, storedId)
if (stored && (stored.status === 1 || stored.status === 2)) {
- stored.status = 4
+ const eventStarted = new Date(stored.startTime).getTime() <= Date.now()
+ stored.status = eventStarted ? 3 /* completed */ : 4 /* cancelled */
stored.lastSyncedAt = now
await setEvent(stored)
@@ -99,5 +100,17 @@ async function syncGuildEvents(h3Event: Parameters
}
}
+ // Clean up events older than 90 days that are completed or canceled
+ const CLEANUP_AGE_MS = 90 * 24 * 60 * 60 * 1000
+ for (const storedId of storedEventIds) {
+ const stored = await getEvent(guildId, storedId)
+ if (stored && (stored.status === 3 || stored.status === 4)) {
+ const age = Date.now() - new Date(stored.startTime).getTime()
+ if (age > CLEANUP_AGE_MS) {
+ await removeEvent(guildId, storedId)
+ }
+ }
+ }
+
return published
}
diff --git a/server/api/calendar/[slug].get.ts b/server/api/calendar/[slug].get.ts
index 68f9ed0..3ef2541 100644
--- a/server/api/calendar/[slug].get.ts
+++ b/server/api/calendar/[slug].get.ts
@@ -11,6 +11,15 @@ export default defineEventHandler(async (event) => {
const events = await getGuildEvents(guild.id)
+ const now = Date.now()
+ const activeEvents = events
+ .filter(e => e.status === 1 || e.status === 2)
+ .sort((a, b) => new Date(a.startTime).getTime() - new Date(b.startTime).getTime())
+ const pastEvents = events
+ .filter(e => e.status === 3 || (e.status !== 4 && new Date(e.startTime).getTime() < now))
+ .sort((a, b) => new Date(b.startTime).getTime() - new Date(a.startTime).getTime())
+ .slice(0, 20) // Only show the 20 most recent past events
+
return {
guild: {
id: guild.id,
@@ -19,8 +28,7 @@ export default defineEventHandler(async (event) => {
timezone: guild.timezone,
calendarSlug: guild.calendarSlug,
},
- events: events
- .filter(e => e.status === 1 || e.status === 2)
- .sort((a, b) => new Date(a.startTime).getTime() - new Date(b.startTime).getTime()),
+ events: activeEvents,
+ pastEvents,
}
})
diff --git a/server/api/guilds/[guildId]/atproto.delete.ts b/server/api/guilds/[guildId]/atproto.delete.ts
new file mode 100644
index 0000000..2487234
--- /dev/null
+++ b/server/api/guilds/[guildId]/atproto.delete.ts
@@ -0,0 +1,24 @@
+export default defineEventHandler(async (event) => {
+ const { user } = await requireUserSession(event)
+ if (!user.discordId) {
+ throw createError({ statusCode: 403, message: 'Discord login required' })
+ }
+
+ const guildId = getRouterParam(event, 'guildId')
+ if (!guildId) {
+ throw createError({ statusCode: 400, message: 'Missing guild ID' })
+ }
+
+ const guild = await getGuild(guildId)
+ if (!guild) {
+ throw createError({ statusCode: 404, message: 'Guild not found' })
+ }
+ if (guild.addedBy !== user.discordId) {
+ throw createError({ statusCode: 403, message: 'Not authorized' })
+ }
+
+ guild.atprotoDid = null
+ await setGuild(guild)
+
+ return { ok: true }
+})
diff --git a/server/api/guilds/[guildId]/index.get.ts b/server/api/guilds/[guildId]/index.get.ts
index 75ae55d..4a6adf4 100644
--- a/server/api/guilds/[guildId]/index.get.ts
+++ b/server/api/guilds/[guildId]/index.get.ts
@@ -15,9 +15,18 @@ export default defineEventHandler(async (event) => {
atprotoSessionValid = !!session
}
+ const allEvents = await getGuildEvents(guildId)
+ const upcoming = allEvents
+ .filter(e => e.status === 1 || e.status === 2)
+ .sort((a, b) => new Date(a.startTime).getTime() - new Date(b.startTime).getTime())
+ const past = allEvents
+ .filter(e => e.status === 3 || e.status === 4)
+ .sort((a, b) => new Date(b.startTime).getTime() - new Date(a.startTime).getTime())
+
return {
guild,
- events: await getGuildEvents(guildId),
+ events: upcoming,
+ pastEvents: past,
atprotoSessionValid,
}
})
diff --git a/server/utils/atproto.ts b/server/utils/atproto.ts
index bcffc78..893cab2 100644
--- a/server/utils/atproto.ts
+++ b/server/utils/atproto.ts
@@ -8,7 +8,7 @@ import type { StoredEvent, StoredGuild } from './types'
const STATUS_MAP: Record = {
1: 'community.lexicon.calendar.event#scheduled',
2: 'community.lexicon.calendar.event#scheduled',
- 3: 'community.lexicon.calendar.event#scheduled',
+ 3: 'community.lexicon.calendar.event#completed',
4: 'community.lexicon.calendar.event#cancelled',
}
diff --git a/server/utils/ics.ts b/server/utils/ics.ts
index 480ff42..d02423d 100644
--- a/server/utils/ics.ts
+++ b/server/utils/ics.ts
@@ -23,7 +23,7 @@ export function generateCalendar(guild: StoredGuild, events: StoredEvent[]): str
const calendar = icalGenerator(calendarData)
for (const event of events) {
- if (event.status === 3 || event.status === 4) continue
+ if (event.status === 4) continue
const eventData: ICalEventData = {
id: `discord-${event.id}@discal.dev`,
diff --git a/uno.config.ts b/uno.config.ts
new file mode 100644
index 0000000..3b90aa3
--- /dev/null
+++ b/uno.config.ts
@@ -0,0 +1,350 @@
+import {
+ defineConfig,
+ presetUno,
+ transformerDirectives,
+} from 'unocss'
+
+export default defineConfig({
+ presets: [
+ presetUno({
+ dark: 'class',
+ }),
+ ],
+
+ transformers: [
+ transformerDirectives(),
+ ],
+
+ // ── Semantic color tokens via CSS variables ────────────────────────
+ // Templates only ever use these names (bg-surface, text-ink, etc.)
+ // Light/dark values are swapped via :root / .dark selectors in preflights.
+ // Fonts are loaded by @nuxt/fonts (auto-detected from font-family references).
+ theme: {
+ fontFamily: {
+ sans: 'Nunito, ui-sans-serif, system-ui, sans-serif',
+ mono: 'JetBrains Mono, ui-monospace, monospace',
+ },
+ colors: {
+ primary: {
+ DEFAULT: 'rgb(var(--c-primary) / %alpha)',
+ hover: 'rgb(var(--c-primary-hover) / %alpha)',
+ active: 'rgb(var(--c-primary-active) / %alpha)',
+ subtle: 'rgb(var(--c-primary-subtle) / %alpha)',
+ muted: 'rgb(var(--c-primary-muted) / %alpha)',
+ text: 'rgb(var(--c-primary-text) / %alpha)',
+ },
+ accent: {
+ DEFAULT: 'rgb(var(--c-accent) / %alpha)',
+ hover: 'rgb(var(--c-accent-hover) / %alpha)',
+ active: 'rgb(var(--c-accent-active) / %alpha)',
+ subtle: 'rgb(var(--c-accent-subtle) / %alpha)',
+ muted: 'rgb(var(--c-accent-muted) / %alpha)',
+ text: 'rgb(var(--c-accent-text) / %alpha)',
+ ink: 'rgb(var(--c-accent-ink) / %alpha)',
+ },
+ blush: {
+ DEFAULT: 'rgb(var(--c-blush) / %alpha)',
+ subtle: 'rgb(var(--c-blush-subtle) / %alpha)',
+ },
+ surface: {
+ DEFAULT: 'rgb(var(--c-surface) / %alpha)',
+ raised: 'rgb(var(--c-surface-raised) / %alpha)',
+ sunken: 'rgb(var(--c-surface-sunken) / %alpha)',
+ overlay: 'var(--c-surface-overlay)',
+ },
+ ink: {
+ DEFAULT: 'rgb(var(--c-ink) / %alpha)',
+ secondary: 'rgb(var(--c-ink-secondary) / %alpha)',
+ muted: 'rgb(var(--c-ink-muted) / %alpha)',
+ inverse: 'rgb(var(--c-ink-inverse) / %alpha)',
+ },
+ line: {
+ DEFAULT: 'rgb(var(--c-line) / %alpha)',
+ subtle: 'rgb(var(--c-line-subtle) / %alpha)',
+ strong: 'rgb(var(--c-line-strong) / %alpha)',
+ },
+ success: {
+ DEFAULT: 'rgb(var(--c-success) / %alpha)',
+ subtle: 'rgb(var(--c-success-subtle) / %alpha)',
+ text: 'rgb(var(--c-success-text) / %alpha)',
+ },
+ danger: {
+ DEFAULT: 'rgb(var(--c-danger) / %alpha)',
+ subtle: 'rgb(var(--c-danger-subtle) / %alpha)',
+ text: 'rgb(var(--c-danger-text) / %alpha)',
+ },
+ warning: {
+ DEFAULT: 'rgb(var(--c-warning) / %alpha)',
+ subtle: 'rgb(var(--c-warning-subtle) / %alpha)',
+ text: 'rgb(var(--c-warning-text) / %alpha)',
+ },
+ },
+ },
+
+ shortcuts: {
+ // ── Layout ─────────────────────────────────────
+ 'page-container': 'max-w-3xl mx-auto px-4 sm:px-6 lg:px-8',
+
+ // ── Buttons ────────────────────────────────────
+ 'btn': 'inline-flex items-center justify-center gap-2 rounded-full font-600 transition-all duration-200 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary select-none',
+ 'btn-sm': 'btn px-3.5 py-1.5 text-sm',
+ 'btn-md': 'btn px-5 py-2.5 text-sm',
+ 'btn-lg': 'btn px-7 py-3 text-base',
+ 'btn-primary': 'btn-md bg-primary text-ink-inverse hover:bg-primary-hover active:bg-primary-active shadow-sm hover:shadow-md active:shadow-sm',
+ 'btn-secondary': 'btn-md bg-primary-subtle text-primary-text hover:bg-primary-muted active:bg-primary-subtle border border-primary/20',
+ 'btn-accent': 'btn-md bg-accent text-accent-ink hover:bg-accent-hover active:bg-accent-active shadow-sm hover:shadow-md',
+ 'btn-ghost': 'btn-md text-ink-secondary hover:bg-line/50 hover:text-ink active:bg-line/70',
+ 'btn-danger': 'btn-md bg-danger text-ink-inverse hover:bg-danger/90 active:bg-danger/80',
+ 'btn-icon': 'btn p-2 rounded-xl text-ink-secondary hover:bg-line/50 hover:text-ink',
+
+ // ── Cards ──────────────────────────────────────
+ 'card': 'rounded-2xl border border-line bg-surface transition-all duration-200',
+ 'card-interactive': 'card group/card hover:border-primary/40 hover:shadow-md cursor-pointer',
+ 'card-highlight': 'card border-primary/30 bg-primary-subtle/30',
+
+ // ── Badges ─────────────────────────────────────
+ 'badge': 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-600',
+ 'badge-primary': 'badge bg-primary-subtle text-primary-text',
+ 'badge-accent': 'badge bg-accent-muted text-accent-text',
+ 'badge-success': 'badge bg-success-subtle text-success-text',
+ 'badge-blush': 'badge bg-blush-subtle text-primary-text',
+
+ // ── Form elements ──────────────────────────────
+ 'input-base': 'w-full rounded-xl border border-line bg-surface px-4 py-2.5 text-sm text-ink placeholder:text-ink-muted transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary',
+ 'select-base': 'input-base appearance-none cursor-pointer',
+
+ // ── Code ───────────────────────────────────────
+ 'code-block': 'block w-full rounded-xl bg-surface-sunken border border-line px-4 py-3 text-sm font-mono text-ink overflow-x-auto',
+ 'code-inline': 'rounded-md bg-surface-sunken border border-line px-1.5 py-0.5 text-sm font-mono text-primary-text',
+
+ // ── Skeleton loading ───────────────────────────
+ 'skeleton': 'rounded-xl bg-surface-raised border border-line animate-skeleton-glow',
+ 'skeleton-text': 'skeleton h-4 rounded-md',
+ 'skeleton-heading': 'skeleton h-8 w-48 rounded-lg',
+ 'skeleton-card': 'skeleton h-32 rounded-2xl',
+
+ // ── Section/page titles ────────────────────────
+ 'heading-1': 'text-3xl sm:text-4xl font-800 text-ink tracking-tight',
+ 'heading-2': 'text-xl sm:text-2xl font-700 text-ink tracking-tight',
+ 'heading-3': 'text-lg font-700 text-ink',
+ 'text-body': 'text-base text-ink-secondary leading-relaxed',
+ 'text-small': 'text-sm text-ink-muted',
+
+ // ── Gradient text ──────────────────────────────
+ 'gradient-text': 'bg-gradient-to-r from-primary via-primary-active to-accent bg-clip-text text-transparent',
+
+ // ── Dialog ─────────────────────────────────────
+ 'dialog-overlay': 'fixed inset-0 bg-ink/30 backdrop-blur-sm z-50 animate-fade-in',
+ 'dialog-content': 'fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 w-[calc(100vw-2rem)] max-w-md rounded-2xl bg-surface border border-line shadow-xl p-6 animate-scale-in',
+
+ // ── Nav items (consistent height) ──────────────
+ 'nav-item': 'inline-flex items-center justify-center h-8 px-3 rounded-lg text-sm font-500 text-ink-secondary hover:bg-line/50 hover:text-ink transition-colors duration-150 cursor-pointer select-none',
+ 'nav-badge': 'inline-flex items-center h-8 rounded-lg px-3 text-xs font-600 bg-primary-subtle text-primary-text gap-1.5',
+
+ // ── Misc ───────────────────────────────────────
+ 'glass': 'bg-surface-overlay backdrop-blur-lg border-b border-line-subtle',
+ 'focus-ring': 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary',
+ 'link': 'text-primary hover:text-primary-hover underline underline-offset-2 decoration-primary/30 hover:decoration-primary/60 transition-colors duration-150',
+ },
+
+ rules: [
+ [/^animate-skeleton-glow$/, () => ({ animation: 'skeleton-glow 2.5s ease-in-out infinite' })],
+ [/^animate-sparkle$/, () => ({ animation: 'sparkle 2s ease-in-out infinite' })],
+ [/^animate-float$/, () => ({ animation: 'float 3s ease-in-out infinite' })],
+ [/^animate-fade-in$/, () => ({ animation: 'fade-in 200ms ease-out' })],
+ [/^animate-scale-in$/, () => ({ animation: 'scale-in 200ms ease-out' })],
+ [/^animate-bounce-in$/, () => ({ animation: 'bounce-in 500ms cubic-bezier(0.34, 1.56, 0.64, 1)' })],
+ [/^animate-pulse-dot$/, () => ({ animation: 'pulse-dot 2s ease-in-out infinite' })],
+ [/^animate-spin-slow$/, () => ({ animation: 'spin 2s linear infinite' })],
+ ],
+
+ preflights: [
+ {
+ getCSS: () => /* css */`
+ /* ── Light mode (default) ─────────────────────── */
+ :root {
+ /* Brand: violet */
+ --c-primary: 139 92 246;
+ --c-primary-hover: 124 58 237;
+ --c-primary-active: 109 40 217;
+ --c-primary-subtle: 237 233 254;
+ --c-primary-muted: 221 214 254;
+ --c-primary-text: 91 33 182;
+
+ /* Brand: gold */
+ --c-accent: 251 191 36;
+ --c-accent-hover: 245 158 11;
+ --c-accent-active: 217 119 6;
+ --c-accent-subtle: 255 251 235;
+ --c-accent-muted: 253 230 138;
+ --c-accent-text: 180 83 9;
+ --c-accent-ink: 78 53 5;
+
+ /* Blush */
+ --c-blush: 249 168 212;
+ --c-blush-subtle: 252 231 243;
+
+ /* Mascot (fixed, not theme-dependent) */
+ --c-mascot-ball-highlight: #e8e8f0;
+ --c-mascot-ball-mid: #c0c0d4;
+ --c-mascot-ball-edge: #8888aa;
+ --c-mascot-ball-stroke: #7777a0;
+ --c-mascot-facet: rgba(153, 153, 187, 0.35);
+ --c-mascot-white: #ffffff;
+ --c-mascot-eye: #1e1b4b;
+ --c-mascot-shadow: rgba(0, 0, 0, 0.04);
+
+ /* Surface */
+ --c-surface: 255 255 255;
+ --c-surface-raised: 250 248 255;
+ --c-surface-sunken: 240 238 245;
+ --c-surface-overlay: rgba(255, 255, 255, 0.85);
+
+ /* Ink (text) */
+ --c-ink: 30 27 75;
+ --c-ink-secondary: 119 119 160;
+ --c-ink-muted: 153 153 187;
+ --c-ink-inverse: 255 255 255;
+
+ /* Lines (borders) */
+ --c-line: 232 232 240;
+ --c-line-subtle: 240 238 245;
+ --c-line-strong: 192 192 212;
+
+ /* Feedback */
+ --c-success: 34 197 94;
+ --c-success-subtle: 240 253 244;
+ --c-success-text: 21 128 61;
+ --c-danger: 239 68 68;
+ --c-danger-subtle: 254 242 242;
+ --c-danger-text: 185 28 28;
+ --c-warning: 245 158 11;
+ --c-warning-subtle: 255 251 235;
+ --c-warning-text: 180 83 9;
+
+ color-scheme: light;
+ }
+
+ /* ── Dark mode ────────────────────────────────── */
+ .dark {
+ --c-primary: 167 139 250;
+ --c-primary-hover: 196 181 253;
+ --c-primary-active: 139 92 246;
+ --c-primary-subtle: 30 27 75;
+ --c-primary-muted: 46 38 94;
+ --c-primary-text: 196 181 253;
+
+ --c-accent: 251 191 36;
+ --c-accent-hover: 252 211 77;
+ --c-accent-active: 245 158 11;
+ --c-accent-subtle: 30 25 15;
+ --c-accent-muted: 50 40 20;
+ --c-accent-text: 253 230 138;
+ --c-accent-ink: 78 53 5;
+
+ --c-blush: 244 114 182;
+ --c-blush-subtle: 40 20 32;
+
+ --c-mascot-ball-highlight: #d0d0e0;
+ --c-mascot-ball-mid: #9999bb;
+ --c-mascot-ball-edge: #666688;
+ --c-mascot-ball-stroke: #555580;
+ --c-mascot-facet: rgba(200, 200, 230, 0.2);
+ --c-mascot-shadow: rgba(0, 0, 0, 0.15);
+
+ --c-surface: 15 10 26;
+ --c-surface-raised: 26 26 46;
+ --c-surface-sunken: 10 6 18;
+ --c-surface-overlay: rgba(15, 10, 26, 0.85);
+
+ --c-ink: 240 238 245;
+ --c-ink-secondary: 153 153 187;
+ --c-ink-muted: 119 119 160;
+ --c-ink-inverse: 30 27 75;
+
+ --c-line: 51 51 85;
+ --c-line-subtle: 35 35 60;
+ --c-line-strong: 85 85 128;
+
+ --c-success: 74 222 128;
+ --c-success-subtle: 10 30 20;
+ --c-success-text: 134 239 172;
+ --c-danger: 248 113 113;
+ --c-danger-subtle: 35 15 15;
+ --c-danger-text: 252 165 165;
+ --c-warning: 251 191 36;
+ --c-warning-subtle: 30 25 15;
+ --c-warning-text: 253 230 138;
+
+ color-scheme: dark;
+ }
+
+ /* ── Keyframes ────────────────────────────────── */
+ @keyframes skeleton-glow {
+ 0%, 100% { border-color: rgb(var(--c-line)); opacity: 0.7; }
+ 50% { border-color: rgb(var(--c-primary) / 0.25); opacity: 1; }
+ }
+ @keyframes sparkle {
+ 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
+ 50% { opacity: 0.6; transform: scale(0.85) rotate(15deg); }
+ }
+ @keyframes float {
+ 0%, 100% { transform: translateY(0); }
+ 50% { transform: translateY(-8px); }
+ }
+ @keyframes fade-in {
+ from { opacity: 0; }
+ to { opacity: 1; }
+ }
+ @keyframes scale-in {
+ from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
+ to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
+ }
+ @keyframes bounce-in {
+ from { opacity: 0; transform: scale(0.9); }
+ to { opacity: 1; transform: scale(1); }
+ }
+ @keyframes pulse-dot {
+ 0%, 100% { opacity: 1; transform: scale(1); }
+ 50% { opacity: 0.5; transform: scale(1.3); }
+ }
+
+ /* ── View Transitions ─────────────────────────── */
+ ::view-transition-old(root) {
+ animation: 150ms ease-out both fade-out;
+ }
+ ::view-transition-new(root) {
+ animation: 150ms ease-in both fade-in, 200ms ease-out both slide-in;
+ }
+ @keyframes fade-out {
+ to { opacity: 0; }
+ }
+ @keyframes slide-in {
+ from { transform: translateY(8px); }
+ }
+
+ /* Respect reduced motion */
+ @media (prefers-reduced-motion: reduce) {
+ *, *::before, *::after {
+ animation-duration: 0.01ms !important;
+ animation-iteration-count: 1 !important;
+ transition-duration: 0.01ms !important;
+ }
+ ::view-transition-old(root),
+ ::view-transition-new(root) {
+ animation: none !important;
+ }
+ }
+
+ /* ── Base ─────────────────────────────────────── */
+ body {
+ font-family: Nunito, ui-sans-serif, system-ui, sans-serif;
+ background-color: rgb(var(--c-surface));
+ color: rgb(var(--c-ink));
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+ `,
+ },
+ ],
+})