/* Manual theme: forces Light or Dark whatever the phone is set to. "Auto" removes the attribute and the normal rules apply.
   These are the same colour sets the stylesheets already use (the light ones are their light-mode blocks, the dark ones their defaults),
   written once more under [data-theme] so a person can choose. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f5ef; --bg2: #f1ede4; --surface: #ffffff; --surface2: #f3efe6; --line: #e3ddd0; --line2: #d3ccbb;
  --ink: #0e1b1a; --ink2: #44524f; --ink3: #6b7875; --teal: #0b7a6f; --teal2: #0b8577; --on-teal: #ffffff; --gold: #9a6a12; --tide: #5b3fe0;
  --good: #1e7a44; --warn: #9a5b00; --bad: #a4372e; --glow: 11, 122, 111; --shadow: 0 8px 24px rgba(40, 30, 10, .09);
  --btn: linear-gradient(135deg, #0e9484 0%, #0b7a6f 100%); --wa: #128c4a; --on-wa: #ffffff;
  --dot: rgba(14, 27, 26, .09); --blobA: rgba(var(--glow), .16); --blobB: rgba(91, 63, 224, .09); --blobC: rgba(154, 106, 18, .10);
}
:root[data-theme="light"] .ambient::before { opacity: .09; }
:root[data-theme="light"][data-fx="full"] body::after { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .02) 0 1px, transparent 1px 3px); }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08080a; --bg2: #0d0d11; --surface: #121217; --surface2: #191920; --line: #25252e; --line2: #32323d;
  --ink: #f5f5f0; --ink2: #b6b6bf; --ink3: #84848f; --teal: #10e5a8; --teal2: #5cf2c3; --on-teal: #03150f; --gold: #e8b84b; --tide: #7c5cff;
  --good: #4fe0a0; --warn: #f2bb5c; --bad: #ff8f86; --glow: 16, 229, 168; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --btn: linear-gradient(135deg, #5cf2c3 0%, #10e5a8 100%); --wa: #25d366; --on-wa: #04210f;
  --dot: rgba(255, 255, 255, .075); --blobA: rgba(var(--glow), .22); --blobB: rgba(124, 92, 255, .17); --blobC: rgba(232, 184, 75, .11);
}
:root[data-theme="dark"] .ambient::before { opacity: .055; }
:root[data-theme="dark"][data-fx="full"] body::after { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .016) 0 1px, transparent 1px 3px); }
:root[data-theme="dark"] .workbar { background: var(--surface); }
/* the desks' page backdrop uses a fixed teal glow: soften it in light */
:root[data-theme="light"] body.desk { background: radial-gradient(800px 500px at 90% -5%, rgba(11, 122, 111, .10), transparent 60%), var(--bg); }

/* the theme switch in Settings */
.themeseg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border: 1px solid var(--line2); border-radius: 14px; background: var(--surface2); }
.themeseg button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink2); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.themeseg button[aria-pressed="true"] { background: rgba(var(--glow, 16, 229, 168), .18); color: var(--teal); }
