/* Designs: :root[data-design=...]. Classic is no attribute at all (style.css, with light/dark from Settings or the device).
   A design sets the whole colour set (so it looks the same whatever the device is set to) and may change the shapes and type through the
   tokens used in style.css: --radius --radius-s --pad --ctl-pad --row-pad --shadow --fs --font --head-font and the menu's --bar-bg --bar-ink --bar-on --bar-line.
   System fonts only: web fonts would not load offline. */

/* Compact: small type, tight rows, more on the screen */
:root[data-design=compact] { --bg: #f1f3f6; --card: #fff; --ink: #18202c; --muted: #5f6b7a; --line: #d9dee6; --accent: #0b6bcb; --accent-ink: #fff; --pos: #1a7f45; --neg: #c0392b; color-scheme: light;
  --fs: 14px; --radius: 4px; --radius-s: 3px; --pad: 9px 11px; --ctl-pad: 4px 8px; --row-pad: 3px 0; }
:root[data-design=compact] main { padding: 10px 12px; }
:root[data-design=compact] .card { margin-bottom: 10px; }
:root[data-design=compact] h3 { font-size: 1rem; margin-bottom: 6px; }
:root[data-design=compact] header { padding: 8px 14px; }
:root[data-design=compact] #tabbar a { padding: 5px 0 4px; font-size: .68rem; }
:root[data-design=compact] #tabbar svg { width: 20px; height: 20px; }
:root[data-design=compact] body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }

/* Midnight: always dark, emerald accent, flat and square, monospace brand */
:root[data-design=midnight] { --bg: #0d1117; --card: #161b22; --ink: #d7dde5; --muted: #8b95a3; --line: #262d37; --accent: #2fbf8a; --accent-ink: #04130d; --pos: #3fcf8e; --neg: #ff7b72; color-scheme: dark;
  --radius: 4px; --radius-s: 3px; --bar-bg: #0d1117; }
:root[data-design=midnight] header a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-size: 1rem; }
:root[data-design=midnight] .card { background: transparent; }
:root[data-design=midnight] h3 { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--muted); }

/* Paper: warm cream, serif headings, airy */
:root[data-design=paper] { --bg: #f3ede1; --card: #fffdf8; --ink: #2b2620; --muted: #7a6f61; --line: #e4dac8; --accent: #a4502b; --accent-ink: #fff; --pos: #2f6b3a; --neg: #b3261e; color-scheme: light;
  --head-font: Georgia, "Times New Roman", serif; --radius: 14px; --radius-s: 10px; --pad: 18px 20px; --shadow: 0 1px 3px rgba(80, 60, 30, .08); --ctl-pad: 8px 14px; --fs: 16.5px; }
:root[data-design=paper] h2.crumb { font-family: var(--head-font); font-size: 1.15rem; }

/* Ocean: rounded type, a deep-teal menu with pills, round corners */
:root[data-design=ocean] { --bg: #eef6f8; --card: #fff; --ink: #0d2c33; --muted: #5a7a82; --line: #cfe3e8; --accent: #0e8a9a; --accent-ink: #fff; --pos: #14804a; --neg: #c2412f; color-scheme: light;
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui, sans-serif; --radius: 16px; --radius-s: 12px; --pad: 16px;
  --bar-bg: #0d4f5c; --bar-line: #0d4f5c; --bar-ink: #a8d4db; --bar-on: #fff; }
:root[data-design=ocean] #tabbar a { margin: 5px 3px; padding: 6px 0 5px; border-radius: 14px; }
:root[data-design=ocean] #tabbar a.on { background: rgba(255, 255, 255, .16); }

/* Sunrise: warm and friendly, coral-orange accent, soft shadows */
:root[data-design=sunrise] { --bg: #fff8f3; --card: #fff; --ink: #2d2420; --muted: #85726a; --line: #f0e2d8; --accent: #e8590c; --accent-ink: #fff; --pos: #2b8a3e; --neg: #c92a2a; color-scheme: light;
  --font: "Avenir Next", "Segoe UI", system-ui, sans-serif; --radius: 16px; --radius-s: 12px; --pad: 16px; --shadow: 0 2px 12px rgba(232, 89, 12, .10); --ctl-pad: 9px 12px; }
:root[data-design=sunrise] h2.crumb { color: var(--accent); }

/* Forest: sage and calm greens, serif headings, a dark-green menu */
:root[data-design=forest] { --bg: #e3e9dc; --card: #f1f3ec; --ink: #1f2a22; --muted: #5e6e62; --line: #cfd8c6; --accent: #2f6f4e; --accent-ink: #fff; --pos: #2f7d46; --neg: #b3382c; color-scheme: light;
  --head-font: Georgia, "Times New Roman", serif; --radius: 8px; --radius-s: 6px; --bar-bg: #2f4a3a; --bar-line: #2f4a3a; --bar-ink: #c3d3c6; --bar-on: #fff; }

/* Graphite: warm charcoal, amber accent, rounded */
:root[data-design=graphite] { --bg: #1a1b1e; --card: #232427; --ink: #e9eaec; --muted: #9a9ca3; --line: #34363b; --accent: #f5a623; --accent-ink: #1a1b1e; --pos: #5fcf80; --neg: #ff7b6b; color-scheme: dark;
  --radius: 12px; --radius-s: 10px; --pad: 16px; }
