diff --git a/SPEC.md b/SPEC.md
index e476394..e9767ae 100644
--- a/SPEC.md
+++ b/SPEC.md
@@ -180,8 +180,11 @@ Split `value` meaning per mode:
| `exact` | amount in minor units | sum == amount |
| `percent` | basis points (100 % = 10000) | sum == 10000 |
-Multiple payers are supported (`payers` list); the default UI shows a single
-payer with an "add payer" option.
+Multiple payers are supported (`payers` list) — e.g. several people chipping
+in for a car. The editor shows a single payer by default; choosing "Several
+people" in *Paid by* lists every member with an amount box. Empty boxes show
+the unassigned remainder as a placeholder, a live line reads "Remaining" /
+"Over by" / "Adds up to the total", and the expense list shows "N payers".
---
@@ -262,8 +265,8 @@ the minimum in practice, and is easy to reason about.
- Create group: name, base currency (default by locale: CZK for Czech, EUR
otherwise), icon/emoji, initial members.
- Share: copy link, native share sheet, QR code.
-- Settings: rename, members, "who am I", remove from device, export, delete
- group (see 8.3).
+- Settings: rename, members, "who am I", default category, remove from
+ device, export, delete group (see 8.3).
- **Base currency is locked once the group has any expense or transfer.** It
can be changed freely while the group is empty; afterwards the setting is
read-only with a short explanation. Clients enforce this during replay too:
@@ -278,6 +281,18 @@ the minimum in practice, and is easy to reason about.
the daily rate for the expense date and is editable.
- Split editor: equal / shares / exact / percent tabs; tap to exclude people;
live "remaining to assign" indicator for exact and percent modes.
+- The add sheet fits one phone screen (390×844, three members): currency as a
+ pill beside the amount; categories as 12 equal icon tiles (6 × 2 on phones,
+ one row of 12 when wider) with the chosen name beside the label; date and
+ payer side by side ("Several people" is the last payer option); photo, note
+ and repeat stay folded behind small buttons; Save is pinned to the bottom.
+- Touch gestures on the group page (shortcuts; every action also has a
+ button): pull up past the end of the Expenses or Balances tab to add an
+ expense (a "Pull up to add expense" pill rises from behind the tab bar and
+ reads "Release to add" once far enough; at the bottom so the browser's
+ pull-to-refresh still works), and swipe left/right to move between the
+ Expenses, Balances, Stats and Activity tabs. Swipes starting within 24px
+ of the screen edge are left to the OS back gesture.
- **One photo per expense** (receipt), see 9.
- Category, date, note.
- Comments thread on each expense.
@@ -288,6 +303,12 @@ Fixed v1 set with icons: food & drink, groceries, transport, accommodation,
entertainment, shopping, utilities, rent, travel, gifts, health, other.
Transfers have their own implicit category.
+Each group has a **default category** (`group.updated` → `defaultCategory`,
+one of the set above; absent means "other") that new expenses start with.
+Replay ignores a `group.updated` whose `defaultCategory` isn't in the set,
+without applying any other field of that event. Each category has an icon
+colour (`CATEGORY_COLORS` in `apps/web/src/lib/format.ts`).
+
### 7.4 Recurring expenses
- A template (expense object + rule: weekly / monthly / yearly, interval,
@@ -435,11 +456,22 @@ which group ids exist.
1. **Home**: groups saved on this device, each showing my balance. "New
group", "Open link/scan QR".
-2. **Group**: tabs: Expenses · Balances (settle up) · Stats · Activity.
- Floating "+" button for a new expense.
+2. **Group**: on Expenses and Balances, a header with my balance as the
+ headline number ("You're owed / You owe / settled up"; the group total if
+ "who am I" isn't set), the group's total spent, and round quick actions:
+ Add · Payment · Settle up · Share. Tabs: Expenses · Balances (settle up) ·
+ Stats · Activity. A floating "+" appears only once the quick actions have
+ scrolled off screen. Touch gestures: pull up at the end of the page to
+ add, swipe sideways to change tab (see 7.2).
3. **Expense editor** (sheet on mobile, dialog on desktop).
4. **Expense detail**: photo, split breakdown, comments, history.
-5. **Group settings**.
+5. **Group settings**, kept short: Share (copy link, native share, QR),
+ Group (icon, name, main currency and default category side by side; Save
+ appears only when something changed), Members ("You are" picker on top;
+ rename/archive as icon buttons; add member as the last row),
+ Notifications (one switch; hidden where push isn't available), Repeating
+ expenses (only when there are any), Export, Danger zone (delete asks for
+ the group name only after it is tapped).
6. **App settings**: language, theme, notifications.
### 10.3 Language
@@ -454,19 +486,26 @@ which group ids exist.
### 10.4 Theme
-Dark and light, following the system setting by default with a manual
-override. Starting palette (to be validated for WCAG AA contrast):
+Three themes, chosen per device in app settings: **System** (default:
+follows the OS between soft dark and light), **Dark** (soft near-black),
+**Black** (true black, for OLED screens) and **Light**. Neutral backgrounds;
+green is the accent only. Tokens live in `apps/web/src/app.css`:
-| Token | Dark | Light |
-|---|---|---|
-| background | `#0B2E22` | `#F2F7F4` |
-| surface | `#123D2E` | `#FFFFFF` |
-| surface-raised | `#1A4D3A` | `#E4EFE9` |
-| text | `#E8F3EC` | `#0B2E22` |
-| text-muted | `#9FBFAE` | `#4A6B5B` |
-| accent / you are owed | `#3DDC97` | `#16865A` |
-| you owe | `#F2A65A` | `#B5541C` |
-| highlight (sparingly) | `#D4AF37` | `#9A7B12` |
+| Token | Dark | Black | Light |
+|---|---|---|---|
+| background | `#0A0B0D` | `#000000` | `#F2F3F5` |
+| surface | `#16181C` | `#121316` | `#FFFFFF` |
+| surface-raised | `#1F2227` | `#1B1D21` | `#E9EBEE` |
+| text | `#F5F6F7` | same as Dark | `#0D0F12` |
+| text-muted | `#8B9099` | same as Dark | `#5F6670` |
+| accent / you are owed | `#3DDC97` | same as Dark | `#0B7549` |
+| you owe | `#FF9466` | same as Dark | `#B53C0A` |
+| highlight (sparingly) | `#D4AF37` | same as Dark | `#9A7B12` |
+
+Text, muted, accent, owe and danger colours have at least 4.5:1 contrast on
+every background and surface in each theme. Cards and lists are separated by
+shade with hairline dividers; controls are pill-shaped; the phone tab bar
+floats as a pill above the content.
Positive/negative amounts also differ by sign and icon, never by colour alone.
diff --git a/apps/web/index.html b/apps/web/index.html
index 79f2dd9..7584991 100644
--- a/apps/web/index.html
+++ b/apps/web/index.html
@@ -3,7 +3,7 @@
+ {/if}
+
+
+
+
+
diff --git a/apps/web/src/components/GroupPage.svelte b/apps/web/src/components/GroupPage.svelte
index 5ecd727..7170c2d 100644
--- a/apps/web/src/components/GroupPage.svelte
+++ b/apps/web/src/components/GroupPage.svelte
@@ -1,5 +1,5 @@
+
+{money(minor, currency, { sign })}{p.before}{p.whole}{p.frac}{p.after}
diff --git a/apps/web/src/components/Sheet.svelte b/apps/web/src/components/Sheet.svelte
index 88522d5..dadbe07 100644
--- a/apps/web/src/components/Sheet.svelte
+++ b/apps/web/src/components/Sheet.svelte
@@ -10,12 +10,17 @@
$effect(() => {
dialog.showModal();
+ // showModal() focuses the first control (the close button), which shows a
+ // focus ring even after a tap. Focus the dialog itself instead, unless a
+ // field asked for focus with autofocus. Tab still reaches every control.
+ if (!dialog.querySelector('[autofocus]')) dialog.focus();
return () => dialog.close();
});