@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
#launch-screen {
  transition: opacity 320ms ease, visibility 320ms ease;
}

#launch-screen.launch-hidden {
  opacity: 0;
  visibility: hidden;
}
@keyframes phloem-fast-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes phloem-fast-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-screen,
.app {
  animation: phloem-fast-fade-in 120ms ease-out both;
}

.welcome-overlay,
.notification-overlay,
.history-overlay,
.quick-start-overlay {
  animation: phloem-fast-fade-in 120ms ease-out both;
}

.welcome-panel,
.notification-panel,
.history-panel,
.quick-start-panel {
  animation: phloem-fast-panel-in 140ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .login-screen,
  .app,
  .welcome-overlay,
  .notification-overlay,
  .history-overlay,
  .quick-start-overlay,
  .welcome-panel,
  .notification-panel,
  .history-panel,
  .quick-start-panel {
    animation: none;
  }
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --border: #e2e0d8;
  --text: #1a1916;
  --muted: #8a8880;
  --soft: #c0bdb5;
  --accent: #1a1916;
  --accent-text: #ffffff;
  --high: #c0392b;
  --high-bg: #fdf0ee;
  --high-border: #f0c4be;
  --ok: #2d7a3a;
  --radius: 10px;
}

:root[data-theme="classic"] {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --border: #e2e0d8;
  --text: #1a1916;
  --muted: #8a8880;
  --soft: #c0bdb5;
  --accent: #1a1916;
  --accent-text: #ffffff;
  --high: #c0392b;
  --high-bg: #fdf0ee;
  --high-border: #f0c4be;
  --ok: #2d7a3a;
}

:root[data-theme="classic-dark"] {
  --bg: #141310;
  --surface: #1d1c18;
  --border: #34312a;
  --text: #f1eee6;
  --muted: #a6a096;
  --soft: #6f695f;
  --accent: #f1eee6;
  --accent-text: #141310;
  --high: #f07062;
  --high-bg: #2b1d1a;
  --high-border: #5f332d;
  --ok: #7fc58a;
}

:root[data-theme="arcade"] {
  --bg: #171326;
  --surface: #241d36;
  --border: #29d4ff;
  --text: #f7f3ff;
  --muted: #c4b9df;
  --soft: #7c6e9f;
  --accent: #ff4fd8;
  --accent-text: #160d24;
  --high: #ff6a3d;
  --high-bg: #3b1f2d;
  --high-border: #ff7a57;
  --ok: #3df5a1;
}

:root[data-theme="arcade-bold"] {
  --bg: #070811;
  --surface: #111422;
  --border: #00e5ff;
  --text: #f9fbff;
  --muted: #b8c2ff;
  --soft: #6972aa;
  --accent: #ff2bd6;
  --accent-text: #080711;
  --high: #ff7438;
  --high-bg: #321827;
  --high-border: #ff865f;
  --ok: #2dff9a;
}

:root[data-theme="cd"] {
  --bg: #e9fff7;
  --surface: #fffdf4;
  --border: #00a6c8;
  --text: #1d2433;
  --muted: #59677c;
  --soft: #94a3b8;
  --accent: #ec2fb4;
  --accent-text: #fff8fd;
  --high: #ff5a3c;
  --high-bg: #ffe5d8;
  --high-border: #ff9b82;
  --ok: #188e64;
}

:root[data-theme="cd-bold"] {
  --bg: #3a1f78;
  --surface: #fff4cf;
  --border: #00d5d8;
  --text: #20163b;
  --muted: #604f7f;
  --soft: #927bb8;
  --accent: #ff2cb5;
  --accent-text: #fff8df;
  --high: #ff5139;
  --high-bg: #ffe1c6;
  --high-border: #ff906f;
  --ok: #00a979;
}

:root[data-theme="phloem"] {
  --bg: #f5fbf2;
  --surface: #ffffff;
  --border: #36a936;
  --text: #161916;
  --muted: #667360;
  --soft: #a8b6a1;
  --accent: #2fa52e;
  --accent-text: #ffffff;
  --high: #b9342b;
  --high-bg: #fff0ee;
  --high-border: #edbbb6;
  --ok: #228a33;
}

:root[data-theme="phloem-dark"] {
  --bg: #101410;
  --surface: #181f18;
  --border: #2fa52e;
  --text: #eff7ec;
  --muted: #a4b49d;
  --soft: #64745f;
  --accent: #45bc42;
  --accent-text: #071007;
  --high: #ff7668;
  --high-bg: #3b201e;
  --high-border: #8f4942;
  --ok: #7bd779;
}

:root[data-theme="sage"] {
  --bg: #f2f5ef;
  --surface: #ffffff;
  --border: #d8dfd0;
  --text: #172018;
  --muted: #75806d;
  --soft: #aeb7a7;
  --accent: #223828;
  --accent-text: #ffffff;
  --high: #b54b35;
  --high-bg: #fbefea;
  --high-border: #edc8bc;
  --ok: #2f7446;
}

:root[data-theme="sage-bold"] {
  --bg: #e5eddc;
  --surface: #fbfdf8;
  --border: #b9caa6;
  --text: #132116;
  --muted: #5d704f;
  --soft: #8fa27f;
  --accent: #244f2f;
  --accent-text: #ffffff;
  --high: #b53a27;
  --high-bg: #f8dfd7;
  --high-border: #e3a999;
  --ok: #1f7a42;
}

:root[data-theme="steel"] {
  --bg: #edf3fa;
  --surface: #fbfdff;
  --border: #c4d3e3;
  --text: #132033;
  --muted: #63778f;
  --soft: #91a6bd;
  --accent: #235f9c;
  --accent-text: #ffffff;
  --high: #b53f4a;
  --high-bg: #faeaed;
  --high-border: #e8bbc1;
  --ok: #2e6f74;
}

:root[data-theme="steel-bold"] {
  --bg: #d7e5f3;
  --surface: #f4f9ff;
  --border: #8aa8c9;
  --text: #0f2035;
  --muted: #45617d;
  --soft: #6f8cad;
  --accent: #14528e;
  --accent-text: #ffffff;
  --high: #b02f49;
  --high-bg: #f4dbe1;
  --high-border: #dc97a5;
  --ok: #1d737d;
}

:root[data-theme="slate"] {
  --bg: #eceee8;
  --surface: #fbfcf8;
  --border: #c8d0c0;
  --text: #1b201c;
  --muted: #6b7669;
  --soft: #99a491;
  --accent: #39483d;
  --accent-text: #ffffff;
  --high: #a94a3f;
  --high-bg: #f7ede8;
  --high-border: #dfbfb5;
  --ok: #43724d;
}

:root[data-theme="slate-bold"] {
  --bg: #cfd7c6;
  --surface: #f3f7ef;
  --border: #94a483;
  --text: #111a14;
  --muted: #4f604c;
  --soft: #708365;
  --accent: #233b2b;
  --accent-text: #ffffff;
  --high: #a5372d;
  --high-bg: #f0dcd4;
  --high-border: #d69a89;
  --ok: #2d7540;
}

:root[data-theme="gold"] {
  --bg: #f6f2e7;
  --surface: #fffefa;
  --border: #e4dac1;
  --text: #211c12;
  --muted: #86785d;
  --soft: #b9aa87;
  --accent: #5b4715;
  --accent-text: #fffaf0;
  --high: #b74730;
  --high-bg: #fbebe4;
  --high-border: #ecc3b6;
  --ok: #32733d;
}

:root[data-theme="gold-bold"] {
  --bg: #ebdcad;
  --surface: #fffaf0;
  --border: #c9ad5f;
  --text: #211805;
  --muted: #6f5b24;
  --soft: #9c843a;
  --accent: #7a5700;
  --accent-text: #fff8df;
  --high: #b43725;
  --high-bg: #f8dfd4;
  --high-border: #df9f8d;
  --ok: #24733a;
}

:root[data-theme="retro-console"] {
  --bg: #d8d8c8;
  --surface: #c5c8b1;
  --border: #a4aa90;
  --text: #1d241c;
  --muted: #626b5b;
  --soft: #879078;
  --accent: #4b526c;
  --accent-text: #f2f0e4;
  --high: #9b3340;
  --high-bg: #d8c4bd;
  --high-border: #b98b88;
  --ok: #2f6f3d;
}

:root[data-theme="retro-console-bold"] {
  --bg: #c7c8b2;
  --surface: #b0b899;
  --border: #808a6f;
  --text: #121a15;
  --muted: #4f5b4a;
  --soft: #6f7b62;
  --accent: #3e4464;
  --accent-text: #f6f2df;
  --high: #8f2639;
  --high-bg: #caaea8;
  --high-border: #a66f76;
  --ok: #1f6f3a;
}

:root[data-theme="rose"] {
  --bg: #f7f1f2;
  --surface: #ffffff;
  --border: #e5d7d9;
  --text: #211819;
  --muted: #89777a;
  --soft: #beaeb1;
  --accent: #40272e;
  --accent-text: #ffffff;
  --high: #bd3e48;
  --high-bg: #fcecee;
  --high-border: #efc4c9;
  --ok: #34735a;
}

:root[data-theme="rose-bold"] {
  --bg: #f2e1e5;
  --surface: #fffafb;
  --border: #d6b5bd;
  --text: #261518;
  --muted: #765d64;
  --soft: #a88991;
  --accent: #5f2636;
  --accent-text: #ffffff;
  --high: #c32942;
  --high-bg: #f9dde3;
  --high-border: #e7a7b4;
  --ok: #277253;
}

:root[data-theme="space"] {
  --bg: #e9e8df;
  --surface: #f7f5ec;
  --border: #b9adc9;
  --text: #272522;
  --muted: #74736b;
  --soft: #91879c;
  --accent: #6b557f;
  --accent-text: #f7f5ec;
  --high: #d95c4f;
  --high-bg: #f6dfd8;
  --high-border: #dfa59a;
  --ok: #3f735f;
}

:root[data-theme="space-bold"] {
  --bg: #2b2927;
  --surface: #363331;
  --border: #756189;
  --text: #f0eee4;
  --muted: #bbb7aa;
  --soft: #a095ad;
  --accent: #c7addf;
  --accent-text: #242321;
  --high: #ff7564;
  --high-bg: #4a2f2c;
  --high-border: #9e5b50;
  --ok: #8fc4aa;
}

:root[data-theme="wildflower"] {
  --bg: #fff5b8;
  --surface: #fffbe1;
  --border: #6da8d6;
  --text: #253032;
  --muted: #6b735b;
  --soft: #9aa985;
  --accent: #2f74b7;
  --accent-text: #fffbe1;
  --high: #d6423f;
  --high-bg: #ffe2dc;
  --high-border: #f19a8c;
  --ok: #43865a;
}

:root[data-theme="wildflower-bold"] {
  --bg: #f4df5d;
  --surface: #fff4b6;
  --border: #2e83c4;
  --text: #172725;
  --muted: #526233;
  --soft: #7c8f43;
  --accent: #d93244;
  --accent-text: #fff8cf;
  --high: #b51f32;
  --high-bg: #ffd5d0;
  --high-border: #e66f68;
  --ok: #2f7f53;
}

:root[data-theme="arizona"] {
  --bg: #eed1b3;
  --surface: #fff0dd;
  --border: #bf735b;
  --text: #2b2119;
  --muted: #7b634f;
  --soft: #a58b72;
  --accent: #7f9a63;
  --accent-text: #fff7e9;
  --high: #b34a35;
  --high-bg: #f6d8c7;
  --high-border: #d79478;
  --ok: #557f4f;
}

:root[data-theme="arizona-bold"] {
  --bg: #c76c4d;
  --surface: #ffe6cd;
  --border: #7d3b2d;
  --text: #21130d;
  --muted: #4c3024;
  --soft: #744532;
  --accent: #263f21;
  --accent-text: #fff8ed;
  --high: #a62f24;
  --high-bg: #f8cdb9;
  --high-border: #c76c4d;
  --ok: #2f5f2b;
}

:root[data-theme="sunset"] {
  --bg: #ffe0be;
  --surface: #fff3df;
  --border: #d78a8d;
  --text: #2e2428;
  --muted: #7f6470;
  --soft: #ad8794;
  --accent: #7b5ea7;
  --accent-text: #fff5df;
  --high: #e55446;
  --high-bg: #ffe0d6;
  --high-border: #f0a28b;
  --ok: #4f8268;
}

:root[data-theme="sunset-bold"] {
  --bg: #412444;
  --surface: #5a3159;
  --border: #f08b72;
  --text: #fff0dd;
  --muted: #e7b9a6;
  --soft: #c896b1;
  --accent: #ffb14f;
  --accent-text: #342236;
  --high: #ff6654;
  --high-bg: #6a2c38;
  --high-border: #f28b7a;
  --ok: #8fc9a2;
}

:root[data-theme="yeehaw"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #2458a6;
  --text: #111827;
  --muted: #5f6f8f;
  --soft: #9aabc9;
  --accent: #194f9a;
  --accent-text: #ffffff;
  --high: #c82333;
  --high-bg: #fff0f1;
  --high-border: #e78992;
  --ok: #2d6f58;
}

:root[data-theme="yeehaw-bold"] {
  --bg: #173f8a;
  --surface: #f8fbff;
  --border: #d22f3f;
  --text: #10203e;
  --muted: #4d638a;
  --soft: #8ca0c4;
  --accent: #d22f3f;
  --accent-text: #ffffff;
  --high: #b91d2d;
  --high-bg: #ffe7ea;
  --high-border: #e06f7b;
  --ok: #2f8061;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 2rem 1rem;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

:root[data-theme="phloem"] body {
  background:
    linear-gradient(90deg, rgba(47, 165, 46, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(47, 165, 46, 0.06) 0 1px, transparent 1px 100%),
    #f5fbf2;
  background-size: 42px 42px, 42px 42px, auto;
}

:root[data-theme="phloem-dark"] body {
  background:
    radial-gradient(circle at 20px 24px, rgba(69, 188, 66, 0.2) 0 1px, transparent 1.7px),
    radial-gradient(circle at 94px 58px, rgba(239, 247, 236, 0.11) 0 1px, transparent 1.6px),
    linear-gradient(90deg, rgba(69, 188, 66, 0.09) 0 1px, transparent 1px 100%),
    #101410;
  background-size: 118px 86px, 132px 94px, 44px 44px, auto;
}

:root[data-theme="arcade"] body {
  background:
    linear-gradient(90deg, rgba(41, 212, 255, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(255, 79, 216, 0.1) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 24px 28px, rgba(61, 245, 161, 0.25) 0 2px, transparent 2.8px),
    radial-gradient(circle at 92px 58px, rgba(255, 106, 61, 0.18) 0 1.4px, transparent 2.2px),
    var(--bg);
  background-size: 38px 38px, 38px 38px, 134px 96px, 164px 118px, auto;
}

:root[data-theme="arcade-bold"] body {
  background:
    linear-gradient(90deg, rgba(0, 229, 255, 0.14) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(255, 43, 214, 0.13) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 22px 30px, rgba(45, 255, 154, 0.32) 0 2px, transparent 3px),
    radial-gradient(circle at 86px 54px, rgba(255, 116, 56, 0.28) 0 1.6px, transparent 2.4px),
    var(--bg);
  background-size: 34px 34px, 34px 34px, 126px 92px, 152px 112px, auto;
}

:root[data-theme="cd"] body {
  background:
    radial-gradient(ellipse at 20px 24px, rgba(236, 47, 180, 0.22) 0 5px, transparent 5.6px),
    radial-gradient(circle at 88px 54px, rgba(255, 214, 53, 0.38) 0 3px, transparent 3.8px),
    linear-gradient(135deg, transparent 0 44%, rgba(0, 166, 200, 0.17) 44% 48%, transparent 48% 100%),
    linear-gradient(45deg, transparent 0 48%, rgba(255, 90, 60, 0.12) 48% 51%, transparent 51% 100%),
    var(--bg);
  background-size: 126px 92px, 152px 112px, 72px 72px, 104px 104px, auto;
}

:root[data-theme="cd-bold"] body {
  background:
    radial-gradient(ellipse at 22px 28px, rgba(255, 44, 181, 0.34) 0 6px, transparent 6.8px),
    radial-gradient(circle at 92px 58px, rgba(255, 234, 76, 0.34) 0 3px, transparent 4px),
    linear-gradient(135deg, transparent 0 43%, rgba(0, 213, 216, 0.28) 43% 48%, transparent 48% 100%),
    linear-gradient(45deg, transparent 0 49%, rgba(255, 81, 57, 0.22) 49% 52%, transparent 52% 100%),
    var(--bg);
  background-size: 118px 88px, 146px 108px, 66px 66px, 96px 96px, auto;
}

:root[data-theme="space"] body {
  background:
    radial-gradient(circle at 18px 24px, rgba(107, 85, 127, 0.12) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72px 58px, rgba(217, 92, 79, 0.11) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 118px 18px, rgba(247, 245, 236, 0.72) 0 1px, transparent 1.6px),
    var(--bg);
  background-size: 132px 96px, 148px 112px, 176px 128px, auto;
}

:root[data-theme="space-bold"] body {
  background:
    radial-gradient(circle at 20px 28px, rgba(199, 173, 223, 0.22) 0 1px, transparent 1.7px),
    radial-gradient(circle at 86px 52px, rgba(255, 117, 100, 0.18) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 130px 22px, rgba(240, 238, 228, 0.16) 0 1px, transparent 1.6px),
    var(--bg);
  background-size: 132px 96px, 148px 112px, 176px 128px, auto;
}

:root[data-theme="wildflower"] body {
  background:
    radial-gradient(circle at 18px 22px, rgba(47, 116, 183, 0.22) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 74px 54px, rgba(214, 66, 63, 0.18) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 126px 28px, rgba(67, 134, 90, 0.16) 0 1px, transparent 1.6px),
    var(--bg);
  background-size: 132px 96px, 150px 108px, 178px 126px, auto;
}

:root[data-theme="wildflower-bold"] body {
  background:
    radial-gradient(circle at 20px 26px, rgba(47, 116, 183, 0.32) 0 1.3px, transparent 2px),
    radial-gradient(circle at 86px 50px, rgba(217, 50, 68, 0.26) 0 1.4px, transparent 2px),
    radial-gradient(circle at 132px 20px, rgba(47, 127, 83, 0.22) 0 1px, transparent 1.8px),
    var(--bg);
  background-size: 126px 92px, 148px 110px, 172px 124px, auto;
}

:root[data-theme="arizona"] body {
  background:
    radial-gradient(circle at 20px 24px, rgba(179, 74, 53, 0.18) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 78px 56px, rgba(127, 154, 99, 0.18) 0 1px, transparent 1.7px),
    radial-gradient(circle at 126px 18px, rgba(255, 240, 221, 0.55) 0 1px, transparent 1.6px),
    var(--bg);
  background-size: 136px 98px, 152px 112px, 180px 128px, auto;
}

:root[data-theme="arizona-bold"] body {
  background:
    radial-gradient(circle at 22px 28px, rgba(73, 109, 56, 0.28) 0 1.3px, transparent 2px),
    radial-gradient(circle at 88px 56px, rgba(255, 224, 103, 0.2) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 136px 22px, rgba(154, 79, 56, 0.24) 0 1.4px, transparent 2px),
    var(--bg);
  background-size: 132px 96px, 148px 112px, 176px 126px, auto;
}

:root[data-theme="sunset"] body {
  background:
    radial-gradient(circle at 18px 24px, rgba(123, 94, 167, 0.2) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 78px 54px, rgba(229, 84, 70, 0.18) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 126px 20px, rgba(255, 177, 79, 0.22) 0 1px, transparent 1.7px),
    var(--bg);
  background-size: 134px 98px, 150px 112px, 178px 126px, auto;
}

:root[data-theme="sunset-bold"] body {
  background:
    radial-gradient(circle at 20px 28px, rgba(255, 177, 79, 0.28) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 86px 52px, rgba(255, 102, 84, 0.24) 0 1.3px, transparent 2px),
    radial-gradient(circle at 132px 22px, rgba(143, 201, 162, 0.18) 0 1px, transparent 1.7px),
    var(--bg);
  background-size: 132px 96px, 148px 112px, 176px 128px, auto;
}

:root[data-theme="yeehaw"] body {
  background:
    radial-gradient(circle at 18px 24px, rgba(25, 79, 154, 0.12) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78px 54px, rgba(200, 35, 51, 0.1) 0 1.1px, transparent 1.7px),
    #ffffff;
  background-size: 136px 100px, 156px 116px, auto;
}

:root[data-theme="yeehaw-bold"] body {
  background:
    radial-gradient(circle at 20px 28px, rgba(255, 255, 255, 0.34) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 92px 58px, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.7px),
    radial-gradient(circle at 136px 20px, rgba(210, 47, 63, 0.22) 0 1.2px, transparent 1.8px),
    var(--bg);
  background-size: 124px 92px, 150px 112px, 180px 128px, auto;
}

@media (min-width: 761px) {
  body {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  * {
    scrollbar-width: auto;
    scrollbar-color: var(--soft) var(--bg);
  }

  *::-webkit-scrollbar {
    width: 14px;
    height: 14px;
  }

  *::-webkit-scrollbar-track {
    background: var(--bg);
  }

  *::-webkit-scrollbar-thumb {
    background: var(--soft);
    border: 3px solid var(--bg);
    border-radius: 8px;
  }

  *::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
  }
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
label { cursor: pointer; }

.login-screen {
  min-height: calc(100vh - 4rem);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.login-screen[hidden] {
  display: none !important;
}

.login-panel {
  width: min(340px, 100%);
  padding: 1rem 0;
}

.login-logo {
  width: min(340px, 86vw);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 32px;
  margin: 0 auto 1.15rem;
}

.login-brand {
  font-family: 'DM Mono', monospace;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  text-align: center;
}

.login-tagline {
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.login-copy {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
  text-align: center;
}

.home-screen-hint {
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, var(--bg));
  padding: 0.72rem 0.78rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.home-screen-hint strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-auth,
.signup-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.login-auth[hidden],
.signup-panel[hidden] {
  display: none !important;
}

.login-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.login-auth input,
.login-auth button,
.signup-panel input,
.signup-panel button {
  width: 100%;
  min-height: 42px;
}

.login-status {
  display: block;
  min-height: 18px;
  text-align: center;
}

.early-access-button,
.secondary-auth-button {
  background: transparent;
  color: var(--muted);
}

.signup-copy {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  margin-bottom: 2px;
  text-align: center;
}

.app {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-template-rows: auto auto 1fr;
  gap: 0 1.75rem;
}

.app[hidden] {
  display: none !important;
}

.app-main { grid-column: 1; }
.app-done { grid-column: 2; grid-row: 1 / 4; }
.app.done-collapsed {
  grid-template-columns: minmax(0, 1160px);
  justify-content: center;
  gap: 0;
}
.app.done-collapsed .app-main,
.app.done-collapsed header {
  grid-column: 1;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  grid-column: 1;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  width: 100%;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  align-self: center;
  clip-path: inset(6% round 6px);
}

h1 {
  font-family: 'DM Mono', monospace;
  font-size: 1.38rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-right: 0;
}

.app-version {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.66rem;
  line-height: 1;
}

.feedback-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 2px 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  line-height: 1;
  min-height: 18px;
  cursor: pointer;
}

.feedback-button:hover,
.feedback-button:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.status {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  min-height: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.1);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
  pointer-events: none;
}

.status:empty { display: none; }
.status.online { color: var(--ok); }
.status.offline { color: var(--high); }

.sync-pending-bar {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 19;
  max-width: min(520px, calc(100vw - 24px));
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.12);
  color: var(--high);
  font-family: 'DM Mono', monospace;
  font-size: 0.73rem;
  line-height: 1.25;
  pointer-events: none;
}

.sync-pending-bar[hidden] { display: none; }
body.has-sync-pending .app { padding-bottom: 38px; }

.theme-select-wrap {
  display: inline-grid;
  position: relative;
  flex-shrink: 0;
  min-height: 30px;
  z-index: 2;
  width: 100%;
}

.theme-select-wrap::after {
  content: "Theme";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 84%, var(--accent) 16%);
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  pointer-events: none;
  z-index: 2;
}

.theme-select {
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  padding: 3px 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  min-height: 30px;
  width: 100%;
  min-width: 0;
  outline: none;
  opacity: 0;
  position: relative;
  z-index: 3;
}

.theme-select-wrap:hover::after {
  color: var(--text);
}

.auth-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 6px;
  align-items: center;
  position: relative;
  margin-left: auto;
  width: min(372px, 100%);
}

.auth-controls input {
  width: 132px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 3px 7px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  outline: none;
}

.auth-controls button {
  border: 2px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 84%, var(--accent) 16%);
  color: var(--muted);
  padding: 3px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  line-height: 1.2;
  min-height: 30px;
  width: 100%;
}

.auth-controls button:hover {
  background: color-mix(in srgb, var(--surface) 74%, var(--accent) 26%);
  color: var(--text);
}

.login-auth.auth-controls {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 9px;
}

.login-auth.auth-controls input,
.login-auth.auth-controls button,
.signup-panel input,
.signup-panel button {
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.menu-panel {
  position: absolute;
  top: 30px;
  right: 0;
  z-index: 13;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 265px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.1);
}

.menu-panel[hidden] {
  display: none;
}

body.popover-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 7;
  background: color-mix(in srgb, var(--bg) 72%, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

body.popover-open .menu-panel,
body.popover-open .workspace-tab.menu-open,
body.popover-open .task.actions-open {
  z-index: 13;
}

.menu-panel input {
  flex: 1;
}

.account-password-row,
.menu-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.account-password-row input {
  min-width: 0;
}

.account-email {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.account-device {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.account-section-title,
.account-device-list-title {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 4px;
}

.account-muted {
  color: var(--muted);
}

.account-device-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 6px;
}

.menu-row button {
  flex: 1;
}

.menu-row {
  flex-wrap: wrap;
}

.account-logout {
  width: 100%;
}

.menu-panel .import-menu {
  position: static;
  min-width: 0;
  width: 100%;
  box-shadow: none;
  background: var(--bg);
}

.workspace-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.workspace-tab {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 5px 10px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workspace-tab[draggable="true"] {
  cursor: grab;
}

.workspace-tab.dragging {
  opacity: 0.45;
}

.workspace-tab.tab-drop-before::before,
.workspace-tab.tab-drop-after::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
  pointer-events: none;
  z-index: 4;
}

.workspace-tab.tab-drop-before::before { left: -5px; }
.workspace-tab.tab-drop-after::after { right: -5px; }

.workspace-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.workspace-tab.search-neutral {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.workspace-tab.hi-viz {
  border-color: var(--accent);
  color: var(--text);
  background:
    repeating-linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 20%, transparent) 0 6px,
      transparent 6px 12px),
    var(--surface);
}

.workspace-tab.active.hi-viz {
  color: var(--accent-text);
  background:
    repeating-linear-gradient(135deg,
      color-mix(in srgb, var(--accent-text) 24%, transparent) 0 6px,
      transparent 6px 12px),
    var(--accent);
}

.workspace-tab.search-neutral.hi-viz {
  color: var(--text);
  background:
    repeating-linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 16%, transparent) 0 6px,
      transparent 6px 12px),
    var(--surface);
}

.workspace-tab.inbox-attention {
  border-color: #d96b4a;
  color: var(--text);
  box-shadow: 0 0 0 1px color-mix(in srgb, #d96b4a 34%, transparent), 0 0 10px color-mix(in srgb, #d96b4a 36%, transparent);
}

.workspace-tab.active.inbox-attention {
  box-shadow: 0 0 0 1px color-mix(in srgb, #d96b4a 42%, transparent), 0 0 12px color-mix(in srgb, #d96b4a 44%, transparent);
}

:root[data-theme="arizona-bold"] .workspace-tab:not(.active),
:root[data-theme="arizona-bold"] .workspace-tab.search-neutral {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-color: var(--border);
  color: var(--text);
}

.workspace-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  color: inherit;
  font-size: 0.64rem;
  line-height: 1;
}

.workspace-count.overdue {
  background: #d96b4a;
  color: #fff7f0;
}

.workspace-count.due-soon {
  background: #d8a531;
  color: #211c12;
}

.workspace-add {
  min-width: 28px;
  padding-left: 8px;
  padding-right: 8px;
}

.workspace-active-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: none;
}

.workspace-active-label {
  flex: 0 0 auto;
}

.workspace-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.workspace-menu-trigger,
.workspace-menu-action {
  border: 0;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent-text) 12%, transparent);
  color: inherit;
  font-family: 'DM Mono', monospace;
}

.workspace-menu-trigger {
  padding: 0 4px 2px;
  line-height: 1;
}

.workspace-menu-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.workspace-menu-action {
  padding: 2px 5px;
  font-size: 0.64rem;
}

.workspace-tab.active .workspace-menu-action {
  border: 1px solid color-mix(in srgb, var(--accent-text) 32%, var(--border));
  background: var(--surface);
  color: var(--text);
}

.workspace-tab.search-neutral .workspace-menu-action {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.workspace-menu-trigger:hover,
.workspace-menu-action:hover {
  background: color-mix(in srgb, var(--accent-text) 22%, transparent);
}

.workspace-tab.active .workspace-menu-action:hover {
  background: var(--bg);
  color: var(--text);
}

.workspace-tab.search-neutral .workspace-menu-action:hover {
  background: var(--bg);
  color: var(--text);
}

.workspace-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 30px;
  margin: -6px 0 12px;
}

.workspace-tools:empty {
  display: none;
}

.workspace-tools button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 2px 4px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
}

.workspace-tools button:hover {
  color: var(--text);
}

.segmented-control,
.subtask-view-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.segmented-control button,
.subtask-view-control button {
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  padding: 3px 7px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
}

.segmented-control button.active,
.subtask-view-control button.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
}

:root[data-theme="arizona-bold"] .workspace-tools button,
:root[data-theme="arizona-bold"] .segmented-control button,
:root[data-theme="arizona-bold"] .subtask-view-control button {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border-color: var(--border);
  color: var(--text);
}

:root[data-theme="arizona-bold"] .segmented-control button.active,
:root[data-theme="arizona-bold"] .subtask-view-control button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.subtask-view-label {
  margin-right: 2px;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.sort-control select {
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 9px;
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
}

.theme-select,
.sort-control select,
.workspace-picker,
.notification-field select {
  color-scheme: light;
}

:root[data-theme="arcade"] .theme-select,
:root[data-theme="arcade"] .sort-control select,
:root[data-theme="arcade"] .workspace-picker,
:root[data-theme="arcade"] .notification-field select,
:root[data-theme="arcade-bold"] .theme-select,
:root[data-theme="arcade-bold"] .sort-control select,
:root[data-theme="arcade-bold"] .workspace-picker,
:root[data-theme="arcade-bold"] .notification-field select,
:root[data-theme="cd-bold"] .theme-select,
:root[data-theme="cd-bold"] .sort-control select,
:root[data-theme="cd-bold"] .workspace-picker,
:root[data-theme="cd-bold"] .notification-field select,
:root[data-theme="classic-dark"] .theme-select,
:root[data-theme="classic-dark"] .sort-control select,
:root[data-theme="classic-dark"] .workspace-picker,
:root[data-theme="classic-dark"] .notification-field select,
:root[data-theme="phloem-dark"] .theme-select,
:root[data-theme="phloem-dark"] .sort-control select,
:root[data-theme="phloem-dark"] .workspace-picker,
:root[data-theme="phloem-dark"] .notification-field select,
:root[data-theme="retro-console"] .theme-select,
:root[data-theme="retro-console"] .sort-control select,
:root[data-theme="retro-console"] .workspace-picker,
:root[data-theme="retro-console"] .notification-field select,
:root[data-theme="retro-console-bold"] .theme-select,
:root[data-theme="retro-console-bold"] .sort-control select,
:root[data-theme="retro-console-bold"] .workspace-picker,
:root[data-theme="retro-console-bold"] .notification-field select,
:root[data-theme="space"] .theme-select,
:root[data-theme="space"] .sort-control select,
:root[data-theme="space"] .workspace-picker,
:root[data-theme="space"] .notification-field select,
:root[data-theme="space-bold"] .theme-select,
:root[data-theme="space-bold"] .sort-control select,
:root[data-theme="space-bold"] .workspace-picker,
:root[data-theme="space-bold"] .notification-field select,
:root[data-theme="yeehaw-bold"] .theme-select,
:root[data-theme="yeehaw-bold"] .sort-control select,
:root[data-theme="yeehaw-bold"] .workspace-picker,
:root[data-theme="yeehaw-bold"] .notification-field select {
  color-scheme: dark;
}

.task-list { display: flex; flex-direction: column; gap: 4px; }

.due-section {
  margin: 12px 0 3px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-list .due-section:first-child {
  margin-top: 0;
}

.task {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.75rem;
  position: relative;
  cursor: default;
  transition: box-shadow 0.15s, opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
  user-select: none;
}

.task[draggable="true"] { cursor: grab; }
.task[draggable="true"]:active { cursor: grabbing; }
.task[draggable="true"] button,
.task[draggable="true"] input,
.task[draggable="true"] select,
.task[draggable="true"] textarea,
.task[draggable="true"] .subtask-text,
.task[draggable="true"] .task-date { cursor: pointer; }
.task[draggable="true"] .drag-handle { cursor: grab; }
.task[draggable="true"] .drag-handle:active { cursor: grabbing; }
.task.dragging { opacity: 0.4; }
.task.drop-before::before,
.task.drop-after::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
  pointer-events: none;
  z-index: 4;
}
.task.drop-before::before { top: -4px; }
.task.drop-after::after { bottom: -4px; }
.task.high-priority { background: var(--high-bg); border-color: var(--high-border); }
.task.completing {
  opacity: 0.58;
  transform: translateY(2px);
  filter: saturate(0.72);
  pointer-events: none;
}

.task-main { display: flex; align-items: center; gap: 10px; }
.drag-handle { color: var(--border); font-size: 0.9rem; cursor: default; flex-shrink: 0; line-height: 1; }

.task-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  flex-shrink: 0;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.task-body { flex: 1; min-width: 0; }
.task-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.task-title { flex: 1; min-width: 0; font-size: 0.95rem; line-height: 1.3; overflow-wrap: anywhere; }
.task-title-input, .subtask-text-input {
  border: none;
  border-bottom: 1px dashed var(--border);
  outline: none;
  background: transparent;
  color: var(--text);
  width: 100%;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.task-title-input {
  display: block;
  resize: none;
  overflow: hidden;
  min-height: 34px;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.task-meta:empty {
  display: none;
}

.task-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

.task-date.due-green { background: #e6f4ea; color: #2d7a3a; }
.task-date.due-yellow { background: #fef9e0; color: #8a6d00; }
.task-date.due-orange { background: #fef0e0; color: #9a4f00; }
.task-date.due-red { background: #fdecea; color: #b71c1c; }
.task-date.due-overdue { background: #f5e0e0; color: #7f0000; }

.inline-date-editor {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.inline-date-clear {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  min-width: 24px;
  height: 27px;
  padding: 0 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  cursor: pointer;
}

.inline-date-clear:hover {
  color: var(--danger);
  border-color: var(--danger);
}

:root[data-theme="classic-dark"] .task-date.due-green { background: #183524; color: #95d9a2; }
:root[data-theme="classic-dark"] .task-date.due-yellow { background: #383117; color: #ead477; }
:root[data-theme="classic-dark"] .task-date.due-orange { background: #3d2818; color: #f0a866; }
:root[data-theme="classic-dark"] .task-date.due-red { background: #3d1d1d; color: #f08a80; }
:root[data-theme="classic-dark"] .task-date.due-overdue { background: #321818; color: #ff9a90; }

.high-badge, .workspace-badge, .repeat-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.high-badge {
  color: var(--high);
  flex-shrink: 0;
  white-space: nowrap;
}

.workspace-badge {
  color: var(--muted);
}

.workspace-badge.search-source {
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--text);
  padding: 2px 6px;
  letter-spacing: 0.03em;
}

.workspace-badge.search-source::before {
  content: "TAB";
  color: var(--accent);
  font-size: 0.58rem;
  margin-right: 5px;
}

.repeat-badge {
  color: var(--accent);
  flex-shrink: 0;
  white-space: nowrap;
}

.smart-view-note {
  color: var(--soft);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  line-height: 1.35;
}

.task-actions {
  display: none;
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 13;
  width: max-content;
  max-width: min(330px, calc(100vw - 2rem));
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.1);
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
}

.task-core-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.mobile-menu-actions {
  display: none;
  gap: 4px;
}

.task-more {
  display: block;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.14s ease, color 0.14s ease;
}

.task.actions-open .task-actions {
  display: flex;
}

.task.actions-open .task-more {
  transform: rotate(90deg);
  color: var(--text);
}

.task-btn {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
}

.task-bottom-btn {
  width: auto;
  min-width: 68px;
  padding: 0 10px;
  font-size: 0.68rem;
}

.task-subtask-menu-btn {
  width: auto;
  min-width: 66px;
  padding: 0 7px;
  font-size: 0.64rem;
}

.task-btn:hover, .tool-row button:hover, .voice-actions button:hover, .icon-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.task-btn.active { color: var(--high); }

:root[data-theme="arcade"] .task-more,
:root[data-theme="arcade"] .workspace-menu-trigger,
:root[data-theme="arcade"] .workspace-menu-action,
:root[data-theme="arcade"] .task-btn,
:root[data-theme="cd"] .task-more,
:root[data-theme="cd"] .workspace-menu-trigger,
:root[data-theme="cd"] .workspace-menu-action,
:root[data-theme="cd"] .task-btn,
:root[data-theme="space"] .task-more,
:root[data-theme="space"] .workspace-menu-trigger,
:root[data-theme="space"] .workspace-menu-action,
:root[data-theme="space"] .task-btn,
:root[data-theme="wildflower"] .task-more,
:root[data-theme="wildflower"] .workspace-menu-trigger,
:root[data-theme="wildflower"] .workspace-menu-action,
:root[data-theme="wildflower"] .task-btn,
:root[data-theme="arizona"] .task-more,
:root[data-theme="arizona"] .workspace-menu-trigger,
:root[data-theme="arizona"] .workspace-menu-action,
:root[data-theme="arizona"] .task-btn,
:root[data-theme="sunset"] .task-more,
:root[data-theme="sunset"] .workspace-menu-trigger,
:root[data-theme="sunset"] .workspace-menu-action,
:root[data-theme="sunset"] .task-btn,
:root[data-theme="yeehaw"] .task-more,
:root[data-theme="yeehaw"] .workspace-menu-trigger,
:root[data-theme="yeehaw"] .workspace-menu-action,
:root[data-theme="yeehaw"] .task-btn {
  color: var(--accent);
}

:root[data-theme="arcade-bold"] .task-more,
:root[data-theme="arcade-bold"] .workspace-menu-trigger,
:root[data-theme="arcade-bold"] .workspace-menu-action,
:root[data-theme="arcade-bold"] .task-btn,
:root[data-theme="cd-bold"] .task-more,
:root[data-theme="cd-bold"] .workspace-menu-trigger,
:root[data-theme="cd-bold"] .workspace-menu-action,
:root[data-theme="cd-bold"] .task-btn,
:root[data-theme="space-bold"] .task-more,
:root[data-theme="space-bold"] .workspace-menu-trigger,
:root[data-theme="space-bold"] .workspace-menu-action,
:root[data-theme="space-bold"] .task-btn,
:root[data-theme="wildflower-bold"] .task-more,
:root[data-theme="wildflower-bold"] .workspace-menu-trigger,
:root[data-theme="wildflower-bold"] .workspace-menu-action,
:root[data-theme="wildflower-bold"] .task-btn,
:root[data-theme="arizona-bold"] .task-more,
:root[data-theme="arizona-bold"] .workspace-menu-trigger,
:root[data-theme="arizona-bold"] .workspace-menu-action,
:root[data-theme="arizona-bold"] .task-btn,
:root[data-theme="sunset-bold"] .task-more,
:root[data-theme="sunset-bold"] .workspace-menu-trigger,
:root[data-theme="sunset-bold"] .workspace-menu-action,
:root[data-theme="sunset-bold"] .task-btn,
:root[data-theme="yeehaw-bold"] .task-more,
:root[data-theme="yeehaw-bold"] .workspace-menu-trigger,
:root[data-theme="yeehaw-bold"] .workspace-menu-action,
:root[data-theme="yeehaw-bold"] .task-btn {
  color: var(--accent);
}

:root[data-theme="yeehaw-bold"] .task-more,
:root[data-theme="yeehaw-bold"] .workspace-menu-trigger,
:root[data-theme="yeehaw-bold"] .workspace-menu-action,
:root[data-theme="yeehaw-bold"] .task-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.workspace-picker {
  height: 26px;
  max-width: 112px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  outline: none;
}

.quick-triage {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.quick-triage button {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  padding: 3px 7px;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
}

.quick-triage button:hover {
  background: var(--bg);
  color: var(--text);
}

.subtasks {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subtasks[hidden] {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.subtask {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  transition: background 160ms ease, opacity 160ms ease;
}

.sub-check {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

.sub-check.checked { background: var(--muted); border-color: var(--muted); }
.sub-check.checked::after { content: "\2713"; color: white; font-size: 8px; display: block; text-align: center; line-height: 12px; }

.subtask-text { font-size: 0.84rem; color: var(--muted); flex: 1; overflow-wrap: anywhere; cursor: text; }
.subtask-text.done { text-decoration: line-through; color: var(--soft); }

.subtask-del {
  opacity: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 2px;
}

.subtask:hover .subtask-del { opacity: 1; }
.inline-sub-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.inline-sub-row[hidden] {
  display: none;
}
.inline-sub-input {
  width: 100%;
  padding: 2px 0;
  font-size: 0.84rem;
}
.inline-sub-add {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  box-sizing: border-box;
  height: 22px;
  min-height: 22px;
  padding: 0 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.inline-sub-voice {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  box-sizing: border-box;
  padding: 0;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
}
.inline-sub-voice .record-dot {
  width: 7px;
  height: 7px;
}
.inline-sub-voice.listening {
  border-color: var(--danger);
  color: var(--text);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  animation: phloem-record-ring 1.15s ease-out infinite;
}
.inline-sub-add:hover,
.inline-sub-voice:hover {
  background: var(--bg);
  color: var(--text);
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-family: 'DM Mono', monospace;
}

.done-header {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.done-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.done-clear,
.done-toggle,
.done-show-toggle {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  padding: 3px 7px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.done-clear:hover,
.done-toggle:hover,
.done-show-toggle:hover {
  background: var(--bg);
  color: var(--high);
}

.done-show-toggle {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  margin: 0 0 0.75rem;
}
.done-note {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--soft);
  margin-bottom: 0.6rem;
}

.done-task {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.done-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 2px;
}

.done-check::after { content: "\2713"; color: white; font-size: 8px; display: block; text-align: center; line-height: 14px; }
.done-body { flex: 1; min-width: 0; }
.done-title { font-size: 0.8rem; color: var(--muted); text-decoration: line-through; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.done-title.deleted { text-decoration: none; }
.done-date { font-family: 'DM Mono', monospace; font-size: 0.68rem; color: var(--soft); margin-top: 1px; }
.done-state.completed { color: #2e9f38; }
.done-state.deleted { color: #e06b4f; }
.done-restore {
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--soft);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  padding: 2px 5px;
  opacity: 0;
  flex-shrink: 0;
}
.done-restore-text {
  min-width: 48px;
  text-align: center;
  border-color: var(--border);
  color: var(--muted);
  font-size: 0.64rem;
}
.done-delete {
  color: var(--high);
  min-width: 24px;
}
.done-restore:hover,
.done-restore:focus-visible {
  opacity: 1;
  border-color: var(--border);
  background: var(--bg);
  color: var(--high);
  outline: none;
}
.done-task:hover .done-restore { opacity: 1; }
.done-empty { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: var(--soft); text-align: center; padding: 1.5rem 0; }

.add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.add-row, .extras-row, .tool-row, .voice-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.extras-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.add-form input[type="text"], .new-title-input, .sub-input, .inline-sub-input, textarea {
  border: none;
  outline: none;
  color: var(--text);
  background: transparent;
}

.add-form input[type="text"], .new-title-input, .sub-input { flex: 1; padding: 4px 0; min-width: 0; }
.new-title-input {
  display: block;
  width: 100%;
  min-height: 34px;
  max-height: 128px;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
}
.sub-input { font-size: 0.85rem; color: var(--muted); }

.new-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

input::placeholder, textarea::placeholder { color: var(--soft); }

input[type="date"], .inline-date-input {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg);
  outline: none;
  color-scheme: light;
}

:root[data-theme="arcade"] input[type="date"],
:root[data-theme="arcade-bold"] input[type="date"],
:root[data-theme="cd-bold"] input[type="date"],
:root[data-theme="classic-dark"] input[type="date"],
:root[data-theme="phloem-dark"] input[type="date"],
:root[data-theme="retro-console"] input[type="date"],
:root[data-theme="retro-console-bold"] input[type="date"],
:root[data-theme="space"] input[type="date"],
:root[data-theme="space-bold"] input[type="date"],
:root[data-theme="yeehaw-bold"] input[type="date"] {
  color-scheme: dark;
}

.mobile-date-btn {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  width: 100%;
  height: 30px;
  padding: 0;
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.date-picker-wrap {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 30px;
  flex-shrink: 0;
  overflow: hidden;
}

.date-picker-wrap.has-date {
  width: 52px;
}

.date-picker-wrap input[type="date"] {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  min-width: 0;
  max-width: 1px;
  height: 1px;
  opacity: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  color-scheme: inherit;
}

.mobile-date-btn.has-date {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 0.72rem;
  letter-spacing: 0;
}

.pending-subs {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.pending-sub {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--text);
  font-size: 0.88rem;
}

.pending-box {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface) 86%, var(--bg) 14%);
}

.pending-sub-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pending-sub-remove {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.pending-sub-remove:hover,
.pending-sub-remove:focus-visible {
  border-color: var(--border);
  color: var(--danger);
  outline: none;
  background: color-mix(in srgb, var(--danger) 9%, transparent);
}

.priority-toggle, .tool-row button, .tool-row select, .voice-actions button, .icon-btn {
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.priority-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  box-sizing: border-box;
  padding: 0 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.priority-toggle.active {
  background: var(--high-bg);
  border-color: var(--high-border);
  color: var(--high);
}

.priority-mark {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 500;
}

.add-btn, .icon-btn {
  height: 30px;
  border-radius: 6px;
  flex-shrink: 0;
}

.add-btn {
  width: 30px;
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

.icon-btn {
  min-width: 42px;
  padding: 0 8px;
  font-size: 0.75rem;
}

.voice-btn.listening {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--text);
  animation: phloem-record-ring 1.15s ease-out infinite;
}

.voice-btn.listening .record-dot,
.inline-sub-voice.listening .record-dot {
  animation: phloem-record-dot 1.15s ease-out infinite;
}
.voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

@keyframes phloem-record-ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 48%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes phloem-record-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.72; }
}
.record-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9362b;
  box-shadow: 0 0 0 2px rgba(217, 54, 43, 0.12);
  flex-shrink: 0;
}

.tool-row {
  justify-content: flex-end;
  margin-bottom: 1rem;
  position: relative;
}

.search-input {
  min-width: 320px;
  max-width: 480px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 5px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  outline: none;
  margin-right: auto;
}

.tool-row button, .voice-actions button {
  padding: 5px 8px;
  font-size: 0.75rem;
}

.import-menu {
  position: absolute;
  right: 92px;
  top: 32px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 148px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.08);
}

.import-menu button {
  text-align: left;
  width: 100%;
}

.voice-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.voice-panel[hidden] {
  display: none;
}


.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg) 62%, rgba(0, 0, 0, 0.28));
}

.welcome-overlay[hidden] {
  display: none;
}

.welcome-panel {
  width: min(520px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 45px rgba(26, 25, 22, 0.22);
  padding: 1rem;
}

.welcome-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.welcome-panel h2 {
  font-size: 1.15rem;
  margin: 0;
  letter-spacing: 0;
}

.welcome-intro {
  margin: 0.75rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.welcome-list {
  display: grid;
  gap: 0.55rem;
}

.welcome-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.welcome-list strong {
  color: var(--text);
}

.welcome-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.welcome-actions button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.45rem 0.8rem;
}

.welcome-actions button.secondary {
  background: transparent;
  color: var(--text);
}

.notification-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg) 62%, rgba(0, 0, 0, 0.28));
}

.notification-overlay[hidden] {
  display: none;
}

.notification-panel {
  width: min(460px, 100%);
  max-height: min(78vh, 620px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 45px rgba(26, 25, 22, 0.22);
  padding: 1rem;
}

.notification-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.55fr);
  gap: 8px;
  margin: 0.9rem 0;
}

.notification-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notification-field select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 0 9px;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
}

.notification-field select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

.notification-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-actions button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0 12px;
  font-family: 'DM Mono', monospace;
  cursor: pointer;
}

.notification-actions .secondary {
  background: transparent;
  color: var(--text);
}

.notification-actions button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.notification-result {
  min-height: 1.15rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.35;
}

.notification-result.online {
  color: var(--accent);
}

.notification-result.offline {
  color: var(--danger);
}

.notification-note {
  margin: -0.15rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.history-overlay {
  position: fixed;
  inset: 0;
  z-index: 41;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg) 62%, rgba(0, 0, 0, 0.28));
}

.history-overlay[hidden] {
  display: none;
}

.history-panel {
  width: min(820px, 100%);
  max-height: min(84vh, 780px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 45px rgba(26, 25, 22, 0.22);
  padding: 1rem;
}

.history-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: stretch;
  margin-bottom: 0.7rem;
}

.history-search {
  width: 100%;
}

.history-sort {
  min-width: 86px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 84%, var(--accent) 16%);
  color: var(--muted);
  padding: 0.35rem 0.55rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
}

.history-sort:hover {
  color: var(--text);
}

.history-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 0.55rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.history-tabs button {
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0.35rem 0.55rem;
}

.history-tabs button.active {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.history-list {
  display: grid;
  gap: 7px;
}

.history-task {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
  padding: 0.55rem;
}

.history-body {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.history-title.deleted {
  color: var(--muted);
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--soft);
}

.history-task button {
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
}

.history-task .history-delete {
  color: var(--high);
}

.quick-start-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg) 62%, rgba(0, 0, 0, 0.28));
}

.quick-start-overlay[hidden] {
  display: none;
}

.quick-start-panel {
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 45px rgba(26, 25, 22, 0.22);
  padding: 1rem;
}

.quick-start-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.quick-start-kicker {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--soft);
  margin-bottom: 0.25rem;
}

.quick-start-top h2 {
  margin: 0;
  font-size: 1.15rem;
}

.quick-start-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
}

.quick-start-intro {
  margin: 0 0 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-start-grid article {
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 7px;
  padding: 0.75rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
}

.quick-start-grid h3 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
}

.premium-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: 1px;
  white-space: nowrap;
}

.premium-tag.inline {
  margin: 0 2px;
}

.quick-start-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 760px) {
  body {
    padding: 0.85rem 0.75rem 1.25rem;
    overflow-x: hidden;
    position: relative;
  }
  input,
  textarea,
  select,
  button {
    max-width: 100%;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .app {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-x: clip;
  }
  .app.done-collapsed {
    display: block;
    max-width: 100%;
  }
  .done-show-toggle {
    grid-column: auto;
    grid-row: auto;
    justify-self: center;
    margin: 0.75rem auto 0;
  }
  .app-main,
  .app-done,
  .add-form,
  .task-list,
  .tool-row {
    max-width: 100%;
    min-width: 0;
  }
  .feedback-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 2px 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  line-height: 1;
  min-height: 18px;
  cursor: pointer;
}

.feedback-button:hover,
.feedback-button:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.status {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
  }
  header {
    margin-bottom: 0.85rem;
    align-items: flex-start;
  }
  .header-left {
    gap: 7px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  h1 {
    font-size: 1.18rem;
  }
  .theme-select-wrap {
    min-width: 0;
    min-height: 34px;
  }
  .theme-select-wrap::after {
    min-height: 34px;
  }
  .theme-select {
    min-height: 34px;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .auth-controls {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-left: 0;
  }
  .auth-controls input {
    flex: 1 1 145px;
    min-height: 34px;
  }
  .auth-controls button {
    min-height: 34px;
  }
  .menu-panel {
    top: 38px;
    left: 0;
    right: 0;
    min-width: 0;
  }
  .welcome-overlay {
    align-items: start;
    padding: 0.75rem;
  }
  .welcome-panel {
    max-height: calc(100vh - 1.5rem);
    overflow: auto;
    padding: 0.85rem;
  }
  .welcome-actions {
    justify-content: stretch;
  }
  .welcome-actions button {
    flex: 1;
  }
  .notification-overlay {
    align-items: start;
    padding: 0.75rem;
  }
  .notification-panel {
    max-height: calc(100vh - 1.5rem);
    padding: 0.85rem;
  }
  .notification-form {
    grid-template-columns: 1fr;
  }
  .notification-actions {
    justify-content: stretch;
  }
  .notification-actions button {
    flex: 1;
  }
  .history-overlay {
    place-items: start center;
    padding: 0.75rem;
  }
  .history-panel {
    max-height: calc(100vh - 1.5rem);
    padding: 0.85rem;
  }
  .history-controls {
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 6px;
  }
  .history-sort {
    min-width: 0;
    padding-inline: 0.35rem;
  }
  .history-task {
    align-items: flex-start;
  }
  .quick-start-overlay {
    align-items: start;
    padding: 0.75rem;
  }
  .quick-start-panel {
    max-height: calc(100vh - 1.5rem);
    padding: 0.85rem;
  }
  .quick-start-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .quick-start-grid article {
    padding: 0.65rem;
  }
  .workspace-tabs {
    gap: 5px;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 0 0 0.55rem;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .workspace-tabs::-webkit-scrollbar { display: none; }
  .workspace-tab {
    min-height: 34px;
    padding: 6px 10px;
  }
  .workspace-tools {
    display: none;
  }
  .workspace-tools.focus-tools {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    margin: -2px 0 10px;
  }
  .workspace-tools button {
    min-height: 30px;
    padding: 4px 6px;
  }
.add-form {
    padding: 0.85rem;
    margin-bottom: 0.75rem;
  }
  .add-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) 42px 54px 42px;
    gap: 7px;
  }
  .add-row #new-title {
    grid-column: 1 / -1;
    min-height: 34px;
  }
  .voice-btn {
    grid-column: 1;
    grid-row: 2;
  }
  .priority-toggle {
    grid-column: 2;
    grid-row: 2;
    gap: 0;
    padding: 0;
    font-size: 0;
  }
  .priority-toggle .priority-mark {
    width: 16px;
    height: 16px;
    font-size: 0.74rem;
  }
  .date-picker-wrap {
    grid-column: 3;
    grid-row: 2;
    width: 100%;
  }
  .add-btn {
    grid-column: 4;
    grid-row: 2;
  }
  .priority-toggle,
  .icon-btn,
  .date-picker-wrap,
  .mobile-date-btn,
  .add-btn {
    width: 100%;
    min-height: 38px;
    justify-content: center;
  }
  .add-btn {
    height: 38px;
  }
  .extras-row {
    align-items: stretch;
    flex-direction: row;
  }
  .new-sub-row {
    flex: 1;
    min-width: 0;
    align-items: stretch;
  }
  .new-sub-row .inline-sub-add {
    min-width: 54px;
  }
  .mobile-date-btn {
    display: flex;
    min-height: 36px;
  }
  .mobile-date-btn.has-date {
    font-size: 0.68rem;
    padding: 0 3px;
  }
  .tool-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 0.75rem;
    min-width: 0;
  }
  .search-input {
    flex: 1 0 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 34px;
    margin-right: 0;
  }
  .sort-control {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
    justify-content: flex-start;
    margin-right: 0;
    gap: 6px;
  }
  .subtask-view-control {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    gap: 2px;
  }
  .subtask-view-label {
    font-size: 0;
    margin-right: 1px;
  }
  .subtask-view-label::after {
    content: "Subs";
    font-size: 0.68rem;
  }
  .subtask-view-control button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 3px 5px;
    font-size: 0.64rem;
  }
  .sort-control select {
    min-height: 34px;
    min-width: 0;
    width: min(39vw, 118px);
  }
  .tool-row button { flex: 0 0 auto; }
  .import-menu {
    left: 0;
    right: auto;
    top: 36px;
  }
  .task {
    padding: 0.6rem 0.65rem;
  }
  .task-main {
    align-items: flex-start;
    gap: 8px;
    position: relative;
    min-height: 34px;
    padding-right: 42px;
  }
  .drag-handle {
    display: none;
  }
  .task-check {
    width: 22px;
    height: 22px;
    margin-top: 2px;
  }
  .task-title-row {
    flex-wrap: wrap;
    gap: 3px 7px;
  }
  .task-title-row .task-title {
    flex-basis: 100%;
  }
  .task-title-row .task-title-input {
    flex: 1 0 100%;
  }
  .task-more {
    display: block;
    width: 38px;
    height: 38px;
    margin-top: 0;
    position: absolute;
    top: -8px;
    right: 0;
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  .task-core-actions {
    display: none;
  }
  .task-actions {
    display: none;
    position: static;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    opacity: 1;
  }
  .task.actions-open .task-main {
    flex-wrap: wrap;
  }
  .task.actions-open .task-actions {
    display: flex;
  }
  .task-actions::-webkit-scrollbar { display: none; }
  .mobile-menu-actions {
    display: inline-flex;
    gap: 4px;
  }
  .task-btn {
    width: 28px;
    height: 32px;
    flex: 0 0 28px;
  }
  .task-bottom-btn {
    width: auto;
    min-width: 42px;
    flex-basis: 42px;
    padding: 0 5px;
    font-size: 0.6rem;
  }
  .task-subtask-menu-btn {
    display: none;
  }
  .inline-sub-row {
    align-items: stretch;
    margin-top: 3px;
  }
  .inline-sub-input {
    min-height: 22px;
    font-size: 16px;
  }
  .inline-sub-voice {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
  }
  .inline-sub-add {
    height: 22px;
    min-height: 22px;
    min-width: 42px;
    padding: 0 5px;
    font-size: 0.6rem;
  }
  .workspace-picker {
    height: 34px;
    max-width: 132px;
  }
  .quick-triage button {
    min-height: 32px;
    padding: 5px 9px;
  }
  .subtask {
    align-items: flex-start;
  }
  .sub-check {
    width: 22px;
    height: 22px;
  }
  .sub-check.checked::after {
    font-size: 11px;
    line-height: 20px;
  }
  .subtask-del,
  .done-restore {
    opacity: 1;
  }
  .app-done {
    margin-top: 1.75rem;
    padding-bottom: 1rem;
  }
  .done-task {
    padding: 8px 0;
  }
  .done-check {
    width: 18px;
    height: 18px;
  }
  .done-check::after {
    line-height: 18px;
  }
  .theme-select,
  .auth-controls input,
  .menu-panel input,
  .add-form input[type="text"],
  .sub-input,
  .inline-sub-input,
  .search-input,
  .sort-control select,
  .task-title-input,
  .subtask-text-input,
  .workspace-picker,
  input[type="date"],
  textarea {
    font-size: 16px;
  }
}


/* v249 workspace menu trigger contrast */
.workspace-tab.active .workspace-menu-trigger {
  border: 1px solid color-mix(in srgb, var(--accent-text) 38%, transparent);
  background: color-mix(in srgb, var(--accent-text) 22%, transparent);
  color: var(--accent-text);
  min-width: 30px;
}

.workspace-tab.active .workspace-menu-trigger:hover,
.workspace-tab.active.menu-open .workspace-menu-trigger {
  background: color-mix(in srgb, var(--accent-text) 34%, transparent);
  color: var(--accent-text);
}

/* v253 compact control polish */
.feedback-button {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
}

.add-form {
  margin-bottom: 0.95rem;
}

.add-form .extras-row {
  margin-top: 6px;
  padding-top: 6px;
  align-items: center;
}

.add-form .new-sub-row {
  height: 26px;
  align-items: center;
}

.add-form .sub-input {
  padding: 1px 0;
  line-height: 1.15;
}

.add-form .new-sub-row .inline-sub-add {
  height: 24px;
  min-height: 24px;
}

@media (max-width: 760px) {
  .add-form {
    margin-bottom: 0.95rem;
  }

  .add-form .extras-row {
    margin-top: 6px;
    padding-top: 6px;
    align-items: center;
  }

  .add-form .new-sub-row {
    height: 30px;
    align-items: center;
  }

  .add-form .new-sub-row .inline-sub-add {
    height: 28px;
    min-height: 28px;
  }

  .tool-row {
    gap: 8px;
  }

  .sort-control {
    flex: 0 0 auto;
    min-width: 174px;
    width: 174px;
    gap: 6px;
  }

  .sort-control select {
    min-width: 136px;
    width: 136px;
  }

  .subtask-view-control {
    margin-left: auto;
    justify-content: flex-end;
  }

  .subtask-view-control button {
    min-width: 52px;
  }

  .app.done-collapsed .done-show-toggle {
    width: 100%;
    min-height: 54px;
    margin: 16px 0 0;
    border-color: color-mix(in srgb, var(--accent) 72%, var(--border));
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
  }
}

/* v254 task/menu button polish */
.done-show-toggle,
.inline-sub-add {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 500;
}

.done-show-toggle:hover,
.inline-sub-add:hover {
  background: color-mix(in srgb, var(--accent) 84%, var(--text) 16%);
  color: var(--accent-text);
}

.task-actions {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--border));
  background: color-mix(in srgb, var(--surface) 92%, var(--bg) 8%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18), 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}

body.popover-open::before {
  background: color-mix(in srgb, var(--bg) 66%, rgba(0, 0, 0, 0.26));
}

.task-mobile-priority {
  display: none;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-weight: 800;
}

.task-mobile-priority.active {
  color: var(--high);
}

.menu-row button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-add {
  min-width: 78px;
  gap: 6px;
  border-color: color-mix(in srgb, var(--accent) 72%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
}

.workspace-add-plus {
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .task-main {
    padding-right: 82px;
  }

  .task-mobile-priority {
    display: block;
    width: 34px;
    height: 34px;
    position: absolute;
    top: -6px;
    right: 40px;
    font-size: 1rem;
  }

  .task-mobile-priority.active {
    border: 1px solid color-mix(in srgb, var(--high) 64%, var(--border));
    background: color-mix(in srgb, var(--high) 12%, transparent);
  }

  .workspace-add {
    min-width: 86px;
  }
}

/* v255 task/subtask visual weight tuning */
.task-check {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--border));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--surface) 82%, transparent), 0 0 0 2px color-mix(in srgb, var(--accent) 8%, transparent);
  cursor: pointer;
}

.task-check:hover,
.task-check:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--surface) 70%, transparent), 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.task.completing .task-check {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--surface) 82%, transparent), 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.sub-check {
  border-color: color-mix(in srgb, var(--border) 68%, transparent);
  background: color-mix(in srgb, var(--surface) 44%, transparent);
  opacity: 0.82;
}

.sub-check:hover,
.sub-check:focus-visible {
  opacity: 1;
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
}

.inline-sub-row .inline-sub-input,
.inline-sub-row .inline-sub-input::placeholder {
  color: color-mix(in srgb, var(--soft) 64%, transparent);
}

.inline-sub-row .inline-sub-input:focus,
.inline-sub-row .inline-sub-input:focus::placeholder {
  color: var(--muted);
}

/* v257 crisp task title and complete control hierarchy */
.task-title {
  font-weight: 600;
}

.task-check {
  border-radius: 6px;
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  .task-check {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task,
  .task-check {
    transition: none;
  }

  .task.completing {
    transform: none;
    filter: none;
  }
}
