/* ══════════════════════════════════════════════════════════════
   Design tokens — mirrored from the Android app's Material3 theme
   (android/app/src/main/java/org/dailysticky/app/ui/theme/Theme.kt,
   `LightColors` + `StickyTypography` + `StickyShapes`). Issue #53:
   web should look/feel like Android, not just function like it.
   Android also ships a real `DarkColors` scheme (system-driven, via
   `isSystemInDarkTheme()`) that web has no equivalent of — flagged
   as a real gap in docs/plans/issue-53-plan.md, not addressed here.
   ══════════════════════════════════════════════════════════════ */
:root {
  /* Brand — StickyYellow / StickyYellowDeep (Theme.kt:30-31) */
  --yellow: #F5E51A;
  --yellow-dark: #C9BA00;
  --yellow-tint: #FEFBD8;      /* consolidated pale-yellow background (was #fffde7/#FFF9C4/#fef9c3 scattered) */

  /* Surfaces — LightColors (Theme.kt:74-100). --bg/--card-bg deliberately
     pulled apart (were #FAFAF8/#F6F5EF, a ~2% luminance gap that read as
     one undifferentiated page on web, unlike Android where the OS gives
     cards real elevation for free) — page now reads as a distinct grey
     "table" cards sit on top of, tiled and separated by --shadow below. */
  --bg: #F2F2F4;               /* background / onBackground */
  --card-bg: #FFFFFF;          /* surfaceContainer — tonal card fill, no elevation shadow needed */
  --surface: #FFFFFF;          /* surface — modals, inputs, dropdowns */
  --surface-high: #F0F0F2;     /* surfaceContainerHigh — hover/active tonal state */
  --surface-highest: #E6E6EA;  /* surfaceContainerHighest */
  --surface-low: #FAFAFB;      /* surfaceContainerLow */
  --border: #E2E2E6;           /* outline */
  --border-soft: #E8E8EB;      /* outlineVariant */
  --text: #1A1A1A;             /* onSurface / onBackground */
  --muted: #75747A;            /* onSurfaceVariant */
  --done-color: #9a99a0;

  /* Secondary accent — Violet / VioletDeep (Theme.kt:37-38), used for
     habits + anything that isn't the primary yellow action */
  --habit: #E8E4FF;            /* secondaryContainer */
  --habit-text: #5B4FC4;       /* secondary (VioletDeep read against light surfaces) */

  /* Status — SuccessLight / ErrorLight (Theme.kt:41-44) */
  --success: #1E9E5A;
  --success-bg: #E3F6EC;
  --overdue: #FDECEC;
  --overdue-border: #F3C6C6;
  --error: #D64545;

  /* Legacy category colors kept as-is — Android has no equivalent token
     for these (project/appt tag colors are view-local, not theme-level) */
  --project: #E3F2FD;
  --project-text: #1565C0;

  /* Shape — StickyShapes (Theme.kt:131-137) */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;      /* default card radius, StickyShapes.medium */
  --radius-lg: 20px;   /* StickyShapes.large — ListCard.kt uses this */
  --radius-xl: 28px;   /* StickyShapes.extraLarge — pills/fab */
  --shadow: 0 1px 3px rgba(26,26,26,0.09), 0 1px 2px rgba(26,26,26,0.05);

  /* Spacing scale — mirrors ListCard.kt's actual paddings (16/14/12/10dp) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Type scale — StickyTypography (Theme.kt:113-129), 1sp ≈ 1px here */
  --fs-headline-md: 1.375rem;  /* 22sp */
  --fs-title-lg: 1.25rem;      /* 20sp */
  --fs-title-md: 1rem;         /* 16sp */
  --fs-title-sm: 0.875rem;     /* 14sp */
  --fs-body-lg: 1rem;          /* 16sp */
  --fs-body-md: 0.875rem;      /* 14sp */
  --fs-body-sm: 0.75rem;       /* 12sp */
  --fs-label-md: 0.75rem;      /* 12sp */
  --fs-label-sm: 0.6875rem;    /* 11sp */
  --fw-title: 700;             /* Bold/ExtraBold titles */
  --fw-label: 600;             /* SemiBold labels */
}

/* == Theme palette ==========================================
   Light values live in :root above; this block holds the palette tokens
   every other colour in the app is expressed through (--bg-/--fg-/--bd-<light hex>
   flip in dark mode, --k-<hex> are fixed on-solid colours that never flip).
   Dark follows the OS (Auto) unless the user picked a theme in Settings,
   which sets data-theme on <html> (see static/theme.js). #327. */
:root {
  --error-solid: #D64545;
  --success-solid: #1E9E5A;
  --habit-solid: #5B4FC4;
  color-scheme: light;
  --primary: #1A1A1A;
  --on-primary: #F5E51A;
  --primary-hover: #2E2E33;
  --bd-0ea5e9: #0ea5e9;
  --bd-1a1a1a: #1a1a1a;
  --bd-1c7a3e: #1c7a3e;
  --bd-1f7a4a: #1f7a4a;
  --bd-22c55e: #22c55e;
  --bd-2e7d32: #2e7d32;
  --bd-3b3bb0: #3b3bb0;
  --bd-3b82f6: #3b82f6;
  --bd-444444: #444444;
  --bd-555555: #555555;
  --bd-5c6bc0: #5c6bc0;
  --bd-64748b: #64748b;
  --bd-7c3aed: #7c3aed;
  --bd-86efac: #86efac;
  --bd-888888: #888888;
  --bd-8a8578: #8a8578;
  --bd-8b5cf6: #8b5cf6;
  --bd-8ecae6: #8ecae6;
  --bd-90caf9: #90caf9;
  --bd-9c27b0: #9c27b0;
  --bd-a1a1aa: #a1a1aa;
  --bd-a5d6a7: #a5d6a7;
  --bd-a78bfa: #a78bfa;
  --bd-b26a00: #b26a00;
  --bd-b8ad00: #b8ad00;
  --bd-b91c1c: #b91c1c;
  --bd-bae6fd: #bae6fd;
  --bd-bbbbbb: #bbbbbb;
  --bd-bbf7d0: #bbf7d0;
  --bd-bfdbfe: #bfdbfe;
  --bd-c09060: #c09060;
  --bd-c0a000: #c0a000;
  --bd-c4b5fd: #c4b5fd;
  --bd-c9c9c0: #c9c9c0;
  --bd-cccccc: #cccccc;
  --bd-d1d5db: #d1d5db;
  --bd-d4c000: #d4c000;
  --bd-d97706: #d97706;
  --bd-ddd6fe: #ddd6fe;
  --bd-dddddd: #dddddd;
  --bd-e57373: #e57373;
  --bd-e8e8dc: #e7e7e7;
  --bd-ea580c: #ea580c;
  --bd-ebebeb: #ebebeb;
  --bd-eeeeee: #eeeeee;
  --bd-f0dede: #f0dede;
  --bd-f0ede0: #ededed;
  --bd-f0f0ea: #f0f0f0;
  --bd-f0f0f0: #f0f0f0;
  --bd-f59e0b: #f59e0b;
  --bd-f5c518: #f5c518;
  --bd-f5f5f0: #f5f5f5;
  --bd-fca5a5: #fca5a5;
  --bd-fcd34d: #fcd34d;
  --bd-fde047: #fde047;
  --bd-fde68a: #fde68a;
  --bd-fecaca: #fecaca;
  --bd-ffcc80: #ffcc80;
  --bd-ffccbc: #ffccbc;
  --bd-ffd54f: #ffd54f;
  --bd-ffe082: #ffe082;
  --bg-555555: #555555;
  --bg-60a5fa: #60a5fa;
  --bg-94a3b8: #94a3b8;
  --bg-9e9e9e: #9e9e9e;
  --bg-ce93d8: #ce93d8;
  --bg-dbeafe: #dbeafe;
  --bg-dcedc8: #dcedc8;
  --bg-dcfce7: #dcfce7;
  --bg-dddddd: #dddddd;
  --bg-e0e0e0: #e0e0e0;
  --bg-e0e7ff: #e0e7ff;
  --bg-e0f2fe: #e0f2fe;
  --bg-e3f2fd: #e3f2fd;
  --bg-e3f3e1: #e3f3e1;
  --bg-e3f3e9: #e3f3e9;
  --bg-e5e5dc: #e4e4e4;
  --bg-e5e7eb: #e5e7eb;
  --bg-e6ffec: #e6ffec;
  --bg-e8f5e9: #e8f5e9;
  --bg-e8f7ee: #e8f7ee;
  --bg-eaf7ef: #eaf7ef;
  --bg-eaffea: #eaffea;
  --bg-ebebeb: #ebebeb;
  --bg-ececec: #ececec;
  --bg-ede9fe: #ede9fe;
  --bg-eeeeee: #eeeeee;
  --bg-eef1f6: #eef1f6;
  --bg-eef2ff: #eef2ff;
  --bg-eef6ff: #eef6ff;
  --bg-eefaf3: #eefaf3;
  --bg-efede8: #ededed;
  --bg-f0ede4: #ededed;
  --bg-f0efe6: #efefef;
  --bg-f0f0ea: #f0f0f0;
  --bg-f0f0f0: #f0f0f0;
  --bg-f0f9ff: #f0f9ff;
  --bg-f0fdf4: #f0fdf4;
  --bg-f1f8f2: #f1f8f2;
  --bg-f2faf4: #f2faf4;
  --bg-f3e5f5: #f3e5f5;
  --bg-f3f4f6: #f3f4f6;
  --bg-f472b6: #f472b6;
  --bg-f4f4f4: #f4f4f4;
  --bg-f4f4f5: #f4f4f5;
  --bg-f5f3ff: #f5f3ff;
  --bg-f5f4f0: #f4f4f4;
  --bg-f5f5f0: #f5f5f5;
  --bg-f5f5f5: #f5f5f5;
  --bg-f7f7f7: #f7f7f7;
  --bg-f8f7f2: #f7f7f7;
  --bg-f8f8f5: #f8f8f8;
  --bg-f9f9f7: #f9f9f9;
  --bg-f9fafb: #f9fafb;
  --bg-fafaf5: #fafafa;
  --bg-fafaf8: #fafafa;
  --bg-fafafa: #fafafa;
  --bg-fde8ff: #fde8ff;
  --bg-fdecea: #fdecea;
  --bg-fee2e2: #fee2e2;
  --bg-fef3c7: #fef3c7;
  --bg-fef9c3: #fef9c3;
  --bg-ffebee: #ffebee;
  --bg-fff3e0: #fff3e0;
  --bg-fff5f5: #fff5f5;
  --bg-fff7e0: #fff7e0;
  --bg-fff8e1: #fff8e1;
  --bg-fff8e6: #fff8e6;
  --bg-fffbe6: #fffbe6;
  --bg-fffbeb: #fffbeb;
  --bg-fffdf0: #fcfcfc;
  --bg-fffef0: #fdfdfd;
  --bg-fffef5: #fefefe;
  --fg-0369a1: #0369a1;
  --fg-1565c0: #1565c0;
  --fg-15803d: #15803d;
  --fg-166534: #166534;
  --fg-16a34a: #16a34a;
  --fg-1a1a1a: #1a1a1a;
  --fg-1a5f1a: #1a5f1a;
  --fg-1a7f37: #1a7f37;
  --fg-1b1b1b: #1b1b1b;
  --fg-1b5e20: #1b5e20;
  --fg-1c7a3e: #1c7a3e;
  --fg-1d4ed8: #1d4ed8;
  --fg-1f7a4a: #1f7a4a;
  --fg-2563eb: #2563eb;
  --fg-2d6a2a: #2d6a2a;
  --fg-2e7d32: #2e7d32;
  --fg-333333: #333333;
  --fg-33691e: #33691e;
  --fg-3730a3: #3730a3;
  --fg-3b3bb0: #3b3bb0;
  --fg-4338ca: #4338ca;
  --fg-444444: #444444;
  --fg-52525b: #52525b;
  --fg-555555: #555555;
  --fg-5b21b6: #5b21b6;
  --fg-5d4037: #5d4037;
  --fg-666666: #666666;
  --fg-6a1b9a: #6a1b9a;
  --fg-6b7280: #6b7280;
  --fg-6d5500: #6d5500;
  --fg-713f12: #713f12;
  --fg-777777: #777777;
  --fg-78350f: #78350f;
  --fg-795548: #795548;
  --fg-7a5a00: #7a5a00;
  --fg-7a6d00: #7a6d00;
  --fg-7c3aed: #7c3aed;
  --fg-7c6f00: #7c6f00;
  --fg-854d0e: #854d0e;
  --fg-86181d: #86181d;
  --fg-888888: #888888;
  --fg-8a1c13: #8a1c13;
  --fg-8a6d00: #8a6d00;
  --fg-8a8578: #8a8578;
  --fg-92400e: #92400e;
  --fg-991b1b: #991b1b;
  --fg-999999: #999999;
  --fg-9ca3af: #9ca3af;
  --fg-aaaaaa: #aaaaaa;
  --fg-b26a00: #b26a00;
  --fg-b3261e: #b3261e;
  --fg-b45309: #b45309;
  --fg-b91c1c: #b91c1c;
  --fg-bb0000: #bb0000;
  --fg-bbbbbb: #bbbbbb;
  --fg-bf360c: #bf360c;
  --fg-c0392b: #c0392b;
  --fg-c62828: #c62828;
  --fg-c98a00: #c98a00;
  --fg-cccccc: #cccccc;
  --fg-d0bcff: #d0bcff;
  --fg-d0d0d0: #d0d0d0;
  --fg-d1d5db: #d1d5db;
  --fg-dc2626: #dc2626;
  --fg-e53935: #e53935;
  --fg-e65100: #e65100;
  --fg-f59e0b: #f59e0b;
  --fg-f5e51a: #f5e51a;
  --k-000000: #000000;
  --k-16a34a: #16a34a;
  --k-1a1a1a: #1a1a1a;
  --k-1c7a3e: #1c7a3e;
  --k-1e9e5a: #1e9e5a;
  --k-1f2937: #1f2937;
  --k-2a7a2a: #2a7a2a;
  --k-2e2e33: #2e2e33;
  --k-2e7d32: #2e7d32;
  --k-313033: #313033;
  --k-333333: #333333;
  --k-34d399: #34d399;
  --k-555555: #555555;
  --k-5a4e00: #5a4e00;
  --k-7b2cbf: #7b2cbf;
  --k-7c6f00: #7c6f00;
  --k-b45309: #b45309;
  --k-d4c000: #d4c000;
  --k-d4c400: #d4c400;
  --k-d64545: #d64545;
  --k-d97706: #d97706;
  --k-e0a100: #e0a100;
  --k-e8d520: #e8d520;
  --k-ede014: #ede014;
  --k-f0d900: #f0d900;
  --k-f3f4f6: #f3f4f6;
  --k-f4eff4: #f4eff4;
  --k-fde68a: #fde68a;
  --k-ffffff: #ffffff;
}
:root[data-theme="dark"] {
  --yellow-tint: #2A2810;
  --bg: #0B0B0D;
  --card-bg: #17171A;
  --surface: #1A1A1D;
  --surface-high: #232327;
  --surface-highest: #2B2B30;
  --surface-low: #141416;
  --border: #2E2E33;
  --border-soft: #232327;
  --text: #F2F2F0;
  --muted: #A6A5AC;
  --done-color: #6B6A70;
  --habit: #2E2A4D;
  --habit-text: #D8D2FF;
  --success: #4ADE80;
  --success-bg: #1D4B2E;
  --overdue: #3A1B1B;
  --overdue-border: #6B2D2D;
  --error: #FF6B6B;
  --project: #12304A;
  --project-text: #90CAF9;
  --shadow: 0 1px 3px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.4);
  color-scheme: dark;
  --primary: #F5E51A;
  --on-primary: #17171A;
  --primary-hover: #E8D520;
  --bd-0ea5e9: #1d4b5f;
  --bd-1a1a1a: #525252;
  --bd-1c7a3e: #2d6340;
  --bd-1f7a4a: #2e6146;
  --bd-22c55e: #255b38;
  --bd-2e7d32: #325934;
  --bd-3b3bb0: #2c2c52;
  --bd-3b82f6: #193157;
  --bd-444444: #494949;
  --bd-555555: #464646;
  --bd-5c6bc0: #2b2f4a;
  --bd-64748b: #393e45;
  --bd-7c3aed: #321d56;
  --bd-86efac: #1b482b;
  --bd-888888: #3c3c3c;
  --bd-8a8578: #403e3a;
  --bd-8b5cf6: #2a1851;
  --bd-8ecae6: #1f3844;
  --bd-90caf9: #163249;
  --bd-9c27b0: #53285a;
  --bd-a1a1aa: #343437;
  --bd-a5d6a7: #263c27;
  --bd-a78bfa: #23154a;
  --bd-b26a00: #6e4d1c;
  --bd-b8ad00: #6d681b;
  --bd-b91c1c: #5e2424;
  --bd-bae6fd: #133243;
  --bd-bbbbbb: #313131;
  --bd-bbf7d0: #174025;
  --bd-bfdbfe: #122743;
  --bd-c09060: #493a2b;
  --bd-c0a000: #6c5f1b;
  --bd-c4b5fd: #1d1344;
  --bd-c9c9c0: #32322d;
  --bd-cccccc: #2e2e2e;
  --bd-d1d5db: #292b2f;
  --bd-d4c000: #69611a;
  --bd-d97706: #65431c;
  --bd-ddd6fe: #19113f;
  --bd-dddddd: #2b2b2b;
  --bd-e57373: #4a1f1f;
  --bd-e8e8dc: #2f2f24;
  --bd-ea580c: #60331c;
  --bd-ebebeb: #282828;
  --bd-eeeeee: #272727;
  --bd-f0dede: #321f1f;
  --bd-f0ede0: #312e20;
  --bd-f0f0ea: #2b2b23;
  --bd-f0f0f0: #272727;
  --bd-f59e0b: #5f461b;
  --bd-f5c518: #5d4e1b;
  --bd-f5f5f0: #2b2b22;
  --bd-fca5a5: #461414;
  --bd-fcd34d: #554617;
  --bd-fde047: #564c16;
  --bd-fde68a: #4b4014;
  --bd-fecaca: #411111;
  --bd-ffcc80: #4d3613;
  --bd-ffccbc: #441d11;
  --bd-ffd54f: #554615;
  --bd-ffe082: #4d3f13;
  --bg-555555: #313131;
  --bg-60a5fa: #0f2036;
  --bg-94a3b8: #1f2328;
  --bg-9e9e9e: #252525;
  --bg-ce93d8: #27182a;
  --bg-dbeafe: #0a1625;
  --bg-dcedc8: #1b2313;
  --bg-dcfce7: #0c2414;
  --bg-dddddd: #1a1a1a;
  --bg-e0e0e0: #1a1a1a;
  --bg-e0e7ff: #090f25;
  --bg-e0f2fe: #0a1a24;
  --bg-e3f2fd: #0b1923;
  --bg-e3f3e1: #131e12;
  --bg-e3f3e9: #121e16;
  --bg-e5e5dc: #1c1c17;
  --bg-e5e7eb: #16181a;
  --bg-e6ffec: #09240f;
  --bg-e8f5e9: #121d13;
  --bg-e8f7ee: #101e16;
  --bg-eaf7ef: #111d15;
  --bg-eaffea: #092309;
  --bg-ebebeb: #181818;
  --bg-ececec: #181818;
  --bg-ede9fe: #0f0a23;
  --bg-eeeeee: #171717;
  --bg-eef1f6: #12161b;
  --bg-eef2ff: #090f23;
  --bg-eef6ff: #091523;
  --bg-eefaf3: #0f1e15;
  --bg-efede8: #1a1915;
  --bg-f0ede4: #1c1a14;
  --bg-f0efe6: #1b1b14;
  --bg-f0f0ea: #1a1a15;
  --bg-f0f0f0: #171717;
  --bg-f0f9ff: #091823;
  --bg-f0fdf4: #0c2012;
  --bg-f1f8f2: #121b13;
  --bg-f2faf4: #101c13;
  --bg-f3e5f5: #1c111e;
  --bg-f3f4f6: #141618;
  --bg-f472b6: #321022;
  --bg-f4f4f4: #161616;
  --bg-f4f4f5: #161617;
  --bg-f5f3ff: #0d0922;
  --bg-f5f4f0: #191814;
  --bg-f5f5f0: #191914;
  --bg-f5f5f5: #161616;
  --bg-f7f7f7: #161616;
  --bg-f8f7f2: #1a1912;
  --bg-f8f8f5: #181814;
  --bg-f9f9f7: #171714;
  --bg-f9fafb: #131518;
  --bg-fafaf5: #1a1a11;
  --bg-fafaf8: #181813;
  --bg-fafafa: #151515;
  --bg-fde8ff: #210924;
  --bg-fdecea: #210e0b;
  --bg-fee2e2: #240a0a;
  --bg-fef3c7: #28220b;
  --bg-fef9c3: #28260b;
  --bg-ffebee: #23090d;
  --bg-fff3e0: #251a09;
  --bg-fff5f5: #220808;
  --bg-fff7e0: #251e09;
  --bg-fff8e1: #251e09;
  --bg-fff8e6: #241c09;
  --bg-fffbe6: #242009;
  --bg-fffbeb: #231e09;
  --bg-fffdf0: #231f09;
  --bg-fffef0: #232109;
  --bg-fffef5: #221f08;
  --fg-0369a1: #abddf9;
  --fg-1565c0: #a3c7f0;
  --fg-15803d: #baf0ce;
  --fg-166534: #c4efd4;
  --fg-16a34a: #adf0c6;
  --fg-1a1a1a: #e6e6e6;
  --fg-1a5f1a: #c7edc7;
  --fg-1a7f37: #bbeec9;
  --fg-1b1b1b: #e6e6e6;
  --fg-1b5e20: #c7ecca;
  --fg-1c7a3e: #bdedce;
  --fg-1d4ed8: #9bb0ec;
  --fg-1f7a4a: #bdebd3;
  --fg-2563eb: #8fadef;
  --fg-2d6a2a: #c6e5c5;
  --fg-2e7d32: #bee4c0;
  --fg-333333: #dddddd;
  --fg-33691e: #cfebc4;
  --fg-3730a3: #b3b0e4;
  --fg-3b3bb0: #acacdf;
  --fg-4338ca: #a6a1e1;
  --fg-444444: #d7d7d7;
  --fg-52525b: #ceced3;
  --fg-555555: #d1d1d1;
  --fg-5b21b6: #c2a7eb;
  --fg-5d4037: #dfd0cb;
  --fg-666666: #cbcbcb;
  --fg-6a1b9a: #d7b1ed;
  --fg-6b7280: #c1c4ca;
  --fg-6d5500: #fceebd;
  --fg-713f12: #f1d7bf;
  --fg-777777: #c5c5c5;
  --fg-78350f: #f3d0bc;
  --fg-795548: #d8c8c2;
  --fg-7a5a00: #fbeab8;
  --fg-7a6d00: #fbf4b8;
  --fg-7c3aed: #ad87ee;
  --fg-7c6f00: #fbf4b8;
  --fg-854d0e: #f4d7b7;
  --fg-86181d: #efb8ba;
  --fg-888888: #bfbfbf;
  --fg-8a1c13: #f1bab6;
  --fg-8a6d00: #fbecb3;
  --fg-8a8578: #c5c3bd;
  --fg-92400e: #f4cbb2;
  --fg-991b1b: #edb1b1;
  --fg-999999: #b9b9b9;
  --fg-9ca3af: #adb2bb;
  --fg-aaaaaa: #b2b2b2;
  --fg-b26a00: #fad8a5;
  --fg-b3261e: #ecaca8;
  --fg-b45309: #f6c8a6;
  --fg-b91c1c: #eda6a6;
  --fg-bb0000: #faa2a2;
  --fg-bbbbbb: #acacac;
  --fg-bf360c: #f4b5a2;
  --fg-c0392b: #e6aba5;
  --fg-c62828: #e8a2a2;
  --fg-c98a00: #fadd9d;
  --fg-cccccc: #a6a6a6;
  --fg-d0bcff: #7d4af5;
  --fg-d0d0d0: #a5a5a5;
  --fg-d1d5db: #99a1ad;
  --fg-dc2626: #e99999;
  --fg-e53935: #eb918f;
  --fg-e65100: #f9b793;
  --fg-f59e0b: #f5cf8f;
  --fg-f5e51a: #f4ec8a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --yellow-tint: #2A2810;
    --bg: #0B0B0D;
    --card-bg: #17171A;
    --surface: #1A1A1D;
    --surface-high: #232327;
    --surface-highest: #2B2B30;
    --surface-low: #141416;
    --border: #2E2E33;
    --border-soft: #232327;
    --text: #F2F2F0;
    --muted: #A6A5AC;
    --done-color: #6B6A70;
    --habit: #2E2A4D;
    --habit-text: #D8D2FF;
    --success: #4ADE80;
    --success-bg: #1D4B2E;
    --overdue: #3A1B1B;
    --overdue-border: #6B2D2D;
    --error: #FF6B6B;
    --project: #12304A;
    --project-text: #90CAF9;
    --shadow: 0 1px 3px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.4);
    color-scheme: dark;
  --primary: #F5E51A;
  --on-primary: #17171A;
  --primary-hover: #E8D520;
    --bd-0ea5e9: #1d4b5f;
    --bd-1a1a1a: #525252;
    --bd-1c7a3e: #2d6340;
    --bd-1f7a4a: #2e6146;
    --bd-22c55e: #255b38;
    --bd-2e7d32: #325934;
    --bd-3b3bb0: #2c2c52;
    --bd-3b82f6: #193157;
    --bd-444444: #494949;
    --bd-555555: #464646;
    --bd-5c6bc0: #2b2f4a;
    --bd-64748b: #393e45;
    --bd-7c3aed: #321d56;
    --bd-86efac: #1b482b;
    --bd-888888: #3c3c3c;
    --bd-8a8578: #403e3a;
    --bd-8b5cf6: #2a1851;
    --bd-8ecae6: #1f3844;
    --bd-90caf9: #163249;
    --bd-9c27b0: #53285a;
    --bd-a1a1aa: #343437;
    --bd-a5d6a7: #263c27;
    --bd-a78bfa: #23154a;
    --bd-b26a00: #6e4d1c;
    --bd-b8ad00: #6d681b;
    --bd-b91c1c: #5e2424;
    --bd-bae6fd: #133243;
    --bd-bbbbbb: #313131;
    --bd-bbf7d0: #174025;
    --bd-bfdbfe: #122743;
    --bd-c09060: #493a2b;
    --bd-c0a000: #6c5f1b;
    --bd-c4b5fd: #1d1344;
    --bd-c9c9c0: #32322d;
    --bd-cccccc: #2e2e2e;
    --bd-d1d5db: #292b2f;
    --bd-d4c000: #69611a;
    --bd-d97706: #65431c;
    --bd-ddd6fe: #19113f;
    --bd-dddddd: #2b2b2b;
    --bd-e57373: #4a1f1f;
    --bd-e8e8dc: #2f2f24;
    --bd-ea580c: #60331c;
    --bd-ebebeb: #282828;
    --bd-eeeeee: #272727;
    --bd-f0dede: #321f1f;
    --bd-f0ede0: #312e20;
    --bd-f0f0ea: #2b2b23;
    --bd-f0f0f0: #272727;
    --bd-f59e0b: #5f461b;
    --bd-f5c518: #5d4e1b;
    --bd-f5f5f0: #2b2b22;
    --bd-fca5a5: #461414;
    --bd-fcd34d: #554617;
    --bd-fde047: #564c16;
    --bd-fde68a: #4b4014;
    --bd-fecaca: #411111;
    --bd-ffcc80: #4d3613;
    --bd-ffccbc: #441d11;
    --bd-ffd54f: #554615;
    --bd-ffe082: #4d3f13;
    --bg-555555: #313131;
    --bg-60a5fa: #0f2036;
    --bg-94a3b8: #1f2328;
    --bg-9e9e9e: #252525;
    --bg-ce93d8: #27182a;
    --bg-dbeafe: #0a1625;
    --bg-dcedc8: #1b2313;
    --bg-dcfce7: #0c2414;
    --bg-dddddd: #1a1a1a;
    --bg-e0e0e0: #1a1a1a;
    --bg-e0e7ff: #090f25;
    --bg-e0f2fe: #0a1a24;
    --bg-e3f2fd: #0b1923;
    --bg-e3f3e1: #131e12;
    --bg-e3f3e9: #121e16;
    --bg-e5e5dc: #1c1c17;
    --bg-e5e7eb: #16181a;
    --bg-e6ffec: #09240f;
    --bg-e8f5e9: #121d13;
    --bg-e8f7ee: #101e16;
    --bg-eaf7ef: #111d15;
    --bg-eaffea: #092309;
    --bg-ebebeb: #181818;
    --bg-ececec: #181818;
    --bg-ede9fe: #0f0a23;
    --bg-eeeeee: #171717;
    --bg-eef1f6: #12161b;
    --bg-eef2ff: #090f23;
    --bg-eef6ff: #091523;
    --bg-eefaf3: #0f1e15;
    --bg-efede8: #1a1915;
    --bg-f0ede4: #1c1a14;
    --bg-f0efe6: #1b1b14;
    --bg-f0f0ea: #1a1a15;
    --bg-f0f0f0: #171717;
    --bg-f0f9ff: #091823;
    --bg-f0fdf4: #0c2012;
    --bg-f1f8f2: #121b13;
    --bg-f2faf4: #101c13;
    --bg-f3e5f5: #1c111e;
    --bg-f3f4f6: #141618;
    --bg-f472b6: #321022;
    --bg-f4f4f4: #161616;
    --bg-f4f4f5: #161617;
    --bg-f5f3ff: #0d0922;
    --bg-f5f4f0: #191814;
    --bg-f5f5f0: #191914;
    --bg-f5f5f5: #161616;
    --bg-f7f7f7: #161616;
    --bg-f8f7f2: #1a1912;
    --bg-f8f8f5: #181814;
    --bg-f9f9f7: #171714;
    --bg-f9fafb: #131518;
    --bg-fafaf5: #1a1a11;
    --bg-fafaf8: #181813;
    --bg-fafafa: #151515;
    --bg-fde8ff: #210924;
    --bg-fdecea: #210e0b;
    --bg-fee2e2: #240a0a;
    --bg-fef3c7: #28220b;
    --bg-fef9c3: #28260b;
    --bg-ffebee: #23090d;
    --bg-fff3e0: #251a09;
    --bg-fff5f5: #220808;
    --bg-fff7e0: #251e09;
    --bg-fff8e1: #251e09;
    --bg-fff8e6: #241c09;
    --bg-fffbe6: #242009;
    --bg-fffbeb: #231e09;
    --bg-fffdf0: #231f09;
    --bg-fffef0: #232109;
    --bg-fffef5: #221f08;
    --fg-0369a1: #abddf9;
    --fg-1565c0: #a3c7f0;
    --fg-15803d: #baf0ce;
    --fg-166534: #c4efd4;
    --fg-16a34a: #adf0c6;
    --fg-1a1a1a: #e6e6e6;
    --fg-1a5f1a: #c7edc7;
    --fg-1a7f37: #bbeec9;
    --fg-1b1b1b: #e6e6e6;
    --fg-1b5e20: #c7ecca;
    --fg-1c7a3e: #bdedce;
    --fg-1d4ed8: #9bb0ec;
    --fg-1f7a4a: #bdebd3;
    --fg-2563eb: #8fadef;
    --fg-2d6a2a: #c6e5c5;
    --fg-2e7d32: #bee4c0;
    --fg-333333: #dddddd;
    --fg-33691e: #cfebc4;
    --fg-3730a3: #b3b0e4;
    --fg-3b3bb0: #acacdf;
    --fg-4338ca: #a6a1e1;
    --fg-444444: #d7d7d7;
    --fg-52525b: #ceced3;
    --fg-555555: #d1d1d1;
    --fg-5b21b6: #c2a7eb;
    --fg-5d4037: #dfd0cb;
    --fg-666666: #cbcbcb;
    --fg-6a1b9a: #d7b1ed;
    --fg-6b7280: #c1c4ca;
    --fg-6d5500: #fceebd;
    --fg-713f12: #f1d7bf;
    --fg-777777: #c5c5c5;
    --fg-78350f: #f3d0bc;
    --fg-795548: #d8c8c2;
    --fg-7a5a00: #fbeab8;
    --fg-7a6d00: #fbf4b8;
    --fg-7c3aed: #ad87ee;
    --fg-7c6f00: #fbf4b8;
    --fg-854d0e: #f4d7b7;
    --fg-86181d: #efb8ba;
    --fg-888888: #bfbfbf;
    --fg-8a1c13: #f1bab6;
    --fg-8a6d00: #fbecb3;
    --fg-8a8578: #c5c3bd;
    --fg-92400e: #f4cbb2;
    --fg-991b1b: #edb1b1;
    --fg-999999: #b9b9b9;
    --fg-9ca3af: #adb2bb;
    --fg-aaaaaa: #b2b2b2;
    --fg-b26a00: #fad8a5;
    --fg-b3261e: #ecaca8;
    --fg-b45309: #f6c8a6;
    --fg-b91c1c: #eda6a6;
    --fg-bb0000: #faa2a2;
    --fg-bbbbbb: #acacac;
    --fg-bf360c: #f4b5a2;
    --fg-c0392b: #e6aba5;
    --fg-c62828: #e8a2a2;
    --fg-c98a00: #fadd9d;
    --fg-cccccc: #a6a6a6;
    --fg-d0bcff: #7d4af5;
    --fg-d0d0d0: #a5a5a5;
    --fg-d1d5db: #99a1ad;
    --fg-dc2626: #e99999;
    --fg-e53935: #eb918f;
    --fg-e65100: #f9b793;
    --fg-f59e0b: #f5cf8f;
    --fg-f5e51a: #f4ec8a;
  }
}
/* == end theme palette ====================================== */
/* theme palette: translucent tints */
:root { --k-f9e84a: #F9E84A; --hover-tint: rgba(0,0,0,0.08); --day-num-ink: rgba(0,0,0,0.35); }
:root[data-theme="dark"] { --hover-tint: rgba(255,255,255,0.10); --day-num-ink: rgba(255,255,255,0.55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hover-tint: rgba(255,255,255,0.10); --day-num-ink: rgba(255,255,255,0.55); } }
/* theme palette: extras added after the first pass */
:root {
  --bg-eae8e0: #eae8e0;
  --bg-f0efe8: #f0efe8;
  --fg-2a7a2a: #2a7a2a;
}
:root[data-theme="dark"] {
  --bg-eae8e0: #1c1b16;
  --bg-f0efe8: #1b1a15;
  --fg-2a7a2a: #bfe6bf;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-eae8e0: #1c1b16;
    --bg-f0efe8: #1b1a15;
    --fg-2a7a2a: #bfe6bf;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Android's own TopAppBar deliberately stays neutral (Material3 default
   surface color) and reserves the sticky-yellow brand color for primary
   actions instead (Theme.kt: "everything else is disciplined near-neutrals
   so the yellow ... still pop[s] instead of competing with a busy
   palette") — mirrored here: header goes neutral, yellow moves to
   .qa-submit/.fab/accent underlines below. */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

header h1 { font-size: var(--fs-headline-md); font-weight: var(--fw-title); letter-spacing: -0.01em; }
header nav { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
header nav a,
header nav .nav-btn {
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 5px 14px;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-label);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
}
header nav a:hover,
header nav .nav-btn:hover { background: var(--surface-high); border-color: var(--yellow-dark); }
.date { font-size: var(--fs-body-sm); color: var(--muted); }

/* ── Nav dropdown ── */
.nav-more { position: relative; }
.nav-more-drop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
  min-width: 150px;
  box-shadow: 0 8px 24px rgba(26,26,26,0.12);
}
.nav-more-drop.open { display: flex; }
.nav-more-drop a,
.nav-more-drop .nav-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  border-radius: var(--radius-xs);
}

.quick-add {
  padding: 10px 24px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* Mobile-only header bar (collapse toggle) */
.qa-header { display: none; }

/* Type chips (mobile only) */
.type-chips { display: none; }

/* Due-date quick buttons (mobile only, mirrors .type-chips) */
.qa-date-row { display: none; }
.qa-date-input {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--text);
}

/* Form: column layout so actions sit above textarea */
.quick-add form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

/* Actions toolbar */
.qa-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 30px;
}
.qa-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.qa-submit {
  padding: 6px 18px;
  background: var(--yellow);
  color: var(--k-1a1a1a);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-title);
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  transition: background 0.12s;
}
.qa-submit:hover { background: var(--yellow-dark); color: var(--k-1a1a1a); }

.btn-detailed {
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: inherit;
}
.btn-detailed:hover { background: var(--surface-high); color: var(--text); }

/* Type pill */
.type-pill {
  flex-shrink: 0;
  font-size: var(--fs-label-md);
  font-weight: var(--fw-label);
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  white-space: nowrap;
}
.type-pill[hidden] { display: none; }
.pill-task     { background: var(--surface-high); color: var(--fg-555555); }
.pill-project  { background: var(--project); color: var(--project-text); }
.pill-appt     { background: var(--bg-e3f2fd); color: var(--fg-1565c0); }
.pill-idea     { background: var(--habit); color: var(--habit-text); }
.pill-question { background: var(--bg-fff3e0); color: var(--fg-e65100); }
.pill-shopping { background: var(--success-bg); color: var(--success); }
.pill-habit    { background: var(--habit); color: var(--habit-text); }

/* Smart input wrap */
.input-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  position: relative;
  overflow: visible;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Ghost autocomplete overlay — sits behind the transparent textarea */
#ghost-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 9px 10px;
  font-size: 0.92rem;
  font-family: "SF Mono", "Consolas", monospace;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
}
.ghost-suffix { color: var(--fg-bbbbbb); }
.input-wrap:focus-within {
  border-color: var(--yellow-dark);
  box-shadow: 0 0 0 2px rgba(201,186,0,0.28);
}

/* Textarea */
.quick-add textarea {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  padding: 9px 10px;
  font-size: 0.92rem;
  font-family: "SF Mono", "Consolas", monospace;
  background: transparent;
  min-width: 0;
  caret-color: var(--fg-333333);
  resize: none;
  overflow: hidden;
  min-height: 36px;
  line-height: 1.45;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
}

.item-content-clickable { cursor: pointer; }
.item-content-clickable:hover { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.recurrence-badge { color: var(--fg-7c6f00); background: var(--yellow-tint); border-radius: var(--radius-xs); padding: 0 4px; font-size: 0.75rem; }
.packing-badge { display:inline-flex; align-items:center; gap:3px; text-decoration:none; font-size:0.95rem; color:var(--text); margin-left:4px; }
.packing-badge-gen { background:none; border:none; cursor:pointer; opacity:0.35; padding:0; }
.packing-badge-gen:hover { opacity:0.8; }
.notes-badge { display:inline-flex; align-items:center; text-decoration:none; font-size:0.95rem; margin-left:4px; }
.notes-badge-empty { opacity:0.25; }
.notes-badge-empty:hover { opacity:0.7; }
.pack-count { font-size:0.72rem; color:var(--muted); white-space:nowrap; }
.appt-check { background:none; border:none; color:var(--text); font-size:1rem; cursor:pointer; padding:0 4px; }
.btn-delete-series { background: none; border: 1px solid var(--error); color: var(--error); border-radius: var(--radius-sm); padding: 5px 12px; font-size: 0.85rem; cursor: pointer; width: 100%; }
.btn-delete-series:hover { background: var(--overdue); }
.btn-skip { background: none; border: none; color: var(--muted); font-size: 0.9rem; cursor: pointer; padding: 0 4px; line-height: 1; }
.btn-skip:hover { color: var(--text); }

.accept-btn {
  flex-shrink: 0;
  background: var(--yellow);
  border: 1px solid var(--yellow-dark);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--k-1a1a1a);
  font-weight: 700;
  font-family: inherit;
}

/* Multi-match dropdown — anchored to .input-wrap */
.ac-dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(26,26,26,0.14);
  list-style: none;
  z-index: 500;
  max-height: 200px;
  overflow-y: auto;
  padding: 3px 0;
}
.ac-item {
  padding: 6px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: "SF Mono", "Consolas", monospace;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ac-item:hover, .ac-item.ac-active { background: var(--yellow); color: var(--k-1a1a1a); }
.ac-item-hint { font-size: 0.72rem; color: var(--muted); }

.cheatsheet {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.cheatsheet summary { cursor: pointer; }
.cheatsheet table { margin-top: 6px; border-collapse: collapse; }
.cheatsheet td { padding: 2px 12px 2px 0; }
.cheatsheet code {
  background: var(--bg-f0f0f0);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.8rem;
}

.columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .columns { grid-template-columns: 1fr; }
}

.col-main, .col-side { display: flex; flex-direction: column; gap: var(--space-4); }

/* Tonal, low-elevation surface — mirrors ListCard.kt (surfaceContainer fill,
   0dp shadow, shapes.large radius) rather than the old white-card-on-shadow
   look. A hairline border stands in for the definition Android gets for
   free from real elevation, since flat CSS shadows read as "greyer", not
   "raised" — the closest honest approximation on the web. */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-4);
}

.card h2 {
  font-size: var(--fs-label-md);
  font-weight: var(--fw-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.card.overdue {
  background: var(--overdue);
  border-color: var(--overdue-border);
}

.empty { color: var(--muted); font-size: 0.88rem; font-style: italic; }

/* Denser-than-Android-cards-but-still-scannable rows: Android's ListCard
   wraps each item in its own card (16/14px padding); a literal port of
   that to a desktop list of dozens of tasks would be extremely sparse, so
   web keeps the compact row-inside-one-card list pattern but borrows
   Android's row rhythm (taller row, quieter hairline, rounded hover) to
   close the "dense HTML table" gap instead. */
.item-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 4px;
  border-radius: var(--radius-xs);
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s;
}
.item-row:last-child { border-bottom: none; }
.item-row:hover { background: var(--surface-high); }

.item-type {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: var(--muted);
}
.item-type.task { color: var(--fg-555555); }
.item-type.appointment { color: var(--fg-1565c0); }
.item-type.idea { color: var(--fg-6a1b9a); }
.item-type.question { color: var(--fg-e65100); }
.item-type.shopping { color: var(--fg-2e7d32); }

.item-content {
  flex: 1;
  font-size: 0.92rem;
  word-break: break-word;
}

.item-row.done .item-content { color: var(--done-color); text-decoration: line-through; }

/* Routine/pre-seeded entries (default office day, standard gym/kayak
   pattern) are visually quiet so genuinely special one-off events stand
   out by contrast — mirrors the grey gcal color used for the same rows. */
.item-row.is-routine { opacity: 0.6; }
.item-row.is-routine .item-content { color: var(--fg-6b7280); }

/* Today's appointments whose time has already passed (#56 follow-up) —
   line through the title only so it reads as "theoretically done"
   without needing a separate complete action. */
.appt-title.appt-expired { text-decoration: line-through; opacity: 0.6; }

.project-tag {
  background: var(--project);
  color: var(--project-text);
  border-radius: var(--radius-xs);
  padding: 1px 7px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 4px;
}

.meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 4px;
}

.inline-form { display: inline; }

/* Clickable checkbox button (tasks only) */
.btn-check {
  border: 1.5px solid var(--bd-bbbbbb);
  border-radius: 3px;
  background: var(--surface);
  width: 16px;
  height: 16px;
  cursor: pointer;
  font-size: 0;          /* hide the ☐ character — box is the visual */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.12s, background 0.12s;
  padding: 0;
  position: relative;
  top: 1px;
}
.btn-check:hover {
  border-color: var(--bd-2e7d32);
  background: var(--bg-f1f8f2);
}
.btn-check:hover::after {
  content: "✓";
  font-size: 10px;
  color: var(--fg-2e7d32);
  position: absolute;
}

/* Delete button — always visible grey, red box on hover */
.item-del { margin-left: 4px; }

.btn-del {
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--fg-d0d0d0);
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.btn-del:hover {
  color: var(--fg-bf360c);
  background: var(--bg-fff3e0);
  border-color: var(--bd-ffccbc);
}

.btn-ghost {
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-ghost:hover { background: var(--bg-f0f0f0); }

.btn-sm-del { background: none; border: none; color: var(--fg-cccccc); font-size: 0.85rem; cursor: pointer; padding: 0 4px; }
.btn-sm-del:hover { color: var(--error); }

.strikethrough { text-decoration: line-through; color: var(--done-color); }
.done-section .item-row { opacity: 0.7; }

/* Overdue rows */
.overdue-row { background: var(--overdue); border-radius: var(--radius-xs); margin: 0 -4px; padding: 0 4px; }
.overdue-check { border-color: var(--bd-e57373) !important; }
.overdue-check:hover { border-color: var(--error) !important; background: var(--bg-ffebee) !important; }
.overdue-check:hover::after { color: var(--error) !important; }
.overdue-bang {
  color: var(--error);
  font-weight: 700;
  font-size: 0.78rem;
  margin-right: 3px;
}
.overdue-date { color: var(--error) !important; }

.task-divider {
  border: none;
  border-top: 1px dashed var(--bd-f0dede);
  margin: 4px 0;
}

/* Habit type colours */
.item-type.habit { color: var(--habit-text); }

.card-link {
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  text-decoration: none;
  margin-left: 6px;
}
.card-link:hover { text-decoration: underline; }

.habit-row { align-items: center; }
.habit-progress {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}
.habit-progress.complete { color: var(--habit-text); }
.habit-row-compact .habit-icon-sm { font-size: 0.9rem; }
.habit-row-compact .item-content { font-size: 0.88rem; }

.habit-icon-sm {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.habit-today-btn-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface-high);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s;
}
.habit-today-btn-sm.done {
  background: var(--habit);
  border-color: var(--habit-text);
  color: var(--habit-text);
}

.habit-del {
  width: 20px !important;
  height: 20px !important;
  font-size: 0.7rem !important;
  opacity: 0;
  transition: opacity 0.15s;
}
.habit-row:hover .habit-del { opacity: 1; }

.habit-add-inline {
  margin-top: 6px;
  display: flex;
}
.habit-add-input {
  flex: 1;
  border: none;
  border-bottom: 1px dashed var(--border);
  background: transparent;
  padding: 4px 2px;
  font-size: 0.82rem;
  color: var(--muted);
  outline: none;
}
.habit-add-input:focus {
  border-bottom-color: var(--habit-text);
  color: var(--text);
}
.habit-add-input::placeholder { color: var(--fg-cccccc); }

.habit-hint {
  font-size: 0.72rem;
  color: var(--fg-cccccc);
  margin-top: 6px;
}
.habit-hint code {
  background: var(--bg-f0f0f0);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.7rem;
}

/* ── Print modal shopping toggle ── */
.print-opt-row {
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}
.toggle-btn {
  padding: 4px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-high);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-width: 48px;
}
.toggle-btn.on {
  background: var(--k-2e7d32);
  color: var(--k-ffffff);
  border-color: var(--k-2e7d32);
}

/* ── Calendar in print modal ── */
.cal-section { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.cal-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.cal-body {
  overflow-y: auto;
  max-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cal-loading, .cal-empty, .cal-err {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 8px 0;
  font-style: italic;
}
.cal-err { color: var(--fg-e53935); }

.cal-allday {
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.cal-hour {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 24px;
  padding: 2px 0;
  border-bottom: 1px solid var(--bd-f5f5f0);
}
.cal-hour:last-child { border-bottom: none; }

.cal-time {
  flex-shrink: 0;
  width: 44px;
  font-size: 0.72rem;
  color: var(--muted);
  padding-top: 2px;
  text-align: right;
}

.cal-evt {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--bg-eef2ff);
  border-left: 3px solid var(--bd-5c6bc0);
  border-radius: 0 4px 4px 0;
  padding: 2px 7px;
  font-size: 0.82rem;
}
.cal-evt.allday { background: var(--bg-f3e5f5); border-left-color: var(--bd-9c27b0); }

.cal-title { flex: 1; font-weight: 500; color: var(--fg-1a1a1a); }
.cal-dur   { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }

/* ── Habit streak pills ── */
.habit-streak {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  margin-left: 6px;
}
.habit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-dddddd);
  cursor: pointer;
  transition: background 0.15s;
}
.habit-dot.done-today { background: var(--habit-solid); }
.habit-dot.done-prev  { background: var(--bg-ce93d8); }

/* ── Floating action button ──
   Matches Android's ExtendedFloatingActionButton exactly (DashboardScreen.kt
   :217-218): containerColor = colorScheme.primary (#1A1A1A), contentColor =
   onPrimary (StickyYellow) — black pill, yellow glyph, not the reverse. */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xl);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1.8rem;
  line-height: 1;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26,26,26,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: background 0.15s, transform 0.15s;
}
.fab:hover { background: var(--primary-hover); transform: scale(1.08); }

/* ── Modal ── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,11,13,0.4);
  z-index: 200;
}
.modal-backdrop.visible { display: block; }

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(26,26,26,0.2);
  width: min(480px, 94vw);
  padding: 20px 24px 24px;
  z-index: 300;
  flex-direction: column;
  gap: 14px;
}
.modal.visible { display: flex; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-weight: var(--fw-title); font-size: var(--fs-title-lg); }
.modal-close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  padding: 2px 6px;
}
.modal-close:hover { color: var(--text); }

.type-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.type-tab {
  padding: 5px 12px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.12s, border-color 0.12s;
}
.type-tab:hover { background: var(--yellow); color: var(--k-1a1a1a); }
.type-tab.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.modal-field label {
  font-size: var(--fs-label-md);
  color: var(--muted);
  font-weight: var(--fw-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.modal-field input,
.modal-field select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.modal-field input:focus,
.modal-field select:focus {
  outline: 2px solid var(--yellow-dark);
  border-color: var(--yellow-dark);
}

.modal-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.modal-row .modal-field { flex: 1; min-width: 120px; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}
.btn-cancel {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}
.btn-cancel:hover { background: var(--surface-high); }
.btn-save {
  padding: 8px 22px;
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-title);
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-save:hover { background: var(--primary-hover); }
.btn-save.saved { background: var(--success-solid); color: var(--k-ffffff); }
.btn-save.error { background: var(--error-solid); color: var(--k-ffffff); }
.btn-delete { padding: 8px 16px; background: none; border: 1px solid var(--error); color: var(--error); border-radius: var(--radius-sm); font-size: 0.9rem; cursor: pointer; }
.btn-delete:hover { background: var(--overdue); }

/* ── Upload review table ── */
.review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.review-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
}
.review-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--bd-f0ede0);
  vertical-align: middle;
}
.review-table tr.skip-row td { opacity: 0.4; text-decoration: line-through; }
.review-table input[type=text], .review-table select {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.85rem;
  width: 100%;
}
.review-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
}
.flag-note {
  background: var(--bg-fff8e1);
  border: 1px solid var(--bd-ffe082);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--fg-5d4037);
  margin-bottom: 10px;
}

/* ══════════════════════════════════════════
   Mobile layout — fixed bottom input bar
   ══════════════════════════════════════════ */
@media (max-width: 768px) {

  #quick-add {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 50;
    padding: 0;
    border-top: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    background: var(--surface);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    overflow: hidden;
  }

  /* Header bar: collapse toggle + expand stub */
  .qa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    min-height: 32px;
  }
  .qa-expand-stub {
    display: none;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
  }
  .qa-collapse-btn {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--fg-cccccc);
    cursor: pointer;
    padding: 4px 4px;
    line-height: 1;
    margin-left: auto;
  }

  /* Hard-collapsed: only header visible */
  #quick-add.qa-collapsed .qa-body   { display: none; }
  #quick-add.qa-collapsed .qa-expand-stub { display: block; }
  #quick-add.qa-collapsed .qa-collapse-btn { display: none; }
  #quick-add.qa-collapsed .qa-header { border-top: none; }

  /* Chips + actions hidden by default on mobile, shown when active */
  .type-chips { display: none; }
  #quick-add .qa-actions { display: none; }

  /* Active (focused) state: chips and actions appear */
  #quick-add.qa-active .type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 6px;
    border-bottom: 1px solid var(--bd-f0f0f0);
  }
  #quick-add.qa-active .qa-actions { display: flex; }

  .chip {
    padding: 5px 11px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-f5f5f5);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.12s;
  }
  .chip:active        { background: var(--yellow); color: var(--k-1a1a1a); }
  .chip-appt:active   { background: var(--bg-e3f2fd); }
  .chip-idea:active   { background: var(--habit); }
  .chip-q:active      { background: var(--bg-fff3e0); }
  .chip-shop:active   { background: var(--bg-e8f5e9); }
  .chip-habit:active  { background: var(--habit); }
  .chip-pack:active   { background: var(--bg-e3f2fd); }
  .chip-rec:active    { background: var(--bg-fde8ff); }

  #quick-add form { padding: 4px 12px max(8px, env(safe-area-inset-bottom, 8px)); }
  #quick-add .qa-actions { padding: 0; }

  .cheatsheet { display: none; }

  .columns {
    padding-bottom: 80px;
    grid-template-columns: 1fr;
    padding-left: 12px;
    padding-right: 12px;
  }
  /* More room when bar is active */
  body.qa-is-active .columns { padding-bottom: 160px; }

  .btn-check { width: 22px !important; height: 22px !important; top: 0 !important; }

  header { padding: 10px 16px; }
  header h1 { font-size: 1.1rem; }
  header nav a, header nav .nav-btn { padding: 4px 9px; font-size: 0.78rem; }

  .fab { bottom: 90px; right: 16px; }
  body.qa-is-active .fab { bottom: 170px; }
}

/* ═══════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════ */

.nav-active { font-weight: 600; }

/* ── List page ── */
.projects-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

.projects-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.projects-heading { font-size: var(--fs-headline-md); font-weight: var(--fw-title); }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: var(--fw-label);
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: var(--primary-hover); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.project-card:hover { background: var(--surface-high); border-color: var(--border); }
.project-card.status-done, .project-card.status-archived { opacity: 0.65; }

.project-card-group { display: flex; flex-direction: column; gap: 4px; }
.project-subcard-list { display: flex; flex-direction: column; gap: 4px; margin-left: 20px; }
.project-subcard-group { display: flex; flex-direction: column; gap: 4px; }
.project-subcard { padding: 12px 18px; border-style: dashed; }

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-end;
}
.project-card-actions .btn-del { opacity: 0.6; }
.project-card-actions .btn-del:hover { opacity: 1; }

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.project-card-name {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.project-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.project-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: auto;
}

.tag-chip {
  background: var(--bg-eef2ff);
  color: var(--fg-4338ca);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.75rem;
}

.status-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  font-weight: 500;
}
.status-badge.status-active   { background: var(--bg-dcfce7); color: var(--fg-166534); }
.status-badge.status-on_hold  { background: var(--bg-fef9c3); color: var(--fg-854d0e); }
.status-badge.status-done     { background: var(--bg-f3f4f6); color: var(--fg-6b7280); }
.status-badge.status-archived { background: var(--bg-f3f4f6); color: var(--fg-9ca3af); }

.projects-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
}
.projects-empty p { margin-bottom: 6px; }

/* ── Detail page layout ── */
.project-body { overflow: hidden; }

.project-layout {
  display: flex;
  height: calc(100vh - 53px - 58px); /* 58px = proj quick-add bar height */
  overflow: hidden;
}

/* Project quick-add bar — fixed at bottom, mirrors #quick-add */
#proj-quick-add {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--yellow-tint);
  border-top: 2px solid var(--yellow-dark);
  padding: 6px 24px max(8px, env(safe-area-inset-bottom, 8px));
  transform: translateZ(0);
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  box-sizing: border-box;
}
#proj-quick-add .qa-header {
  display: none; /* desktop: no collapse header needed */
}
#proj-quick-add .qa-body { display: block; }
#proj-quick-add form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#proj-quick-add .qa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
#proj-quick-add .type-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}
#proj-quick-add .type-chips::-webkit-scrollbar { display: none; }
#proj-quick-add .qa-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 4px;
}
#proj-quick-add .input-wrap {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
@media (max-width: 768px) {
  #proj-quick-add .qa-header { display: flex; }
  #proj-quick-add.qa-collapsed .qa-body { display: none; }
  #proj-quick-add.qa-collapsed .qa-expand-stub { display: block; }
  #proj-quick-add.qa-collapsed .qa-collapse-btn { display: none; }
  #proj-quick-add.qa-active .type-chips { display: flex; }
  #proj-quick-add .type-chips { display: none; }
  #proj-quick-add.qa-active .qa-date-row { display: flex; flex-wrap: wrap; }
  #proj-quick-add .qa-date-row { display: none; }
  #proj-quick-add .qa-actions { display: none; }
  #proj-quick-add.qa-active .qa-actions { display: flex; }
  #proj-quick-add form { padding: 4px 0 max(8px, env(safe-area-inset-bottom, 8px)); }
}

/* Inline quick-add variant (page-scoped tasks, in the "Tasks on this page"
   section) - not fixed-bottom and no collapse header, so chips/date row are
   always visible regardless of screen width, unlike the project-level bar. */
.quick-add-inline {
  position: static;
  padding: 8px 0 0;
  background: transparent;
  border-bottom: none;
}
.quick-add-inline .type-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0 4px;
}
.quick-add-inline .qa-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 4px;
}
.quick-add-inline form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quick-add-inline .qa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quick-add-inline .input-wrap {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.project-sidebar {
  width: 280px;
  min-width: 240px;
  background: var(--bg-fafaf8);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

.project-main {
  flex: 1;
  overflow-y: auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

/* ── Sidebar meta ── */
.sidebar-meta {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-back a {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}
.sidebar-back a:hover { color: var(--text); }
.sidebar-back { margin-bottom: 10px; }

.project-name-input {
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 2px 0;
  margin-bottom: 4px;
  color: var(--text);
  outline: none;
}
.project-name-input:focus { border-bottom: 1px solid var(--border); }

.project-desc-input {
  width: 100%;
  font-size: 0.82rem;
  border: none;
  background: transparent;
  resize: none;
  color: var(--muted);
  padding: 2px 0;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
}
.project-desc-input:focus { color: var(--text); }

.meta-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.status-select {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.status-select.status-active   { background: var(--bg-dcfce7); color: var(--fg-166534); }
.status-select.status-on_hold  { background: var(--bg-fef9c3); color: var(--fg-854d0e); }
.status-select.status-done     { background: var(--bg-f3f4f6); color: var(--fg-6b7280); }
.status-select.status-archived { background: var(--bg-f3f4f6); color: var(--fg-9ca3af); }

.tags-input {
  flex: 1;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--muted);
  font-family: inherit;
  min-width: 80px;
}

.btn-save-meta {
  margin-top: 8px;
  font-size: 0.78rem;
  padding: 3px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
}
.btn-save-meta:hover { background: var(--yellow); color: var(--k-1a1a1a); }

.parent-select {
  flex: 1;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--muted);
  font-family: inherit;
  min-width: 80px;
}

.sidebar-subprojects {
  padding: 12px 16px 0;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

/* ── Sidebar sections ── */
.sidebar-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sidebar-add-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.sidebar-add-btn:hover { color: var(--text); }

/* ── Page list ── */
.page-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.page-list-item {
  display: flex;
  align-items: center;
  border-radius: 6px;
  overflow: hidden;
}
.page-list-item a {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-list-item a:hover { background: var(--bg-efede8); }
.page-list-item.active a { background: var(--yellow); font-weight: 600; color: var(--k-1a1a1a); }
.page-list-item .btn-del { opacity: 0; }
.page-list-item:hover .btn-del { opacity: 1; }
.page-list-empty { font-size: 0.82rem; color: var(--muted); padding: 4px 8px; }

.page-item-actions { display: flex; align-items: center; opacity: 0; }
.page-list-item:hover .page-item-actions { opacity: 1; }
.page-item-actions .btn-del { opacity: 1; }
.btn-move {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 2px 4px;
  line-height: 1;
}
.btn-move:hover { color: var(--text); }
.btn-move:disabled { opacity: 0.25; cursor: default; }

.page-type-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pt-note    { background: var(--bg-94a3b8); }
.pt-brief   { background: var(--bg-60a5fa); }
.pt-log     { background: var(--k-34d399); }
.pt-tasks   { background: var(--bg-f472b6); }

.add-page-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.add-page-form input, .add-page-form select {
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 8px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.add-page-form button {
  font-size: 0.82rem;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.add-page-form button:hover { background: var(--yellow); color: var(--k-1a1a1a); }
.hidden { display: none !important; }

/* ── Project tasks ── */
.project-add-task {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.proj-qa-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  display: flex;
  align-items: flex-start;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.proj-qa-wrap:focus-within {
  border-color: var(--yellow-dark);
  box-shadow: 0 0 0 2px rgba(249,232,74,0.25);
}
.proj-qa-pill {
  font-size: 0.7rem;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--yellow);
  white-space: nowrap;
  align-self: center;
  margin-left: 6px;
  flex-shrink: 0; color: var(--k-1a1a1a); }
.proj-qa-pill:empty, .proj-qa-pill[hidden] { display: none; }
.proj-task-input {
  font-size: 0.82rem;
  border: none;
  outline: none;
  padding: 5px 8px;
  font-family: "SF Mono", "Consolas", monospace;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  min-height: 30px;
  line-height: 1.4;
  border-radius: 5px;
}
.proj-qa-actions {
  display: flex;
  gap: 4px;
  flex: 1;
}
.proj-task-meta {
  display: flex;
  align-items: center;
  gap: 5px;
}
.proj-type-chips {
  display: flex;
  gap: 4px;
}
.proj-chip {
  font-size: 0.78rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}
.proj-chip.active {
  background: var(--yellow);
  border-color: var(--yellow-dark);
  font-weight: 600; color: var(--k-1a1a1a); }
.proj-date-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.proj-date-quick {
  font-size: 0.75rem;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  color: var(--muted);
}
.proj-date-quick:hover, .proj-date-quick.active { background: var(--yellow); color: var(--k-1a1a1a); border-color: var(--yellow-dark); }
.task-due-input {
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 6px;
  font-family: inherit;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}
.btn-add-task {
  font-size: 0.78rem;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-add-task:hover { background: var(--yellow); color: var(--k-1a1a1a); }

.project-task-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.project-task-item {
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.83rem;
}
.project-task-item:hover { background: var(--bg-f5f4f0); }
.project-task-item.done { opacity: 0.55; }

.task-main { display: flex; align-items: flex-start; gap: 5px; }
.task-content { flex: 1; line-height: 1.3; }
.task-meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding-left: 24px;
}
.task-due {
  font-size: 0.72rem;
  color: var(--muted);
}
.task-due.overdue { color: var(--fg-dc2626); }
.task-count {
  background: var(--bg-e5e7eb);
  border-radius: 8px;
  padding: 0 6px;
  font-size: 0.72rem;
  color: var(--fg-555555);
  font-weight: 600;
}
.type-mini-select {
  font-size: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 3px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  background: transparent;
}
.item-type-icon { font-size: 0.85rem; color: var(--muted); padding-top: 1px; min-width: 18px; }

.done-tasks-toggle {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.done-tasks-toggle summary { cursor: pointer; padding: 4px 0; }
.done-list { margin-top: 4px; opacity: 0.7; }
.project-task-empty { font-size: 0.82rem; color: var(--muted); padding: 4px 6px; }

/* ── Page editor ── */
.page-editor-header {
  display: flex;
  flex-direction: column;
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.page-title-field {
  font-size: 1.4rem;
  font-weight: 700;
  border: none;
  outline: none;
  width: 100%;
  padding: 4px 0 2px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  border-bottom: 1px solid transparent;
}
.page-title-field:focus { border-bottom-color: var(--border); }

.page-editor-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.page-type-select {
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 7px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.editor-toggle-btns {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.toggle-view {
  padding: 4px 12px;
  font-size: 0.8rem;
  border: none;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
}
.toggle-view:first-child { border-right: 1px solid var(--border); }
.toggle-view.active { background: var(--yellow); font-weight: 600; color: var(--k-1a1a1a); }

.page-preview {
  flex: 1;
  padding: 24px 24px 48px;
  overflow-y: auto;
  line-height: 1.7;
  font-size: 0.95rem;
  width: 100%;
  box-sizing: border-box;
}

.page-editor {
  flex: 1;
  padding: 20px 24px;
  border: none;
  outline: none;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  resize: none;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  min-height: calc(100vh - 160px);
}

/* ── Markdown body styles ── */
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  margin: 1.2em 0 0.4em;
  font-weight: 700;
  line-height: 1.3;
}
.markdown-body h1 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
.markdown-body h2 { font-size: 1.2rem; }
.markdown-body h3 { font-size: 1rem; }
.markdown-body p  { margin: 0.6em 0; }
.markdown-body ul, .markdown-body ol { padding-left: 1.5em; margin: 0.5em 0; }
.markdown-body li { margin: 0.25em 0; }
.markdown-body code {
  background: var(--bg-f3f4f6);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.85em;
  font-family: "SF Mono", Consolas, monospace;
}
.markdown-body pre {
  background: var(--bg-f3f4f6);
  border-radius: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  margin: 0.8em 0;
}
.markdown-body pre code { background: none; padding: 0; }
.markdown-body blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1em;
  color: var(--muted);
  margin: 0.6em 0;
}
.markdown-body table { border-collapse: collapse; width: 100%; margin: 0.8em 0; }
.markdown-body th, .markdown-body td {
  border: 1px solid var(--border);
  padding: 6px 12px;
  text-align: left;
}
.markdown-body th { background: var(--bg-f9fafb); font-weight: 600; }
.markdown-body a { color: var(--fg-2563eb); }
.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 1.2em 0; }

.page-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  gap: 8px;
}

.sidebar-overview-link {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}
.sidebar-overview-link:hover { background: var(--bg-efede8); }
.sidebar-overview-link.active { background: var(--yellow); font-weight: 600; color: var(--k-1a1a1a); }

.page-add-sub { font-size: 0.85rem; }

.page-desc-field {
  font-size: 0.85rem;
  color: var(--muted);
  border: none;
  outline: none;
  width: 100%;
  padding: 0 0 8px;
  font-family: inherit;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.page-desc-field:focus { border-bottom-color: var(--border); }

.page-editor-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 24px 0;
}

.page-task-section {
  border-top: 1px solid var(--border);
  padding: 12px 24px 24px;
}
.page-task-section .project-task-list { margin: 8px 0; }

.project-overview { display: flex; flex-direction: column; flex: 1; }

/* ── Mobile tab bar ── */
.mobile-tab-bar {
  display: none;
}

@media (max-width: 700px) {
  /* Projects list */
  .projects-grid { grid-template-columns: 1fr; }
  .projects-page { padding: 16px; }

  /* Project detail — tab-driven layout */
  .project-body { overflow: auto; }

  .mobile-tab-bar {
    display: flex;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .mobile-tab {
    flex: 1;
    padding: 10px 4px;
    font-size: 0.82rem;
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    color: var(--muted);
    border-bottom: 2px solid transparent;
  }
  .mobile-tab.active {
    color: var(--text);
    border-bottom: 2px solid var(--text);
  }
  .task-count-mobile {
    background: var(--bg-e5e7eb);
    border-radius: 8px;
    padding: 0 5px;
    font-size: 0.7rem;
    color: var(--fg-555555);
    margin-left: 3px;
  }

  .project-layout {
    flex-direction: column;
    height: auto;
    padding-bottom: 70px; /* room for fixed bar */
    overflow: visible;
  }

  /* Sidebar becomes a flat panel container, no fixed width */
  .project-sidebar {
    width: 100%;
    min-width: unset;
    border-right: none;
    overflow: visible;
  }

  /* Each panel fills the screen naturally */
  .sidebar-meta,
  .sidebar-section {
    border-bottom: none;
  }

  /* Main editor sits below sidebar panels */
  .project-main {
    min-height: 60vh;
    border-top: 1px solid var(--border);
  }

  .page-editor-header {
    padding: 12px 16px 0;
    gap: 6px;
  }
  .page-title-field { font-size: 1.1rem; }
  .page-preview, .page-editor { padding: 16px; }

  /* Page list links — ensure no browser default blue */
  .page-list-item a { color: var(--text) !important; }
}

/* ═══════════════════════════════════════════════════
   CALENDAR PAGE
   ═══════════════════════════════════════════════════ */

.cal-page-wrap { max-width: 1200px; margin: 0 auto; padding: 20px 24px; }

.cal-week-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cal-week-label { font-size: 1.1rem; font-weight: 600; flex: 1; }
.cal-nav-btn {
  font-size: 1.3rem;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  line-height: 1.4;
}
.cal-nav-btn:hover { background: var(--yellow); color: var(--k-1a1a1a); }
.cal-today-btn {
  font-size: 0.85rem;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
}
.cal-today-btn:hover { background: var(--yellow); color: var(--k-1a1a1a); }
.cal-add-btn { margin-left: auto; font-size: 0.85rem; padding: 6px 14px; }
.cal-gcal-err {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--yellow-tint);
  border: 1px solid var(--yellow-dark);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 16px;
}

.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
  gap: 1px;
}
.cal-day { background: var(--card-bg); min-height: 140px; display: flex; flex-direction: column; }
.cal-day.cal-today { background: var(--bg-fffef5); }
.cal-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border);
}
.cal-day-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.cal-activity-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  background: var(--bg-f0f9ff);
  color: var(--fg-0369a1);
  border: 1px solid var(--bd-8ecae6);
}
.cal-activity-badge:empty { display: none; }
.cal-day-num {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.cal-day-num-today { background: var(--primary); color: var(--on-primary); }
.cal-day-events { flex: 1; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 3px; }
.cal-day-empty { flex: 1; }
.cal-event {
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cal-event.cal-gcal  { background: var(--bg-dbeafe); border-left: 3px solid var(--bd-3b82f6); }
.cal-event.cal-sticky { background: var(--bg-fef9c3); border-left: 3px solid var(--bd-f59e0b); }
.cal-event.cal-workout { background: var(--bg-dcfce7); border-left: 3px solid var(--bd-22c55e); text-decoration: none; cursor: pointer; }
.cal-event.cal-workout-spontaneous { background: var(--bg-fef3c7); border-left-color: var(--bd-f59e0b); }
/* Week-scheduler blocks (#57): quieter than real events, coloured by kind. */
.cal-event.cal-auto { background: var(--bg-f4f4f5); border-left: 3px solid var(--bd-a1a1aa); }
.cal-event.cal-auto .cal-event-title { font-weight: 400; color: var(--fg-52525b); }
.cal-event.cal-auto-commute { border-left-color: var(--bd-64748b); }
.cal-event.cal-auto-cooking { border-left-color: var(--bd-ea580c); }
.cal-event.cal-auto-eating { border-left-color: var(--bd-f59e0b); }
.cal-event.cal-auto-shopping { border-left-color: var(--bd-8b5cf6); }
.cal-event.cal-auto-packing { border-left-color: var(--bd-0ea5e9); }
.cal-event.cal-auto-preview { background: transparent; border: 1px dashed var(--bd-a1a1aa); border-left-width: 3px; border-left-style: solid; }

.sched-preview { border: 1px solid var(--border, var(--bd-dddddd)); border-radius: 8px; padding: 12px 14px; margin: 10px 0 14px; background: var(--surface); }
.sched-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sched-preview-sub { display: block; font-size: 0.8rem; color: var(--fg-666666); margin-top: 2px; }
.sched-preview-actions { display: flex; gap: 8px; }
.sched-preview-actions form { margin: 0; }
.sched-move { font-size: 0.85rem; margin-top: 8px; }
.sched-decision { border-top: 1px solid var(--bd-eeeeee); margin-top: 10px; padding-top: 10px; font-size: 0.85rem; }
.sched-decision.is-done { color: var(--fg-777777); }
.sched-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sched-options form { margin: 0; }
.sched-option { font-size: 0.8rem; padding: 5px 10px; border-radius: 14px; border: 1px solid var(--bd-cccccc); background: var(--bg-fafafa); cursor: pointer; }
.sched-option:hover { background: var(--bg-f0f0f0); }
.sched-decision-chosen { margin-top: 4px; }
.cal-event-time { font-size: 0.68rem; color: var(--fg-555555); font-weight: 500; }
.cal-event-title { font-weight: 500; color: var(--text); line-height: 1.3; }

@media (max-width: 700px) {
  .cal-week-grid { grid-template-columns: repeat(7, minmax(44px, 1fr)); overflow-x: auto; }
  .cal-day { min-height: 90px; }
  .cal-day-header { padding: 6px 4px 4px; }
  .cal-event { padding: 2px 4px; }
  .cal-event-time { display: none; }
  .cal-event-title { font-size: 0.7rem; }
  .cal-add-btn { margin-left: 0; }
}

/* ── Notifications section (daily-sticky#100) ── */
.notifications-header {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 2px 8px;
}
.notification-card { position: relative; padding-right: 32px; }
.notif-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  line-height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.notif-dismiss:hover { background: var(--hover-tint); color: var(--text); }

/* ── Commute widget ── */
.commute-card { padding: 12px 16px; }
.commute-header { display: flex; align-items: center; gap: 12px; }
.commute-icon { font-size: 1.4rem; flex-shrink: 0; }
.commute-body { flex: 1; min-width: 0; }
.commute-title { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.commute-meta { font-size: 0.78rem; color: var(--fg-666666); margin-top: 2px; }
.commute-time { font-size: 1.5rem; font-weight: 700; white-space: nowrap; color: var(--text); }
.commute-trend { font-size: 0.82rem; font-weight: 600; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.trend-worse  { color: var(--fg-dc2626); }
.trend-better { color: var(--fg-16a34a); }
.trend-steady { color: var(--fg-6b7280); }
.commute-suggestion { font-size: 0.78rem; color: var(--fg-666666); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }

/* ── Quick-add saved toast ── */
.qa-saved-toast {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 0.75rem;
  color: var(--fg-16a34a);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.qa-saved-toast--visible { opacity: 1; }

/* ── Undo-complete floating toast ── */
.undo-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--k-1f2937);
  color: var(--k-f3f4f6);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 500;
  max-width: min(90vw, 420px);
}
.undo-toast--visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.undo-toast.msg-toast { white-space: normal; }
.undo-toast-text { text-decoration: line-through; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-toast-btn {
  background: none;
  border: none;
  color: var(--fg-f5e51a);
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}
.undo-toast-btn:hover { text-decoration: underline; }

/* ── Groq parse card ── */
.groq-card {
  background: var(--card-bg);
  border: 2px solid var(--yellow);
  border-radius: var(--radius-lg);
  margin-top: 8px;
  overflow: hidden;
}
.groq-card-body {
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.groq-card-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.groq-type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-xl);
  background: var(--yellow);
  color: var(--k-7c6f00);
  flex-shrink: 0;
}
.groq-content-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.groq-content-input,
.groq-notes-input {
  font: inherit;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 6px;
}
.groq-content-input {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.groq-notes-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  font-size: 0.85rem;
  resize: vertical;
}
.groq-content-input[hidden],
.groq-notes-input[hidden],
.groq-raw-btn[hidden] { display: none; }
.groq-raw-btn {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 2px 6px;
  border: none;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.groq-meta {
  font-size: 0.8rem;
  color: var(--muted);
}
.groq-clarification {
  font-size: 0.85rem;
  color: var(--fg-b45309);
  background: var(--bg-fef3c7);
  border-radius: 5px;
  padding: 5px 8px;
  margin-top: 2px;
}
.groq-clarify-row {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}
.groq-clarify-input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid var(--bd-d97706);
  border-radius: 5px;
  font-size: 0.85rem;
  background: var(--surface);
}
.groq-btn-clarify {
  background: var(--k-d97706);
  color: var(--k-ffffff);
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.groq-btn-clarify:hover { background: var(--k-b45309); }
.groq-action-matches {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.groq-action-matches[hidden] { display: none; }
.groq-action-match {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  background: var(--bg-f8f7f2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.groq-action-match:has(input:checked) {
  background: var(--bg-eef6ff);
  border-color: var(--bd-3b82f6);
}
.groq-action-match-title { flex: 1; font-weight: 500; }
.groq-action-match-detail { color: var(--muted); font-size: 0.8rem; }
.groq-suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--bg-f0fdf4);
  border: 1px solid var(--bd-86efac);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--fg-166534);
}
.groq-suggestion[hidden] { display: none; }
.groq-suggestion span { flex: 1; }
.groq-suggestion-add {
  background: var(--k-16a34a);
  color: var(--k-ffffff);
  border: none;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.groq-suggestion-dismiss {
  background: none;
  border: none;
  color: var(--fg-166534);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 2px;
}
.groq-conflict {
  font-size: 0.85rem;
  color: var(--fg-b91c1c);
  background: var(--bg-fee2e2);
  border-radius: 5px;
  padding: 5px 8px;
  margin-top: 2px;
}
.groq-project-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}
.groq-project-row[hidden] { display: none; }
.groq-project-row label { flex-shrink: 0; }
.groq-project-input {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card-bg);
  color: var(--text);
}
.groq-card-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.groq-btn {
  flex: 1;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 0;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.groq-btn-edit {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.groq-btn-edit:hover { background: var(--bg-f0ede4); }
.groq-btn-save {
  background: var(--yellow);
  color: var(--k-5a4e00);
}
.groq-btn-save:hover { background: var(--yellow-dark); color: var(--k-1a1a1a); }
.groq-countdown {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding: 3px 12px 6px;
  background: var(--card-bg);
}

/* ── Packing banner ── */
#packing-banner { margin: 0 0 16px; }
.pb-inner {
  background: var(--card-bg);
  border: 2px solid var(--yellow);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pb-icon { font-size: 1.2rem; margin-right: 6px; }
.pb-nights { font-size: 0.78rem; color: var(--fg-666666); font-weight: normal; margin-left: 6px; }
.pb-empty-note { font-size: 0.82rem; color: var(--fg-888888); margin-left: 8px; }
.pb-skip { background: none; border: none; color: var(--fg-888888); cursor: pointer; font-size: 0.82rem; white-space: nowrap; padding: 2px 4px; }
.pb-skip:hover { color: var(--text); }
.pb-lists { display: flex; flex-direction: column; gap: 8px; }
.pb-template { border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.pb-tpl-header { display: flex; align-items: center; gap: 6px; background: var(--bg-fafafa); padding: 7px 10px; }
.pb-tpl-toggle { background: none; border: none; cursor: pointer; font-size: 0.85rem; color: var(--fg-666666); padding: 0 2px; transition: transform 0.15s; }
.pb-collapsed .pb-tpl-toggle { transform: rotate(-90deg); }
.pb-collapsed .pb-tpl-items { display: none; }
.pb-tpl-name { flex: 1; font-weight: 600; font-size: 0.88rem; }
.pb-tpl-remove { background: none; border: none; cursor: pointer; color: var(--fg-aaaaaa); font-size: 0.8rem; padding: 0 2px; }
.pb-tpl-remove:hover { color: var(--fg-dc2626); }
.pb-tpl-items { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 8px 10px; }
.pb-item { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; cursor: pointer; white-space: nowrap; }
.pb-item input[type=checkbox] { cursor: pointer; }
.pb-item-qty { color: var(--fg-888888); font-size: 0.75rem; }
.pb-addlist-row { display: flex; gap: 6px; }
.pb-addlist-select { flex: 1; border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 0.88rem; background: var(--surface); }
.pb-addlist-add { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.pb-addlist-add:hover { background: var(--bg-fafafa); }
.pb-custom-row { display: flex; gap: 6px; }
.pb-custom-input { flex: 1; border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 0.88rem; }
.pb-custom-add { background: var(--yellow); border: none; border-radius: 6px; padding: 6px 12px; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--k-1a1a1a); }
.pb-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pb-reminder { display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; }
.pb-reminder label { display: flex; align-items: center; gap: 8px; }
.pb-reminder-dt { border: 1px solid var(--border); border-radius: 5px; padding: 4px 6px; font-size: 0.82rem; }
.pb-reminder-hint { color: var(--fg-888888); font-size: 0.75rem; }
.pb-confirm { background: var(--yellow); border: none; border-radius: 7px; padding: 9px 18px; font-size: 0.88rem; font-weight: 700; cursor: pointer; white-space: nowrap; color: var(--k-1a1a1a); }
.pb-confirm:hover { filter: brightness(0.95); }
.pb-confirm:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 600px) {
  .pb-footer { flex-direction: column; align-items: stretch; }
  .pb-confirm { width: 100%; text-align: center; }
}

/* ══════════════════════════════════════════
   Mobile UX: touch targets, hover-only visibility, readability
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  body { font-size: 16px; }

  /* Roomier task rows — easier tap */
  .item-row { padding: 8px 0; min-height: 44px; }

  /* Delete buttons: tappable size, always a visible grey */
  .btn-del { width: 32px; height: 32px; font-size: 0.88rem; color: var(--fg-bbbbbb); }

  /* Habit delete: opacity 0 is hover-only — make it faintly visible on touch */
  .habit-del { opacity: 0.4 !important; width: 30px !important; height: 30px !important; font-size: 0.85rem !important; }

  /* Larger habit completion button */
  .habit-today-btn-sm { width: 36px; height: 36px; font-size: 1rem; }

  /* Page list: actions faintly visible (no hover on touch); links taller */
  .page-item-actions { opacity: 0.4; }
  .page-list-item a { padding: 10px 8px; font-size: 0.9rem; }
  .btn-move { padding: 6px; font-size: 0.9rem; }

  /* Notes badge: empty state was 0.25 opacity — barely visible on mobile */
  .notes-badge-empty { opacity: 0.45; }

  /* Quick-add submit/secondary — taller tap targets */
  .qa-submit { padding: 9px 22px; font-size: 0.95rem; }
  .btn-detailed { padding: 9px 14px; font-size: 0.88rem; }

  /* Type and date chips */
  .chip { padding: 8px 14px; font-size: 0.88rem; }

  /* Recipe tag-toggle chips (edit mode) — small/tightly packed by default,
     hard to tap accurately on a phone (found during a manual tag cleanup
     pass, see plan.md Backlog -> "Recipe tag chips too small on mobile") */
  .tag-check-label { padding: 8px 14px; font-size: 0.85rem; min-height: 36px; }

  /* Autocomplete dropdown rows */
  .ac-item { padding: 10px 14px; font-size: 0.9rem; }

  /* Project task rows */
  .project-task-item { padding: 8px 8px; font-size: 0.88rem; }

  /* Modal: cap height and scroll internally on short phones */
  .modal { max-height: 88vh; overflow-y: auto; top: 6vh; transform: translate(-50%, 0); }

  /* Nav dropdown wide enough for all entries */
  .nav-more-drop { min-width: 180px; }

  /* Groq confirm/dismiss buttons */
  .groq-btn { padding: 10px 0; font-size: 0.95rem; }

  /* Markdown tables: scroll horizontally instead of overflowing */
  .markdown-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ─── Muscle heat map (_muscle_map.html macro) ─────────────────────────── */
.mm-wrap { display: flex; }
.mm-fig { text-align: center; }
.mm-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ── Chores (#203): House card, /chores page, chore sheet ── */
.chore-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 50%; color: var(--k-ffffff); font-size: 0.9rem; line-height: 1;
}
.chore-bar {
  display: inline-block; width: 64px; height: 6px; flex: 0 0 64px;
  border-radius: 3px; background: var(--surface-high); overflow: hidden; vertical-align: middle;
}
.chore-bar > span { display: block; height: 100%; border-radius: 3px; }
.chore-meta { font-size: 0.8rem; color: var(--muted); }
.chore-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid var(--border-soft); cursor: pointer;
}
.chore-row:last-child { border-bottom: none; }
.chore-row:hover { background: var(--surface-low); }
.chore-row-main { flex: 1; min-width: 0; }
.chore-name { font-weight: 500; }
.chore-row.overdue .chore-name { color: var(--error); }
.chore-row.is-done .chore-name { text-decoration: line-through; color: var(--done-color); }
.chore-act {
  border: 1px solid var(--border); background: var(--card-bg); border-radius: var(--radius-xl);
  width: 34px; height: 30px; cursor: pointer; font-size: 0.85rem;
}
.chore-act:hover { background: var(--yellow); border-color: var(--yellow-dark); color: var(--k-1a1a1a); }
.chore-done-mark { color: var(--success); font-weight: 700; padding: 0 8px; }
.chore-steps { display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.chore-step-arrow { color: var(--border); }

.house-card h2 { display: flex; align-items: baseline; justify-content: space-between; }
.house-all { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.house-next, .house-stale {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer;
}
.house-next-text, .house-stale-name { flex: 1; min-width: 0; }
.house-next.urgent {
  background: var(--yellow-tint); border: 1px solid var(--yellow-dark);
  border-radius: var(--radius-sm); padding: 10px;
}
.house-status { padding: 4px; margin: 0; }

.chores-page { max-width: 760px; margin: 0 auto; padding: 1rem; display: flex; flex-direction: column; gap: 12px; }
.chores-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.chores-toolbar-right { display: flex; gap: 8px; align-items: center; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.week-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.house-tile-add { border-style: dashed; }
.chore-delete { color: var(--error); border-color: var(--overdue-border); }
.house-tile-add .house-ring > span { font-size: 1.4rem; font-weight: 400; color: var(--muted); }
.chore-notice { margin-bottom: 8px; }
.chore-notice-row { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.chore-notice-text { flex: 1; }
.chore-notice-actions { display: flex; gap: 8px; margin-top: 8px; }
.week-day { border: none; cursor: pointer; font-family: inherit; }
.week-day:hover { outline: 2px solid var(--yellow-dark); }
.chore-day-list { max-height: 60vh; overflow-y: auto; }
.week-nav-title { font-weight: 600; min-width: 110px; text-align: center; }
.week-month summary { list-style: none; cursor: pointer; }
.week-month summary::-webkit-details-marker { display: none; }
.week-month summary h3::after { content: " \25B8"; }
.week-month[open] summary h3::after { content: " \25BE"; }
.chores-page .card { min-width: 0; }
.week-day {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 0; border-radius: var(--radius-sm); text-decoration: none; color: var(--text);
  background: var(--surface-low); font-size: 0.75rem;
}
.week-day b { font-size: 1rem; }
.week-day i { font-style: normal; color: var(--yellow-dark); height: 1em; letter-spacing: 1px; }
.week-day.today { background: var(--yellow); color: var(--k-1a1a1a); }
.week-group h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 14px 0 2px; }
.house-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.house-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg);
  cursor: pointer; font-family: inherit; text-align: center;
}
.house-tile.selected, .house-tile:hover { border-color: var(--yellow-dark); background: var(--yellow-tint); }
.house-tile-name { font-weight: 600; }
.house-ring {
  width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface-high);
}
.house-ring > span:not(.chore-chip) {
  width: 42px; height: 42px; border-radius: 50%; background: var(--card-bg);
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600;
}
.house-area h3 { margin: 16px 0 4px; }
.balance-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.balance-row > span:first-child { width: 60px; font-weight: 600; }
.balance-row .chore-bar { flex: 1 1 auto; width: auto; }

.chore-sheet { max-height: 88vh; overflow-y: auto; }
.chore-sheet .modal-title { display: flex; align-items: center; gap: 8px; }
.chore-sheet-fresh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chore-sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.chore-sheet-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chore-sheet-line select, .chore-sheet-line input[type=date] {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; font-family: inherit;
}
.chore-stats { border-top: 1px solid var(--border-soft); padding-top: 8px; }
.chore-history { display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; }
.chore-hist { display: flex; align-items: center; gap: 6px; }
.chore-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.chore-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--primary); color: var(--on-primary); padding: 10px 18px; border-radius: var(--radius-xl);
  opacity: 0; transition: opacity 0.2s, transform 0.2s; z-index: 400; pointer-events: none;
}
.chore-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Daily bag card (#56) */
.bag-card h2 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bag-count { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.bag-open { margin-left: auto; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.bag-section { border-top: 1px solid var(--border-soft); }
.bag-section summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; font-weight: 600; list-style: none; }
.bag-section summary::-webkit-details-marker { display: none; }
.bag-section summary::before { content: '▸'; color: var(--muted); }
.bag-section[open] summary::before { content: '▾'; }
.bag-section-name { flex: 1; }
.bag-section-count { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.bag-section.is-done .bag-section-name { text-decoration: line-through; color: var(--muted); }
.bag-trip { display: block; padding: 10px 0; border-top: 1px solid var(--border-soft); font-weight: 600; text-decoration: none; }
.bag-item { cursor: pointer; gap: 8px; padding-left: 16px; }
.bag-item.is-packed .item-content { text-decoration: line-through; color: var(--muted); }

/* Conflicts card (#272 stage 3) */
.conflicts-card h2 { display: flex; align-items: center; gap: 8px; }
.review-day { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.conflict-count {
  background: var(--error-solid); color: var(--k-ffffff); border-radius: var(--radius-xl);
  padding: 1px 8px; font-size: 0.75rem; font-weight: 700;
}
.conflict { border-top: 1px solid var(--border); padding: 12px 0; }
.conflict:first-of-type { border-top: 0; }
.conflict-breaking { border-left: 3px solid var(--error); padding-left: 10px; }
.conflict-msg { font-weight: 600; font-size: 0.92rem; }
.conflict-change { margin-top: 4px; font-size: 0.85rem; color: var(--muted); }
.conflict-meals { margin: 6px 0 0; padding-left: 18px; font-size: 0.85rem; }
.conflict-flag { margin-top: 6px; font-size: 0.82rem; color: var(--error); font-weight: 600; }
.conflict-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.conflict-btn { min-height: 40px; }
.conflict-sheet { margin-top: 10px; background: var(--surface-low); border: 1px solid var(--border); border-radius: var(--radius-md, 8px); padding: 10px; }
.conflict-meal + .conflict-meal { margin-top: 10px; }
.conflict-meal-name { font-size: 0.8rem; font-weight: 700; margin-bottom: 4px; }
.conflict-opt {
  display: block; width: 100%; text-align: left; min-height: 40px; margin: 4px 0; padding: 8px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md, 8px);
  font: inherit; font-size: 0.85rem; cursor: pointer;
}
.conflict-opt:hover { background: var(--surface-high); border-color: var(--yellow-dark); }
.conflict-note { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); }
.conflict-now { font-weight: 400; color: var(--muted); }
.conflict-sheet { margin-top: 8px; }
.conflict-actions { margin-top: 10px; }

.conflict-rows { margin-top: 8px; }
.conflict-row { padding: 6px 0; border-top: 1px solid var(--border-soft); }
.conflict-row:first-child { border-top: 0; }
.conflict-row-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.conflict-row-day { min-width: 92px; font-size: 0.85rem; }
.conflict-row-what { flex: 1; font-size: 0.85rem; }
.conflict-row-bare { color: var(--error); font-weight: 600; }
.conflict-other { background: none; border: 0; color: var(--text); text-decoration: underline; font: inherit; font-size: 0.82rem; cursor: pointer; padding: 6px 4px; min-height: 36px; }


/* ══════════════════════════════════════════════════════════════
   River conditions (#281) - one single-axis SVG chart per measure.
   Chart roles: measured = ink, forecast = blue + lighter range band,
   normal level = grey dashed, tide push = aqua, session = yellow wash,
   chance of release = blue strip. Discipline bands are labelled tints.
   ══════════════════════════════════════════════════════════════ */
.rc-page {
  --rc-forecast: #2a78d6;
  --rc-band: rgba(42, 120, 214, 0.08);
  --rc-band-likely: rgba(42, 120, 214, 0.22);
  --rc-tide: rgba(27, 175, 122, 0.30);
  --rc-session: rgba(245, 229, 26, 0.16);
  --rc-actual: #eb6834;
  --rc-v1: #e8a317;
  --rc-v7: #9b6bd6;
  --rc-v5: #1bafaf;
  --rc-v2: #d64e8f;
  max-width: 1100px; margin: 0 auto; padding: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.rc-page.rc-loading .rc-verdict, .rc-page.rc-loading .rc-grid { opacity: 0.55; transition: opacity 0.15s; }
.rc-controls { display: flex; flex-direction: column; gap: var(--space-3); }
.rc-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.rc-chip {
  min-height: 40px; padding: 8px 16px; border-radius: var(--radius-xl);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: var(--fw-label); cursor: pointer;
}
.rc-chip.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.rc-window { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: flex-end; }
.rc-window[hidden] { display: none; }
.rc-window label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-label-md); color: var(--muted); }
.rc-window input {
  min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); color: var(--text); font: inherit;
}
.rc-window .btn-ghost { min-height: 40px; }
.rc-progress { height: 3px; border-radius: 2px; overflow: hidden; background: var(--surface-high); position: relative; }
.rc-progress::after {
  content: ""; position: absolute; inset: 0; width: 35%; background: var(--rc-forecast);
  animation: rc-progress 1.1s ease-in-out infinite;
}
@keyframes rc-progress { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.rc-banner {
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--yellow-tint);
  border: 1px solid var(--border-soft); font-size: var(--fs-body-md);
}
.rc-banner-error { background: var(--overdue); border-color: var(--overdue-border); }
.rc-verdict-head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.rc-verdict-head h2 {
  font-size: var(--fs-title-lg); font-weight: var(--fw-title); color: var(--text);
  text-transform: none; letter-spacing: 0; margin: 0; padding: 0; border: 0;
}
.rc-quality {
  font-size: var(--fs-label-md); font-weight: var(--fw-label); padding: 2px 10px;
  border-radius: var(--radius-xl); text-transform: capitalize;
}
.rc-lines { list-style: none; margin-top: var(--space-2); display: flex; flex-direction: column; gap: 4px; }
.rc-lines li { font-size: var(--fs-body-md); line-height: 1.4; }
.rc-muted { color: var(--muted); font-size: var(--fs-body-sm); }
.rc-verdict > .rc-muted { margin-top: var(--space-2); }
.rc-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 900px) { .rc-grid { grid-template-columns: 1fr 1fr; } }
.rc-chart-card { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rc-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.rc-chart-head h3 { font-size: var(--fs-title-sm); font-weight: var(--fw-title); margin: 0; }
.rc-feed { margin: 6px 0 0; font-size: var(--fs-body-sm); }
.rc-feed-stale { color: var(--warn, var(--fg-b26a00)); }
.rc-plot-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rc-plot-end { display: flex; align-items: center; gap: 2px; }
.rc-plot-end .btn-ghost { min-width: 36px; padding: 4px 8px; font-size: 1.2em; line-height: 1; }
.rc-plot-end input[type=date] { width: 9.5em; }
.rc-readout { font-size: var(--fs-body-sm); color: var(--text); min-height: 1.3em; font-variant-numeric: tabular-nums; }
.rc-chart-body { width: 100%; touch-action: pan-y; }
.rc-chart-body svg { display: block; width: 100%; height: auto; overflow: visible; }
.rc-subzoom { width: 100%; touch-action: pan-y; margin-top: 4px; }
.rc-caption { font-size: var(--fs-body-sm); color: var(--muted); }
.rc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-label-md); color: var(--muted); }
.rc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rc-key { display: inline-block; flex: none; }
.rc-key-line { width: 16px; height: 0; border-top: 2px solid; }
.rc-key-box { width: 12px; height: 10px; border-radius: 2px; }
.rc-key-dot { width: 8px; height: 8px; border-radius: 50%; }
.rc-sources { font-size: var(--fs-label-md); color: var(--muted); text-align: center; padding: var(--space-2) 0 var(--space-5); }

/* SVG marks */
.rc-gridline { stroke: var(--border-soft); stroke-width: 1; }
.rc-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.rc-axis-strong { fill: var(--text); font-weight: 600; }
.rc-measured { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
.rc-forecast { fill: none; stroke: var(--rc-forecast); stroke-width: 2; stroke-dasharray: 5 3; stroke-linejoin: round; }
.rc-normal { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 2 3; }
.rc-actual { stroke: var(--rc-actual); stroke-width: 2; stroke-dasharray: 6 3; }
.rc-run { fill: none; stroke: var(--rc-actual); stroke-width: 1.8; stroke-linejoin: round; stroke-dasharray: 5 3; }
.rc-key.rc-run { border-color: var(--rc-actual); border-top-style: dashed; }
.rc-vintage-1 { fill: none; stroke: var(--rc-v1); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 5 3; }
.rc-vintage-7 { fill: none; stroke: var(--rc-v7); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 5 3; }
.rc-vintage-5 { fill: none; stroke: var(--rc-v5); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 5 3; }
.rc-vintage-2 { fill: none; stroke: var(--rc-v2); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 5 3; }
polygon.rc-band { fill: var(--rc-band); stroke: none; }
line.rc-zero { stroke: var(--text); stroke-width: 1.5; }
polygon.rc-rain { fill: rgba(42, 120, 214, 0.35); stroke: none; }
.rc-key.rc-rain { background: rgba(42, 120, 214, 0.35); }
polygon.rc-band-likely { fill: var(--rc-band-likely); stroke: none; }
polygon.rc-tide { fill: var(--rc-tide); stroke: none; }
.rc-session { fill: var(--rc-session); }
.rc-now { stroke: var(--text); stroke-width: 1; stroke-dasharray: 1 3; }
.rc-crosshair { stroke: var(--text); stroke-width: 1; }
.rc-strip { fill: var(--rc-forecast); }
.rc-hband { opacity: 0.35; }
.rc-hband-label { fill: var(--muted); font-size: 10px; font-weight: 600; }
.rc-rain-obs { fill: var(--rc-forecast); }
.rc-rain-fc { fill: rgba(42, 120, 214, 0.40); }
.rc-rain-met { fill: var(--rc-actual); stroke: var(--card-bg); stroke-width: 2; }
/* Legend keys reuse the mark classes as colours. */
.rc-key.rc-measured { border-color: var(--text); }
.rc-key.rc-forecast { border-color: var(--rc-forecast); border-top-style: dashed; }
.rc-key.rc-normal { border-color: var(--muted); border-top-style: dotted; }
.rc-key.rc-actual { border-color: var(--rc-actual); border-top-style: dashed; }
.rc-key.rc-vintage-1 { border-color: var(--rc-v1); }
.rc-key.rc-vintage-7 { border-color: var(--rc-v7); }
.rc-key.rc-dashed { border-top-style: dashed; }
.rc-vintage-nav { display: flex; align-items: center; justify-content: center; gap: var(--space-2); }
.rc-vintage-nav button { min-width: 44px; min-height: 44px; font-size: 22px; }
.rc-vintage-nav button:disabled { opacity: 0.35; }
.rc-vintage-nav input { min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface); color: var(--text); font: inherit; }
.rc-key.rc-vintage-5 { border-color: var(--rc-v5); }
.rc-key.rc-vintage-2 { border-color: var(--rc-v2); }
.rc-key.rc-band { background: var(--rc-band); border: 1px solid rgba(42, 120, 214, 0.3); }
.rc-key.rc-band-likely { background: var(--rc-band-likely); }
.rc-key.rc-tide { background: var(--rc-tide); }
.rc-key.rc-strip { background: linear-gradient(90deg, rgba(42,120,214,0.1), var(--rc-forecast)); }
.rc-key.rc-rain-obs { background: var(--rc-forecast); }
.rc-key.rc-rain-fc { background: rgba(42, 120, 214, 0.40); }
.rc-key.rc-rain-met { background: var(--rc-actual); }
/* Discipline band / quality tones (always shown with a text label). */
.rc-tone-good { fill: var(--success-bg); background: var(--success-bg); color: var(--success); }
.rc-tone-ok { fill: var(--yellow-tint); background: var(--yellow-tint); color: var(--fg-7a6d00); }
.rc-tone-bad { fill: var(--overdue); background: var(--overdue); color: var(--error); }
.rc-tone-neutral { fill: var(--surface-high); background: var(--surface-high); color: var(--muted); }
.cal-river-link { display: block; font-size: var(--fs-label-sm); font-weight: var(--fw-label); color: var(--project-text); text-decoration: none; margin-top: 2px; }
.cal-river-link:hover { text-decoration: underline; }
/* Polo goal-setting chart (#281) */
.rc-plan { fill: none; stroke: var(--rc-forecast); stroke-width: 2.5; stroke-linejoin: miter; }
.rc-ideal { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 3; }
.rc-alt { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 1.5 3; }
polygon.rc-goal-band { fill: rgba(30, 158, 90, 0.24); stroke: none; }
.rc-marker { stroke: var(--rc-forecast); stroke-width: 1; stroke-dasharray: 3 3; }
.rc-marker-label { fill: var(--rc-forecast); font-size: 10px; font-weight: 600; }
.rc-key.rc-plan { border-color: var(--rc-forecast); border-top-width: 3px; }
.rc-key.rc-ideal { border-color: var(--text); border-top-style: dashed; }
.rc-key.rc-alt { border-color: var(--muted); border-top-style: dotted; }
.rc-key.rc-goal-band { background: rgba(30, 158, 90, 0.24); }
/* Polo goal side view (#281): bridge, rope, 1 m goal, gap to the water. */
.rc-goal-diagram { margin-top: var(--space-2); }
.rc-goal-diagram svg { display: block; width: 100%; height: auto; }
.rc-dg-water { fill: rgba(42, 120, 214, 0.18); }
.rc-dg-bridge { fill: var(--muted); }
.rc-dg-rope { stroke: var(--text); stroke-width: 1.5; }
.rc-dg-goal { fill: rgba(245, 229, 26, 0.35); stroke: var(--text); stroke-width: 2; }
.rc-dg-dim { stroke: var(--success); stroke-width: 2; stroke-dasharray: 3 2; }
.rc-dg-bad { stroke: var(--error); }
.rc-dg-label { fill: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; }
.rc-dg-end { text-anchor: end; }
.rc-dg-mid { text-anchor: middle; }
.rc-dg-bad-text { fill: var(--error); font-weight: 600; }
.rc-dg-water-label { fill: var(--muted); }
/* Natural rivers (#283): river switcher and the 7-day outlook strip. */
.rc-rivers { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.rc-rivers .rc-chip { text-decoration: none; display: inline-flex; align-items: center; }
.rc-outlook { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.rc-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; min-height: 64px;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); font: inherit; cursor: pointer;
}
.rc-day.selected { outline: 2px solid var(--text); outline-offset: 1px; }
.rc-day-name { font-size: var(--fs-label-sm); font-weight: var(--fw-label); }
.rc-day-level { font-size: var(--fs-body-md); font-weight: var(--fw-title); font-variant-numeric: tabular-nums; color: var(--text); }
.rc-day-chance { font-size: var(--fs-label-sm); color: var(--muted); }

/* Spate rivers (#284): the downstream gauge drawn faintly, reports. */
.rc-aux { fill: none; stroke: var(--fg-8a8578); stroke-width: 1.5; stroke-opacity: 0.6; stroke-linejoin: round; }
.rc-key.rc-aux { border-color: var(--bd-8a8578); opacity: 0.7; }
.rc-report-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.rc-suggestion { border: 1px solid var(--border); border-radius: 10px; padding: var(--space-2) var(--space-3); margin-bottom: var(--space-2); }
.rc-suggestion p { margin: 0 0 var(--space-2); }
.rc-suggestion .btn, .rc-suggestion .btn-ghost { margin-right: var(--space-2); min-height: 40px; }
.rc-reports { list-style: none; margin: 0; padding: 0; }
.rc-reports > li { border-top: 1px solid var(--border); padding: var(--space-2) 0; display: flex; flex-direction: column; gap: 4px; }
.rc-report-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.rc-report-menu { margin-left: auto; display: flex; gap: 4px; }
.rc-report-menu .btn-ghost { min-height: 36px; padding: 4px 10px; }
.rc-report-photos { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-report-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.rc-dialog { border: 0; border-radius: 16px; padding: var(--space-4); width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.rc-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.rc-dialog form { display: flex; flex-direction: column; gap: var(--space-3); }
.rc-dialog h3 { margin: 0; }
.rc-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-label-md); color: var(--muted); }
.rc-field input, .rc-field select, .rc-field textarea { font: inherit; color: var(--text); min-height: 44px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.rc-dialog-buttons { display: flex; justify-content: flex-end; gap: var(--space-2); }
.rc-error { color: var(--fg-b3261e); margin: 0; min-height: 1em; }
.rc-read-item { display: flex; flex-direction: column; gap: var(--space-2); border-top: 1px solid var(--border); padding: var(--space-3) 0; }
.rc-read-item img { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 10px; background: var(--surface-high); }
.rc-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--k-313033); color: var(--k-f4eff4); padding: 10px 16px; border-radius: 8px; transition: transform 0.2s; z-index: 1000; display: flex; align-items: center; gap: 12px; }
.rc-toast.show { transform: translate(-50%, 0); }
.rc-toast .btn-ghost { color: var(--fg-d0bcff); }

/* ── Surf forecast (#296) ── */
.sf-page { --sf-very-poor: #d94b4b; --sf-poor: #e8742a; --sf-poor-fair: #f0a21c; --sf-fair: #e4cf1f;
  --sf-fair-good: #9ccc3b; --sf-good: #29b867; --sf-epic: #0f9d58; }
.sf-b-very-poor { --b: var(--sf-very-poor); } .sf-b-poor { --b: var(--sf-poor); } .sf-b-poor-fair { --b: var(--sf-poor-fair); }
.sf-b-fair { --b: var(--sf-fair); } .sf-b-fair-good { --b: var(--sf-fair-good); } .sf-b-good { --b: var(--sf-good); } .sf-b-epic { --b: var(--sf-epic); }
.sf-head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.sf-head h2 { color: var(--text); font-size: var(--fs-title-lg); font-weight: var(--fw-title); margin: 0; padding: 0; border: 0; text-transform: none; letter-spacing: 0; }
.sf-when { font-size: var(--fs-title-md, 1.1rem); font-weight: var(--fw-label); margin: var(--space-2) 0 2px; }
.sf-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.sf-seg button { min-height: 40px; padding: 0 14px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.sf-seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.sf-toolbar { display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.sf-score { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 700; }
.sf-score b { font-size: 1.6rem; line-height: 1; }
.sf-score small { color: var(--muted); font-weight: 400; }
.sf-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--b); color: var(--fg-1b1b1b); font-weight: 600; font-size: var(--fs-label-md); white-space: nowrap; }
.sf-arrow { display: inline-block; font-weight: 700; line-height: 1; }
.sf-arrow.wind-offshore, .sf-arrow.wind-glass { color: var(--success); }
.sf-arrow.wind-cross { color: var(--fg-c98a00); }
.sf-arrow.wind-onshore, .sf-arrow.wind-calm-onshore { color: var(--error); }
.sf-days { padding: 0; }
.sf-strip { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-2); scroll-snap-type: x proximity; }
.sf-tile { flex: 0 0 auto; min-width: 104px; min-height: 48px; padding: 10px 8px 8px; border: 2px solid transparent; border-radius: 12px; background: var(--surface-high, var(--surface)); color: var(--text); font: inherit; text-align: center; cursor: pointer; scroll-snap-align: start; }
.sf-tile[aria-pressed="true"] { border-color: var(--text); }
.sf-tile-day { display: block; font-size: var(--fs-label-md); color: var(--muted); }
.sf-tile-size { display: block; font-size: 1.15rem; font-weight: 700; margin: 2px 0 4px; white-space: nowrap; }
.sf-tile-wind { display: flex; justify-content: center; gap: 8px; min-height: 1.2em; }
.sf-bars { display: flex; gap: 4px; margin-top: 6px; }
.sf-bars i { flex: 1; height: 6px; border-radius: 3px; background: var(--b, var(--border)); }
.sf-detail { padding: var(--space-4); }
.sf-detail h3 { margin: 0 0 var(--space-2); }
.sf-timeline { display: flex; gap: 1px; height: 28px; margin: var(--space-2) 0 2px; }
.sf-timeline button { flex: 1; border: 0; padding: 0; background: var(--b); cursor: pointer; border-radius: 2px; }
.sf-timeline button.night { opacity: 0.35; }
.sf-timeline button[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 1px; position: relative; z-index: 1; }
.sf-hours { display: flex; justify-content: space-between; font-size: var(--fs-label-md); color: var(--muted); margin-bottom: var(--space-3); }
.sf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-4); }
.sf-grid h4 { margin: 0 0 4px; font-size: var(--fs-label-md); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: var(--fw-label); }
.sf-big { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.sf-sub { color: var(--muted); font-size: var(--fs-body-sm); }
.sf-swells { margin: 0; padding: 0; list-style: none; font-size: var(--fs-body-sm); }
.sf-swells li { display: flex; gap: 10px; align-items: center; }
.sf-swells b { min-width: 3.4em; }
.sf-why { margin-top: var(--space-3); }
.sf-why h4 { margin: 0 0 4px; font-size: var(--fs-label-md); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: var(--fw-label); }
.sf-why ul { margin: 0; padding: 0; list-style: none; }
.sf-why li { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: var(--fs-body-sm); }
.sf-why i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sf-good); }
.sf-why-ok i { background: var(--sf-poor-fair); }
.sf-why-bad i { background: var(--sf-very-poor); }
.sf-tide { width: 100%; height: 100px; margin-top: var(--space-3); }
.sf-tide-dot { fill: var(--rc-forecast); }
.sf-tide-now { stroke: var(--text); stroke-width: 1; stroke-dasharray: 3 3; }
.sf-tide-label { font-size: 11px; fill: var(--muted); }
.sf-table-wrap { overflow-x: auto; }
.sf-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body-sm); white-space: nowrap; }
.sf-table th { text-align: left; font-weight: var(--fw-label); color: var(--muted); padding: 4px 8px; }
.sf-table td { padding: 4px 8px; border-top: 1px solid var(--border-soft); }
.sf-table tr.sf-night { opacity: 0.45; }
@media (max-width: 600px) { .sf-wx { display: none; } .sf-grid { grid-template-columns: 1fr; } }

.show-more > summary {
  cursor: pointer;
  padding: 10px 4px;
  min-height: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

.nav-more-label {
  padding: 8px 14px 2px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Up next + week strip (#171) */
.up-next {
  max-width: 1200px;
  margin: 8px auto 0;
  padding: 12px 16px;
  background: var(--yellow-tint);
  border-radius: var(--radius-lg, 12px);
}
@media (min-width: 769px) { .up-next, .week-strip { width: calc(100% - 48px); } }
@media (max-width: 768px) { .up-next, .week-strip { margin-left: 12px; margin-right: 12px; } }
.up-next-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.up-next-main { display: flex; gap: 10px; align-items: baseline; color: inherit; text-decoration: none; min-height: 32px; }
.up-next-time { font-weight: 700; }
.up-next-title { font-size: 1.05rem; font-weight: 600; }
.up-next-leave, .up-next-note, .up-next-then { font-size: 0.85rem; color: var(--muted); }
.up-next-leave:empty { display: none; }
.week-strip { display: flex; gap: 8px; max-width: 1200px; margin: 8px auto 0; overflow-x: auto; }
.week-chip {
  flex: 1 1 0; min-width: 0; display: flex; justify-content: space-between; gap: 6px; align-items: center;
  min-height: 48px; padding: 0 14px; border-radius: 24px; text-decoration: none; color: inherit;
  background: var(--card-bg); border: 1px solid var(--border-soft);
}
.week-chip-value { font-weight: 700; }

/* Section order is applied with CSS order. On phones the two columns dissolve
   so a section can move across them. */
.col-main, .col-side { display: flex; flex-direction: column; }
@media (max-width: 768px) {
  .columns { display: flex; flex-direction: column; }
  .col-main, .col-side { display: contents; }
}

.customize-modal { max-height: 85vh; overflow-y: auto; padding: 16px; }
.customize-list { list-style: none; margin: 0; padding: 0; }
.customize-row { display: flex; align-items: center; gap: 8px; min-height: 48px; border-bottom: 1px solid var(--border-soft); }
.customize-name { flex: 1; }
.customize-grip { cursor: grab; color: var(--muted); }
.customize-btn { min-width: 44px; min-height: 44px; background: none; border: none; cursor: pointer; color: var(--text); }
.customize-keep { display: block; margin: 12px 0; }
.customize-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.qa-in-project { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; font-size: 0.8rem; color: var(--muted); cursor: pointer; }

/* Dashboard Shopping card: one raised box per row, like the House card. */
.shop-boxes { display: flex; flex-direction: column; gap: 6px; }
.shop-box {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 10px;
}
.shop-box:hover { background: var(--surface-high); }
.shop-box-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.shop-box-name { font-weight: 600; }
.shop-box-amount { font-size: 0.8rem; }
.show-more .shop-boxes { margin-top: 6px; }
