From a84a36349bbbd08dcd2d3e71ca7ec4f220dc8933 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Mon, 19 Oct 2026 07:48:07 +0000 Subject: [PATCH] Fix critical and high audit findings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed findings from the audit reports (SECURITY, QUALITY, PERFORMANCE): - P-001 · Dashboard re-downloads the entire dataset every 5 seconds Re-synced the vendored shared/ snapshot from shared commit 199a5ef. Co-Authored-By: Claude Haiku 5.5 --- PERFORMANCE_REPORT.md | 21 +- backend/data.go | 8 +- backend/sync.go | 74 +- backend/web.go | 46 +- backend/web_test.go | 26 + shared/.changeset/user-management-roles.md | 5 - shared/README.md | 69 +- shared/backend/mediacore/mediacore.go | 67 +- shared/backend/mediacore/mediacore_test.go | 164 + shared/backend/syncsocket/syncsocket.go | 34 +- shared/backend/syncsocket/syncsocket_test.go | 46 + shared/package-lock.json | 8 - shared/package.json | 1 - .../gabriel20xx/shared/auth/AuthClient.java | 6 +- .../shared/auth/AuthClientTest.java | 28 + .../packages/legacy-assets/.stylelintrc.json | 15 - shared/packages/legacy-assets/README.md | 16 - shared/packages/legacy-assets/package.json | 13 - .../legacy-assets/public/css/index.css | 5202 ----------------- .../packages/node-backend/src/authclient.js | 12 +- .../node-backend/test/authclient.test.js | 23 + .../src/shared_backend/authproxy.py | 19 + .../python-backend/tests/test_authproxy.py | 40 +- .../lib/components/MediaPlayerControls.svelte | 3 + .../src/lib/components/UserManagement.svelte | 286 - shared/packages/web-ui/src/lib/index.ts | 6 - .../web-ui/src/lib/primary-color.svelte.ts | 52 +- shared/packages/web-ui/src/lib/styles.css | 142 - shared/packages/web-ui/src/lib/types.ts | 17 +- .../media/enforce-design-system-css.mjs | 117 - shared/shared-styles.css | 142 - 31 files changed, 653 insertions(+), 6055 deletions(-) create mode 100644 backend/web_test.go delete mode 100644 shared/.changeset/user-management-roles.md create mode 100644 shared/backend/mediacore/mediacore_test.go create mode 100644 shared/backend/syncsocket/syncsocket_test.go delete mode 100644 shared/packages/legacy-assets/.stylelintrc.json delete mode 100644 shared/packages/legacy-assets/README.md delete mode 100644 shared/packages/legacy-assets/package.json delete mode 100644 shared/packages/legacy-assets/public/css/index.css delete mode 100644 shared/packages/web-ui/src/lib/components/UserManagement.svelte delete mode 100644 shared/scripts/media/enforce-design-system-css.mjs diff --git a/PERFORMANCE_REPORT.md b/PERFORMANCE_REPORT.md index 31b97c2..fdb2752 100644 --- a/PERFORMANCE_REPORT.md +++ b/PERFORMANCE_REPORT.md @@ -6,33 +6,36 @@ - **Commit:** 6aec03f on main - **Working tree:** clean (no uncommitted changes, no untracked files) - **Stack:** Go 1.26 (net/http, pgx v5) API server; PostgreSQL; SvelteKit 2 / Svelte 5 static SPA (Vite 8, TanStack Query) embedded in the Go binary; Android client (Kotlin, Room, Retrofit) with offline sync; Docker multi-stage image on `scratch`; GitHub Actions. +- **Updated:** 2026-10-19 — Critical and High findings handled in the working tree (not committed). - **Scope:** Read all first-party backend code (`backend/*.go`, including tests), `docker/Dockerfile`, `.dockerignore`, `.github/workflows/*`, the frontend data layer, list components, routes and Vite config, the Android API client, preferences and sync repository, and the shared auth, postgres and authclient code that CollabTable calls. Excluded: `node_modules`, `frontend/.svelte-kit`, the Gradle wrapper, lock files (read for versions only), build output, and the rest of `shared/` (node, python and java packages, which CollabTable does not use). Tracked SQLite files were inspected read-only from a copy (schema and row counts only). No tests, builds or linters were run; the analysis is static. ## Summary -| Severity | Count | -|---|---:| -| Critical | 0 | -| High | 2 | -| Medium | 5 | -| Low | 3 | -| Info | 1 | +| Severity | Count | Fixed | Not reproduced | Open | +|---|---:|---:|---:|---:| +| Critical | 0 | 0 | 0 | 0 | +| High | 2 | 1 | 0 | 1 | +| Medium | 5 | 0 | 0 | 5 | +| Low | 3 | 0 | 0 | 3 | +| Info | 1 | 0 | 0 | 1 | Two structural costs dominate: the dashboard re-downloads the full database every 5 seconds, and sync writes row by row with several round trips per value inside one long transaction. Missing indexes and pagination will make both worse as data grows. ## Issues -### P-001 · Dashboard re-downloads the entire dataset every 5 seconds · **High** +### P-001 · Dashboard re-downloads the entire dataset every 5 seconds · **High** · Fixed - **Location:** `backend/web.go:9-29` (four unpaginated queries), `backend/data.go:68-204` (no LIMIT in any query builder), `backend/web.go:74-76` (`no-store`), `frontend/src/lib/features/lists/listsData.svelte.js:4,10`, `frontend/src/lib/api.js:27-29` - **Description:** `createOverviewData()` polls `/web/data` with `refetchInterval: 5000`. Each response contains every non-deleted list, every field, every item and every item value, with no pagination, no `since` filter and no HTTP caching (`Cache-Control: no-store`). The server already computes per-list effective update times (`web.go:31-72`), but the client has no way to use them to skip unchanged data. TanStack Query's default is to poll only while the tab is visible, so each open dashboard pays this cost. - **Impact:** Transfer, JSON encoding and client re-rendering all scale with total data size rather than with the amount of change. With a few thousand items and several viewers this is continuous multi-megabyte traffic and repeated full re-renders. - **Recommendation:** Serve changes incrementally with a `since` cursor (as sync already does), or add an ETag derived from the maximum `updatedat` and answer `304` when nothing changed, dropping `no-store` for that path. Compress the response (see P-006). Consider a longer interval or server push for the dashboard. +- **Status:** Fixed 2026-10-19 — `/web/data` now sends a weak ETag over the response data (the per-request timestamp is excluded), answers `304` when `If-None-Match` matches, and uses `Cache-Control: private, no-cache` instead of `no-store`, so an unchanged poll sends no body. A `max(updatedat)` validator was rejected because client-supplied timestamps can move backwards and hard deletes leave no trace. Residual: changed data is still sent in full, the server still runs the four queries on every poll, and browsers may now keep a private on-disk copy of the dashboard data, which `no-store` previously prevented. Files: `backend/web.go`, `backend/data.go` (stable tie-break order), `backend/web_test.go`. -### P-002 · Sync issues several statements per row inside one long transaction · **High** +### P-002 · Sync issues several statements per row inside one long transaction · **High** · Open - **Location:** `backend/sync.go:61-209` (the transaction closure). For item values, `sync.go:172-207`: `listid` lookup (`:175`), `EXISTS` on items (`:185`), optional stub insert (`:193`), upsert (`:198`) and a notification insert (`:206`). Per-row upserts at `sync.go:64-79`, `:104-126`, `:149-164`. Request size is capped at 50 MB by `backend/server.go:253-259`. - **Description:** Every list, field, item and value in a request is processed one at a time with separate statements. Each item value needs four to five round trips, plus a notification row per change, and the whole batch holds row locks until commit. There is no cap on the number of rows per request. - **Impact:** An initial sync or a large offline push (potentially thousands of rows) becomes thousands of sequential round trips. The transaction stays open for the whole batch, and the 60-second `WriteTimeout` (`server.go:123`) can cut the request off. The device then retries and repeats the same work, and concurrent devices contend on the same rows. - **Recommendation:** Batch the writes, using `pgx.Batch` or multi-row `INSERT ... SELECT FROM unnest(...)` upserts per table. Load the field-to-list map once per request instead of once per value. Insert notifications as one multi-row statement per request. Cap rows per request, return `413` above the cap, and have clients chunk their pushes. +- **Status:** Open 2026-10-19 — partly addressed: `backend/sync.go` now resolves each request's fields and items in two statements (`valueReferences`) instead of up to two lookups per value, which removes the per-value reads. Still needed: the list, field, item and value upserts and their notification inserts still run one statement at a time inside one transaction, so this needs `pgx.Batch` or `unnest` bulk upserts; the per-request row cap with `413` is a client-facing change and needs CollabTableAndroid to chunk pushes first. Not measured against PostgreSQL, since none is available in this environment. ### P-003 · No index on `updatedat`, so every delta query scans the table · **Medium** - **Location:** `backend/db.go:40-189` (indexes exist only on `fields.listid`, `items.listid`, `item_values.itemid`, `item_values.fieldid`, and notifications `createdat` and `listid`, at `:83-86` and `:97-98`). Queries filtering on `updatedat`: `backend/data.go:75`, `:108`, `:145`, `:178`; sync calls at `backend/sync.go:220-235`. diff --git a/backend/data.go b/backend/data.go index 27820f1..67eccad 100644 --- a/backend/data.go +++ b/backend/data.go @@ -79,7 +79,7 @@ func (d *DB) queryLists(ctx context.Context, includeDeleted bool, since *int64) if len(conditions) > 0 { query += " WHERE " + strings.Join(conditions, " AND ") } - query += " ORDER BY updatedat DESC" + query += " ORDER BY updatedat DESC, id" rows, err := d.pool.Query(ctx, query, args...) if err != nil { @@ -116,7 +116,7 @@ func (d *DB) queryFields(ctx context.Context, includeDeleted bool, since *int64, if len(conditions) > 0 { query += " WHERE " + strings.Join(conditions, " AND ") } - query += ` ORDER BY "order" ASC` + query += ` ORDER BY "order" ASC, id` rows, err := d.pool.Query(ctx, query, args...) if err != nil { @@ -152,7 +152,7 @@ func (d *DB) queryItems(ctx context.Context, includeDeleted bool, since *int64, if len(conditions) > 0 { query += " WHERE " + strings.Join(conditions, " AND ") } - query += " ORDER BY updatedat DESC" + query += " ORDER BY updatedat DESC, id" rows, err := d.pool.Query(ctx, query, args...) if err != nil { @@ -185,7 +185,7 @@ func (d *DB) queryValues(ctx context.Context, since *int64, itemID string) ([]It if len(conditions) > 0 { query += " WHERE " + strings.Join(conditions, " AND ") } - query += " ORDER BY updatedat ASC" + query += " ORDER BY updatedat ASC, id" rows, err := d.pool.Query(ctx, query, args...) if err != nil { diff --git a/backend/sync.go b/backend/sync.go index 8dba43b..f08ffb2 100644 --- a/backend/sync.go +++ b/backend/sync.go @@ -1,7 +1,7 @@ package main import ( - "errors" + "context" "fmt" "net/http" "time" @@ -42,6 +42,55 @@ func normalizeEntityTimestamps(createdAt, updatedAt, now int64) (int64, int64) { return created, updated } +// valueReferences returns the list ID of each field and the existence of each +// item that the values refer to, using one statement per table. +func valueReferences(ctx context.Context, tx pgx.Tx, values []ItemValue) (map[string]string, map[string]bool, error) { + fieldLists := make(map[string]string) + existingItems := make(map[string]bool) + if len(values) == 0 { + return fieldLists, existingItems, nil + } + fieldIDs := make([]string, 0, len(values)) + itemIDs := make([]string, 0, len(values)) + for _, value := range values { + fieldIDs = append(fieldIDs, value.FieldID) + itemIDs = append(itemIDs, value.ItemID) + } + + fieldRows, err := tx.Query(ctx, `SELECT id, listid FROM fields WHERE id = ANY($1)`, fieldIDs) + if err != nil { + return nil, nil, err + } + defer fieldRows.Close() + for fieldRows.Next() { + var fieldID, listID string + if err := fieldRows.Scan(&fieldID, &listID); err != nil { + return nil, nil, err + } + fieldLists[fieldID] = listID + } + if err := fieldRows.Err(); err != nil { + return nil, nil, err + } + + itemRows, err := tx.Query(ctx, `SELECT id FROM items WHERE id = ANY($1)`, itemIDs) + if err != nil { + return nil, nil, err + } + defer itemRows.Close() + for itemRows.Next() { + var itemID string + if err := itemRows.Scan(&itemID); err != nil { + return nil, nil, err + } + existingItems[itemID] = true + } + if err := itemRows.Err(); err != nil { + return nil, nil, err + } + return fieldLists, existingItems, nil +} + func (s *Server) handleSync(w http.ResponseWriter, r *http.Request) { var request SyncRequest if err := decodeJSON(r, &request); err != nil { @@ -169,23 +218,23 @@ func (s *Server) handleSync(w http.ResponseWriter, r *http.Request) { } } + // Resolve the fields and items the values refer to once per request, not once + // per value. Items are read after the item loop above, so this request's own + // item inserts are visible. + fieldLists, existingItems, err := valueReferences(r.Context(), tx, request.ItemValues) + if err != nil { + return err + } + for _, value := range request.ItemValues { updatedAt := normalizeTimestamp(int64(value.UpdatedAt), now, now) - var listID string - fieldErr := tx.QueryRow(r.Context(), `SELECT listid FROM fields WHERE id = $1`, value.FieldID).Scan(&listID) - if errors.Is(fieldErr, pgx.ErrNoRows) { + listID, ok := fieldLists[value.FieldID] + if !ok { orphans = append(orphans, OrphanValue{ID: value.ID, ItemID: value.ItemID, FieldID: value.FieldID, Reason: "missingField"}) continue } - if fieldErr != nil { - return fieldErr - } - var itemExists bool - if err := tx.QueryRow(r.Context(), `SELECT EXISTS(SELECT 1 FROM items WHERE id = $1)`, value.ItemID).Scan(&itemExists); err != nil { - return err - } - if !itemExists { + if !existingItems[value.ItemID] { if _, err := tx.Exec(r.Context(), ` INSERT INTO items (id, listid, createdat, updatedat, isdeleted) VALUES ($1, $2, $3, $3, 0) @@ -194,6 +243,7 @@ func (s *Server) handleSync(w http.ResponseWriter, r *http.Request) { orphans = append(orphans, OrphanValue{ID: value.ID, ItemID: value.ItemID, FieldID: value.FieldID, Reason: "failedCreateStubItem"}) continue } + existingItems[value.ItemID] = true } if _, err := tx.Exec(r.Context(), ` INSERT INTO item_values (id, itemid, fieldid, value, updatedat) diff --git a/backend/web.go b/backend/web.go index 34c4214..2c73239 100644 --- a/backend/web.go +++ b/backend/web.go @@ -1,8 +1,12 @@ package main import ( + "crypto/sha256" + "encoding/hex" + "encoding/json" "net/http" "strconv" + "strings" "time" ) @@ -71,10 +75,7 @@ func (s *Server) handleWebData(w http.ResponseWriter, r *http.Request) { webLists = append(webLists, webList{List: list, EffectiveUpdatedAt: effective}) } - w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate") - w.Header().Set("Pragma", "no-cache") - w.Header().Set("Expires", "0") - writeJSON(w, http.StatusOK, map[string]any{ + payload := map[string]any{ "lists": webLists, "fields": fields, "items": items, @@ -85,8 +86,41 @@ func (s *Server) handleWebData(w http.ResponseWriter, r *http.Request) { "items": len(items), "values": len(values), }, - "timestamp": time.Now().UnixMilli(), - }) + } + // The ETag covers the data only; the timestamp is added after hashing because + // it changes on every request. + body, err := json.Marshal(payload) + if err != nil { + writeJSONError(w, http.StatusInternalServerError, "Failed to fetch data") + return + } + digest := sha256.Sum256(body) + etag := `W/"` + hex.EncodeToString(digest[:]) + `"` + // Browsers may keep this per-user response, but revalidate it on every poll, + // so an unchanged dashboard gets a 304 instead of the full body. + w.Header().Set("Cache-Control", "private, no-cache") + w.Header().Set("ETag", etag) + if etagMatches(r.Header.Get("If-None-Match"), etag) { + w.WriteHeader(http.StatusNotModified) + return + } + payload["timestamp"] = time.Now().UnixMilli() + writeJSON(w, http.StatusOK, payload) +} + +// etagMatches reports whether an If-None-Match header matches etag under the +// weak comparison of RFC 9110, which ignores the W/ prefix. +func etagMatches(ifNoneMatch, etag string) bool { + if strings.TrimSpace(ifNoneMatch) == "*" { + return true + } + want := strings.TrimPrefix(etag, "W/") + for _, candidate := range strings.Split(ifNoneMatch, ",") { + if strings.TrimPrefix(strings.TrimSpace(candidate), "W/") == want { + return true + } + } + return false } func (s *Server) handleNotificationPoll(w http.ResponseWriter, r *http.Request) { diff --git a/backend/web_test.go b/backend/web_test.go new file mode 100644 index 0000000..78464ff --- /dev/null +++ b/backend/web_test.go @@ -0,0 +1,26 @@ +package main + +import "testing" + +func TestEtagMatchesUsesWeakComparison(t *testing.T) { + const etag = `W/"abc"` + cases := []struct { + name string + ifNoneMatch string + want bool + }{ + {name: "missing header", ifNoneMatch: "", want: false}, + {name: "same weak tag", ifNoneMatch: `W/"abc"`, want: true}, + {name: "strong form of same tag", ifNoneMatch: `"abc"`, want: true}, + {name: "one of several tags", ifNoneMatch: `"x", W/"abc"`, want: true}, + {name: "different tag", ifNoneMatch: `W/"def"`, want: false}, + {name: "wildcard", ifNoneMatch: "*", want: true}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + if got := etagMatches(tc.ifNoneMatch, etag); got != tc.want { + t.Fatalf("etagMatches(%q) = %v, want %v", tc.ifNoneMatch, got, tc.want) + } + }) + } +} diff --git a/shared/.changeset/user-management-roles.md b/shared/.changeset/user-management-roles.md deleted file mode 100644 index fea0f60..0000000 --- a/shared/.changeset/user-management-roles.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gabriel20xx/web-ui": minor ---- - -`UserManagement` accepts an optional `roles` prop (`KnownRole[]`) in place of the `projects` prop it replaces: when present, each account gets a role picker (checkboxes in the add and edit rows, the role names in the read-only row), and `onCreate`/`onUpdate` receive a `roleIds: number[]` field. An account's projects now come from its roles, so per-account project checkboxes are gone. `ManagedUser` carries `roleIds` instead of `projects`. Only AuthGuard's own admin UI passes this prop today; every other consumer is unaffected. diff --git a/shared/README.md b/shared/README.md index d195268..bc9c9c6 100644 --- a/shared/README.md +++ b/shared/README.md @@ -21,7 +21,6 @@ The single source of truth for code reused across every project in this workspac |---|---|---| | `@gabriel20xx/design-tokens` | CSS | Colors, typography, spacing, radii, shadows, light/dark theme variables. | | `@gabriel20xx/web-ui` | Svelte | Shared application shell and reusable UI components. The complete public component inventory is documented below. | -| `@gabriel20xx/legacy-assets` | Browser JS/CSS | Legacy client-side assets, kept for a handful of older pages. | | `repos.gfranz.ch/Gabriel20xx/shared/backend` | Go | Env config, `pgx` pools/transactions, auth persistence, an AuthGuard client (`authclient`), log shipping (`logshipper`), embedded Goose migrations, and the media-family's shared route/table surface (`mediaauth`, `mediacore`, `carriernodeclient`, `syncsocket`). | | `@gabriel20xx/node-backend` | Node.js | `pg` pool/config/transactions/migrations, auth/session persistence, an AuthGuard client. | | `gabriel20xx-shared-backend` | Python | `asyncpg` pool/config, auth/session persistence, an AuthGuard client. | @@ -29,34 +28,64 @@ The single source of truth for code reused across every project in this workspac ### Public `web-ui` components -These are the complete Svelte component exports from `packages/web-ui/src/lib/index.ts` (22 components): +These are the complete Svelte component exports from `packages/web-ui/src/lib/index.ts` (22 components), grouped by purpose. + +#### Layout and navigation + +| Component | Includes | +|---|---| +| `AppShell` | Application layout that composes the header, notification stack, theme, and primary-color handling. | +| `Header` | Branded application header with navigation, icons, actions, profile/settings menus, and logout. | + +#### Buttons and controls + +| Component | Includes | +|---|---| +| `Button` | Button with primary, secondary, outline, ghost, and danger variants; multiple sizes and full-width mode. | +| `Pagination` | Page navigation and page-size selection with total/item counts. | +| `PrimaryColorPicker` | Per-project primary-color selector backed by the shared color persistence helpers. | + +#### Dialogs | Component | Includes | |---|---| | `AboutDialog` | About modal with application branding, description, version, links, and custom content. | -| `AppShell` | Application layout that composes the header, notification stack, theme, and primary-color handling. | -| `AuthPage` | Login, first-time setup, password-reset, and optional TOTP authentication flows. | -| `Badge` | Small inline label with default, primary, success, warning, and danger variants. | -| `Button` | Button with primary, secondary, outline, ghost, and danger variants; multiple sizes and full-width mode. | -| `Card` | Styled content section for grouping application content. | | `Dialog` | Generic modal dialog with title, description, body, footer, and bindable open state. | -| `EmptyState` | Empty-content message with an inbox icon, title, and description. | -| `Header` | Branded application header with navigation, icons, actions, profile/settings menus, and logout. | -| `MediaPlayer` | Audio/video player with playback, seeking, volume, quality, fullscreen, keyboard controls, and custom end controls. | -| `MediaPlayerControls` | Reusable media controls for playback, seeking, volume, quality, fullscreen, optional graph toggling, and custom end controls. | -| `Metric` | Labeled metric/value display with optional detail and semantic variants. | -| `NotificationStack` | Global stack of dismissible success, error, warning, and informational notifications. | -| `Pagination` | Page navigation and page-size selection with total/item counts. | -| `PrimaryColorPicker` | Per-project primary-color selector backed by the shared color persistence helpers. | -| `ProfileDialog` | Profile username/email/password editing and TOTP settings. | -| `SectionTitle` | Section heading with optional description. | | `SettingsDialog` | Generic settings modal with custom content or a default empty-settings message. | + +#### Content and data display + +| Component | Includes | +|---|---| +| `Badge` | Small inline label with default, primary, success, warning, and danger variants. | +| `Card` | Styled content section for grouping application content. | +| `EmptyState` | Empty-content message with an inbox icon, title, and description. | +| `Metric` | Labeled metric/value display with optional detail and semantic variants. | +| `SectionTitle` | Section heading with optional description. | + +#### Feedback and status + +| Component | Includes | +|---|---| +| `NotificationStack` | Global stack of dismissible success, error, warning, and informational notifications. | | `StatusDialog` | Detailed service health/readiness status modal with refresh support. | | `StatusWidget` | Header-friendly health/readiness indicator that polls `/healthz` and `/ready` and opens `StatusDialog`. | -| `TotpSettings` | TOTP status, setup, enable, and disable controls. | -| `UserManagement` | Role-aware user administration with listing, creation, editing, deletion, role assignment, and pagination. | -This inventory describes the public component API only; the package also exports notification helpers, primary-color helpers, and TypeScript types. When a public component is added, removed, renamed, or materially changes responsibility, update this table in the same change as `packages/web-ui/src/lib/index.ts`. Keep the table aligned with that barrel file, and do not add internal or generated components to it. +#### Media + +| Component | Includes | +|---|---| +| `MediaPlayer` | Audio/video player with playback, seeking, volume, quality, fullscreen, keyboard controls, and custom end controls. | + +#### Accounts and access + +| Component | Includes | +|---|---| +| `AuthPage` | Login, first-time setup, password-reset, and optional TOTP authentication flows. | +| `ProfileDialog` | Profile username/email/password editing and TOTP settings. | +| `TotpSettings` | TOTP status, setup, enable, and disable controls. | + +This inventory describes the public component API only; the package also exports notification helpers, primary-color helpers, and TypeScript types. When a public component is added, removed, renamed, or materially changes responsibility, update the matching category table in the same change as `packages/web-ui/src/lib/index.ts`. Keep the tables aligned with that barrel file, place each component in the category that matches its primary purpose, and do not add internal or generated components to them. The `web-ui` components don't import `$app/state`, `$lib` stores, or a project-specific API — applications provide those through props and callbacks. diff --git a/shared/backend/mediacore/mediacore.go b/shared/backend/mediacore/mediacore.go index 9351990..74de436 100644 --- a/shared/backend/mediacore/mediacore.go +++ b/shared/backend/mediacore/mediacore.go @@ -85,16 +85,16 @@ func (c *Core) Mount(r chi.Router) { r.With(c.auth.Require).Post("/security/totp/verify", c.auth.TOTPVerify) r.With(c.auth.Require).Post("/security/totp/disable", c.auth.TOTPDisable) r.With(c.auth.Optional).Get("/sync", c.getSyncState) - r.With(c.auth.Optional).Put("/sync", c.putSyncState) + r.With(c.auth.Require).Put("/sync", c.putSyncState) r.With(c.auth.Optional).Get("/media/state", c.mediaState) r.With(c.auth.Require).Post("/media/like", c.mediaLike) r.With(c.auth.Require).Post("/media/save", c.mediaSave) r.With(c.auth.Optional).Post("/media/view", c.mediaView) r.With(c.auth.Optional).Post("/media/view-session", c.mediaViewSession) r.With(c.auth.Require).Get("/media/liked", c.mediaLiked) - r.Get("/media/stream", c.streamMediaByQuery) - r.Head("/media/stream", c.streamMediaByQuery) - r.Get("/media/thumb", c.thumbnailMediaByQuery) + r.With(c.auth.RequireIfLoginRequired).Get("/media/stream", c.streamMediaByQuery) + r.With(c.auth.RequireIfLoginRequired).Head("/media/stream", c.streamMediaByQuery) + r.With(c.auth.RequireIfLoginRequired).Get("/media/thumb", c.thumbnailMediaByQuery) r.With(c.auth.Optional).Get("/media/{id}/tags", c.mediaTags) r.With(c.auth.Require).Post("/media/{id}/tags", c.addMediaTag) @@ -132,10 +132,15 @@ func (c *Core) putSyncState(w http.ResponseWriter, r *http.Request) { writeError(w, http.StatusBadRequest, "clientId is required") return } + mediaID, ok := syncScalar(input["mediaId"]) + if !ok { + writeError(w, http.StatusBadRequest, "mediaId must be a string, a number or null") + return + } sessionID := boundedSyncString(firstNonEmpty(syncString(input, "sessionId"), r.URL.Query().Get("sessionId"), "default")) state := map[string]any{ "sessionId": sessionID, - "mediaId": input["mediaId"], + "mediaId": mediaID, "timeMs": syncInt(input, "timeMs", 0), "paused": syncBool(input, "paused"), "fps": syncFPS(input), @@ -144,7 +149,12 @@ func (c *Core) putSyncState(w http.ResponseWriter, r *http.Request) { "updatedAt": time.Now().UTC().Format(time.RFC3339Nano), } if value, ok := input["playAt"]; ok { - state["playAt"] = value + playAt, valid := syncScalar(value) + if !valid { + writeError(w, http.StatusBadRequest, "playAt must be a string, a number or null") + return + } + state["playAt"] = playAt } c.sync.SetHTTPState(sessionID, state) c.sync.Broadcast(sessionID) @@ -179,7 +189,7 @@ func (c *Core) streamMediaByQuery(w http.ResponseWriter, r *http.Request) { } func (c *Core) streamMediaIdentifier(w http.ResponseWriter, r *http.Request, identifier string) { - record, err := c.findMedia(r.Context(), identifier) + record, err := c.findMedia(r.Context(), identifier, canSeeHidden(r)) if err != nil { writeError(w, http.StatusNotFound, "media not found") return @@ -197,6 +207,11 @@ func (c *Core) thumbnailMediaIdentifier(w http.ResponseWriter, r *http.Request, writeError(w, http.StatusBadRequest, "invalid media id") return } + includeHidden := canSeeHidden(r) + if !includeHidden && c.isHiddenMedia(r.Context(), id) { + writeError(w, http.StatusNotFound, "thumbnail not found") + return + } if !strings.Contains(id, string(filepath.Separator)) && !strings.Contains(id, "/") { if c.carrierNode.ProxyThumbnail(w, r, c.serviceName, id) { return @@ -216,7 +231,7 @@ func (c *Core) thumbnailMediaIdentifier(w http.ResponseWriter, r *http.Request, return } } - record, err := c.findMedia(r.Context(), id) + record, err := c.findMedia(r.Context(), id, includeHidden) if err != nil || !isImagePath(record.FilePath) { writeError(w, http.StatusNotFound, "thumbnail not found") return @@ -723,7 +738,25 @@ func (c *Core) profile(w http.ResponseWriter, r *http.Request) { writeJSON(w, http.StatusOK, map[string]any{"user": user}) } -func (c *Core) findMedia(ctx context.Context, identifier string) (MediaRecord, error) { +// canSeeHidden reports whether the caller is a moderator, who may stream and view media that has +// been hidden (active = FALSE). Everyone else gets hidden media as not found. +func canSeeHidden(r *http.Request) bool { + return sharedauth.IsAdmin(sharedauth.UserFromContext(r.Context())) +} + +// isHiddenMedia reports whether identifier names a media item that has been hidden. A lookup +// error counts as hidden, so a database fault never exposes hidden media. +func (c *Core) isHiddenMedia(ctx context.Context, identifier string) bool { + var hidden bool + err := c.db.QueryRow(ctx, ` + SELECT EXISTS (SELECT 1 FROM media WHERE NOT active AND (media_key=$1 OR CAST(id AS TEXT)=$1))`, + strings.TrimSpace(identifier)).Scan(&hidden) + return err != nil || hidden +} + +// findMedia looks up one media item by media key or numeric id. Hidden media is only returned +// when includeHidden is set. +func (c *Core) findMedia(ctx context.Context, identifier string, includeHidden bool) (MediaRecord, error) { identifier = strings.TrimSpace(identifier) var record MediaRecord row := c.db.QueryRow(ctx, ` @@ -732,7 +765,7 @@ func (c *Core) findMedia(ctx context.Context, identifier string) (MediaRecord, e COALESCE(width, 0), COALESCE(height, 0), COALESCE(duration_ms, 0), COALESCE(size_bytes, 0), COALESCE(is_vr, FALSE), COALESCE(has_funscript, FALSE), funscript_action_count, funscript_avg_speed, funscript_max_speed, COALESCE(speed, 0), COALESCE(modified_at, created_at) - FROM media WHERE media_key=$1 OR CAST(id AS TEXT)=$1 LIMIT 1`, identifier) + FROM media WHERE (media_key=$1 OR CAST(id AS TEXT)=$1) AND (active OR $2) LIMIT 1`, identifier, includeHidden) var title, description string var width, height int var duration, size int64 @@ -1084,6 +1117,20 @@ func syncBool(message map[string]any, key string) bool { return value } +// syncScalar keeps a client-supplied sync value to what sync state holds: null, a number or a +// bounded string. Objects, arrays and booleans are refused so arbitrary JSON is never stored as +// shared session state. +func syncScalar(value any) (any, bool) { + switch typed := value.(type) { + case nil, float64: + return typed, true + case string: + return boundedSyncString(typed), true + default: + return nil, false + } +} + func syncInt(message map[string]any, key string, fallback int64) int64 { value, ok := message[key].(float64) if !ok { diff --git a/shared/backend/mediacore/mediacore_test.go b/shared/backend/mediacore/mediacore_test.go new file mode 100644 index 0000000..37a97df --- /dev/null +++ b/shared/backend/mediacore/mediacore_test.go @@ -0,0 +1,164 @@ +package mediacore + +import ( + "context" + "fmt" + "net/http" + "net/http/httptest" + "strings" + "testing" + + "github.com/go-chi/chi/v5" + + sharedauth "repos.gfranz.ch/Gabriel20xx/shared/backend/auth" + "repos.gfranz.ch/Gabriel20xx/shared/backend/authclient" +) + +// loginRequiredStore is a ProxyStore that always requires login, so the auth gate can be +// exercised without a database. +type loginRequiredStore struct{} + +func (loginRequiredStore) LoginRequired(context.Context) (bool, error) { return true, nil } +func (loginRequiredStore) SetLoginRequired(context.Context, bool) error { return nil } +func (loginRequiredStore) IsSetupClaimed(context.Context) (bool, error) { return true, nil } +func (loginRequiredStore) TryClaimSetup(context.Context) (bool, error) { return false, nil } +func (loginRequiredStore) UnclaimSetup(context.Context) error { return nil } + +// loginOffStore is loginRequiredStore with login switched off for the whole application. +type loginOffStore struct{ loginRequiredStore } + +func (loginOffStore) LoginRequired(context.Context) (bool, error) { return false, nil } + +// TestMediaStreamAndThumbnailRequireLogin checks that anonymous requests to the media stream and +// thumbnail routes are refused when login is required, before any database lookup or CarrierNode +// call. The Core in this test has no database and no CarrierNode client, so reaching either would +// panic. +func TestMediaStreamAndThumbnailRequireLogin(t *testing.T) { + auth := sharedauth.NewWithStore(loginRequiredStore{}, "session", false, "", "testproject") + router := chi.NewRouter() + New(Config{Auth: auth}).Mount(router) + + for _, request := range []struct{ method, target string }{ + {http.MethodGet, "/media/stream?mediaKey=1"}, + {http.MethodHead, "/media/stream?mediaKey=1"}, + {http.MethodGet, "/media/thumb?mediaKey=1"}, + } { + response := httptest.NewRecorder() + router.ServeHTTP(response, httptest.NewRequest(request.method, request.target, nil)) + if response.Code != http.StatusUnauthorized { + t.Errorf("%s %s status = %d, want %d", request.method, request.target, response.Code, http.StatusUnauthorized) + } + } +} + +// TestMediaGateAllowsAnonymousWhenLoginIsOff checks the gate the media stream and thumbnail routes +// use: with login disabled an anonymous request reaches the handler, as it does for the rest of +// the application. The handler here is a stub, so no database or CarrierNode call is made. +func TestMediaGateAllowsAnonymousWhenLoginIsOff(t *testing.T) { + auth := sharedauth.NewWithStore(loginOffStore{}, "session", false, "", "testproject") + reached := false + gate := auth.RequireIfLoginRequired(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + reached = true + })) + for _, target := range []string{"/media/stream?mediaKey=1", "/media/thumb?mediaKey=1"} { + reached = false + response := httptest.NewRecorder() + gate.ServeHTTP(response, httptest.NewRequest(http.MethodGet, target, nil)) + if !reached || response.Code != http.StatusOK { + t.Errorf("GET %s with login off: reached = %v, status = %d; want reached and 200", target, reached, response.Code) + } + } +} + +// newRoleAuthGuard stands in for AuthGuard's GET /api/me. Each bearer token maps to one role, so a +// test can act as a viewer, a moderator or an admin without a database. +func newRoleAuthGuard(t *testing.T) *httptest.Server { + t.Helper() + roles := map[string]string{"viewer-token": "user", "moderator-token": "moderator", "admin-token": "admin"} + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + role, ok := roles[strings.TrimPrefix(r.Header.Get("Authorization"), "Bearer ")] + if !ok || r.URL.Path != "/api/me" { + w.WriteHeader(http.StatusUnauthorized) + return + } + w.Header().Set("Content-Type", "application/json") + fmt.Fprintf(w, `{"user":{"id":1,"username":"tester","role":%q}}`, role) + })) + t.Cleanup(server.Close) + return server +} + +// TestOnlyModeratorsCanSeeHiddenMedia checks which callers get hidden media looked up at all. +// Anonymous callers and viewers may not; moderators and admins may. With login off every caller +// is the placeholder superadmin, as for the rest of the application. The active = FALSE filter +// itself needs a database and is not exercised here. +func TestOnlyModeratorsCanSeeHiddenMedia(t *testing.T) { + guard := newRoleAuthGuard(t) + login := sharedauth.NewWithStore(loginRequiredStore{}, "session", false, guard.URL, "testproject") + loginOff := sharedauth.NewWithStore(loginOffStore{}, "session", false, guard.URL, "testproject") + + for _, tc := range []struct { + name string + auth *sharedauth.Service + token string + want string + }{ + {"anonymous with login required", login, "", "false"}, + {"viewer", login, "viewer-token", "false"}, + {"moderator", login, "moderator-token", "true"}, + {"admin", login, "admin-token", "true"}, + {"anonymous with login off", loginOff, "", "true"}, + } { + router := chi.NewRouter() + router.With(tc.auth.Optional).Get("/probe", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprint(w, canSeeHidden(r)) + }) + request := httptest.NewRequest(http.MethodGet, "/probe", nil) + if tc.token != "" { + request.AddCookie(&http.Cookie{Name: authclient.DefaultCookieName, Value: tc.token}) + } + response := httptest.NewRecorder() + router.ServeHTTP(response, request) + if got := response.Body.String(); got != tc.want { + t.Errorf("%s: canSeeHidden = %q, want %q", tc.name, got, tc.want) + } + } +} + +// TestSyncWriteRequiresLogin checks that an anonymous PUT /sync is refused before it can change +// shared playback state. The Core has no sync hub, so reaching the handler would panic. +func TestSyncWriteRequiresLogin(t *testing.T) { + auth := sharedauth.NewWithStore(loginRequiredStore{}, "session", false, "", "testproject") + router := chi.NewRouter() + New(Config{Auth: auth}).Mount(router) + + request := httptest.NewRequest(http.MethodPut, "/sync", strings.NewReader(`{"clientId":"c1","mediaId":"m1"}`)) + response := httptest.NewRecorder() + router.ServeHTTP(response, request) + if response.Code != http.StatusUnauthorized { + t.Errorf("PUT /sync status = %d, want %d", response.Code, http.StatusUnauthorized) + } +} + +// TestSyncScalarKeepsOnlyScalars checks that sync values are limited to null, numbers and +// bounded strings, so objects, arrays and booleans are never stored as session state. +func TestSyncScalarKeepsOnlyScalars(t *testing.T) { + if value, ok := syncScalar(nil); !ok || value != nil { + t.Errorf("syncScalar(nil) = %v, %v; want nil, true", value, ok) + } + if value, ok := syncScalar(float64(7)); !ok || value != float64(7) { + t.Errorf("syncScalar(7) = %v, %v; want 7, true", value, ok) + } + if value, ok := syncScalar(" media-1 "); !ok || value != "media-1" { + t.Errorf("syncScalar(string) = %v, %v; want media-1, true", value, ok) + } + long, ok := syncScalar(strings.Repeat("x", 500)) + if text, isText := long.(string); !ok || !isText || len(text) != 128 { + t.Errorf("syncScalar(long string) = %v, %v; want a 128-byte string, true", long, ok) + } + for _, refused := range []any{map[string]any{"a": 1}, []any{1}, true} { + if _, ok := syncScalar(refused); ok { + t.Errorf("syncScalar(%#v) accepted a non-scalar value", refused) + } + } +} diff --git a/shared/backend/syncsocket/syncsocket.go b/shared/backend/syncsocket/syncsocket.go index 6514085..4c498e1 100644 --- a/shared/backend/syncsocket/syncsocket.go +++ b/shared/backend/syncsocket/syncsocket.go @@ -31,8 +31,9 @@ import ( ) const ( - maxSyncIdentifier = 128 - maxSyncSessions = 1000 + maxSyncIdentifier = 128 + maxSyncSessions = 1000 + maxSyncConnections = 1000 ) type peer struct { @@ -73,10 +74,15 @@ func NewHub() *Hub { } } -func (h *Hub) add(p *peer) { +// add registers a peer, or reports false when the hub already holds maxSyncConnections peers. +func (h *Hub) add(p *peer) bool { h.mu.Lock() + defer h.mu.Unlock() + if len(h.peers) >= maxSyncConnections { + return false + } h.peers[p] = struct{}{} - h.mu.Unlock() + return true } func (h *Hub) remove(p *peer) string { @@ -300,7 +306,10 @@ func (h *Hub) ServeWebSocket(w http.ResponseWriter, r *http.Request, allowedOrig userAgent: firstNonEmpty(r.Header.Get("User-Agent"), "Unknown"), ipAddress: firstNonEmpty(strings.Split(r.Header.Get("X-Forwarded-For"), ",")[0], r.RemoteAddr, "Unknown"), } - h.add(p) + if !h.add(p) { + _ = conn.Close(websocket.StatusTryAgainLater, "too many sync connections") + return + } defer func() { sessionID := h.remove(p) _ = conn.Close(websocket.StatusNormalClosure, "") @@ -453,6 +462,9 @@ func (h *Hub) handleSyncUpdate(p *peer, message map[string]any) { if captured := syncInt(message, "capturedAtLocalMs", 0); captured > 0 { h.capturedAtMs[sessionID] = captured } + trimSessionMap(h.playAt) + trimSessionMap(h.playAtLocalMs) + trimSessionMap(h.capturedAtMs) if toClientID == "" { h.states[sessionID] = cloneMap(state) if len(h.states) > maxSyncSessions { @@ -571,6 +583,18 @@ func cloneMap(value map[string]any) map[string]any { return result } +// trimSessionMap keeps a per-session map within maxSyncSessions by dropping entries, the same +// bound the states map uses. Session IDs come from clients, so without it each map would grow +// for every ID ever seen. +func trimSessionMap[V any](values map[string]V) { + for len(values) > maxSyncSessions { + for key := range values { + delete(values, key) + break + } + } +} + func firstNonEmpty(values ...string) string { for _, value := range values { if strings.TrimSpace(value) != "" { diff --git a/shared/backend/syncsocket/syncsocket_test.go b/shared/backend/syncsocket/syncsocket_test.go new file mode 100644 index 0000000..96366b7 --- /dev/null +++ b/shared/backend/syncsocket/syncsocket_test.go @@ -0,0 +1,46 @@ +package syncsocket + +import ( + "fmt" + "testing" +) + +// TestSessionTimingMapsStayBounded checks that fresh client-chosen session IDs cannot grow the +// per-session timing maps past maxSyncSessions. +func TestSessionTimingMapsStayBounded(t *testing.T) { + hub := NewHub() + p := &peer{clientID: "client-1"} + for i := 0; i < maxSyncSessions+100; i++ { + hub.handleSyncUpdate(p, map[string]any{ + "clientId": "client-1", + "sessionId": fmt.Sprintf("session-%d", i), + "paused": false, + "playAt": "2026-10-19T10:00:00Z", + "playAtLocalMs": float64(1), + "capturedAtLocalMs": float64(1), + }) + } + if n := len(hub.playAt); n > maxSyncSessions { + t.Errorf("playAt holds %d sessions, want at most %d", n, maxSyncSessions) + } + if n := len(hub.playAtLocalMs); n > maxSyncSessions { + t.Errorf("playAtLocalMs holds %d sessions, want at most %d", n, maxSyncSessions) + } + if n := len(hub.capturedAtMs); n > maxSyncSessions { + t.Errorf("capturedAtMs holds %d sessions, want at most %d", n, maxSyncSessions) + } +} + +// TestHubRefusesPeersBeyondTheConnectionCap checks that the hub stops registering connections +// once it holds maxSyncConnections peers. +func TestHubRefusesPeersBeyondTheConnectionCap(t *testing.T) { + hub := NewHub() + for i := 0; i < maxSyncConnections; i++ { + if !hub.add(&peer{}) { + t.Fatalf("add refused peer %d, below the cap", i) + } + } + if hub.add(&peer{}) { + t.Fatal("add accepted a peer beyond maxSyncConnections") + } +} diff --git a/shared/package-lock.json b/shared/package-lock.json index 0bf133b..472d98d 100644 --- a/shared/package-lock.json +++ b/shared/package-lock.json @@ -742,10 +742,6 @@ "resolved": "packages/design-tokens", "link": true }, - "node_modules/@gabriel20xx/legacy-assets": { - "resolved": "packages/legacy-assets", - "link": true - }, "node_modules/@gabriel20xx/node-backend": { "resolved": "packages/node-backend", "link": true @@ -3109,10 +3105,6 @@ "version": "0.1.1", "license": "MIT" }, - "packages/legacy-assets": { - "name": "@gabriel20xx/legacy-assets", - "version": "3.0.0" - }, "packages/node-backend": { "name": "@gabriel20xx/node-backend", "version": "0.1.1", diff --git a/shared/package.json b/shared/package.json index dc3d47c..b24e822 100644 --- a/shared/package.json +++ b/shared/package.json @@ -50,7 +50,6 @@ "media:audit:layout": "node scripts/media/audit-inline-layout.mjs", "media:audit:layout:strict": "node scripts/media/audit-inline-layout.mjs --strict", "media:clean:test-artifacts": "node scripts/media/clean-test-artifacts.mjs", - "media:enforce:css-design-system": "node scripts/media/enforce-design-system-css.mjs", "media:enforce:js-mapping": "node scripts/media/enforce-js-mapping.mjs", "media:enforce:no-skipped-tests": "node scripts/media/enforce-no-skipped-tests.mjs", "media:lint:all": "node scripts/media/lint-all.mjs", diff --git a/shared/packages/java-backend/src/main/java/com/gabriel20xx/shared/auth/AuthClient.java b/shared/packages/java-backend/src/main/java/com/gabriel20xx/shared/auth/AuthClient.java index 6a586fe..7215675 100644 --- a/shared/packages/java-backend/src/main/java/com/gabriel20xx/shared/auth/AuthClient.java +++ b/shared/packages/java-backend/src/main/java/com/gabriel20xx/shared/auth/AuthClient.java @@ -715,9 +715,13 @@ public final class AuthClient { if (candidate.startsWith(prefix)) { String value = candidate.substring(prefix.length()); try { - return URLDecoder.decode(value, StandardCharsets.UTF_8.name()); + // URLDecoder would turn a literal "+" into a space; escape it first so it survives, as in Node. + return URLDecoder.decode(value.replace("+", "%2B"), StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException ex) { return value; + } catch (IllegalArgumentException ex) { + // A malformed escape such as a bare "%" is not a usable token, so treat the cookie as absent. + return ""; } } } diff --git a/shared/packages/java-backend/src/test/java/com/gabriel20xx/shared/auth/AuthClientTest.java b/shared/packages/java-backend/src/test/java/com/gabriel20xx/shared/auth/AuthClientTest.java index b04b144..364bd47 100644 --- a/shared/packages/java-backend/src/test/java/com/gabriel20xx/shared/auth/AuthClientTest.java +++ b/shared/packages/java-backend/src/test/java/com/gabriel20xx/shared/auth/AuthClientTest.java @@ -218,6 +218,34 @@ class AuthClientTest { assertEquals("right", token); } + @Test + void extractTokenKeepsALiteralPlusSignInTheCookieValue() { + AuthClient client = new AuthClient("https://auth.example.com"); + + String token = client.extractToken(name -> null, "auth_session=ab+cd%2Bef"); + + assertEquals("ab+cd+ef", token); + } + + @Test + void extractTokenTreatsAMalformedCookieEscapeAsNoToken() { + AuthClient client = new AuthClient("https://auth.example.com"); + + String token = client.extractToken(name -> null, "auth_session=bad%zz; other=1"); + + assertEquals("", token); + } + + @Test + void middlewareFailsClosedOnAMalformedCookieInsteadOfThrowing() throws Exception { + AuthClient client = new AuthClient("https://auth.example.com"); + + String result = client.middleware(name -> null, "auth_session=100%", + user -> "authenticated", () -> "unauthorized"); + + assertEquals("unauthorized", result); + } + @Test void middlewareFailsClosedAndDoesNotInvokeTheHandlerOnAnInvalidSession() throws Exception { server = fakeAuthGuard(401, "{\"valid\":false}"); diff --git a/shared/packages/legacy-assets/.stylelintrc.json b/shared/packages/legacy-assets/.stylelintrc.json deleted file mode 100644 index ebdae9e..0000000 --- a/shared/packages/legacy-assets/.stylelintrc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": ["stylelint-config-standard"], - "ignoreFiles": ["public/css/index.css", "**/*.min.css"], - "rules": { - "at-rule-no-unknown": [true, { "ignoreAtRules": ["layer", "apply", "config"] }], - "selector-class-pattern": null, - "keyframes-name-pattern": null, - "custom-property-pattern": null, - "no-descending-specificity": null, - "import-notation": null, - "comment-empty-line-before": null, - "declaration-property-value-no-unknown": null, - "value-keyword-case": ["lower", { "camelCaseSvgKeywords": true }] - } -} diff --git a/shared/packages/legacy-assets/README.md b/shared/packages/legacy-assets/README.md deleted file mode 100644 index 24e30f6..0000000 --- a/shared/packages/legacy-assets/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# @gabriel20xx/legacy-assets - -This package now contains exactly one file: `public/css/index.css`, a static (pre-Tailwind-v4) -theme stylesheet. Its only remaining consumer is `Original/MediaDesktop`'s Electron renderer, -which still uses the old `--color-*` utility-class theme rather than the current `--sc-*` -design-token system in `packages/design-tokens`. It's a `file:` dependency there -(`scripts/copy-assets.mjs` copies `index.css` into `MediaDesktop/public/` at build time) - do not -delete this package without first migrating MediaDesktop off the old stylesheet. - -Everything else that used to live here (the pre-SvelteKit `public/js/*` auth/layout/media -utilities, an orphaned `MediaDesktop/assets/icon.png` copy, and the broken monorepo-era -`build:theme` script) was removed: nothing else in the workspace referenced any of it. - -Originally `MediaCollection/MediaShared`, moved here to centralize shared components. Both the -`MediaCollection` and `MediaShared` umbrella names are retired - everything here is just part of -`shared` now, workspace-wide. diff --git a/shared/packages/legacy-assets/package.json b/shared/packages/legacy-assets/package.json deleted file mode 100644 index 9ef5876..0000000 --- a/shared/packages/legacy-assets/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@gabriel20xx/legacy-assets", - "version": "3.0.0", - "private": true, - "description": "Legacy pre-SvelteKit theme CSS, kept only for MediaDesktop's Electron renderer (file: dependency)", - "scripts": { - "lint:css": "stylelint \"public/**/*.css\"" - }, - "exports": { - "./index.css": "./public/css/index.css" - }, - "files": ["public/**"] -} diff --git a/shared/packages/legacy-assets/public/css/index.css b/shared/packages/legacy-assets/public/css/index.css deleted file mode 100644 index fbcd8fe..0000000 --- a/shared/packages/legacy-assets/public/css/index.css +++ /dev/null @@ -1,5202 +0,0 @@ -/* - index.css — Static legacy theme CSS (kept only for MediaDesktop's Electron renderer) - Previously generated by Tailwind CSS; now a self-contained static file. - Do not regenerate with Tailwind. Edit directly to add or update styles. -*/ - -/* ============================================================ - DESIGN TOKENS — CSS Custom Properties - :root provides defaults (dark theme) before JS sets data-theme. - [data-theme="dark"] and [data-theme="light"] are applied by - theme-toggle.js setting document.documentElement.dataset.theme. - ============================================================ */ - -:root, -[data-theme="dark"] { - /* Backgrounds */ - --color-bg: #081021; - --color-bg-soft: #0d1528; - --color-surface: #13203a; - --color-surface-muted: #172845; - --color-surface-raised: #1b2f52; - --color-surface-alt: #10223f; - --color-canvas-bg: #070f1f; - --color-panel-bg: #12213d; - --color-input-bg: #0b1b35; - --color-dropzone-bg: #0f2748; - - /* Topbar / Navigation bar */ - --color-bar-bg: #0a162d; - --color-bar-surface: #102241; - --color-bar-surface-border: #2a4a78; - --color-bar-border: #1a3158; - --color-bar-text: #e8f1ff; - --color-bar-text-muted: #9ab0d0; - - /* Text */ - --color-text: #e8f1ff; - --color-text-dim: #90a6c7; - --color-text-muted: #a8bdd9; - - /* Borders */ - --color-border: #1d365d; - --color-border-strong: #2b4a79; - --color-input-border: #2a4a78; - - /* Accent (blue) */ - --color-accent: #4f9cff; - --color-accent-glow: #8fc2ff; - --color-accent-soft: rgba(143, 194, 255, 0.18); - --color-primary-dim: #173862; - - /* Action (blue) */ - --color-action: #2563eb; - --color-action-alt-text: #bfdbfe; - --color-action-border: #3b82f6; - --color-action-hover: #1d4ed8; - - /* Status — success */ - --color-success-strong: #16a34a; - --color-success-hover: #15803d; - - /* Status — danger */ - --color-danger: #ef4444; - --color-danger-hover: #dc2626; - --color-danger-strong: #b91c1c; - - /* Overlay */ - --color-overlay: rgba(0, 0, 0, 0.75); - - /* Scrollbar */ - --scrollbar-size: 0.75rem; - --scrollbar-radius: 9999px; - --color-scrollbar-track: var(--color-bg-soft); - --color-scrollbar-thumb: var(--color-border-strong); - --color-scrollbar-thumb-hover: var(--color-accent); - --color-scrollbar-thumb-active: var(--color-action-hover); - - /* Sizing */ - --bar-height: 56px; - --topbar-height: 56px; - --bottom-nav-height: 56px; - --overlay-gap: 0.75rem; - --tab-content-top-gap: 0.75rem; - --control-height: 2.375rem; - --control-radius: 8px; - --control-padding-x: 0.75rem; - --control-check-size: 1.05rem; - --control-check-radius: 4px; - - /* Radius */ - --radius-sm: 4px; - --radius-md: 8px; - --radius-pill: 9999px; - - /* Typography */ - --font-size-xs: 0.75rem; - --font-size-sm: 0.875rem; - - /* Shadows */ - --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3); - --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4); - --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5); - --shadow-2xl: 0 10px 40px rgba(0, 0, 0, 0.6); - - /* Transitions */ - --transition-fast: 150ms ease; -} - -[data-theme="light"] { - /* Backgrounds */ - --color-bg: #f3f7ff; - --color-bg-soft: #ffffff; - --color-surface: #e9f1ff; - --color-surface-muted: #dde9ff; - --color-surface-raised: #d1e2ff; - --color-surface-alt: #e4eeff; - --color-canvas-bg: #eef4ff; - --color-panel-bg: #fafdff; - --color-input-bg: #f6faff; - --color-dropzone-bg: #e7f0ff; - - /* Topbar / Navigation bar */ - --color-bar-bg: #f5f9ff; - --color-bar-surface: #e8f1ff; - --color-bar-surface-border: #c5d8f7; - --color-bar-border: #d4e2fa; - --color-bar-text: #102a52; - --color-bar-text-muted: #4d668f; - - /* Text */ - --color-text: #102a52; - --color-text-dim: #5a739b; - --color-text-muted: #6f86ab; - - /* Borders */ - --color-border: #c6d8f2; - --color-border-strong: #aac3e8; - --color-input-border: #b5cbeb; - - /* Accent (blue) */ - --color-accent: #4f9cff; - --color-accent-glow: rgba(79, 156, 255, 0.85); - --color-accent-soft: rgba(79, 156, 255, 0.12); - --color-primary-dim: #dbeafe; - - /* Action (blue) */ - --color-action: #2563eb; - --color-action-alt-text: #1e40af; - --color-action-border: #3b82f6; - --color-action-hover: #1d4ed8; - - /* Status — success */ - --color-success-strong: #16a34a; - --color-success-hover: #15803d; - - /* Status — danger */ - --color-danger: #ef4444; - --color-danger-hover: #dc2626; - --color-danger-strong: #b91c1c; - - /* Overlay */ - --color-overlay: rgba(0, 0, 0, 0.5); - - /* Sizing — same as dark */ - --bar-height: 56px; - --topbar-height: 56px; - --bottom-nav-height: 56px; - --overlay-gap: 0.75rem; - --tab-content-top-gap: 0.75rem; - --control-height: 2.375rem; - --control-radius: 8px; - --control-padding-x: 0.75rem; - --control-check-size: 1.05rem; - --control-check-radius: 4px; - - /* Radius — same as dark */ - --radius-sm: 4px; - --radius-md: 8px; - --radius-pill: 9999px; - - /* Typography — same as dark */ - --font-size-xs: 0.75rem; - --font-size-sm: 0.875rem; - - /* Shadows — lighter for light theme */ - --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.1); - --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.15); - --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.2); - --shadow-2xl: 0 10px 40px rgba(0, 0, 0, 0.25); - - /* Transitions — same as dark */ - --transition-fast: 150ms ease; -} - -/* Base body styles */ -body { - background-color: var(--color-bg); - color: var(--color-text); - min-height: 100vh; -} - -/* Remove status pills from shared header across all web projects. */ -[data-topbar='1'] [data-status-indicator] { - display: none !important; -} - -/* Ensure the fixed topbar visually reaches the browser edge when scrollbar gutter is reserved. */ -header[data-topbar='1'] { - right: calc(100% - 100vw); -} - -/* Keep the shared header login button label on a single line. */ -[data-topbar='1'] #authLoginOpenBtn { - white-space: nowrap; -} - -/* Keep fixed full-width scrolling shells flush with the viewport edge. */ -main.fixed.left-0.right-0.overflow-y-auto { - right: calc(100% - 100vw); -} - -/* Constrain page scrolling to content so fixed chrome stays outside the scrollable region. */ -html.nc-content-scroll-shell-root { - overflow: hidden; - scrollbar-gutter: auto; -} - -body.nc-content-scroll-shell { - overflow: hidden; -} - -body.nc-content-scroll-shell > .nc-scroll-host, -body.nc-content-scroll-shell > .page-panel > .nc-scroll-host { - position: fixed; - left: 0; - right: calc(100% - 100vw); - top: var(--topbar-height, 56px); - bottom: var(--bottom-nav-height, 0px); - height: calc(100dvh - var(--topbar-height, 56px) - var(--bottom-nav-height, 0px)); - overflow-y: auto; - overflow-x: hidden; - overscroll-behavior-y: contain; - -webkit-overflow-scrolling: touch; -} - -@supports not (height: 100dvh) { - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host { - height: calc(100vh - var(--topbar-height, 56px) - var(--bottom-nav-height, 0px)); - } -} - -body.nc-content-scroll-shell > .fixed.left-0.right-0.overflow-y-auto, -body.nc-content-scroll-shell > .page-panel > .fixed.left-0.right-0.overflow-y-auto { - bottom: var(--bottom-nav-height, 0px); -} - -/* Custom scrollbar styling for page-content scrolling regions. */ -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -), -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -) * { - scrollbar-width: thin; - scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track); -} - -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -)::-webkit-scrollbar, -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -) *::-webkit-scrollbar { - width: var(--scrollbar-size); - height: var(--scrollbar-size); -} - -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -)::-webkit-scrollbar-track, -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -) *::-webkit-scrollbar-track { - border-radius: var(--scrollbar-radius); - background: var(--color-scrollbar-track); -} - -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -)::-webkit-scrollbar-thumb, -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -) *::-webkit-scrollbar-thumb { - border: 2px solid var(--color-scrollbar-track); - border-radius: var(--scrollbar-radius); - background: var(--color-scrollbar-thumb); - background-clip: padding-box; - min-height: 1.5rem; -} - -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -)::-webkit-scrollbar-thumb:hover, -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -) *::-webkit-scrollbar-thumb:hover { - background: var(--color-scrollbar-thumb-hover); -} - -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -)::-webkit-scrollbar-thumb:active, -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -) *::-webkit-scrollbar-thumb:active { - background: var(--color-scrollbar-thumb-active); -} - -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -)::-webkit-scrollbar-corner, -:where( - body.nc-content-scroll-shell > .nc-scroll-host, - body.nc-content-scroll-shell > .page-panel > .nc-scroll-host, - body > main, - body > #main-content, - body > .page-panel > main, - body > .page-panel > #main-content -) *::-webkit-scrollbar-corner { - background: var(--color-scrollbar-track); -} - -/* Player */ -.volume-slider { - appearance: none; - width: 68px; - height: 3px; - border-radius: 2px; - background: rgb(255 255 255/25%); - outline: none; - cursor: pointer; - vertical-align: middle; - flex-shrink: 0; -} -.volume-slider::-webkit-slider-runnable-track { - height: 3px; - border-radius: 2px; - background: rgb(255 255 255/25%); -} -.volume-slider::-webkit-slider-thumb { - appearance: none; - width: 12px; - height: 12px; - margin-top: -4.5px; - border-radius: 50%; - background: #fff; - cursor: pointer; - box-shadow: 0 0 0 2px rgb(0 0 0/30%); -} -.volume-slider::-moz-range-track { - height: 3px; - border-radius: 2px; - background: rgb(255 255 255/25%); - border: none; -} -.volume-slider::-moz-range-thumb { - width: 12px; - height: 12px; - border-radius: 50%; - background: #fff; - border: none; - cursor: pointer; - box-shadow: 0 0 0 2px rgb(0 0 0/30%); -} - -/* Dual-handle range slider used by media filter popovers. */ -.c-range-slider { - position: relative; - width: 100%; - height: 1.5rem; -} -.c-range-slider__track { - position: absolute; - left: 0; - right: 0; - top: 50%; - height: 0.375rem; - transform: translateY(-50%); - border-radius: var(--radius-pill, 9999px); - background: rgb(148 163 184 / 28%); -} -.c-range-slider__fill { - position: absolute; - top: 0; - height: 100%; - border-radius: var(--radius-pill, 9999px); - background: var(--color-accent, #4f9cff); -} -.c-range-slider__input { - position: absolute; - inset: 0; - width: 100%; - margin: 0; - background: transparent; - -webkit-appearance: none; - appearance: none; - pointer-events: none; -} -.c-range-slider__input::-webkit-slider-runnable-track { - height: 0.375rem; - background: transparent; -} -.c-range-slider__input::-webkit-slider-thumb { - -webkit-appearance: none; - appearance: none; - width: 0.95rem; - height: 0.95rem; - margin-top: calc((0.375rem - 0.95rem) / 2); - border-radius: var(--radius-pill, 9999px); - border: 2px solid var(--color-accent, #4f9cff); - background: var(--color-surface, #13203a); - box-shadow: 0 1px 4px rgb(0 0 0 / 45%); - pointer-events: auto; - cursor: pointer; -} -.c-range-slider__input::-moz-range-track { - height: 0.375rem; - background: transparent; - border: none; -} -.c-range-slider__input::-moz-range-progress { - background: transparent; -} -.c-range-slider__input::-moz-range-thumb { - width: 0.95rem; - height: 0.95rem; - border-radius: var(--radius-pill, 9999px); - border: 2px solid var(--color-accent, #4f9cff); - background: var(--color-surface, #13203a); - box-shadow: 0 1px 4px rgb(0 0 0 / 45%); - pointer-events: auto; - cursor: pointer; -} -.c-range-slider__input:focus-visible { - outline: none; -} -.c-range-slider__input:focus-visible::-webkit-slider-thumb { - box-shadow: 0 0 0 3px var(--color-accent-soft, rgb(79 156 255 / 25%)); -} -.c-range-slider__input:focus-visible::-moz-range-thumb { - box-shadow: 0 0 0 3px var(--color-accent-soft, rgb(79 156 255 / 25%)); -} - -*, -:after, -:before { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgba(59, 130, 246, 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; -} -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgba(59, 130, 246, 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; -} -*, -:after, -:before { - box-sizing: border-box; - border: 0 solid #e5e7eb; -} -:after, -:before { - --tw-content: ""; -} -:host, -html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - font-family: - ui-sans-serif, - system-ui, - sans-serif, - Apple Color Emoji, - Segoe UI Emoji, - Segoe UI Symbol, - Noto Color Emoji; - font-feature-settings: normal; - font-variation-settings: normal; - -webkit-tap-highlight-color: transparent; - scrollbar-gutter: stable; -} -body { - margin: 0; - line-height: inherit; -} -hr { - height: 0; - color: inherit; - border-top-width: 1px; -} -abbr:where([title]) { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; -} -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} -a, -a:link, -a:visited, -a:hover, -a:active { - color: inherit; - text-decoration: none; -} -b, -strong { - font-weight: bolder; -} -code, -kbd, -pre, -samp { - font-family: - ui-monospace, - SFMono-Regular, - Menlo, - Monaco, - Consolas, - Liberation Mono, - Courier New, - monospace; - font-feature-settings: normal; - font-variation-settings: normal; - font-size: 1em; -} -small { - font-size: 80%; -} -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sub { - bottom: -0.25em; -} -sup { - top: -0.5em; -} -table { - text-indent: 0; - border-color: inherit; - border-collapse: collapse; -} -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - font-feature-settings: inherit; - font-variation-settings: inherit; - font-size: 100%; - font-weight: inherit; - line-height: inherit; - letter-spacing: inherit; - color: inherit; - margin: 0; - padding: 0; -} -button, -select { - text-transform: none; -} -button, -input:where([type="button"]), -input:where([type="reset"]), -input:where([type="submit"]) { - -webkit-appearance: button; - background-color: transparent; - background-image: none; -} -:-moz-focusring { - outline: auto; -} -:-moz-ui-invalid { - box-shadow: none; -} -progress { - vertical-align: baseline; -} -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} -[type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; -} -::-webkit-search-decoration { - -webkit-appearance: none; -} -::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; -} -summary { - display: list-item; -} -blockquote, -dd, -dl, -figure, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -p, -pre { - margin: 0; -} -fieldset { - margin: 0; -} -fieldset, -legend { - padding: 0; -} -menu, -ol, -ul { - list-style: none; - margin: 0; - padding: 0; -} -dialog { - padding: 0; -} -textarea { - resize: vertical; -} -input::-moz-placeholder, -textarea::-moz-placeholder { - opacity: 1; - color: #9ca3af; -} -input::placeholder, -textarea::placeholder { - opacity: 1; - color: #9ca3af; -} -[role="button"], -button { - cursor: pointer; -} -:disabled { - cursor: default; -} -audio, -canvas, -embed, -iframe, -img, -object, -svg, -video { - display: block; - vertical-align: middle; -} -img, -video { - max-width: 100%; - height: auto; -} -[hidden]:where(:not([hidden="until-found"])) { - display: none; -} - -/* Shared controls: enforce one size/radius system for single-line controls across apps */ -input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="image"]):not([type="hidden"]), -select, -textarea { - box-sizing: border-box; - border: 1px solid var(--color-input-border); - background-color: var(--color-input-bg); - color: var(--color-text); - transition: - border-color var(--transition-fast), - box-shadow var(--transition-fast), - background-color var(--transition-fast); -} -input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="image"]):not([type="hidden"]):not(textarea), -select:not([multiple]):not([size]) { - min-height: var(--control-height); - height: var(--control-height); - border-radius: var(--control-radius); - padding: 0 var(--control-padding-x); - line-height: 1.2; -} -textarea { - border-radius: var(--control-radius); - padding: 0.5rem var(--control-padding-x); -} -input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="image"]):not([type="hidden"]):focus, -select:focus, -textarea:focus { - border-color: var(--color-accent); - box-shadow: 0 0 0 2px var(--color-accent-soft); - outline: none; -} -select:not([multiple]):not([size]) { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - padding-right: calc(var(--control-padding-x) + 1.25rem); - background-image: - linear-gradient(45deg, transparent 50%, var(--color-text-dim) 50%), - linear-gradient(135deg, var(--color-text-dim) 50%, transparent 50%); - background-position: - calc(100% - 0.95rem) calc(50% + 0.12rem), - calc(100% - 0.65rem) calc(50% + 0.12rem); - background-size: 0.35rem 0.35rem; - background-repeat: no-repeat; -} - -/* Utility: force a control to use shared single-line control height. */ -.u-control-height { - min-height: var(--control-height); - height: var(--control-height); -} - -input[type="checkbox"], -input[type="radio"] { - accent-color: var(--color-action); - inline-size: var(--control-check-size); - block-size: var(--control-check-size); - border-radius: var(--control-check-radius); - flex: 0 0 auto; -} -input[type="radio"] { - border-radius: var(--radius-pill); -} -input[type="range"] { - accent-color: var(--color-action); -} -input[type="file"] { - min-height: var(--control-height); - border: 1px solid var(--color-input-border); - border-radius: var(--control-radius); - background-color: var(--color-input-bg); - color: var(--color-text); - padding: 0.25rem; -} -input[type="file"]::file-selector-button { - height: calc(var(--control-height) - 0.5rem); - margin-right: 0.6rem; - border: 1px solid var(--color-border-strong); - border-radius: calc(var(--control-radius) - 2px); - background-color: var(--color-surface-alt); - color: var(--color-text); - padding: 0 0.65rem; - line-height: 1; -} - -/* Shared button components used by Downloader/Desktop and dynamic UIs */ -.c-btn, -.btn-ghost, -.btn-primary, -.btn-secondary, -.btn-outline, -.btn-danger, -:where(button:not([class])), -:where(input[type="button"]:not([class])), -:where(input[type="submit"]:not([class])), -:where(input[type="reset"]:not([class])) { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 0.375rem; - min-height: 2.25rem; - padding: 0.45rem 0.85rem; - border: 1px solid var(--color-border-strong); - border-radius: var(--radius-md); - background-color: var(--color-surface-alt); - color: var(--color-text); - font-size: var(--font-size-sm); - font-weight: 600; - line-height: 1.2; - text-decoration: none; - transition: - background-color var(--transition-fast), - border-color var(--transition-fast), - box-shadow var(--transition-fast), - color var(--transition-fast), - opacity var(--transition-fast); -} -.c-btn:hover, -.btn-ghost:hover, -.btn-primary:hover, -.btn-secondary:hover, -.btn-outline:hover, -.btn-danger:hover, -:where(button:not([class])):hover, -:where(input[type="button"]:not([class])):hover, -:where(input[type="submit"]:not([class])):hover, -:where(input[type="reset"]:not([class])):hover { - background-color: var(--color-surface-raised); -} -.c-btn:focus-visible, -.btn-ghost:focus-visible, -.btn-primary:focus-visible, -.btn-secondary:focus-visible, -.btn-outline:focus-visible, -.btn-danger:focus-visible, -:where(button:not([class])):focus-visible, -:where(input[type="button"]:not([class])):focus-visible, -:where(input[type="submit"]:not([class])):focus-visible, -:where(input[type="reset"]:not([class])):focus-visible { - outline: none; - box-shadow: 0 0 0 2px var(--color-accent-soft); -} -.c-btn:disabled, -.btn-ghost:disabled, -.btn-primary:disabled, -.btn-secondary:disabled, -.btn-outline:disabled, -.btn-danger:disabled, -:where(button:not([class])):disabled, -:where(input[type="button"]:not([class])):disabled, -:where(input[type="submit"]:not([class])):disabled, -:where(input[type="reset"]:not([class])):disabled, -.c-btn[aria-disabled="true"], -.btn-ghost[aria-disabled="true"], -.btn-primary[aria-disabled="true"], -.btn-secondary[aria-disabled="true"], -.btn-outline[aria-disabled="true"], -.btn-danger[aria-disabled="true"] { - opacity: 0.6; - pointer-events: none; -} -.c-btn-primary, -.btn-primary { - border-color: var(--color-action-border); - background-color: var(--color-action); - color: #fff; -} -.c-btn-primary:hover, -.btn-primary:hover { - border-color: var(--color-action-hover); - background-color: var(--color-action-hover); -} -.c-btn-secondary, -.btn-secondary { - border-color: var(--color-action-border); - background-color: var(--color-primary-dim); - color: var(--color-action-alt-text); -} -.c-btn-secondary:hover, -.btn-secondary:hover { - border-color: var(--color-action); - background-color: var(--color-accent-soft); -} -.c-btn-ghost, -.btn-ghost, -.c-btn-outline, -.btn-outline { - border-color: var(--color-border-strong); - background-color: transparent; - color: var(--color-text); -} -.c-btn-ghost:hover, -.btn-ghost:hover { - background-color: var(--color-surface-muted); -} -.c-btn-outline:hover, -.btn-outline:hover { - background-color: var(--color-surface-alt); -} -.c-btn-danger, -.btn-danger { - border-color: var(--color-danger); - background-color: var(--color-danger); - color: #fff; -} -.c-btn-danger:hover, -.btn-danger:hover { - border-color: var(--color-danger-hover); - background-color: var(--color-danger-hover); -} -.c-btn-sq { - width: 2.25rem; - min-width: 2.25rem; - padding: 0; -} - -/* Shared responsive nav: desktop modern top nav, mobile fixed icon bar */ -[data-bottom-nav] { - box-sizing: border-box; - z-index: 49; - display: flex; - align-items: center; - gap: 0.35rem; - border: 1px solid var(--color-bar-surface-border); - background: var(--color-bar-bg); -} -[data-bottom-nav]:empty { - display: none; -} -[data-bottom-nav] [data-navbar-layout] { - display: none; - width: 100%; - align-items: center; - gap: 0.35rem; -} -[data-bottom-nav] a { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 0.45rem; - min-height: 2.25rem; - padding: 0.45rem 0.8rem; - border: 1px solid transparent; - border-radius: var(--radius-md); - color: var(--color-bar-text-muted); - text-decoration: none; - font-size: 0.82rem; - font-weight: 600; - line-height: 1.1; - transition: - background-color var(--transition-fast), - border-color var(--transition-fast), - color var(--transition-fast), - box-shadow var(--transition-fast); -} -[data-bottom-nav] a i { - font-size: 0.95rem; -} -[data-bottom-nav] a:hover { - border-color: var(--color-bar-surface-border); - background-color: var(--color-bar-surface); - color: var(--color-bar-text); -} -[data-bottom-nav] a.is-active { - border-color: var(--color-action-border); - background-color: var(--color-primary-dim); - color: var(--color-bar-text); -} -[data-bottom-nav] a:focus-visible { - outline: none; - box-shadow: 0 0 0 2px var(--color-accent-soft); -} - -.pt-topbar-gap { - padding-top: calc(var(--topbar-height) + var(--tab-content-top-gap, 0.75rem)); -} - -/* Fixed-scroll main shells already reserve topbar space via `top: var(--topbar-height)`. - Apply the final content gap immediately to avoid post-load jump. */ -main.fixed.left-0.right-0.overflow-y-auto > .pt-topbar-gap, -main.fixed.left-0.right-0.overflow-y-auto > #main-content.pt-topbar-gap { - padding-top: var(--tab-content-top-gap, 0.75rem); -} - -body.nc-content-scroll-shell .pt-topbar-gap { - padding-top: var(--tab-content-top-gap, 0.75rem); -} -body.nc-auto-topbar-gap:not(.is-fullscreen):not(.is-chrome-hidden) { - padding-top: calc(var(--topbar-height) + var(--tab-content-top-gap, 0.75rem)); -} -.pb-navbar-gap { - padding-bottom: calc(var(--bottom-nav-height) + var(--overlay-gap, 0.75rem)); -} - -/* Normalize the header-to-content gap across tabbed panels in all projects. - Excludes no-scroll feed stages (e.g. MediaViewer home), which manage - their own top spacing separately. */ -body.nc-content-scroll-shell:not(.is-feed-stage-active) > .page-panel > main.pt-topbar-gap, -body.nc-content-scroll-shell:not(.is-feed-stage-active) > .page-panel > #main-content.pt-topbar-gap, -body.nc-content-scroll-shell:not(.is-feed-stage-active) - > .nc-scroll-host - > .page-panel - > main.pt-topbar-gap, -body.nc-content-scroll-shell:not(.is-feed-stage-active) - > .nc-scroll-host - > .page-panel - > #main-content.pt-topbar-gap { - padding-top: var(--tab-content-top-gap, 0.75rem); -} - -/* Semantic worker badges/pills used by ContentScanner history rows. */ -.worker-badge-image, -.worker-badge-video, -.worker-badge-audio, -.worker-badge-unknown, -.worker-pill-default, -.worker-pill-meta, -.worker-pill-sfw, -.worker-pill-suggestive, -.worker-pill-nsfw { - border: 1px solid transparent; -} - -.worker-badge-image { - color: rgb(147 197 253); - background-color: rgb(37 99 235 / 0.2); - border-color: rgb(59 130 246 / 0.35); -} - -.worker-badge-video { - color: rgb(110 231 183); - background-color: rgb(5 150 105 / 0.2); - border-color: rgb(16 185 129 / 0.35); -} - -.worker-badge-audio { - color: rgb(252 211 77); - background-color: rgb(180 83 9 / 0.2); - border-color: rgb(245 158 11 / 0.35); -} - -.worker-badge-unknown { - color: rgb(203 213 225); - background-color: rgb(51 65 85 / 0.35); - border-color: rgb(100 116 139 / 0.45); -} - -.worker-pill-default { - color: rgb(203 213 225); - background-color: rgb(51 65 85 / 0.35); - border-color: rgb(100 116 139 / 0.45); -} - -.worker-pill-meta { - color: rgb(147 197 253); - background-color: rgb(37 99 235 / 0.2); - border-color: rgb(59 130 246 / 0.35); -} - -.worker-pill-sfw { - color: rgb(110 231 183); - background-color: rgb(5 150 105 / 0.2); - border-color: rgb(16 185 129 / 0.35); -} - -.worker-pill-suggestive { - color: rgb(252 211 77); - background-color: rgb(180 83 9 / 0.2); - border-color: rgb(245 158 11 / 0.35); -} - -.worker-pill-nsfw { - color: rgb(252 165 165); - background-color: rgb(153 27 27 / 0.25); - border-color: rgb(248 113 113 / 0.4); -} - -.worker-pill-compact { - padding: 0.125rem 0.375rem; - font-size: 0.6875rem; - line-height: 1rem; - font-weight: 500; -} - -/* Immersive feed stage + media stack behavior */ -body.is-feed-stage-active:not(.is-fullscreen):not(.is-chrome-hidden) { - overflow-x: hidden; -} - -body.is-feed-stage-active.is-fullscreen { - --topbar-height: 0px; -} - -body.is-feed-stage-active.is-fullscreen [data-topbar='1'] { - display: none !important; -} - -@media (min-width: 768px) { - body.is-feed-stage-active [data-float-controls='1'] { - bottom: 0.85rem; - } -} - -[data-stage-panel='feed'] [data-stage-main='1'] { - margin-left: auto; - margin-right: auto; -} - -[data-stage-panel='feed'] [data-media-stage='feed'] { - position: relative; - width: 100%; - min-height: 320px; - height: calc( - 100dvh - var(--topbar-height) - var(--bottom-nav-height) - (var(--overlay-gap, 0.75rem) * 2) - ); - overflow: hidden; - border-radius: var(--radius-md); - background: color-mix(in srgb, var(--color-surface-alt) 65%, transparent); - overscroll-behavior: none; - touch-action: pan-y; -} - -/* When the shared scroll shell already reserves topbar/bottom-nav space, - keep feed-stage content flush to the header and fully contained in the host. */ -body.nc-content-scroll-shell.is-feed-stage-active [data-stage-main='1'].pt-topbar-gap { - padding-top: 0; -} - -body.nc-content-scroll-shell.is-feed-stage-active [data-stage-main='1'].pb-navbar-gap { - padding-bottom: 0; -} - -body.nc-content-scroll-shell.is-feed-stage-active [data-stage-panel='feed'] [data-media-stage='feed'] { - min-height: 0; - height: 100%; -} - -@supports not (height: 100dvh) { - [data-stage-panel='feed'] [data-media-stage='feed'] { - height: calc( - 100vh - var(--topbar-height) - var(--bottom-nav-height) - (var(--overlay-gap, 0.75rem) * 2) - ); - } -} - -@media (min-width: 768px) { - body.is-feed-stage-active [data-stage-main='1'].pt-topbar-gap { - padding-top: var(--overlay-gap, 0.75rem); - } - - body.is-feed-stage-active [data-stage-main='1'].pb-navbar-gap { - padding-bottom: 0; - } - - body.is-feed-stage-active [data-stage-panel='feed'] [data-media-stage='feed'] { - height: calc(100dvh - var(--topbar-height)); - } - - @supports not (height: 100dvh) { - body.is-feed-stage-active [data-stage-panel='feed'] [data-media-stage='feed'] { - height: calc(100vh - var(--topbar-height)); - } - } -} - -/* Feed home panels are no-scroll stages; keep their final no-gap state from first paint. */ -.page-panel[data-stage-panel='feed'] [data-stage-main='1'].pt-topbar-gap { - padding-top: 0; -} - -[data-stage-panel='feed'] [data-media-stage='feed'] .media { - position: absolute; - inset: 0; - display: block; - visibility: hidden; - opacity: 0; - z-index: 0; - transition: - opacity 0.32s ease, - transform 0.32s ease, - visibility 0s linear 0.32s; -} - -[data-stage-panel='feed'] [data-media-stage='feed'] .media.is-active { - visibility: visible; - opacity: 1; - z-index: 1; - transition: - opacity 0.32s ease, - transform 0.32s ease, - visibility 0s linear 0s; -} - -[data-stage-panel='feed'] [data-media-stage='feed'] img.media, -[data-stage-panel='feed'] [data-media-stage='feed'] video.media { - width: 100%; - height: 100%; - object-fit: contain !important; - object-position: center; -} - -[data-stage-panel='feed'] [data-media-stage='feed'] .media.fly-in-up { - z-index: 2; - animation: nc-media-stack-fly-in-up 0.32s ease both; -} - -[data-stage-panel='feed'] [data-media-stage='feed'] .media.fly-in-down { - z-index: 2; - animation: nc-media-stack-fly-in-down 0.32s ease both; -} - -[data-stage-panel='feed'] [data-media-stage='feed'] .media.fly-out-up { - animation: nc-media-stack-fly-out-up 0.32s ease both; -} - -[data-stage-panel='feed'] [data-media-stage='feed'] .media.fly-out-down { - animation: nc-media-stack-fly-out-down 0.32s ease both; -} - -@keyframes nc-media-stack-fly-in-up { - from { - transform: translateY(9%); - opacity: 0; - } - to { - transform: translateY(0); - opacity: 1; - } -} - -@keyframes nc-media-stack-fly-in-down { - from { - transform: translateY(-9%); - opacity: 0; - } - to { - transform: translateY(0); - opacity: 1; - } -} - -@keyframes nc-media-stack-fly-out-up { - from { - transform: translateY(0); - opacity: 1; - } - to { - transform: translateY(-9%); - opacity: 0; - } -} - -@keyframes nc-media-stack-fly-out-down { - from { - transform: translateY(0); - opacity: 1; - } - to { - transform: translateY(9%); - opacity: 0; - } -} - -/* Shared pagination utility */ -.nc-pagination-container { - display: grid; - width: 100%; - align-items: center; - gap: 0.625rem; -} -.nc-pagination-container.nc-pagination-top { - grid-template-columns: minmax(0, 1fr); - grid-template-areas: - 'info' - 'center' - 'buttons'; -} -.nc-pagination-container.nc-pagination-bottom { - grid-template-columns: minmax(0, 1fr); - grid-template-areas: - 'buttons' - 'center' - 'info'; -} -.nc-pagination-meta { - grid-area: info; - display: flex; - min-width: 0; - flex-wrap: wrap; - align-items: center; - justify-content: center; - gap: 0.625rem; -} -.nc-pagination-info { - display: block; - min-width: 0; - flex: 1 1 auto; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - text-align: center; - color: var(--color-text-dim); - font-size: var(--font-size-xs); -} -.nc-pagination-page-size-label { - display: inline-flex; - flex: 0 0 auto; - align-items: center; - gap: 0.375rem; - color: var(--color-text-dim); - font-size: var(--font-size-xs); - white-space: nowrap; -} -.nc-pagination-page-size { - min-height: 2.1rem; - min-width: 4.5rem; - padding: 0.35rem 0.5rem; - border: 1px solid var(--color-border-strong); - border-radius: var(--radius-md); - background: var(--color-surface-alt); - color: var(--color-text); - font-size: var(--font-size-sm); -} -.nc-pagination-center { - grid-area: center; - display: flex; - width: 100%; - justify-content: center; -} -.nc-pagination-center-slot { - display: inline-flex; - align-items: center; - justify-content: center; -} -.nc-pagination-btns { - grid-area: buttons; - display: flex; - width: 100%; - flex-wrap: wrap; - align-items: center; - justify-content: center; - gap: 0.25rem; -} -.nc-pagination-btn { - box-sizing: border-box; - display: inline-flex; - min-height: 2.1rem; - min-width: 2.1rem; - flex: 1 1 0; - align-items: center; - justify-content: center; - gap: 0.25rem; - border: 1px solid var(--color-border-strong); - border-radius: var(--radius-md); - background: var(--color-surface-alt); - color: var(--color-text); - font-size: var(--font-size-sm); - font-weight: 600; - line-height: 1; - white-space: nowrap; - cursor: pointer; - transition: - background-color var(--transition-fast), - border-color var(--transition-fast), - box-shadow var(--transition-fast), - color var(--transition-fast), - opacity var(--transition-fast); -} -.nc-pagination-btn svg { - width: 1rem; - height: 1rem; - pointer-events: none; -} -.nc-pagination-btn:hover:not(:disabled) { - background: var(--color-surface-raised); -} -.nc-pagination-btn:focus-visible { - outline: none; - box-shadow: 0 0 0 2px var(--color-accent-soft); -} -.nc-pagination-btn:disabled { - opacity: 0.5; - cursor: not-allowed; -} -.nc-pagination-btn-active, -.nc-pagination-btn[aria-current='page'] { - border-color: var(--color-action-border); - background: var(--color-primary-dim); - color: var(--color-action-alt-text); -} - -@media (min-width: 640px) { - .nc-pagination-container.nc-pagination-top, - .nc-pagination-container.nc-pagination-bottom { - grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); - grid-template-areas: 'info center buttons'; - } - .nc-pagination-info { - width: auto; - max-width: 100%; - text-align: left; - } - .nc-pagination-meta { - justify-self: start; - justify-content: flex-start; - } - .nc-pagination-center { - width: auto; - justify-self: center; - } - .nc-pagination-btns { - width: auto; - justify-self: end; - flex-wrap: nowrap; - overflow-x: auto; - } - .nc-pagination-btn { - flex: 0 0 auto; - min-width: 2.25rem; - padding: 0.35rem 0.55rem; - } -} - -/* Shared results-card mode layouts */ -[data-nc-result-card='1'] [data-nc-result-card-preview='1'] { - overflow: hidden; - border-radius: var(--radius-md); -} - -[data-nc-result-card='1'] [data-nc-result-card-body='1'] { - min-width: 0; - display: flex; - flex: 1 1 auto; - flex-direction: column; - gap: 0.45rem; -} - -[data-nc-result-card='1'] [data-nc-result-card-title='1'] { - min-width: 0; - color: var(--color-text); - font-weight: 600; - overflow-wrap: anywhere; -} - -[data-nc-result-card='1'] [data-nc-result-card-meta='1'] { - min-width: 0; - color: var(--color-text-dim); - font-size: var(--font-size-xs); -} - -[data-nc-result-card='1'] [data-nc-result-card-actions='1'] { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 0.5rem; -} - -[data-nc-results-content='1'][data-nc-display-mode='grid'] [data-nc-result-card='1'] { - display: flex; - flex-direction: column; -} - -[data-nc-results-content='1'][data-nc-display-mode='list'] [data-nc-result-card='1'] { - display: grid; - grid-template-columns: clamp(108px, 18vw, 188px) minmax(0, 1fr) auto; - align-items: stretch; - gap: 0.75rem; - text-align: left; -} - -[data-nc-results-content='1'][data-nc-display-mode='list'] - [data-nc-result-card='1'][data-nc-result-card-no-actions='1'] { - grid-template-columns: clamp(108px, 18vw, 188px) minmax(0, 1fr); -} - -[data-nc-results-content='1'][data-nc-display-mode='list'] - [data-nc-result-card='1'] - [data-nc-result-card-preview='1'] { - height: 100%; - min-height: 92px; -} - -[data-nc-results-content='1'][data-nc-display-mode='list'] - [data-nc-result-card='1'] - [data-nc-result-card-preview='1'][data-nc-thumb-ratio='16-9'] { - align-self: start; - height: auto; - min-height: 0; - aspect-ratio: 16/9; -} - -[data-nc-results-content='1'][data-nc-display-mode='list'] - [data-nc-result-card='1'] - [data-nc-result-card-actions='1'] { - justify-content: flex-end; - align-self: center; -} - -@media (max-width: 640px) { - [data-nc-results-content='1'][data-nc-display-mode='list'] [data-nc-result-card='1'] { - grid-template-columns: 96px minmax(0, 1fr); - } - - [data-nc-results-content='1'][data-nc-display-mode='list'] - [data-nc-result-card='1'] - [data-nc-result-card-actions='1'] { - grid-column: 1/-1; - justify-content: stretch; - } -} - -@media (max-width: 767px) { - [data-bottom-nav][data-page-switcher='1'] { - display: none !important; - } - [data-bottom-nav] { - position: fixed; - left: 0; - right: 0; - bottom: 0; - min-height: var(--bottom-nav-height); - justify-content: space-around; - border-width: 1px 0 0; - border-radius: 0; - padding: 0.35rem max(0.5rem, env(safe-area-inset-right)) - calc(0.35rem + env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left)); - box-shadow: var(--shadow-md); - } - [data-bottom-nav] [data-navbar-layout='mobile'] { - display: flex; - justify-content: space-around; - } - [data-bottom-nav] [data-navbar-layout='desktop'] { - display: none !important; - } - [data-bottom-nav] a { - flex: 1 1 0; - max-width: 8rem; - flex-direction: column; - gap: 0.22rem; - min-height: calc(var(--bottom-nav-height) - 0.75rem); - padding: 0.25rem 0.4rem; - font-size: 0.68rem; - letter-spacing: 0.02em; - } - [data-bottom-nav] a span { - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } -} - -@media (min-width: 768px) { - [data-bottom-nav][data-mobile-nav='1'] { - display: none !important; - } - [data-bottom-nav] { - position: sticky; - left: auto; - right: auto; - bottom: auto; - top: calc(var(--topbar-height, 56px) + var(--overlay-gap, 0.75rem)); - z-index: 51; - width: min(1504px, calc(100% - 2rem)); - margin: calc(var(--topbar-height, 56px) + var(--overlay-gap, 0.75rem)) auto 0.85rem; - justify-content: stretch; - border-radius: var(--radius-lg); - padding: 0.45rem 0.5rem; - box-shadow: var(--shadow-sm); - } - [data-topbar='1'] [data-bottom-nav][data-page-switcher='1'] { - position: static; - left: auto; - right: auto; - top: auto; - bottom: auto; - transform: none; - z-index: auto; - display: inline-flex; - align-items: center; - justify-content: flex-end; - width: auto; - max-width: 100%; - height: auto; - margin: 0; - border: 1px solid var(--color-bar-surface-border); - border-radius: var(--radius-pill); - background: var(--color-bar-surface); - box-shadow: var(--shadow-sm); - padding: 0.22rem; - } - [data-topbar='1'] [data-bottom-nav][data-page-switcher='1'] [data-navbar-layout='desktop'] { - width: auto; - max-width: 100%; - justify-content: flex-end; - gap: 0.22rem; - overflow-x: auto; - scrollbar-width: thin; - } - [data-topbar='1'] [data-bottom-nav][data-page-switcher='1'] a { - flex: 0 0 auto; - min-height: 2rem; - padding: 0.35rem 0.75rem; - border-radius: var(--radius-pill); - border-color: transparent; - background: transparent; - color: var(--color-bar-text-muted); - } - [data-topbar='1'] [data-bottom-nav][data-page-switcher='1'] a:hover { - border-color: var(--color-bar-surface-border); - background: var(--color-bar-bg); - color: var(--color-bar-text); - } - [data-topbar='1'] [data-bottom-nav][data-page-switcher='1'] a.is-active { - border-color: var(--color-action-border); - background: var(--color-primary-dim); - color: var(--color-bar-text); - } - [data-bottom-nav] [data-navbar-layout='mobile'] { - display: none !important; - } - [data-bottom-nav] [data-navbar-layout='desktop'] { - display: flex; - justify-content: stretch; - } - [data-bottom-nav] a { - flex: 1 1 0; - min-width: 0; - } - [data-bottom-nav] a span { - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .pb-navbar-gap { - padding-bottom: 1rem; - } -} - -.\!container { - width: 100% !important; -} -.container { - width: 100%; -} -@media (min-width: 640px) { - .\!container { - max-width: 640px !important; - } - .container { - max-width: 640px; - } -} -@media (min-width: 768px) { - .\!container { - max-width: 768px !important; - } - .container { - max-width: 768px; - } -} -@media (min-width: 1024px) { - .\!container { - max-width: 1024px !important; - } - .container { - max-width: 1024px; - } -} -@media (min-width: 1280px) { - .\!container { - max-width: 1280px !important; - } - .container { - max-width: 1280px; - } -} -@media (min-width: 1536px) { - .\!container { - max-width: 1536px !important; - } - .container { - max-width: 1536px; - } -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} -.pointer-events-none { - pointer-events: none; -} -.pointer-events-auto { - pointer-events: auto; -} -.\!visible { - visibility: visible !important; -} -.visible { - visibility: visible; -} -.invisible { - visibility: hidden; -} -.collapse { - visibility: collapse; -} -.static { - position: static; -} -.\!fixed { - position: fixed !important; -} -.fixed { - position: fixed; -} -.absolute { - position: absolute; -} -.relative { - position: relative; -} -.sticky { - position: sticky; -} -.inset-0 { - inset: 0; -} -.inset-4 { - inset: 1rem; -} -.inset-8 { - inset: 2rem; -} -.inset-x-0 { - left: 0; - right: 0; -} -.inset-y-0 { - top: 0; - bottom: 0; -} -.-right-1 { - right: -0.25rem; -} -.-right-3 { - right: -0.75rem; -} -.-top-1 { - top: -0.25rem; -} -.-top-3 { - top: -0.75rem; -} -.bottom-0 { - bottom: 0; -} -.bottom-1\.5 { - bottom: 0.375rem; -} -.bottom-\[-34px\] { - bottom: -34px; -} -.bottom-\[calc\(var\(--bottom-nav-height\)\+0\.85rem\)\] { - bottom: calc(var(--bottom-nav-height) + 0.85rem); -} -.bottom-\[calc\(var\(--bottom-nav-height\2c 56px\)\+0\.85rem\)\] { - bottom: calc(var(--bottom-nav-height, 56px) + 0.85rem); -} -.bottom-\[calc\(var\(--bottom-nav-height\2c 56px\)\+4rem\)\] { - bottom: calc(var(--bottom-nav-height, 56px) + 4rem); -} -.bottom-full { - bottom: 100%; -} -.left-0 { - left: 0; -} -.left-1\.5 { - left: 0.375rem; -} -.left-1\/2 { - left: 50%; -} -.left-3 { - left: 0.75rem; -} -.right-0 { - right: 0; -} -.right-1\.5 { - right: 0.375rem; -} -.right-14 { - right: 3.5rem; -} -.right-2 { - right: 0.5rem; -} -.right-2\.5 { - right: 0.625rem; -} -.right-3 { - right: 0.75rem; -} -.right-4 { - right: 1rem; -} -.right-\[0\.6rem\] { - right: 0.6rem; -} -.right-\[0\.85rem\] { - right: 0.85rem; -} -.right-\[var\(--overlay-gap\2c \.75rem\)\] { - right: var(--overlay-gap, 0.75rem); -} -.top-0 { - top: 0; -} -.top-1\.5 { - top: 0.375rem; -} -.top-1\/2 { - top: 50%; -} -.top-2 { - top: 0.5rem; -} -.top-2\.5 { - top: 0.625rem; -} -.top-3 { - top: 0.75rem; -} -.top-4 { - top: 1rem; -} -.top-\[-38px\] { - top: -38px; -} -.top-\[0\.4rem\] { - top: 0.4rem; -} -.top-\[calc\(100\%\+6px\)\] { - top: calc(100% + 6px); -} -.top-\[calc\(var\(--topbar-height\)\+1rem\)\] { - top: calc(var(--topbar-height) + 1rem); -} -.top-\[var\(--overlay-gap\2c \.75rem\)\] { - top: var(--overlay-gap, 0.75rem); -} -.top-\[var\(--topbar-height\)\] { - top: var(--topbar-height); -} -.top-full { - top: 100%; -} -.isolate { - isolation: isolate; -} -.z-10 { - z-index: 10; -} -.z-20 { - z-index: 20; -} -.z-30 { - z-index: 30; -} -.z-40 { - z-index: 40; -} -.z-50 { - z-index: 50; -} -.z-\[1000\] { - z-index: 1000; -} -.z-\[10050\] { - z-index: 10050; -} -.z-\[10100\] { - z-index: 10100; -} -.z-\[120\] { - z-index: 120; -} -.z-\[130\] { - z-index: 130; -} -.z-\[160\] { - z-index: 160; -} -.z-\[180\] { - z-index: 180; -} -.z-\[190\] { - z-index: 190; -} -.z-\[1\] { - z-index: 1; -} -.z-\[200\] { - z-index: 200; -} -.z-\[220\] { - z-index: 220; -} -.z-\[2\] { - z-index: 2; -} -.z-\[300\] { - z-index: 300; -} -.z-\[48\] { - z-index: 48; -} -.z-\[5000\] { - z-index: 5000; -} -.z-\[60\] { - z-index: 60; -} -.z-\[9980\] { - z-index: 9980; -} -.z-\[9990\] { - z-index: 9990; -} -.z-\[9999\] { - z-index: 9999; -} -.col-\[1\/-1\], -.col-span-full { - grid-column: 1/-1; -} -.m-0 { - margin: 0; -} -.-mx-4 { - margin-left: -1rem; - margin-right: -1rem; -} -.mx-1 { - margin-left: 0.25rem; - margin-right: 0.25rem; -} -.mx-2 { - margin-left: 0.5rem; - margin-right: 0.5rem; -} -.mx-auto { - margin-left: auto; - margin-right: auto; -} -.my-1 { - margin-top: 0.25rem; - margin-bottom: 0.25rem; -} -.my-2 { - margin-top: 0.5rem; - margin-bottom: 0.5rem; -} -.-mb-4 { - margin-bottom: -1rem; -} -.mb-1 { - margin-bottom: 0.25rem; -} -.mb-2 { - margin-bottom: 0.5rem; -} -.mb-4 { - margin-bottom: 1rem; -} -.ml-1 { - margin-left: 0.25rem; -} -.ml-auto { - margin-left: auto; -} -.mr-1 { - margin-right: 0.25rem; -} -.mr-2 { - margin-right: 0.5rem; -} -.mr-auto { - margin-right: auto; -} -.mt-0 { - margin-top: 0; -} -.mt-1 { - margin-top: 0.25rem; -} -.mt-2 { - margin-top: 0.5rem; -} -.mt-4 { - margin-top: 1rem; -} -.mt-auto { - margin-top: auto; -} -.box-border { - box-sizing: border-box; -} -.line-clamp-2 { - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; -} -.block { - display: block; -} -.inline-block { - display: inline-block; -} -.inline { - display: inline; -} -.flex { - display: flex; -} -.inline-flex { - display: inline-flex; -} -.table { - display: table; -} -.\!grid { - display: grid !important; -} -.grid { - display: grid; -} -.contents { - display: contents; -} -.\!hidden { - display: none !important; -} -.hidden { - display: none; -} -.aspect-video { - aspect-ratio: 16/9; -} -.h-1\.5 { - height: 0.375rem; -} -.h-10 { - height: 2.5rem; -} -.h-11 { - height: 2.75rem; -} -.h-12 { - height: 3rem; -} -.h-14 { - height: 3.5rem; -} -.h-16 { - height: 4rem; -} -.h-2 { - height: 0.5rem; -} -.h-2\.5 { - height: 0.625rem; -} -.h-3 { - height: 0.75rem; -} -.h-3\.5 { - height: 0.875rem; -} -.h-36 { - height: 9rem; -} -.h-4 { - height: 1rem; -} -.h-40 { - height: 10rem; -} -.h-5 { - height: 1.25rem; -} -.h-6 { - height: 1.5rem; -} -.h-64 { - height: 16rem; -} -.h-7 { - height: 1.75rem; -} -.h-8 { - height: 2rem; -} -.h-9 { - height: 2.25rem; -} -.h-\[100px\] { - height: 100px; -} -.h-\[130px\] { - height: 130px; -} -.h-\[14px\] { - height: 14px; -} -.h-\[15px\] { - height: 15px; -} -.h-\[200px\] { - height: 200px; -} -.h-\[220px\] { - height: 220px; -} -.h-\[2px\] { - height: 2px; -} -.h-\[360px\] { - height: 360px; -} -.h-\[3px\] { - height: 3px; -} -.h-\[42px\] { - height: 42px; -} -.h-\[72px\] { - height: 72px; -} -.h-\[88px\] { - height: 88px; -} -.h-\[min\(74vh\2c - calc\(100vh-var\(--topbar-height\)-var\(--bottom-nav-height\)-2rem\)\)\] { - height: min( - 74vh, - calc(100vh - var(--topbar-height) - var(--bottom-nav-height) - 2rem) - ); -} -.h-\[var\(--bar-height\2c 56px\)\] { - height: var(--bar-height, 56px); -} -.h-full { - height: 100%; -} -.h-px { - height: 1px; -} -.h-screen { - height: 100vh; -} -.max-h-52 { - max-height: 13rem; -} -.max-h-\[320px\] { - max-height: 320px; -} -.max-h-\[360px\] { - max-height: 360px; -} -.max-h-\[55vh\] { - max-height: 55vh; -} -.max-h-\[70vh\] { - max-height: 70vh; -} -.max-h-\[80vh\] { - max-height: 80vh; -} -.max-h-\[90vh\] { - max-height: 90vh; -} -.max-h-\[min\(85vh\2c 740px\)\] { - max-height: min(85vh, 740px); -} -.max-h-full { - max-height: 100%; -} -.max-h-none { - max-height: none; -} -.min-h-0 { - min-height: 0; -} -.min-h-\[200px\] { - min-height: 200px; -} -.min-h-\[240px\] { - min-height: 240px; -} -.min-h-\[360px\] { - min-height: 360px; -} -.min-h-\[50vh\] { - min-height: 50vh; -} -.min-h-\[60vh\] { - min-height: 60vh; -} -.min-h-\[92px\] { - min-height: 92px; -} -.min-h-full { - min-height: 100%; -} -.min-h-screen { - min-height: 100vh; -} -.w-0 { - width: 0; -} -.w-1\.5 { - width: 0.375rem; -} -.w-10 { - width: 2.5rem; -} -.w-11 { - width: 2.75rem; -} -.w-12 { - width: 3rem; -} -.w-14 { - width: 3.5rem; -} -.w-16 { - width: 4rem; -} -.w-2 { - width: 0.5rem; -} -.w-2\.5 { - width: 0.625rem; -} -.w-20 { - width: 5rem; -} -.w-3 { - width: 0.75rem; -} -.w-3\.5 { - width: 0.875rem; -} -.w-32 { - width: 8rem; -} -.w-36 { - width: 9rem; -} -.w-4 { - width: 1rem; -} -.w-48 { - width: 12rem; -} -.w-5 { - width: 1.25rem; -} -.w-56 { - width: 14rem; -} -.w-6 { - width: 1.5rem; -} -.w-60 { - width: 15rem; -} -.w-64 { - width: 16rem; -} -.w-7 { - width: 1.75rem; -} -.w-8 { - width: 2rem; -} -.w-9 { - width: 2.25rem; -} -.w-\[11\.1\%\] { - width: 11.1%; -} -.w-\[18px\] { - width: 18px; -} -.w-\[33\.3\%\] { - width: 33.3%; -} -.w-\[380px\] { - width: 380px; -} -.w-\[min\(100\%\2c 1200px\)\] { - width: min(100%, 1200px); -} -.w-\[min\(100\%\2c 560px\)\] { - width: min(100%, 560px); -} -.w-\[min\(340px\2c calc\(100vw-1\.5rem\)\)\] { - width: min(340px, calc(100vw - 1.5rem)); -} -.w-\[min\(520px\2c 92vw\)\] { - width: min(520px, 92vw); -} -.w-\[min\(720px\2c 92vw\)\] { - width: min(720px, 92vw); -} -.w-\[min\(96vw\2c 1100px\)\] { - width: min(96vw, 1100px); -} -.w-fit { - width: -moz-fit-content; - width: fit-content; -} -.w-full { - width: 100%; -} -.w-px { - width: 1px; -} -.min-w-0 { - min-width: 0; -} -.min-w-5 { - min-width: 1.25rem; -} -.min-w-\[110px\] { - min-width: 110px; -} -.min-w-\[160px\] { - min-width: 160px; -} -.min-w-\[220px\] { - min-width: 220px; -} -.min-w-\[40px\] { - min-width: 40px; -} -.min-w-\[60px\] { - min-width: 60px; -} -.max-w-6xl { - max-width: 72rem; -} -.max-w-\[120px\] { - max-width: 120px; -} -.max-w-\[160px\] { - max-width: 160px; -} -.max-w-\[220px\] { - max-width: 220px; -} -.max-w-\[360px\] { - max-width: 360px; -} -.max-w-\[520px\] { - max-width: 520px; -} -.max-w-\[760px\] { - max-width: 760px; -} -.max-w-\[95vw\] { - max-width: 95vw; -} -.max-w-\[960px\] { - max-width: 960px; -} -.max-w-\[min\(520px\2c 90vw\)\] { - max-width: min(520px, 90vw); -} -.max-w-full { - max-width: 100%; -} -.max-w-md { - max-width: 28rem; -} -.max-w-screen-2xl { - max-width: 1536px; - margin-left: auto; - margin-right: auto; -} -.max-w-sm { - max-width: 24rem; -} -.max-w-xs { - max-width: 20rem; -} -.flex-1 { - flex: 1 1 0%; -} -.flex-\[1_1_0\] { - flex: 1 1 0; -} -.flex-\[1_1_140px\] { - flex: 1 1 140px; -} -.flex-\[1_1_160px\] { - flex: 1 1 160px; -} -.flex-\[1_1_260px\] { - flex: 1 1 260px; -} -.flex-shrink-0, -.shrink-0 { - flex-shrink: 0; -} -.grow { - flex-grow: 1; -} -.table-fixed { - table-layout: fixed; -} -.origin-left { - transform-origin: left; -} -.-translate-x-1\/2 { - --tw-translate-x: -50%; -} -.-translate-x-1\/2, -.-translate-y-1\/2 { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.-translate-y-1\/2 { - --tw-translate-y: -50%; -} -.translate-y-0 { - --tw-translate-y: 0px; -} -.translate-y-0, -.translate-y-2 { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.translate-y-2 { - --tw-translate-y: 0.5rem; -} -.rotate-180 { - --tw-rotate: 180deg; -} -.rotate-180, -.transform { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -@keyframes pulse { - 50% { - opacity: 0.5; - } -} -.animate-pulse { - animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; -} -@keyframes spin { - to { - transform: rotate(1turn); - } -} -.animate-spin { - animation: spin 1s linear infinite; -} -.cursor-grab { - cursor: grab; -} -.cursor-help { - cursor: help; -} -.cursor-not-allowed { - cursor: not-allowed; -} -.cursor-pointer { - cursor: pointer; -} -.select-none { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -.resize-y { - resize: vertical; -} -.resize { - resize: both; -} -.list-disc { - list-style-type: disc; -} -.list-none { - list-style-type: none; -} -.appearance-none { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} -.auto-rows-\[minmax\(0\2c 1fr\)\] { - grid-auto-rows: minmax(0, 1fr); -} -.grid-cols-1 { - grid-template-columns: repeat(1, minmax(0, 1fr)); -} -.grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); -} -.grid-cols-6 { - grid-template-columns: repeat(6, minmax(0, 1fr)); -} -.grid-cols-\[90px_minmax\(0\2c 1fr\)\] { - grid-template-columns: 90px minmax(0, 1fr); -} -.grid-cols-\[repeat\(auto-fit\2c minmax\(140px\2c 1fr\)\)\] { - grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); -} -.flex-row { - flex-direction: row; -} -.flex-col { - flex-direction: column; -} -.flex-col-reverse { - flex-direction: column-reverse; -} -.flex-wrap { - flex-wrap: wrap; -} -.place-items-center { - place-items: center; -} -.items-start { - align-items: flex-start; -} -.items-end { - align-items: flex-end; -} -.items-center { - align-items: center; -} -.items-stretch { - align-items: stretch; -} -.justify-start { - justify-content: flex-start; -} -.justify-end { - justify-content: flex-end; -} -.justify-center { - justify-content: center; -} -.justify-between { - justify-content: space-between; -} -.gap-0 { - gap: 0; -} -.gap-1\.5 { - gap: 0.375rem; -} -.gap-2 { - gap: 0.5rem; -} -.gap-3 { - gap: 0.75rem; -} -.gap-x-1\.5 { - -moz-column-gap: 0.375rem; - column-gap: 0.375rem; -} -.gap-x-3 { - -moz-column-gap: 0.75rem; - column-gap: 0.75rem; -} -.gap-y-1\.5 { - row-gap: 0.375rem; -} -.space-y-1 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.25rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); -} -.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.375rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); -} -.space-y-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.5rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); -} -.space-y-3 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.75rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.75rem * var(--tw-space-y-reverse)); -} -.space-y-4 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(1rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1rem * var(--tw-space-y-reverse)); -} -.space-y-5 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(1.25rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1.25rem * var(--tw-space-y-reverse)); -} -.divide-y > :not([hidden]) ~ :not([hidden]) { - --tw-divide-y-reverse: 0; - border-top-width: calc(1px * (1 - var(--tw-divide-y-reverse))); - border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); -} -.divide-slate-800\/50 > :not([hidden]) ~ :not([hidden]) { - border-color: rgba(30, 41, 59, 0.5); -} -.self-start { - align-self: flex-start; -} -.self-end { - align-self: flex-end; -} -.self-center { - align-self: center; -} -.overflow-auto { - overflow: auto; -} -.overflow-hidden { - overflow: hidden; -} -.overflow-visible { - overflow: visible; -} -.overflow-x-auto { - overflow-x: auto; -} -.overflow-y-auto { - overflow-y: auto; -} -.overflow-x-hidden { - overflow-x: hidden; -} -.truncate { - overflow: hidden; - white-space: nowrap; -} -.text-ellipsis, -.truncate { - text-overflow: ellipsis; -} -.whitespace-nowrap { - white-space: nowrap; -} -.whitespace-pre-line { - white-space: pre-line; -} -.break-words { - overflow-wrap: break-word; -} -.break-all { - word-break: break-all; -} -.rounded { - border-radius: 0.25rem; -} -.rounded-full { - border-radius: 9999px; -} -.rounded-lg { - border-radius: 0.5rem; -} -.rounded-md { - border-radius: 0.375rem; -} -.rounded-l-lg { - border-top-left-radius: 0.5rem; - border-bottom-left-radius: 0.5rem; -} -.rounded-r-lg { - border-top-right-radius: 0.5rem; - border-bottom-right-radius: 0.5rem; -} -.border { - border-width: 1px; -} -.border-0 { - border-width: 0; -} -.border-2 { - border-width: 2px; -} -.border-b { - border-bottom-width: 1px; -} -.border-l { - border-left-width: 1px; -} -.border-l-0 { - border-left-width: 0; -} -.border-l-4 { - border-left-width: 4px; -} -.border-r-0 { - border-right-width: 0; -} -.border-t { - border-top-width: 1px; -} -.border-dashed { - border-style: dashed; -} -.border-none { - border-style: none; -} -.border-\[\#333\] { - --tw-border-opacity: 1; - border-color: rgb(51 51 51 / var(--tw-border-opacity, 1)); -} -.border-\[\#444\] { - --tw-border-opacity: 1; - border-color: rgb(68 68 68 / var(--tw-border-opacity, 1)); -} -.border-\[var\(--color-accent\)\] { - border-color: var(--color-accent); -} -.border-\[var\(--color-action-border\)\] { - border-color: var(--color-action-border); -} -.border-\[var\(--color-bar-border\)\] { - border-color: var(--color-bar-border); -} -.border-\[var\(--color-bar-border\2c \#1e1e1e\)\] { - border-color: var(--color-bar-border, #1e1e1e); -} -.border-\[var\(--color-bar-surface-border\)\] { - border-color: var(--color-bar-surface-border); -} -.border-\[var\(--color-bar-surface-border\2c \#2a2f3a\)\] { - border-color: var(--color-bar-surface-border, #2a2f3a); -} -.border-\[var\(--color-border\)\] { - border-color: var(--color-border); -} -.border-\[var\(--color-border\2c \#222\)\] { - border-color: var(--color-border, #222); -} -.border-\[var\(--color-border\2c \#333\)\] { - border-color: var(--color-border, #333); -} -.border-\[var\(--color-border-strong\)\] { - border-color: var(--color-border-strong); -} -.border-\[var\(--color-danger-strong\)\] { - border-color: var(--color-danger-strong); -} -.border-\[var\(--color-input-border\)\] { - border-color: var(--color-input-border); -} -.border-\[var\(--color-success-strong\)\] { - border-color: var(--color-success-strong); -} -.border-amber-500 { - --tw-border-opacity: 1; - border-color: rgb(245 158 11 / var(--tw-border-opacity, 1)); -} -.border-amber-500\/30 { - border-color: rgba(245, 158, 11, 0.3); -} -.border-amber-600 { - --tw-border-opacity: 1; - border-color: rgb(217 119 6 / var(--tw-border-opacity, 1)); -} -.border-blue-500 { - --tw-border-opacity: 1; - border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); -} -.border-blue-500\/30 { - border-color: rgba(59, 130, 246, 0.3); -} -.border-emerald-500\/30 { - border-color: rgba(16, 185, 129, 0.3); -} -.border-red-500 { - --tw-border-opacity: 1; - border-color: rgb(239 68 68 / var(--tw-border-opacity, 1)); -} -.border-red-500\/30 { - border-color: rgba(239, 68, 68, 0.3); -} -.border-slate-600 { - --tw-border-opacity: 1; - border-color: rgb(71 85 105 / var(--tw-border-opacity, 1)); -} -.border-slate-700 { - --tw-border-opacity: 1; - border-color: rgb(51 65 85 / var(--tw-border-opacity, 1)); -} -.border-slate-700\/50 { - border-color: rgba(51, 65, 85, 0.5); -} -.border-slate-800 { - --tw-border-opacity: 1; - border-color: rgb(30 41 59 / var(--tw-border-opacity, 1)); -} -.border-transparent { - border-color: transparent; -} -.border-white\/10 { - border-color: hsla(0, 0%, 100%, 0.1); -} -.border-white\/15 { - border-color: hsla(0, 0%, 100%, 0.15); -} -.border-white\/20 { - border-color: hsla(0, 0%, 100%, 0.2); -} -.border-white\/30 { - border-color: hsla(0, 0%, 100%, 0.3); -} -.bg-\[\#111\] { - --tw-bg-opacity: 1; - background-color: rgb(17 17 17 / var(--tw-bg-opacity, 1)); -} -.bg-\[\#2cd3a7\] { - --tw-bg-opacity: 1; - background-color: rgb(44 211 167 / var(--tw-bg-opacity, 1)); -} -.bg-\[\#5b8cff\] { - --tw-bg-opacity: 1; - background-color: rgb(91 140 255 / var(--tw-bg-opacity, 1)); -} -.bg-\[\#a78bfa\] { - --tw-bg-opacity: 1; - background-color: rgb(167 139 250 / var(--tw-bg-opacity, 1)); -} -.bg-\[\#f87171\] { - --tw-bg-opacity: 1; - background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1)); -} -.bg-\[\#fbbf24\] { - --tw-bg-opacity: 1; - background-color: rgb(251 191 36 / var(--tw-bg-opacity, 1)); -} -.bg-\[rgba\(0\2c 0\2c 0\2c \.55\)\] { - background-color: rgba(0, 0, 0, 0.55); -} -.bg-\[rgba\(0\2c 0\2c 0\2c \.82\)\] { - background-color: rgba(0, 0, 0, 0.82); -} -.bg-\[rgba\(168\2c 85\2c 247\2c \.18\)\] { - background-color: rgba(168, 85, 247, 0.18); -} -.bg-\[rgba\(255\2c 255\2c 255\2c 0\.3\)\] { - background-color: hsla(0, 0%, 100%, 0.3); -} -.bg-\[rgba\(30\2c 32\2c 38\2c 0\.8\)\] { - background-color: rgba(30, 32, 38, 0.8); -} -.bg-\[rgba\(30\2c 32\2c 38\2c 0\.82\)\] { - background-color: rgba(30, 32, 38, 0.82); -} -.bg-\[rgba\(30\2c 32\2c 38\2c 0\.85\)\] { - background-color: rgba(30, 32, 38, 0.85); -} -.bg-\[rgba\(30\2c 32\2c 38\2c 0\.9\)\] { - background-color: rgba(30, 32, 38, 0.9); -} -.bg-\[rgba\(34\2c 197\2c 94\2c \.18\)\] { - background-color: rgba(34, 197, 94, 0.18); -} -.bg-\[rgba\(59\2c 130\2c 246\2c \.18\)\] { - background-color: rgba(59, 130, 246, 0.18); -} -.bg-\[var\(--_accent\)\] { - background-color: var(-- accent); -} -.bg-\[var\(--color-accent\)\] { - background-color: var(--color-accent); -} -.bg-\[var\(--color-action\)\] { - background-color: var(--color-action); -} -.bg-\[var\(--color-bar-bg\)\] { - background-color: var(--color-bar-bg); -} -.bg-\[var\(--color-bar-bg\2c \#121212\)\] { - background-color: var(--color-bar-bg, #121212); -} -.bg-\[var\(--color-bar-surface\)\] { - background-color: var(--color-bar-surface); -} -.bg-\[var\(--color-bar-surface\2c \#11131a\)\] { - background-color: var(--color-bar-surface, #11131a); -} -.bg-\[var\(--color-bg\)\] { - background-color: var(--color-bg); -} -.bg-\[var\(--color-bg\2c \#0a0a0a\)\] { - background-color: var(--color-bg, #0a0a0a); -} -.bg-\[var\(--color-bg\2c \#0b0c0f\)\] { - background-color: var(--color-bg, #0b0c0f); -} -.bg-\[var\(--color-bg\2c \#0f1117\)\] { - background-color: var(--color-bg, #0f1117); -} -.bg-\[var\(--color-bg-soft\)\] { - background-color: var(--color-bg-soft); -} -.bg-\[var\(--color-canvas-bg\2c \#0f1117\)\] { - background-color: var(--color-canvas-bg, #0f1117); -} -.bg-\[var\(--color-danger-strong\)\] { - background-color: var(--color-danger-strong); -} -.bg-\[var\(--color-dropzone-bg\)\] { - background-color: var(--color-dropzone-bg); -} -.bg-\[var\(--color-input-bg\)\] { - background-color: var(--color-input-bg); -} -.bg-\[var\(--color-input-bg\2c \#11131a\)\] { - background-color: var(--color-input-bg, #11131a); -} -.bg-\[var\(--color-overlay\)\] { - background-color: var(--color-overlay); -} -.bg-\[var\(--color-panel-bg\)\] { - background-color: var(--color-panel-bg); -} -.bg-\[var\(--color-primary-dim\2c \#1a3a5c\)\] { - background-color: var(--color-primary-dim, #1a3a5c); -} -.bg-\[var\(--color-success-strong\)\] { - background-color: var(--color-success-strong); -} -.bg-\[var\(--color-surface\)\] { - background-color: var(--color-surface); -} -.bg-\[var\(--color-surface\2c \#0f172a\)\] { - background-color: var(--color-surface, #0f172a); -} -.bg-\[var\(--color-surface\2c \#1e1e1e\)\] { - background-color: var(--color-surface, #1e1e1e); -} -.bg-\[var\(--color-surface-alt\)\] { - background-color: var(--color-surface-alt); -} -.bg-\[var\(--color-text-dim\)\] { - background-color: var(--color-text-dim); -} -.bg-amber-400 { - --tw-bg-opacity: 1; - background-color: rgb(251 191 36 / var(--tw-bg-opacity, 1)); -} -.bg-amber-500 { - --tw-bg-opacity: 1; - background-color: rgb(245 158 11 / var(--tw-bg-opacity, 1)); -} -.bg-amber-500\/20 { - background-color: rgba(245, 158, 11, 0.2); -} -.bg-black { - --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); -} -.bg-black\/0 { - background-color: transparent; -} -.bg-black\/35 { - background-color: rgba(0, 0, 0, 0.35); -} -.bg-black\/50 { - background-color: rgba(0, 0, 0, 0.5); -} -.bg-black\/55 { - background-color: rgba(0, 0, 0, 0.55); -} -.bg-black\/60 { - background-color: rgba(0, 0, 0, 0.6); -} -.bg-black\/70 { - background-color: rgba(0, 0, 0, 0.7); -} -.bg-black\/80 { - background-color: rgba(0, 0, 0, 0.8); -} -.bg-black\/85 { - background-color: rgba(0, 0, 0, 0.85); -} -.bg-black\/\[\.35\] { - background-color: rgba(0, 0, 0, 0.35); -} -.bg-blue-500 { - --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); -} -.bg-blue-500\/20 { - background-color: rgba(59, 130, 246, 0.2); -} -.bg-blue-600 { - --tw-bg-opacity: 1; - background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); -} -.bg-emerald-400 { - --tw-bg-opacity: 1; - background-color: rgb(52 211 153 / var(--tw-bg-opacity, 1)); -} -.bg-emerald-500 { - --tw-bg-opacity: 1; - background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1)); -} -.bg-emerald-500\/20 { - background-color: rgba(16, 185, 129, 0.2); -} -.bg-emerald-600 { - --tw-bg-opacity: 1; - background-color: rgb(5 150 105 / var(--tw-bg-opacity, 1)); -} -.bg-red-400 { - --tw-bg-opacity: 1; - background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1)); -} -.bg-red-500 { - --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity, 1)); -} -.bg-red-500\/20 { - background-color: rgba(239, 68, 68, 0.2); -} -.bg-red-600 { - --tw-bg-opacity: 1; - background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1)); -} -.bg-slate-400 { - --tw-bg-opacity: 1; - background-color: rgb(148 163 184 / var(--tw-bg-opacity, 1)); -} -.bg-slate-600 { - --tw-bg-opacity: 1; - background-color: rgb(71 85 105 / var(--tw-bg-opacity, 1)); -} -.bg-slate-700 { - --tw-bg-opacity: 1; - background-color: rgb(51 65 85 / var(--tw-bg-opacity, 1)); -} -.bg-slate-800 { - --tw-bg-opacity: 1; - background-color: rgb(30 41 59 / var(--tw-bg-opacity, 1)); -} -.bg-slate-800\/20 { - background-color: rgba(30, 41, 59, 0.2); -} -.bg-slate-800\/50 { - background-color: rgba(30, 41, 59, 0.5); -} -.bg-slate-800\/80 { - background-color: rgba(30, 41, 59, 0.8); -} -.bg-slate-900 { - --tw-bg-opacity: 1; - background-color: rgb(15 23 42 / var(--tw-bg-opacity, 1)); -} -.bg-transparent { - background-color: transparent; -} -.bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); -} -.bg-white\/20 { - background-color: hsla(0, 0%, 100%, 0.2); -} -.bg-white\/30 { - background-color: hsla(0, 0%, 100%, 0.3); -} -.bg-gradient-to-br { - background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); -} -.bg-gradient-to-t { - background-image: linear-gradient(to top, var(--tw-gradient-stops)); -} -.from-\[var\(--color-action\)\] { - --tw-gradient-from: var(--color-action) var(--tw-gradient-from-position); - --tw-gradient-to: hsla(0, 0%, 100%, 0) var(--tw-gradient-to-position); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} -.from-black\/60 { - --tw-gradient-from: rgba(0, 0, 0, 0.6) var(--tw-gradient-from-position); - --tw-gradient-to: transparent var(--tw-gradient-to-position); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} -.to-\[var\(--color-action-border\)\] { - --tw-gradient-to: var(--color-action-border) var(--tw-gradient-to-position); -} -.to-transparent { - --tw-gradient-to: transparent var(--tw-gradient-to-position); -} -.bg-clip-text { - -webkit-background-clip: text; - background-clip: text; -} -.object-contain { - -o-object-fit: contain; - object-fit: contain; -} -.object-cover { - -o-object-fit: cover; - object-fit: cover; -} -.p-0 { - padding: 0; -} -.p-2 { - padding: 0.5rem; -} -.p-3 { - padding: 0.75rem; -} -.p-4 { - padding: 1rem; -} -.px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} -.px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem; -} -.px-4 { - padding-left: 1rem; - padding-right: 1rem; -} -.px-\[var\(--overlay-gap\2c \.75rem\)\] { - padding-left: var(--overlay-gap, 0.75rem); - padding-right: var(--overlay-gap, 0.75rem); -} -.py-0 { - padding-top: 0; - padding-bottom: 0; -} -.py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} -.py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} -.py-4 { - padding-top: 1rem; - padding-bottom: 1rem; -} -.\!pl-9 { - padding-left: 2.25rem !important; -} -.pb-2 { - padding-bottom: 0.5rem; -} -.pb-3 { - padding-bottom: 0.75rem; -} -.pb-4 { - padding-bottom: 1rem; -} -.pb-\[calc\(var\(--bottom-nav-height\)\+var\(--overlay-gap\2c \.75rem\)\)\] { - padding-bottom: calc(var(--bottom-nav-height) + var(--overlay-gap, 0.75rem)); -} -.pl-4 { - padding-left: 1rem; -} -.pl-9 { - padding-left: 2.25rem; -} -.pr-9 { - padding-right: 2.25rem; -} -.pr-\[2\.1rem\] { - padding-right: 2.1rem; -} -.pr-\[3rem\] { - padding-right: 3rem; -} -.pt-2 { - padding-top: 0.5rem; -} -.pt-3 { - padding-top: 0.75rem; -} -.pt-4 { - padding-top: 1rem; -} -.pt-\[calc\(var\(--topbar-height\)\+1rem\)\] { - padding-top: calc(var(--topbar-height) + 1rem); -} -.pt-\[calc\(var\(--topbar-height\)\+var\(--overlay-gap\2c \.75rem\)\)\] { - padding-top: calc(var(--topbar-height) + var(--overlay-gap, 0.75rem)); -} -.pt-\[var\(--topbar-height\)\] { - padding-top: var(--topbar-height); -} -.text-left { - text-align: left; -} -.text-center { - text-align: center; -} -.text-right { - text-align: right; -} -.align-top { - vertical-align: top; -} -.align-middle { - vertical-align: middle; -} -.font-mono { - font-family: - ui-monospace, - SFMono-Regular, - Menlo, - Monaco, - Consolas, - Liberation Mono, - Courier New, - monospace; -} -.text-2xl { - font-size: 1.5rem; - line-height: 2rem; -} -.text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; -} -.text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; -} -.text-\[6rem\] { - font-size: 6rem; -} -.text-base { - font-size: 1rem; - line-height: 1.5rem; -} -.text-lg { - font-size: 1.125rem; - line-height: 1.75rem; -} -.text-sm { - font-size: 0.875rem; - line-height: 1.25rem; -} -.text-xl { - font-size: 1.25rem; - line-height: 1.75rem; -} -.text-xs { - font-size: 0.75rem; - line-height: 1rem; -} -.font-\[650\] { - font-weight: 650; -} -.font-black { - font-weight: 900; -} -.font-bold { - font-weight: 700; -} -.font-extrabold { - font-weight: 800; -} -.font-medium { - font-weight: 500; -} -.font-normal { - font-weight: 400; -} -.font-semibold { - font-weight: 600; -} -.uppercase { - text-transform: uppercase; -} -.lowercase { - text-transform: lowercase; -} -.capitalize { - text-transform: capitalize; -} -.normal-case { - text-transform: none; -} -.italic { - font-style: italic; -} -.tabular-nums { - --tw-numeric-spacing: tabular-nums; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) - var(--tw-numeric-figure) var(--tw-numeric-spacing) - var(--tw-numeric-fraction); -} -.leading-5 { - line-height: 1.25rem; -} -.leading-6 { - line-height: 1.5rem; -} -.leading-\[1\.1\] { - line-height: 1.1; -} -.leading-\[1\.2\] { - line-height: 1.2; -} -.leading-\[1\.3\] { - line-height: 1.3; -} -.leading-\[1\.45\] { - line-height: 1.45; -} -.leading-\[1\.4\] { - line-height: 1.4; -} -.leading-none { - line-height: 1; -} -.leading-relaxed { - line-height: 1.625; -} -.leading-snug { - line-height: 1.375; -} -.leading-tight { - line-height: 1.25; -} -.tracking-\[0\.05em\] { - letter-spacing: 0.05em; -} -.tracking-\[0\.08em\] { - letter-spacing: 0.08em; -} -.tracking-\[0\.3px\] { - letter-spacing: 0.3px; -} -.tracking-\[0\.4px\] { - letter-spacing: 0.4px; -} -.tracking-\[0\.5px\] { - letter-spacing: 0.5px; -} -.tracking-tight { - letter-spacing: -0.025em; -} -.tracking-tighter { - letter-spacing: -0.05em; -} -.tracking-wide { - letter-spacing: 0.025em; -} -.tracking-wider { - letter-spacing: 0.05em; -} -.tracking-widest { - letter-spacing: 0.1em; -} -.text-\[\#23272f\] { - --tw-text-opacity: 1; - color: rgb(35 39 47 / var(--tw-text-opacity, 1)); -} -.text-\[\#4ade80\] { - --tw-text-opacity: 1; - color: rgb(74 222 128 / var(--tw-text-opacity, 1)); -} -.text-\[\#60a5fa\] { - --tw-text-opacity: 1; - color: rgb(96 165 250 / var(--tw-text-opacity, 1)); -} -.text-\[\#9ca3af\] { - --tw-text-opacity: 1; - color: rgb(156 163 175 / var(--tw-text-opacity, 1)); -} -.text-\[\#c084fc\] { - --tw-text-opacity: 1; - color: rgb(192 132 252 / var(--tw-text-opacity, 1)); -} -.text-\[\#ddd\] { - --tw-text-opacity: 1; - color: rgb(221 221 221 / var(--tw-text-opacity, 1)); -} -.text-\[\#eee\] { - --tw-text-opacity: 1; - color: rgb(238 238 238 / var(--tw-text-opacity, 1)); -} -.text-\[\#f87171\] { - --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity, 1)); -} -.text-\[\#fbbf24\] { - --tw-text-opacity: 1; - color: rgb(251 191 36 / var(--tw-text-opacity, 1)); -} -.text-\[\#fff\] { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity, 1)); -} -.text-\[var\(--color-accent\)\] { - color: var(--color-accent); -} -.text-\[var\(--color-accent-glow\)\] { - color: var(--color-accent-glow); -} -.text-\[var\(--color-accent-glow\2c \#a78bfa\)\] { - color: var(--color-accent-glow, #a78bfa); -} -.text-\[var\(--color-action-alt-text\)\] { - color: var(--color-action-alt-text); -} -.text-\[var\(--color-action-border\)\] { - color: var(--color-action-border); -} -.text-\[var\(--color-bar-text\)\] { - color: var(--color-bar-text); -} -.text-\[var\(--color-bar-text\2c \#e6e6e6\)\] { - color: var(--color-bar-text, #e6e6e6); -} -.text-\[var\(--color-bar-text-muted\)\] { - color: var(--color-bar-text-muted); -} -.text-\[var\(--color-danger\)\] { - color: var(--color-danger); -} -.text-\[var\(--color-text\)\] { - color: var(--color-text); -} -.text-\[var\(--color-text\2c \#e6e6e6\)\] { - color: var(--color-text, #e6e6e6); -} -.text-\[var\(--color-text-dim\)\] { - color: var(--color-text-dim); -} -.text-\[var\(--color-text-muted\2c \#888\)\] { - color: var(--color-text-muted, #888); -} -.text-\[var\(--color-text-muted\2c \#a0a0a0\)\] { - color: var(--color-text-muted, #a0a0a0); -} -.text-\[var\(--color-text-muted\2c \#aaa\)\] { - color: var(--color-text-muted, #aaa); -} -.text-\[var\(--color-text-muted\2c \#bbb\)\] { - color: var(--color-text-muted, #bbb); -} -.text-\[var\(--font-size-sm\)\] { - color: var(--font-size-sm); -} -.text-\[var\(--font-size-xs\)\] { - color: var(--font-size-xs); -} -.text-amber-300 { - --tw-text-opacity: 1; - color: rgb(252 211 77 / var(--tw-text-opacity, 1)); -} -.text-amber-400 { - --tw-text-opacity: 1; - color: rgb(251 191 36 / var(--tw-text-opacity, 1)); -} -.text-black { - --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity, 1)); -} -.text-blue-300 { - --tw-text-opacity: 1; - color: rgb(147 197 253 / var(--tw-text-opacity, 1)); -} -.text-blue-400 { - --tw-text-opacity: 1; - color: rgb(96 165 250 / var(--tw-text-opacity, 1)); -} -.text-emerald-300 { - --tw-text-opacity: 1; - color: rgb(110 231 183 / var(--tw-text-opacity, 1)); -} -.text-emerald-400 { - --tw-text-opacity: 1; - color: rgb(52 211 153 / var(--tw-text-opacity, 1)); -} -.text-inherit { - color: inherit; -} -.text-red-300 { - --tw-text-opacity: 1; - color: rgb(252 165 165 / var(--tw-text-opacity, 1)); -} -.text-red-400 { - --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity, 1)); -} -.text-slate-200 { - --tw-text-opacity: 1; - color: rgb(226 232 240 / var(--tw-text-opacity, 1)); -} -.text-slate-300 { - --tw-text-opacity: 1; - color: rgb(203 213 225 / var(--tw-text-opacity, 1)); -} -.text-slate-400 { - --tw-text-opacity: 1; - color: rgb(148 163 184 / var(--tw-text-opacity, 1)); -} -.text-slate-500 { - --tw-text-opacity: 1; - color: rgb(100 116 139 / var(--tw-text-opacity, 1)); -} -.text-slate-600 { - --tw-text-opacity: 1; - color: rgb(71 85 105 / var(--tw-text-opacity, 1)); -} -.text-transparent { - color: transparent; -} -.text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity, 1)); -} -.text-white\/0 { - color: hsla(0, 0%, 100%, 0); -} -.text-white\/40 { - color: hsla(0, 0%, 100%, 0.4); -} -.text-white\/70 { - color: hsla(0, 0%, 100%, 0.7); -} -.text-white\/80 { - color: hsla(0, 0%, 100%, 0.8); -} -.text-white\/90 { - color: hsla(0, 0%, 100%, 0.9); -} -.no-underline { - text-decoration-line: none; -} -.placeholder-\[var\(--color-text-dim\)\]::-moz-placeholder { - color: var(--color-text-dim); -} -.placeholder-\[var\(--color-text-dim\)\]::placeholder { - color: var(--color-text-dim); -} -.placeholder-slate-500::-moz-placeholder { - --tw-placeholder-opacity: 1; - color: rgb(100 116 139 / var(--tw-placeholder-opacity, 1)); -} -.placeholder-slate-500::placeholder { - --tw-placeholder-opacity: 1; - color: rgb(100 116 139 / var(--tw-placeholder-opacity, 1)); -} -.accent-\[var\(--color-accent\)\] { - accent-color: var(--color-accent); -} -.accent-blue-500 { - accent-color: #3b82f6; -} -.opacity-0 { - opacity: 0; -} -.opacity-100 { - opacity: 1; -} -.opacity-20 { - opacity: 0.2; -} -.opacity-25 { - opacity: 0.25; -} -.opacity-30 { - opacity: 0.3; -} -.opacity-40 { - opacity: 0.4; -} -.opacity-50 { - opacity: 0.5; -} -.opacity-60 { - opacity: 0.6; -} -.opacity-70 { - opacity: 0.7; -} -.opacity-75 { - opacity: 0.75; -} -.opacity-80 { - opacity: 0.8; -} -.opacity-85 { - opacity: 0.85; -} -.opacity-\[\.55\] { - opacity: 0.55; -} -.shadow { - --tw-shadow: - 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); - --tw-shadow-colored: - 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); -} -.shadow, -.shadow-2xl { - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-2xl { - --tw-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); - --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color); -} -.shadow-\[0_0_0_1px_\#333\2c 0_4px_28px_rgba\(0\2c 0\2c 0\2c \.6\)\] { - --tw-shadow: 0 0 0 1px #333, 0 4px 28px rgba(0, 0, 0, 0.6); - --tw-shadow-colored: - 0 0 0 1px var(--tw-shadow-color), 0 4px 28px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-\[0_10px_30px_rgba\(0\2c 0\2c 0\2c 0\.35\)\] { - --tw-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); - --tw-shadow-colored: 0 10px 30px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-\[0_24px_64px_rgba\(0\2c 0\2c 0\2c \.6\)\] { - --tw-shadow: 0 24px 64px rgba(0, 0, 0, 0.6); - --tw-shadow-colored: 0 24px 64px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-\[0_4px_20px_rgba\(0\2c 0\2c 0\2c 0\.4\)\] { - --tw-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); - --tw-shadow-colored: 0 4px 20px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-\[0_8px_24px_rgba\(0\2c 0\2c 0\2c 0\.5\)\] { - --tw-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); - --tw-shadow-colored: 0 8px 24px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-\[0_8px_24px_rgba\(0\2c 0\2c 0\2c 0\.6\)\] { - --tw-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); - --tw-shadow-colored: 0 8px 24px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-\[var\(--shadow-2xl\2c 0_10px_40px_rgba\(0\2c 0\2c 0\2c \.6\)\)\] { - --tw-shadow: var(--shadow-2xl, 0 10px 40px rgba(0, 0, 0, 0.6)); - --tw-shadow-colored: 10px 40px var(--tw-shadow-color); -} -.shadow-\[var\(--shadow-2xl\2c 0_10px_40px_rgba\(0\2c 0\2c 0\2c \.6\)\)\], -.shadow-inner { - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-inner { - --tw-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05); - --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color); -} -.shadow-lg { - --tw-shadow: - 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); - --tw-shadow-colored: - 0 10px 15px -3px var(--tw-shadow-color), - 0 4px 6px -4px var(--tw-shadow-color); -} -.shadow-lg, -.shadow-md { - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-md { - --tw-shadow: - 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); - --tw-shadow-colored: - 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); -} -.shadow-sm { - --tw-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); - --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); -} -.shadow-sm, -.shadow-xl { - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.shadow-xl { - --tw-shadow: - 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); - --tw-shadow-colored: - 0 20px 25px -5px var(--tw-shadow-color), - 0 8px 10px -6px var(--tw-shadow-color); -} -.shadow-\[var\(--shadow-lg\)\] { - --tw-shadow-color: var(--shadow-lg); - --tw-shadow: var(--tw-shadow-colored); -} -.shadow-\[var\(--shadow-md\)\] { - --tw-shadow-color: var(--shadow-md); - --tw-shadow: var(--tw-shadow-colored); -} -.shadow-\[var\(--shadow-sm\)\] { - --tw-shadow-color: var(--shadow-sm); - --tw-shadow: var(--tw-shadow-colored); -} -.outline { - outline-style: solid; -} -.ring { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 - var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 - calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); -} -.ring, -.ring-1 { - box-shadow: - var(--tw-ring-offset-shadow), var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); -} -.ring-1 { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 - var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 - calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); -} -.ring-slate-700 { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(51 65 85/var(--tw-ring-opacity, 1)); -} -.blur { - --tw-blur: blur(8px); -} -.blur, -.drop-shadow-\[0_1px_4px_rgba\(0\2c 0\2c 0\2c 0\.7\)\] { - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) - var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) - var(--tw-sepia) var(--tw-drop-shadow); -} -.drop-shadow-\[0_1px_4px_rgba\(0\2c 0\2c 0\2c 0\.7\)\] { - --tw-drop-shadow: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7)); -} -.drop-shadow-lg { - --tw-drop-shadow: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04)) - drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1)); -} -.drop-shadow-lg, -.invert { - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) - var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) - var(--tw-sepia) var(--tw-drop-shadow); -} -.invert { - --tw-invert: invert(100%); -} -.filter { - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) - var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) - var(--tw-sepia) var(--tw-drop-shadow); -} -.backdrop-blur { - --tw-backdrop-blur: blur(8px); - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) - var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) - var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) - var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) - var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) - var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) - var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) - var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) - var(--tw-backdrop-sepia); -} -.backdrop-blur-\[4px\], -.backdrop-blur-sm { - --tw-backdrop-blur: blur(4px); - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) - var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) - var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) - var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) - var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) - var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) - var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) - var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) - var(--tw-backdrop-sepia); -} -.transition { - transition-property: - color, - background-color, - border-color, - text-decoration-color, - fill, - stroke, - opacity, - box-shadow, - transform, - filter, - -webkit-backdrop-filter; - transition-property: - color, background-color, border-color, text-decoration-color, fill, stroke, - opacity, box-shadow, transform, filter, backdrop-filter; - transition-property: - color, - background-color, - border-color, - text-decoration-color, - fill, - stroke, - opacity, - box-shadow, - transform, - filter, - backdrop-filter, - -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-\[background\2c transform\] { - transition-property: background, transform; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-\[opacity\2c transform\] { - transition-property: opacity, transform; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-\[top\] { - transition-property: top; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-\[width\2c background-color\] { - transition-property: width, background-color; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-\[width\] { - transition-property: width; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-all { - transition-property: all; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-colors { - transition-property: - color, background-color, border-color, text-decoration-color, fill, stroke; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-opacity { - transition-property: opacity; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.transition-transform { - transition-property: transform; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 0.15s; -} -.duration-200 { - transition-duration: 0.2s; -} -.duration-300 { - transition-duration: 0.3s; -} -.duration-\[var\(--transition-fast\)\] { - transition-duration: var(--transition-fast); -} -.ease-in-out { - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -} -.\[animation-direction\:reverse\] { - animation-direction: reverse; -} -.\[animation-duration\:12s\] { - animation-duration: 12s; -} -.\[animation-duration\:5s\] { - animation-duration: 5s; -} -.\[animation-duration\:8s\] { - animation-duration: 8s; -} -.\[filter\:drop-shadow\(0_2px_6px_rgba\(0\2c 0\2c 0\2c 0\.4\)\)\] { - filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); -} -.\[grid-template-columns\:repeat\(auto-fill\2c minmax\(220px\2c 1fr\)\)\] { - grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); -} -.\[grid-template-columns\:repeat\(auto-fit\2c minmax\(180px\2c 1fr\)\)\] { - grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); -} -.\[grid-template-columns\:repeat\(auto-fit\2c minmax\(200px\2c 1fr\)\)\] { - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); -} -.\[grid-template-columns\:repeat\(auto-fit\2c minmax\(260px\2c 1fr\)\)\] { - grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); -} -.\[max-height\:calc\(100vh-var\(--topbar-height\)-var\(--bottom-nav-height\)-7rem\)\] { - max-height: calc( - 100vh - var(--topbar-height) - var(--bottom-nav-height) - 7rem - ); -} -.\[text-shadow\:0_1px_2px_rgba\(0\2c 0\2c 0\2c 0\.8\)\2c _0_0_4px_rgba\(0\2c 0\2c 0\2c 0\.8\)\] { - text-shadow: - 0 1px 2px rgba(0, 0, 0, 0.8), - 0 0 4px rgba(0, 0, 0, 0.8); -} -.\[width\:min\(320px\2c calc\(100vw-2rem\)\)\] { - width: min(320px, calc(100vw - 2rem)); -} -.placeholder\:text-\[var\(--color-text-dim\)\]::-moz-placeholder { - color: var(--color-text-dim); -} -.placeholder\:text-\[var\(--color-text-dim\)\]::placeholder { - color: var(--color-text-dim); -} -.before\:block:before { - content: var(--tw-content); - display: block; -} -.before\:pt-\[56\.25\%\]:before { - content: var(--tw-content); - padding-top: 56.25%; -} -.before\:content-\[\'\'\]:before { - --tw-content: ""; - content: var(--tw-content); -} -.first\:mt-0:first-child { - margin-top: 0; -} -.last\:border-0:last-child { - border-width: 0; -} -.empty\:hidden:empty { - display: none; -} -.hover\:border-\[var\(--color-accent\)\]:hover { - border-color: var(--color-accent); -} -.hover\:border-\[var\(--color-border-strong\)\]:hover { - border-color: var(--color-border-strong); -} -.hover\:border-\[var\(--color-danger-strong\)\]:hover { - border-color: var(--color-danger-strong); -} -.hover\:border-red-400:hover { - --tw-border-opacity: 1; - border-color: rgb(248 113 113 / var(--tw-border-opacity, 1)); -} -.hover\:border-red-500:hover { - --tw-border-opacity: 1; - border-color: rgb(239 68 68 / var(--tw-border-opacity, 1)); -} -.hover\:border-slate-600:hover { - --tw-border-opacity: 1; - border-color: rgb(71 85 105 / var(--tw-border-opacity, 1)); -} -.hover\:border-slate-700:hover { - --tw-border-opacity: 1; - border-color: rgb(51 65 85 / var(--tw-border-opacity, 1)); -} -.hover\:bg-\[var\(--color-accent\)\]:hover { - background-color: var(--color-accent); -} -.hover\:bg-\[var\(--color-action-hover\)\]:hover { - background-color: var(--color-action-hover); -} -.hover\:bg-\[var\(--color-bar-bg\)\]:hover { - background-color: var(--color-bar-bg); -} -.hover\:bg-\[var\(--color-bar-surface\)\]:hover { - background-color: var(--color-bar-surface); -} -.hover\:bg-\[var\(--color-bg-soft\)\]:hover { - background-color: var(--color-bg-soft); -} -.hover\:bg-\[var\(--color-danger\)\]:hover { - background-color: var(--color-danger); -} -.hover\:bg-\[var\(--color-danger-hover\)\]:hover { - background-color: var(--color-danger-hover); -} -.hover\:bg-\[var\(--color-danger-strong\)\]:hover { - background-color: var(--color-danger-strong); -} -.hover\:bg-\[var\(--color-success-hover\)\]:hover { - background-color: var(--color-success-hover); -} -.hover\:bg-\[var\(--color-surface\)\]:hover { - background-color: var(--color-surface); -} -.hover\:bg-\[var\(--color-surface-alt\)\]:hover { - background-color: var(--color-surface-alt); -} -.hover\:bg-\[var\(--color-surface-muted\)\]:hover { - background-color: var(--color-surface-muted); -} -.hover\:bg-\[var\(--color-surface-muted\2c \#1a1f2e\)\]:hover { - background-color: var(--color-surface-muted, #1a1f2e); -} -.hover\:bg-\[var\(--color-surface-raised\2c \#1e2030\)\]:hover { - background-color: var(--color-surface-raised, #1e2030); -} -.hover\:bg-black\/80:hover { - background-color: rgba(0, 0, 0, 0.8); -} -.hover\:bg-black\/90:hover { - background-color: rgba(0, 0, 0, 0.9); -} -.hover\:bg-blue-500:hover { - --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1)); -} -.hover\:bg-emerald-500:hover { - --tw-bg-opacity: 1; - background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1)); -} -.hover\:bg-slate-600:hover { - --tw-bg-opacity: 1; - background-color: rgb(71 85 105 / var(--tw-bg-opacity, 1)); -} -.hover\:bg-slate-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(51 65 85 / var(--tw-bg-opacity, 1)); -} -.hover\:bg-slate-800:hover { - --tw-bg-opacity: 1; - background-color: rgb(30 41 59 / var(--tw-bg-opacity, 1)); -} -.hover\:bg-slate-800\/50:hover { - background-color: rgba(30, 41, 59, 0.5); -} -.hover\:bg-white\/10:hover { - background-color: hsla(0, 0%, 100%, 0.1); -} -.hover\:text-\[var\(--color-accent-glow\)\]:hover { - color: var(--color-accent-glow); -} -.hover\:text-\[var\(--color-text\)\]:hover { - color: var(--color-text); -} -.hover\:text-black:hover { - --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity, 1)); -} -.hover\:text-blue-300:hover { - --tw-text-opacity: 1; - color: rgb(147 197 253 / var(--tw-text-opacity, 1)); -} -.hover\:text-red-300:hover { - --tw-text-opacity: 1; - color: rgb(252 165 165 / var(--tw-text-opacity, 1)); -} -.hover\:text-red-400:hover { - --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity, 1)); -} -.hover\:text-slate-200:hover { - --tw-text-opacity: 1; - color: rgb(226 232 240 / var(--tw-text-opacity, 1)); -} -.hover\:text-slate-300:hover { - --tw-text-opacity: 1; - color: rgb(203 213 225 / var(--tw-text-opacity, 1)); -} -.hover\:text-white:hover { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity, 1)); -} -.hover\:underline:hover { - text-decoration-line: underline; -} -.hover\:opacity-100:hover { - opacity: 1; -} -.hover\:opacity-80:hover { - opacity: 0.8; -} -.hover\:ring-2:hover { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 - var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 - calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: - var(--tw-ring-offset-shadow), var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); -} -.hover\:ring-\[var\(--color-action\)\]:hover { - --tw-ring-color: var(--color-action); -} -.hover\:brightness-110:hover { - --tw-brightness: brightness(1.1); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) - var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) - var(--tw-sepia) var(--tw-drop-shadow); -} -.focus\:border-\[var\(--color-accent\)\]:focus { - border-color: var(--color-accent); -} -.focus\:border-\[var\(--color-action\)\]:focus { - border-color: var(--color-action); -} -.focus\:border-\[var\(--color-action-border\)\]:focus { - border-color: var(--color-action-border); -} -.focus\:border-blue-500:focus { - --tw-border-opacity: 1; - border-color: rgb(59 130 246 / var(--tw-border-opacity, 1)); -} -.focus\:border-emerald-500:focus { - --tw-border-opacity: 1; - border-color: rgb(16 185 129 / var(--tw-border-opacity, 1)); -} -.focus\:shadow-\[0_0_0_2px_\#ffb84d33\]:focus { - --tw-shadow: 0 0 0 2px #ffb84d33; - --tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color); - box-shadow: - var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), - var(--tw-shadow); -} -.focus\:outline-none:focus { - outline: 2px solid transparent; - outline-offset: 2px; -} -.focus\:outline:focus { - outline-style: solid; -} -.focus\:outline-2:focus, -.focus\:outline-\[2px\]:focus { - outline-width: 2px; -} -.focus\:outline-offset-2:focus { - outline-offset: 2px; -} -.focus\:outline-\[\#3b4457\]:focus { - outline-color: #3b4457; -} -.focus\:outline-\[var\(--color-accent\)\]:focus { - outline-color: var(--color-accent); -} -.focus\:ring-1:focus { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 - var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 - calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); -} -.focus\:ring-1:focus, -.focus\:ring-2:focus { - box-shadow: - var(--tw-ring-offset-shadow), var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); -} -.focus\:ring-2:focus { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 - var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 - calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); -} -.focus\:ring-\[var\(--color-accent-soft\)\]:focus { - --tw-ring-color: var(--color-accent-soft); -} -.focus\:ring-\[var\(--color-action\)\]\/20:focus { - --tw-ring-color: color-mix(in srgb, var(--color-action) 20%, transparent); -} -.focus\:ring-\[var\(--color-action\)\]\/40:focus { - --tw-ring-color: color-mix(in srgb, var(--color-action) 40%, transparent); -} -.focus\:ring-\[var\(--color-action-border\)\]\/50:focus { - --tw-ring-color: color-mix(in srgb, var(--color-action-border) 50%, transparent); -} -.focus\:ring-blue-300\/20:focus { - --tw-ring-color: rgba(147, 197, 253, 0.2); -} -.focus\:ring-blue-300\/50:focus { - --tw-ring-color: rgba(147, 197, 253, 0.5); -} -.focus\:ring-blue-400:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(96 165 250/var(--tw-ring-opacity, 1)); -} -.focus\:ring-blue-400\/40:focus { - --tw-ring-color: rgba(96, 165, 250, 0.4); -} -.focus\:ring-blue-500:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(59 130 246/var(--tw-ring-opacity, 1)); -} -.focus\:ring-emerald-500:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(16 185 129/var(--tw-ring-opacity, 1)); -} -.focus\:ring-red-500\/50:focus { - --tw-ring-color: rgba(239, 68, 68, 0.5); -} -.focus\:ring-white\/30:focus { - --tw-ring-color: hsla(0, 0%, 100%, 0.3); -} -.focus\:ring-offset-1:focus { - --tw-ring-offset-width: 1px; -} -.focus\:ring-offset-2:focus { - --tw-ring-offset-width: 2px; -} -.focus\:ring-offset-\[var\(--color-bg\)\]:focus { - --tw-ring-offset-color: var(--color-bg); -} -.focus\:ring-offset-slate-900:focus { - --tw-ring-offset-color: #0f172a; -} -.focus-visible\:outline-none:focus-visible { - outline: 2px solid transparent; - outline-offset: 2px; -} -.active\:scale-90:active { - --tw-scale-x: 0.9; - --tw-scale-y: 0.9; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} -.disabled\:cursor-default:disabled { - cursor: default; -} -.disabled\:cursor-not-allowed:disabled { - cursor: not-allowed; -} -.disabled\:opacity-40:disabled { - opacity: 0.4; -} -.disabled\:opacity-45:disabled { - opacity: 0.45; -} -.disabled\:opacity-60:disabled { - opacity: 0.6; -} -.group:hover .group-hover\:bg-black\/30 { - background-color: rgba(0, 0, 0, 0.3); -} -.group:hover .group-hover\:text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity, 1)); -} -.group:hover .group-hover\:text-white\/80 { - color: hsla(0, 0%, 100%, 0.8); -} -.group:hover .group-hover\:opacity-100 { - opacity: 1; -} -.group:hover .group-hover\:ring-\[var\(--color-action\)\] { - --tw-ring-color: var(--color-action); -} -@media (max-width: 768px) { - .max-\[768px\]\:h-\[300px\] { - height: 300px; - } - .max-\[768px\]\:min-h-\[300px\] { - min-height: 300px; - } - .max-\[768px\]\:min-w-full { - min-width: 100%; - } - .max-\[768px\]\:flex-col { - flex-direction: column; - } - .max-\[768px\]\:p-4 { - padding: 1rem; - } - .max-\[768px\]\:px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem; - } - .max-\[768px\]\:px-4 { - padding-left: 1rem; - padding-right: 1rem; - } - .max-\[768px\]\:pb-4 { - padding-bottom: 1rem; - } -} -@media (max-width: 700px) { - .max-\[700px\]\:left-4 { - left: 1rem; - } - .max-\[700px\]\:right-4 { - right: 1rem; - } - .max-\[700px\]\:w-auto { - width: auto; - } -} -@media (max-width: 680px) { - .max-\[680px\]\:bottom-2 { - bottom: 0.5rem; - } - .max-\[680px\]\:left-2 { - left: 0.5rem; - } - .max-\[680px\]\:right-2 { - right: 0.5rem; - } - .max-\[680px\]\:top-2 { - top: 0.5rem; - } -} -@media (max-width: 600px) { - .max-\[600px\]\:static { - position: static; - } - .max-\[600px\]\:col-\[1\/-1\] { - grid-column: 1/-1; - } - .max-\[600px\]\:row-\[1\] { - grid-row: 1; - } - .max-\[600px\]\:grid { - display: grid; - } - .max-\[600px\]\:h-11 { - height: 2.75rem; - } - .max-\[600px\]\:w-11 { - width: 2.75rem; - } - .max-\[600px\]\:translate-y-0 { - --tw-translate-y: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - .max-\[600px\]\:grid-cols-\[auto_auto\] { - grid-template-columns: auto auto; - } - .max-\[600px\]\:grid-rows-\[1fr_auto\] { - grid-template-rows: 1fr auto; - } - .max-\[600px\]\:content-stretch { - align-content: stretch; - } - .max-\[600px\]\:items-center { - align-items: center; - } - .max-\[600px\]\:justify-center { - justify-content: center; - } - .max-\[600px\]\:justify-items-center { - justify-items: center; - } - .max-\[600px\]\:gap-\[var\(--overlay-gap\2c \.75rem\)\] { - gap: var(--overlay-gap, 0.75rem); - } - .max-\[600px\]\:justify-self-start { - justify-self: start; - } - .max-\[600px\]\:justify-self-end { - justify-self: end; - } - .max-\[600px\]\:pb-\[calc\(var\(--bottom-nav-height\)\+var\(--overlay-gap\2c \.75rem\)\+env\(safe-area-inset-bottom\2c 0px\)\)\] { - padding-bottom: calc( - var(--bottom-nav-height) + var(--overlay-gap, 0.75rem) + - env(safe-area-inset-bottom, 0px) - ); - } - .max-\[600px\]\:pl-\[calc\(var\(--overlay-gap\2c \.75rem\)\+env\(safe-area-inset-left\2c 0px\)\)\] { - padding-left: calc( - var(--overlay-gap, 0.75rem) + env(safe-area-inset-left, 0px) - ); - } - .max-\[600px\]\:pr-\[calc\(var\(--overlay-gap\2c \.75rem\)\+env\(safe-area-inset-right\2c 0px\)\)\] { - padding-right: calc( - var(--overlay-gap, 0.75rem) + env(safe-area-inset-right, 0px) - ); - } -} -@media (max-width: 480px) { - .max-\[480px\]\:h-\[240px\] { - height: 240px; - } - .max-\[480px\]\:min-h-\[240px\] { - min-height: 240px; - } - .max-\[480px\]\:text-xs { - font-size: 0.75rem; - line-height: 1rem; - } -.max-\[480px\]\:text-base { - font-size: 1rem; - line-height: 1.5rem; - } -} -@media (min-width: 640px) { - .sm\:ml-auto { - margin-left: auto; - } - .sm\:table-cell { - display: table-cell; - } - .sm\:h-\[92px\] { - height: 92px; - } - .sm\:w-\[180px\] { - width: 180px; - } - .sm\:w-\[92px\] { - width: 92px; - } - .sm\:w-auto { - width: auto; - } - .sm\:flex-none { - flex: none; - } - .sm\:grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - .sm\:grid-cols-4 { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } - .sm\:flex-row { - flex-direction: row; - } - .sm\:flex-nowrap { - flex-wrap: nowrap; - } - .sm\:items-start { - align-items: flex-start; - } - .sm\:items-center { - align-items: center; - } - .sm\:justify-end { - justify-content: flex-end; - } - .sm\:justify-between { - justify-content: space-between; - } - .sm\:gap-1\.5 { - gap: 0.375rem; - } - .sm\:gap-2 { - gap: 0.5rem; - } - .sm\:gap-3 { - gap: 0.75rem; - } -.sm\:space-y-6 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(1.5rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); - } -.sm\:px-0 { - padding-left: 0; - padding-right: 0; - } - .sm\:px-4 { - padding-left: 1rem; - padding-right: 1rem; - } -.sm\:py-4 { - padding-top: 1rem; - padding-bottom: 1rem; - } -.sm\:text-left { - text-align: left; - } - .sm\:text-xs { - font-size: 0.75rem; - line-height: 1rem; - } - .sm\:text-sm { - font-size: 0.875rem; - line-height: 1.25rem; - } - .sm\:text-xl { - font-size: 1.25rem; - line-height: 1.75rem; - } -.sm\:leading-normal { - line-height: 1.5; - } - .sm\:\[grid-template-columns\:repeat\(auto-fill\2c minmax\(180px\2c 1fr\)\)\] { - grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); - } -} -@media (min-width: 768px) { - .md\:sticky { - position: sticky; - } - .md\:top-\[0\.5rem\] { - top: 0.5rem; - } - .md\:mt-0 { - margin-top: 0; - } - .md\:table-cell { - display: table-cell; - } - .md\:grid { - display: grid; - } - .md\:hidden { - display: none; - } - .md\:w-80 { - width: 20rem; - } - .md\:w-\[360px\] { - width: 360px; - } -.md\:w-auto { - width: auto; - } - .md\:min-w-\[160px\] { - min-width: 160px; - } - .md\:grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - .md\:grid-cols-\[24px_1fr_auto\] { - grid-template-columns: 24px 1fr auto; - } - .md\:grid-cols-\[26px_88px_1fr_auto\] { - grid-template-columns: 26px 88px 1fr auto; - } - .md\:grid-cols-\[28px_1fr_auto\] { - grid-template-columns: 28px 1fr auto; - } - .md\:flex-row { - flex-direction: row; - } - .md\:flex-col { - flex-direction: column; - } - .md\:items-start { - align-items: flex-start; - } - .md\:items-center { - align-items: center; - } - .md\:gap-2 { - gap: 0.5rem; - } - .md\:gap-3 { - gap: 0.75rem; - } -} -@media (min-width: 1024px) { - .lg\:table-cell { - display: table-cell; - } - .lg\:w-\[460px\] { - width: 460px; - } - .lg\:grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - .lg\:grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - .lg\:grid-cols-4 { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } -} -@media (min-width: 1280px) { -.xl\:grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - .xl\:grid-cols-6 { - grid-template-columns: repeat(6, minmax(0, 1fr)); - } -} -#main-content[data-banner-offset="1"] - .\[\#main-content\[data-banner-offset\=\'1\'\]_\&\]\:top-\[calc\(var\(--topbar-height\)\+3\.5rem\)\] { - top: calc(var(--topbar-height) + 3.5rem); -} -.\[\&_\.u-span-2\]\:col-span-2 .u-span-2 { - grid-column: span 2 / span 2; -} -@media (max-width: 900px) { - .max-\[900px\]\:\[\&_\.u-span-2\]\:col-span-1 .u-span-2 { - grid-column: span 1 / span 1; - } -} -.\[\&_\.u-span-3\]\:col-span-3 .u-span-3 { - grid-column: span 3 / span 3; -} -@media (max-width: 900px) { - .max-\[900px\]\:\[\&_\.u-span-3\]\:col-span-1 .u-span-3 { - grid-column: span 1 / span 1; - } -} -.\[\&_label\]\:text-\[var\(--color-text-dim\)\] label { - color: var(--color-text-dim); -} -.\[\&_label\]\:text-\[var\(--font-size-sm\)\] label { - font-size: var(--font-size-sm); -} - -/* Immersive media stage styles */ -body[data-ui-shell='immersive-media'] { - --kiosk-edge-offset: 0.85rem; - --kiosk-control-size: 2.5rem; - overflow: hidden; -} - -body[data-ui-shell='immersive-media'] [data-media-canvas='1'] { - position: fixed; - left: 0; - right: 0; - top: var(--topbar-height, 56px); - bottom: 0; - overflow: hidden; - background: var(--color-canvas-bg); -} - -@media (max-width: 767px) { - body[data-ui-shell='immersive-media'] [data-media-canvas='1'] { - bottom: var(--bottom-nav-height, 56px); - } -} - -body[data-ui-shell='immersive-media'].is-fullscreen [data-media-canvas='1'], -body[data-ui-shell='immersive-media'].is-chrome-hidden [data-media-canvas='1'] { - top: 0; - bottom: 0; - right: calc(100% - 100vw); -} - -body[data-ui-shell='immersive-media'].is-fullscreen [data-media-canvas='1'] { - right: 0; -} - -body[data-ui-shell='immersive-media'].is-fullscreen [data-topbar='1'], -body[data-ui-shell='immersive-media'].is-fullscreen [data-bottom-nav], -body[data-ui-shell='immersive-media'].is-chrome-hidden [data-topbar='1'], -body[data-ui-shell='immersive-media'].is-chrome-hidden [data-bottom-nav] { - display: none !important; -} - -body[data-ui-shell='immersive-media'] [data-media-primary='1'], -body[data-ui-shell='immersive-media'] [data-media-waiting='1'] { - position: absolute; - inset: 0; -} - -body[data-ui-shell='immersive-media'] [data-media-primary='1'] { - width: 100%; - height: 100%; - object-fit: contain; -} - -body[data-ui-shell='immersive-media'] [data-media-waiting='1'] { - display: flex; - align-items: center; - justify-content: center; - pointer-events: none; -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'], -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'], -body[data-ui-shell='immersive-media'] [data-overlay-progress='1'] { - position: absolute; -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'] { - z-index: 30; - display: flex; - gap: 0.5rem; -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'] button { - display: inline-flex; - align-items: center; - justify-content: center; - width: var(--kiosk-control-size); - height: var(--kiosk-control-size); - border: 1px solid var(--color-border-strong); - border-radius: 9999px; - background: color-mix(in srgb, var(--color-surface-raised) 85%, transparent); - color: var(--color-text); - box-shadow: var(--shadow-sm); - opacity: 0; - pointer-events: none; - transition: - opacity var(--transition-fast), - background-color var(--transition-fast), - border-color var(--transition-fast); -} - -body[data-ui-shell='immersive-media'].mouse-active [data-overlay-controls='1'] button, -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'] button.is-always-visible { - opacity: 1; - pointer-events: auto; -} - -@media (hover: none), (pointer: coarse) { - body[data-ui-shell='immersive-media'] [data-overlay-controls='1'] button { - opacity: 1; - pointer-events: auto; - } -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'] button:hover { - border-color: var(--color-input-border); - background: var(--color-surface-raised); -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'] button:focus-visible { - outline: none; - box-shadow: 0 0 0 2px var(--color-accent-soft); -} - -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'] { - z-index: 28; - pointer-events: none; - opacity: 0; - transition: opacity var(--transition-fast); -} - -body[data-ui-shell='immersive-media'].mouse-active [data-overlay-stats='1'], -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].is-visible, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].is-always-visible { - opacity: 1; -} - -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'] .u-hidden { - display: none !important; -} - -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'] .is-hover-only { - opacity: 0; - transition: opacity var(--transition-fast); -} - -body[data-ui-shell='immersive-media'].mouse-active [data-overlay-stats='1'] .is-hover-only, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].is-visible .is-hover-only, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].is-always-visible .is-hover-only { - opacity: 1; -} - -body[data-ui-shell='immersive-media'] [data-stats-shell='1'] { - display: inline-flex; - align-items: center; - gap: 0.5rem; - min-height: 2rem; - border: 1px solid var(--color-border-strong); - border-radius: var(--radius-pill); - background: color-mix(in srgb, var(--color-surface) 84%, transparent); - color: var(--color-text); - padding: 0.35rem 0.7rem; - box-shadow: var(--shadow-sm); - backdrop-filter: blur(4px); -} - -body[data-ui-shell='immersive-media'] [data-stat='queue'], -body[data-ui-shell='immersive-media'] [data-stat='duration'] { - display: inline-flex; - align-items: center; - gap: 0.35rem; - font-size: var(--font-size-sm); -} - -body[data-ui-shell='immersive-media'] [data-stat-divider='1'] { - display: inline-block; -} - -body[data-ui-shell='immersive-media'] [data-overlay-progress='1'] { - left: 0; - right: 0; - bottom: 0; - z-index: 26; - height: 0.35rem; - background: color-mix(in srgb, var(--color-border-strong) 45%, transparent); - opacity: 0; - transition: opacity var(--transition-fast); -} - -body[data-ui-shell='immersive-media'] [data-overlay-progress='1'].is-visible, -body[data-ui-shell='immersive-media'] [data-overlay-progress='1'].is-always-visible { - opacity: 1; -} - -body[data-ui-shell='immersive-media'] [data-overlay-progress='1'].u-hidden { - display: none !important; -} - -body[data-ui-shell='immersive-media'] [data-progress-fill='1'] { - width: 0; - height: 100%; - background: linear-gradient(90deg, var(--color-action), var(--color-accent)); - transition: width 0.12s linear; -} - -body[data-ui-shell='immersive-media'] [data-overlay-backdrop='1'] { - position: fixed; - inset: 0; - z-index: 80; - background: transparent; - opacity: 0; - pointer-events: none; - transition: opacity var(--transition-fast); -} - -body[data-ui-shell='immersive-media'] [data-overlay-backdrop='1'].is-open { - opacity: 1; - pointer-events: auto; -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'] { - position: fixed; - top: 0; - left: 0; - transform: translateY(0.35rem) scale(0.98); - transform-origin: top right; - width: min(440px, calc(100vw - 1.5rem)); - max-height: calc(100vh - 1.5rem); - max-height: calc(100dvh - 1.5rem); - overflow: auto; - z-index: 81; - border: 1px solid var(--color-border-strong); - border-radius: var(--radius-md); - background: var(--color-surface); - box-shadow: var(--shadow-2xl); - padding: 1rem; - opacity: 0; - pointer-events: none; - transition: - opacity var(--transition-fast), - transform var(--transition-fast); -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'].is-open { - opacity: 1; - pointer-events: auto; - transform: translateY(0) scale(1); -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'][data-anchor='above'] { - transform-origin: bottom right; -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'][data-anchor='below'] { - transform-origin: top right; -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'] [data-ui-input='1'] { - display: flex; - flex-direction: column; - gap: 0.35rem; -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'] label { - font-size: var(--font-size-sm); - color: var(--color-text-dim); -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'] label[data-inline-toggle='1'] { - flex-direction: row; - align-items: center; - color: var(--color-text); -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'] input:not([type='checkbox']), -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'] select { - width: 100%; -} - -body[data-ui-shell='immersive-media'] [data-overlay-panel='1'] input[type='checkbox'] { - width: auto; - flex: 0 0 auto; -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'].u-pos-top-left, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].u-pos-top-left { - top: var(--kiosk-edge-offset); - left: var(--kiosk-edge-offset); -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'].u-pos-top-middle, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].u-pos-top-middle { - top: var(--kiosk-edge-offset); - left: 50%; - transform: translateX(-50%); -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'].u-pos-top-right, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].u-pos-top-right { - top: var(--kiosk-edge-offset); - right: var(--kiosk-edge-offset); -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'].u-pos-bottom-left, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].u-pos-bottom-left { - bottom: calc(var(--kiosk-edge-offset) + 0.35rem); - left: var(--kiosk-edge-offset); -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'].u-pos-bottom-middle, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].u-pos-bottom-middle { - bottom: calc(var(--kiosk-edge-offset) + 0.35rem); - left: 50%; - transform: translateX(-50%); -} - -body[data-ui-shell='immersive-media'] [data-overlay-controls='1'].u-pos-bottom-right, -body[data-ui-shell='immersive-media'] [data-overlay-stats='1'].u-pos-bottom-right { - bottom: calc(var(--kiosk-edge-offset) + 0.35rem); - right: var(--kiosk-edge-offset); -} - -@media (max-width: 767px) { - body[data-ui-shell='immersive-media'] { - --kiosk-edge-offset: 0.65rem; - --kiosk-control-size: 2.25rem; - } - - body[data-ui-shell='immersive-media'] [data-overlay-panel='1'] { - width: min(360px, calc(100vw - 1rem)); - max-height: calc(100dvh - 1rem); - padding: 0.85rem; - } - - body[data-ui-shell='immersive-media'] [data-stats-shell='1'] { - font-size: var(--font-size-xs); - padding: 0.3rem 0.55rem; - } - - body[data-ui-shell='immersive-media'] [data-stat='queue'], - body[data-ui-shell='immersive-media'] [data-stat='duration'] { - font-size: var(--font-size-xs); - } -} - -/* ============================================================ - DESIGN HARMONIZATION LAYER - Unifies visual language across apps still using slate utility classes. - ============================================================ */ - -/* Slate backgrounds -> shared surface tokens */ -.bg-slate-900 { - background-color: var(--color-surface); -} -.bg-slate-800 { - background-color: var(--color-surface-raised); -} -.bg-slate-800\/80 { - background-color: color-mix(in srgb, var(--color-surface-raised) 80%, transparent); -} -.bg-slate-800\/50 { - background-color: color-mix(in srgb, var(--color-surface-raised) 50%, transparent); -} -.bg-slate-800\/20 { - background-color: color-mix(in srgb, var(--color-surface-raised) 20%, transparent); -} -.bg-slate-700 { - background-color: var(--color-surface-muted); -} -/* Slate borders -> shared border tokens */ -.border-slate-800 { - border-color: var(--color-border); -} -.border-slate-700 { - border-color: var(--color-border-strong); -} -.border-slate-700\/50 { - border-color: color-mix(in srgb, var(--color-border-strong) 50%, transparent); -} -.border-slate-600 { - border-color: var(--color-input-border); -} -/* Slate text -> shared text tokens */ -.text-slate-200, -.text-slate-300 { - color: var(--color-text); -} -.text-slate-400 { - color: var(--color-text-muted); -} -.text-slate-500, -.text-slate-600 { - color: var(--color-text-dim); -} -/* Keep card/panel depth coherent across apps */ -:where(section, article, aside, nav, div).rounded-xl.border.border-slate-800.bg-slate-900, -:where(section, article, aside, nav, div).rounded-xl.border.border-slate-700.bg-slate-900 { - box-shadow: var(--shadow-sm); -} - -/* Harmonize heavier elevation utility with tokenized shadow */ -.shadow-xl { - box-shadow: var(--shadow-lg); -} diff --git a/shared/packages/node-backend/src/authclient.js b/shared/packages/node-backend/src/authclient.js index fedb8c7..9114d19 100644 --- a/shared/packages/node-backend/src/authclient.js +++ b/shared/packages/node-backend/src/authclient.js @@ -211,9 +211,8 @@ export class AuthClient { */ middleware() { return async (req, res, next) => { - const token = this.tokenFromRequest(req); try { - req.authUser = await this.validate(token); + req.authUser = await this.validate(this.tokenFromRequest(req)); next(); } catch { // Fail closed on both an invalid session and a transport/decoding @@ -236,7 +235,14 @@ export class AuthClient { .split(';') .map(part => part.trim()) .find(part => part.startsWith(`${this.cookieName}=`)); - if (match) return decodeURIComponent(match.slice(this.cookieName.length + 1)); + if (match) { + // A malformed escape such as a bare "%" is not a usable token, so treat the cookie as absent. + try { + return decodeURIComponent(match.slice(this.cookieName.length + 1)); + } catch { + return ''; + } + } } return ''; } diff --git a/shared/packages/node-backend/test/authclient.test.js b/shared/packages/node-backend/test/authclient.test.js index fd6bb65..6e4ba8d 100644 --- a/shared/packages/node-backend/test/authclient.test.js +++ b/shared/packages/node-backend/test/authclient.test.js @@ -125,6 +125,29 @@ test('tokenFromRequest falls back to the auth_session cookie', () => { assert.equal(client.tokenFromRequest(req), 'cookie-token'); }); +test('tokenFromRequest treats a malformed cookie escape as no token', () => { + const client = new AuthClient('https://auth.example.com'); + const req = { headers: { cookie: 'auth_session=bad%zz; other=1' } }; + assert.equal(client.tokenFromRequest(req), ''); +}); + +test('middleware answers 401 instead of rejecting on a malformed cookie', async () => { + const client = new AuthClient('https://auth.example.com', { + fetchImpl: fakeFetch([{ status: 401, body: { valid: false } }]), + }); + let statusCode = null; + const res = { + status(code) { + statusCode = code; + return { json: () => {} }; + }, + }; + await client.middleware()({ headers: { cookie: 'auth_session=100%' } }, res, () => { + throw new Error('next should not be called'); + }); + assert.equal(statusCode, 401); +}); + test('middleware attaches authUser on success and 401s on failure', async () => { const okClient = new AuthClient('https://auth.example.com', { fetchImpl: fakeFetch([{ status: 200, body: { valid: true, user_id: 1, username: 'a', role: 'user' } }]), diff --git a/shared/packages/python-backend/src/shared_backend/authproxy.py b/shared/packages/python-backend/src/shared_backend/authproxy.py index 68c9a72..e3313c4 100644 --- a/shared/packages/python-backend/src/shared_backend/authproxy.py +++ b/shared/packages/python-backend/src/shared_backend/authproxy.py @@ -94,6 +94,7 @@ ERR_FEATURE_REQUIRES_AUTHGUARD = "This feature requires AUTHGUARD_URL to be conf # rather than a generic "internal error" indistinguishable from any other bug. ERR_AUTHGUARD_UNAVAILABLE = "Unable to reach the authentication service. Please try again shortly." ERR_SECRET_NOT_SET = "SECRET environment variable is not set." +ERR_ADMIN_REQUIRED = "Administrator access required." # _LOCAL_PROFILE is the fixed placeholder identity every handler reports when # authentication is disabled, either because AUTHGUARD_URL is disabled or @@ -338,6 +339,23 @@ def build_auth_router( raise HTTPException(status_code=401, detail=ERR_AUTH_REQUIRED) return token + async def require_admin( + request: Request, + client: Optional[AuthClient] = Depends(get_client), # noqa: B008 + ) -> PublicUser: + """FastAPI dependency gating a route behind an administrator session + (the Python counterpart of Go's RequireAdmin). Unlike require_session it + never falls back to _LOCAL_PROFILE, so a route that changes the + login-required flag cannot be called anonymously, even while login is + already disabled.""" + if not _enabled(client): + raise HTTPException(status_code=401, detail=ERR_AUTH_REQUIRED) + assert client is not None + profile, _ = await _current_profile_or_401(request, client) + if not can_manage_users(profile.role): + raise HTTPException(status_code=403, detail=ERR_ADMIN_REQUIRED) + return profile + # --- status / me ------------------------------------------------------- @router.get("/me") @@ -561,6 +579,7 @@ def build_auth_router( async def update_access_settings( req: UpdateAccessRequest, store: ProxyStore = Depends(get_store), # noqa: B008 + _admin: PublicUser = Depends(require_admin), # noqa: B008 ) -> dict[str, bool]: nonlocal login_required_override await store.set_login_required(req.loginRequired) diff --git a/shared/packages/python-backend/tests/test_authproxy.py b/shared/packages/python-backend/tests/test_authproxy.py index f03a573..0176621 100644 --- a/shared/packages/python-backend/tests/test_authproxy.py +++ b/shared/packages/python-backend/tests/test_authproxy.py @@ -4,7 +4,13 @@ from fastapi import FastAPI, Request from fastapi.testclient import TestClient from shared_backend import authproxy as ap -from shared_backend.authclient import APIError, AuthClient, PublicUser, SessionResult +from shared_backend.authclient import ( + DEFAULT_COOKIE_NAME, + APIError, + AuthClient, + PublicUser, + SessionResult, +) class _FakeStore(ap.ProxyStore): @@ -113,14 +119,32 @@ class AuthDisabledModeTests(unittest.TestCase): class AccessSettingsTests(unittest.TestCase): - def test_get_and_put_round_trip_through_the_store(self) -> None: + def test_get_is_public_and_put_requires_an_admin_session(self) -> None: store = _FakeStore(login_required=True) - client = TestClient(_build_app(store)) + client = TestClient(_build_app(store, _RoleClient())) self.assertEqual(client.get("/api/auth/access").json(), {"loginRequired": True}) + + response = client.put("/api/auth/access", json={"loginRequired": False}) + self.assertEqual(response.status_code, 401) + self.assertEqual(client.get("/api/auth/access").json(), {"loginRequired": True}) + + client.cookies.set(DEFAULT_COOKIE_NAME, "user-token") + response = client.put("/api/auth/access", json={"loginRequired": False}) + self.assertEqual(response.status_code, 403) + self.assertEqual(client.get("/api/auth/access").json(), {"loginRequired": True}) + + client.cookies.set(DEFAULT_COOKIE_NAME, "admin-token") response = client.put("/api/auth/access", json={"loginRequired": False}) self.assertEqual(response.json(), {"loginRequired": False}) self.assertEqual(client.get("/api/auth/access").json(), {"loginRequired": False}) + def test_anonymous_put_is_refused_when_authguard_is_not_configured(self) -> None: + store = _FakeStore(login_required=True) + client = TestClient(_build_app(store)) + response = client.put("/api/auth/access", json={"loginRequired": False}) + self.assertEqual(response.status_code, 401) + self.assertEqual(client.get("/api/auth/access").json(), {"loginRequired": True}) + def test_internal_update_disables_login_and_uses_admin_identity(self) -> None: store = _FakeStore(login_required=True) client = TestClient( @@ -180,6 +204,16 @@ class _FakeClient(AuthClient): return ["auth_session=; Path=/; Max-Age=0"] +class _RoleClient(_FakeClient): + """Resolves two fixed session tokens to an administrator and an ordinary user.""" + + async def me(self, token: str) -> PublicUser: + roles = {"admin-token": "superadmin", "user-token": "user"} + if token not in roles: + raise APIError(401, "unauthenticated") + return PublicUser(id=1, username="a", email="a@b.com", role=roles[token]) + + class EnabledModeSetupAndLoginTests(unittest.TestCase): """Exercises the real (client is not None) path, including the setup-claim flag's interaction with the store.""" diff --git a/shared/packages/web-ui/src/lib/components/MediaPlayerControls.svelte b/shared/packages/web-ui/src/lib/components/MediaPlayerControls.svelte index 03953f8..854965a 100644 --- a/shared/packages/web-ui/src/lib/components/MediaPlayerControls.svelte +++ b/shared/packages/web-ui/src/lib/components/MediaPlayerControls.svelte @@ -1,3 +1,6 @@ + - -{#if canManage && onList && onCreate && onUpdate && onDelete} -
-
-
-

User management

-

Add, edit, or remove accounts for this project.

-
- -
- -
- Add user -
- - - - -
- {#if roles && roles.length > 0} -
- Roles (none checked = all projects) - {#each roles as role (role.id)} - - {/each} -
- {/if} -
-
- - {#if error}

{error}

{/if} - {#if notice}

{notice}

{/if} - - {#if loading && users.length === 0} -

Loading users...

- {:else if users.length === 0} -

No users found.

- {:else} -
- {#each pagedUsers as user (user.id)} - {#if String(editingId) === String(user.id)} -
- - - - - {#if roles && roles.length > 0} -
- Roles (none checked = all projects) - {#each roles as role (role.id)} - - {/each} -
- {/if} - -
- {:else} -
-
{user.username}{user.email}
- {user.role} - - {#if roles && roles.length > 0} - {roleSummary(user)} - {/if} - -
- {/if} - {/each} -
- { - page = change.page; - pageSize = change.pageSize; - }} - /> - {/if} -
-{/if} diff --git a/shared/packages/web-ui/src/lib/index.ts b/shared/packages/web-ui/src/lib/index.ts index 92ebe59..e314562 100644 --- a/shared/packages/web-ui/src/lib/index.ts +++ b/shared/packages/web-ui/src/lib/index.ts @@ -9,7 +9,6 @@ export { default as EmptyState } from './components/EmptyState.svelte'; export { default as Header } from './components/Header.svelte'; export { default as Metric } from './components/Metric.svelte'; export { default as MediaPlayer } from './components/MediaPlayer.svelte'; -export { default as MediaPlayerControls } from './components/MediaPlayerControls.svelte'; export { default as NotificationStack } from './components/NotificationStack.svelte'; export { default as Pagination } from './components/Pagination.svelte'; export { default as ProfileDialog } from './components/ProfileDialog.svelte'; @@ -19,7 +18,6 @@ export { default as SettingsDialog } from './components/SettingsDialog.svelte'; export { default as StatusDialog } from './components/StatusDialog.svelte'; export { default as StatusWidget } from './components/StatusWidget.svelte'; export { default as TotpSettings } from './components/TotpSettings.svelte'; -export { default as UserManagement } from './components/UserManagement.svelte'; export { notifications, notify } from './notifications.svelte'; export { PRIMARY_COLOR_PALETTE, @@ -49,13 +47,9 @@ export type { StatusProbe, StatusSnapshot, UserCreateInput, - UserCreateRequest, - UserDeleteRequest, UserId, - UserListRequest, UserRole, UserUpdateInput, - UserUpdateRequest, TotpSetupRequest, TotpSetupResponse, TotpStatusRequest, diff --git a/shared/packages/web-ui/src/lib/primary-color.svelte.ts b/shared/packages/web-ui/src/lib/primary-color.svelte.ts index fd515a9..1a1a622 100644 --- a/shared/packages/web-ui/src/lib/primary-color.svelte.ts +++ b/shared/packages/web-ui/src/lib/primary-color.svelte.ts @@ -39,9 +39,10 @@ const paletteByName = Object.fromEntries(PRIMARY_COLOR_PALETTE.map((color) => [c string, PaletteColor > -const primaryVars = ['--color-primary', '--color-accent', '--color-ring'] -const foregroundVars = ['--color-primary-fg', '--color-accent-fg'] +const primaryVars = ['--color-primary', '--color-accent', '--color-ring', '--sc-primary', '--sc-accent', '--sc-ring'] +const foregroundVars = ['--color-primary-fg', '--color-accent-fg', '--sc-primary-fg', '--sc-accent-fg'] const activeUserAttribute = 'data-primary-color-user' +const styleElementId = 'sc-primary-color' const activeProjects = new Set() function normalizeUserKey(userKey: string): string { @@ -67,19 +68,45 @@ function readStoredColor(projectKey: string): string { } } +// Moves a #rrggbb color a fraction of the way toward a channel value (0 = black, 255 = white). +function mixHex(hex: string, towards: number, weight: number): string { + const channels = [1, 3, 5].map((start) => parseInt(hex.slice(start, start + 2), 16)) + return `#${channels.map((c) => Math.round(c + (towards - c) * weight).toString(16).padStart(2, '0')).join('')}` +} + +// The color is written to a stylesheet rather than inline on . Shared and app CSS re-declare these +// tokens on every [data-theme] element (the AppShell root, for one), and that declaration hides the value +// would pass down, so the choice never reached the app's UI. Targeting [data-theme] elements with +// !important makes it win everywhere, and the dark/light split is left to the selectors. +function primaryDeclarations(color: PaletteColor, dark: boolean): string { + const primary = dark ? color.dark : color.light + // Hover is lighter on dark and darker on light, as in the shared theme. It is a hex value, not color-mix(), + // because consumers such as the terminal read these tokens as plain colors. + const hover = dark ? mixHex(primary, 255, 0.15) : mixHex(primary, 0, 0.15) + const foreground = dark ? color.darkFg : '#ffffff' + return [ + ...primaryVars.map((name) => `${name}: ${primary} !important;`), + `--sc-primary-hover: ${hover} !important;`, + ...foregroundVars.map((name) => `${name}: ${foreground} !important;`), + ].join(' ') +} + export function applyPrimaryColor(_projectKey: string, colorName: string): void { if (typeof document === 'undefined') return const color = paletteByName[colorName] - const root = document.documentElement.style + let style = document.getElementById(styleElementId) as HTMLStyleElement | null if (!color) { - for (const name of [...primaryVars, ...foregroundVars]) root.removeProperty(name) + style?.remove() return } - const dark = document.documentElement.getAttribute('data-theme') === 'dark' - const primary = dark ? color.dark : color.light - const foreground = dark ? color.darkFg : '#ffffff' - for (const name of primaryVars) root.setProperty(name, primary) - for (const name of foregroundVars) root.setProperty(name, foreground) + if (!style) { + style = document.createElement('style') + style.id = styleElementId + document.head.append(style) + } + style.textContent = `:root, [data-theme] { ${primaryDeclarations(color, false)} } +[data-theme='dark'] { ${primaryDeclarations(color, true)} } +` } export function setPrimaryColor(projectKey: string, colorName: string): void { @@ -105,11 +132,8 @@ export function initPrimaryColor(projectKey: string, userKey = ''): () => void { if (typeof document === 'undefined') return () => undefined if (userKey) setPrimaryColorUser(userKey) activeProjects.add(projectKey.trim().toLowerCase() || 'application') - const stored = readStoredColor(projectKey) - applyPrimaryColor(projectKey, stored) - const observer = new MutationObserver(() => applyPrimaryColor(projectKey, readStoredColor(projectKey))) - observer.observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] }) - return () => observer.disconnect() + applyPrimaryColor(projectKey, readStoredColor(projectKey)) + return () => undefined } export function storedPrimaryColor(projectKey: string): string { diff --git a/shared/packages/web-ui/src/lib/styles.css b/shared/packages/web-ui/src/lib/styles.css index 025efac..0634b6a 100644 --- a/shared/packages/web-ui/src/lib/styles.css +++ b/shared/packages/web-ui/src/lib/styles.css @@ -746,148 +746,6 @@ html[data-wide-layout='true'] .sc-header { color: var(--sc-success); } -.sc-user-management { - display: grid; - gap: 1rem; - margin-top: 1.5rem; - padding-top: 1.5rem; - border-top: 1px solid var(--sc-border); -} - -.sc-user-management-header, -.sc-user-row, -.sc-user-edit-row { - display: flex; - align-items: center; - gap: 0.75rem; -} - -.sc-user-management-header { - justify-content: space-between; -} - -.sc-user-management-header h3 { - margin: 0; -} - -.sc-user-management-header p { - margin: 0.25rem 0 0; -} - -.sc-user-form, -.sc-user-list { - display: grid; - gap: 0.75rem; -} - -.sc-user-form { - padding: 0.9rem; - border: 1px solid var(--sc-border); - border-radius: 0.6rem; - background: var(--sc-surface-raised); -} - -.sc-user-grid { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 0.6rem; -} - -.sc-user-row { - min-width: 0; - justify-content: space-between; - padding: 0.7rem 0; - border-bottom: 1px solid var(--sc-border); -} - -.sc-user-row > div:first-child { - display: grid; - min-width: 0; -} - -.sc-user-row > div:first-child span { - overflow: hidden; - color: var(--sc-muted-fg); - text-overflow: ellipsis; - white-space: nowrap; -} - -.sc-user-role { - color: var(--sc-muted-fg); - font-size: 0.8rem; - text-transform: capitalize; -} - -.sc-user-last-login { - flex-shrink: 0; - font-size: 0.8rem; - white-space: nowrap; -} - -.sc-user-actions { - display: flex; - flex-shrink: 0; - gap: 0.4rem; -} - -.sc-user-roles-summary { - max-width: 12rem; - overflow: hidden; - font-size: 0.8rem; - text-overflow: ellipsis; - white-space: nowrap; -} - -.sc-user-roles { - display: flex; - flex: 1 1 100%; - flex-wrap: wrap; - gap: 0.5rem 1rem; - margin: 0; - padding: 0.5rem 0.7rem; - border: 1px solid var(--sc-border); - border-radius: 0.5rem; -} - -.sc-user-roles legend { - flex-basis: 100%; - margin-bottom: 0.3rem; - color: var(--sc-muted-fg); - font-size: 0.8rem; -} - -.sc-user-role-option { - display: flex; - align-items: center; - gap: 0.35rem; - font-size: 0.85rem; -} - -.sc-user-edit-row { - align-items: stretch; - flex-wrap: wrap; -} - -.sc-user-edit-row .sc-input { - flex: 1 1 10rem; - min-width: 8rem; -} - -@media (max-width: 620px) { - .sc-user-grid { - grid-template-columns: 1fr; - } - - .sc-user-row { - align-items: flex-start; - flex-wrap: wrap; - } - - .sc-user-actions { - width: 100%; - } -} - .sc-pagination { display: flex; flex-wrap: wrap; diff --git a/shared/packages/web-ui/src/lib/types.ts b/shared/packages/web-ui/src/lib/types.ts index 92231d8..049b114 100644 --- a/shared/packages/web-ui/src/lib/types.ts +++ b/shared/packages/web-ui/src/lib/types.ts @@ -73,7 +73,7 @@ export interface KnownProject { label: string; } -/** One custom role an administrator may assign to a user - see UserManagement's `roles` prop. */ +/** One custom role an administrator may assign to a user. */ export interface KnownRole { id: number; name: string; @@ -107,24 +107,11 @@ export interface UserUpdateInput { /** * Replaces the account's full set of custom roles when present (an empty * array removes it from every role); omitted (undefined) leaves them - * untouched. Only ever set when UserManagement was given a `roles` prop. + * untouched. */ roleIds?: number[]; } -export type UserListRequest = () => ManagedUser[] | Promise; - -export type UserCreateRequest = ( - input: UserCreateInput, -) => void | Promise; - -export type UserUpdateRequest = ( - id: UserId, - input: UserUpdateInput, -) => void | Promise; - -export type UserDeleteRequest = (id: UserId) => void | Promise; - export interface AboutLink { label: string; href: string; diff --git a/shared/scripts/media/enforce-design-system-css.mjs b/shared/scripts/media/enforce-design-system-css.mjs deleted file mode 100644 index 9bf7574..0000000 --- a/shared/scripts/media/enforce-design-system-css.mjs +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env node -/** - * Enforce design-system CSS constraints for shared theme files. - * - * Rules enforced: - * - Theme CSS must not contain project/service-coupled selector tokens. - * - Theme CSS must not contain route-coupled panel IDs in selectors. - * - * TODO(shared extraction): the original monorepo version of this script also asserted that - * MediaShared/public/css/index.css and MediaDesktop/public/index.css stayed byte-for-byte synced. - * That check is no longer possible from inside this repo: MediaDesktop is now a fully separate - * repo (Original/MediaDesktop) and isn't checked out alongside this one, so there is nothing here - * to diff it against. The desktop-vs-shared theme sync check has been dropped rather than pointed - * at a nonexistent path; if that guarantee still matters, it belongs in MediaDesktop's own CI - * (comparing its vendored shared/ copy's theme file against its own), not here. - */ -import fs from 'node:fs'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; - -const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const repoRoot = path.resolve(__dirname, '..', '..'); - -// MediaShared/public/css/index.css became packages/legacy-assets/public/css/index.css once -// media-backend/webui were folded directly into the shared repo (no more vendored copy). -const sharedThemePath = path.join( - repoRoot, - 'packages', - 'legacy-assets', - 'public', - 'css', - 'index.css' -); - -const bannedSelectorRules = [ - { - name: 'project-coupled service token', - regex: /\b(?:kiosk|viewer|moderator|generator|library|contentscanner|downloader|carriernode)-page\b/i, - }, - { - name: 'project-coupled state class token', - regex: - /\b(?:viewer|kiosk|moderator|generator|library|contentscanner|downloader|carriernode)-(?:home|page|stage|mode|active|panel)\b/i, - }, - { - name: 'project-prefixed keyframe name', - regex: - /@keyframes\s+nc-(?:viewer|kiosk|moderator|generator|library|contentscanner|downloader|carriernode)/i, - }, - { - name: 'project-coupled data attribute', - regex: - /\[data-(?:kiosk|viewer|moderator|generator|library|contentscanner|downloader|carriernode)[^\]]*\]/i, - }, - { - name: 'route-coupled panel selector', - regex: /#panel-[a-z0-9_-]+/i, - }, -]; - -function readUtf8(filePath) { - return fs.readFileSync(filePath, 'utf8'); -} - -function stripCssComments(text) { - return text.replace(/\/\*[\s\S]*?\*\//g, ''); -} - -function findViolations(filePath, content) { - const cleaned = stripCssComments(content); - const lines = cleaned.split(/\r?\n/); - const violations = []; - - for (let i = 0; i < lines.length; i += 1) { - const line = lines[i]; - for (const rule of bannedSelectorRules) { - if (rule.regex.test(line)) { - violations.push({ - filePath, - line: i + 1, - rule: rule.name, - snippet: line.trim(), - }); - } - } - } - - return violations; -} - -function main() { - if (!fs.existsSync(sharedThemePath)) { - console.error('[enforce-design-system-css] Missing expected theme file:'); - console.error(` - ${path.relative(repoRoot, sharedThemePath)}`); - process.exit(1); - } - - const sharedTheme = readUtf8(sharedThemePath); - - const allViolations = findViolations(sharedThemePath, sharedTheme); - - if (allViolations.length > 0) { - console.error('[enforce-design-system-css] Design-system CSS violations found:'); - for (const v of allViolations) { - const rel = path.isAbsolute(v.filePath) ? path.relative(repoRoot, v.filePath) : v.filePath; - console.error(` - ${rel}:${v.line} [${v.rule}] ${v.snippet}`); - } - console.error('[enforce-design-system-css] Fix violations before running lint/test.'); - process.exit(1); - } - - console.log( - '[enforce-design-system-css] OK: shared theme is free of project-coupled selectors.' - ); -} - -main(); diff --git a/shared/shared-styles.css b/shared/shared-styles.css index 832f18b..049a154 100644 --- a/shared/shared-styles.css +++ b/shared/shared-styles.css @@ -727,148 +727,6 @@ html[data-wide-layout='true'] .sc-header { color: var(--sc-success); } -.sc-user-management { - display: grid; - gap: 1rem; - margin-top: 1.5rem; - padding-top: 1.5rem; - border-top: 1px solid var(--sc-border); -} - -.sc-user-management-header, -.sc-user-row, -.sc-user-edit-row { - display: flex; - align-items: center; - gap: 0.75rem; -} - -.sc-user-management-header { - justify-content: space-between; -} - -.sc-user-management-header h3 { - margin: 0; -} - -.sc-user-management-header p { - margin: 0.25rem 0 0; -} - -.sc-user-form, -.sc-user-list { - display: grid; - gap: 0.75rem; -} - -.sc-user-form { - padding: 0.9rem; - border: 1px solid var(--sc-border); - border-radius: 0.6rem; - background: var(--sc-surface-raised); -} - -.sc-user-grid { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 0.6rem; -} - -.sc-user-row { - min-width: 0; - justify-content: space-between; - padding: 0.7rem 0; - border-bottom: 1px solid var(--sc-border); -} - -.sc-user-row > div:first-child { - display: grid; - min-width: 0; -} - -.sc-user-row > div:first-child span { - overflow: hidden; - color: var(--sc-muted-fg); - text-overflow: ellipsis; - white-space: nowrap; -} - -.sc-user-role { - color: var(--sc-muted-fg); - font-size: 0.8rem; - text-transform: capitalize; -} - -.sc-user-last-login { - flex-shrink: 0; - font-size: 0.8rem; - white-space: nowrap; -} - -.sc-user-actions { - display: flex; - flex-shrink: 0; - gap: 0.4rem; -} - -.sc-user-roles-summary { - max-width: 12rem; - overflow: hidden; - font-size: 0.8rem; - text-overflow: ellipsis; - white-space: nowrap; -} - -.sc-user-roles { - display: flex; - flex: 1 1 100%; - flex-wrap: wrap; - gap: 0.5rem 1rem; - margin: 0; - padding: 0.5rem 0.7rem; - border: 1px solid var(--sc-border); - border-radius: 0.5rem; -} - -.sc-user-roles legend { - flex-basis: 100%; - margin-bottom: 0.3rem; - color: var(--sc-muted-fg); - font-size: 0.8rem; -} - -.sc-user-role-option { - display: flex; - align-items: center; - gap: 0.35rem; - font-size: 0.85rem; -} - -.sc-user-edit-row { - align-items: stretch; - flex-wrap: wrap; -} - -.sc-user-edit-row .sc-input { - flex: 1 1 10rem; - min-width: 8rem; -} - -@media (max-width: 620px) { - .sc-user-grid { - grid-template-columns: 1fr; - } - - .sc-user-row { - align-items: flex-start; - flex-wrap: wrap; - } - - .sc-user-actions { - width: 100%; - } -} - .sc-pagination { display: flex; flex-wrap: wrap;