/* ---------- Colors (light) ---------- */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --shade: #F2F2F2;
  --line: #D9D9D9;
  --text: #000000;
  --dim: #808080;
  --label: #1F4E79;
  --link: #2E75B6;
  --today: #E3EEF8;
  --accent-fill: #BDD7EE;
  --gray-border: #808080;
  --hol-bg: #F8E1E1;
  --hol-text: #5C0F0B;
  --hol-border: #C00000;
  --export-bg: #1F4E79;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .18);

  /* Calendar-specific tokens: re-theme the calendar from here. */
  --oc-bg: var(--bg);
  --oc-out: var(--shade);
  --oc-line: var(--line);
  --oc-ev-bg: var(--accent-fill);
  --oc-ev-border: var(--label);
  --oc-task-bg: var(--shade);
  --oc-task-border: var(--gray-border);
  --oc-hol-bg: var(--hol-bg);
  --oc-hol-text: var(--hol-text);
  --oc-hol-border: var(--hol-border);
  --oc-now: var(--hol-border);
}

/* ---------- Colors (dark) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --shade: #1A1A1A;
  --line: #3A3A3A;
  --text: #D0D0D0;
  --dim: #7F7F7F;
  --label: #A8E6BD;
  --link: #8FD6A8;
  --today: #0D1F14;
  --accent-fill: #173524;
  --gray-border: #7F7F7F;
  --hol-bg: #2A1418;
  --hol-text: #F2C4C4;
  --hol-border: #FF5C8A;
  --export-bg: #8FD6A8;
  --export-text: #0A0A0A;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --shade: #1A1A1A;
    --line: #3A3A3A;
    --text: #D0D0D0;
    --dim: #7F7F7F;
    --label: #A8E6BD;
    --link: #8FD6A8;
    --today: #0D1F14;
    --accent-fill: #173524;
    --gray-border: #7F7F7F;
    --hol-bg: #2A1418;
    --hol-text: #F2C4C4;
    --hol-border: #FF5C8A;
    --export-bg: #8FD6A8;
    --export-text: #0A0A0A;
    --shadow: 0 8px 28px rgba(0, 0, 0, .7);
  }
}

/* ---------- More themes (picked from the palette button in the header) ---------- */
/* Ivory: warm paper white, charcoal ink, muted navy */
:root[data-theme="ivory"] {
  color-scheme: light;
  --bg: #FBF9F4;
  --shade: #F3EFE6;
  --line: #E4DED1;
  --text: #2B2A28;
  --dim: #8C877D;
  --label: #34506E;
  --link: #4A6A8C;
  --today: #F0EADB;
  --accent-fill: #DCE3EA;
  --gray-border: #A39C8E;
  --hol-bg: #F6E4E0;
  --hol-text: #6E2A22;
  --hol-border: #B5543F;
  --export-bg: #34506E;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(40, 32, 20, .14);
}
/* Mist: soft cool gray, quiet slate blue */
:root[data-theme="mist"] {
  color-scheme: light;
  --bg: #F6F7F9;
  --shade: #ECEEF2;
  --line: #DCE0E6;
  --text: #2A2E35;
  --dim: #858C98;
  --label: #4A6283;
  --link: #5B7496;
  --today: #E6EBF2;
  --accent-fill: #D5DEEA;
  --gray-border: #9AA1AC;
  --hol-bg: #F4E3E6;
  --hol-text: #6A2533;
  --hol-border: #B84A62;
  --export-bg: #4A6283;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(30, 40, 60, .14);
}
/* Champagne: warm linen with soft gold */
:root[data-theme="champagne"] {
  color-scheme: light;
  --bg: #FAF7F2;
  --shade: #F1ECE3;
  --line: #E3DBCD;
  --text: #2E2A25;
  --dim: #8E867A;
  --label: #8A6D3B;
  --link: #9C7C47;
  --today: #F2E9D8;
  --accent-fill: #EADFC9;
  --gray-border: #A89F90;
  --hol-bg: #F5E3DF;
  --hol-text: #6B2B24;
  --hol-border: #B0573F;
  --export-bg: #8A6D3B;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(40, 32, 20, .14);
}
:root[data-theme="slate"] {
  color-scheme: dark;
  --bg: #1E232B;
  --shade: #2A3039;
  --line: #3B434F;
  --text: #D8DEE6;
  --dim: #8792A2;
  --label: #8FB8E8;
  --link: #7AA7D9;
  --today: #26303D;
  --accent-fill: #2F4461;
  --gray-border: #8792A2;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #3D6FB0;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Red: Slate's look in red */
:root[data-theme="slatered"] {
  color-scheme: dark;
  --bg: #2C1E1E;
  --shade: #392A2A;
  --line: #4E3B3B;
  --text: #E5D9D9;
  --dim: #A08888;
  --label: #E69494;
  --link: #D57B7B;
  --today: #3D2626;
  --accent-fill: #602E2E;
  --gray-border: #A08888;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #A63A3A;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Orange: Slate's look in orange */
:root[data-theme="slateorange"] {
  color-scheme: dark;
  --bg: #2C241E;
  --shade: #39302A;
  --line: #4E433B;
  --text: #E5DED9;
  --dim: #A09288;
  --label: #E6B494;
  --link: #D59F7B;
  --today: #3D2F26;
  --accent-fill: #60422E;
  --gray-border: #A09288;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #A6653A;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Gold: Slate's look in gold */
:root[data-theme="slategold"] {
  color-scheme: dark;
  --bg: #2C281E;
  --shade: #39352A;
  --line: #4E493B;
  --text: #E5E2D9;
  --dim: #A09988;
  --label: #E6D094;
  --link: #D5BD7B;
  --today: #3D3726;
  --accent-fill: #60532E;
  --gray-border: #A09988;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #8E7329;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Lime: Slate's look in lime */
:root[data-theme="slatelime"] {
  color-scheme: dark;
  --bg: #272C1E;
  --shade: #34392A;
  --line: #484E3B;
  --text: #E1E5D9;
  --dim: #98A088;
  --label: #CAE694;
  --link: #B7D57B;
  --today: #363D26;
  --accent-fill: #50602E;
  --gray-border: #98A088;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #617E25;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Green: Slate's look in green */
:root[data-theme="slategreen"] {
  color-scheme: dark;
  --bg: #1E2C22;
  --shade: #2A392E;
  --line: #3B4E40;
  --text: #D9E5DC;
  --dim: #88A08E;
  --label: #94E6A8;
  --link: #7BD592;
  --today: #263D2C;
  --accent-fill: #2E603B;
  --gray-border: #88A08E;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #27863F;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Teal: Slate's look in teal */
:root[data-theme="slateteal"] {
  color-scheme: dark;
  --bg: #1E2C2A;
  --shade: #2A3937;
  --line: #3B4E4C;
  --text: #D9E5E4;
  --dim: #88A09D;
  --label: #94E6DB;
  --link: #7BD5C9;
  --today: #263D3A;
  --accent-fill: #2E605A;
  --gray-border: #88A09D;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #268276;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Sky: Slate's look in sky */
:root[data-theme="slatesky"] {
  color-scheme: dark;
  --bg: #1E282C;
  --shade: #2A3539;
  --line: #3B4A4E;
  --text: #D9E2E5;
  --dim: #889AA0;
  --label: #94D1E6;
  --link: #7BBFD5;
  --today: #26373D;
  --accent-fill: #2E5460;
  --gray-border: #889AA0;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #2D7F9A;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Indigo: Slate's look in indigo */
:root[data-theme="slateindigo"] {
  color-scheme: dark;
  --bg: #1E1E2C;
  --shade: #2A2A39;
  --line: #3B3B4E;
  --text: #D9D9E5;
  --dim: #8888A0;
  --label: #9494E6;
  --link: #7B7BD5;
  --today: #26263D;
  --accent-fill: #2E2E60;
  --gray-border: #8888A0;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #3A3AA6;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Violet: Slate's look in violet */
:root[data-theme="slateviolet"] {
  color-scheme: dark;
  --bg: #251E2C;
  --shade: #312A39;
  --line: #443B4E;
  --text: #DFD9E5;
  --dim: #9388A0;
  --label: #BA94E6;
  --link: #A57BD5;
  --today: #31263D;
  --accent-fill: #462E60;
  --gray-border: #9388A0;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #6D3AA6;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Slate Rose: Slate's look in rose */
:root[data-theme="slaterose"] {
  color-scheme: dark;
  --bg: #2C1E25;
  --shade: #392A32;
  --line: #4E3B45;
  --text: #E5D9DF;
  --dim: #A08894;
  --label: #E694BD;
  --link: #D57BA8;
  --today: #3D2632;
  --accent-fill: #602E47;
  --gray-border: #A08894;
  --hol-bg: #3A2228;
  --hol-text: #F4C6CE;
  --hol-border: #F06A85;
  --export-bg: #A63A70;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Graphite: charcoal with champagne gold */
:root[data-theme="graphite"] {
  color-scheme: dark;
  --bg: #1C1C1E;
  --shade: #26262A;
  --line: #37373C;
  --text: #E4E1DB;
  --dim: #8D8A85;
  --label: #D4B982;
  --link: #C9AD74;
  --today: #2A2824;
  --accent-fill: #3A3326;
  --gray-border: #8D8A85;
  --hol-bg: #3A2225;
  --hol-text: #F2C9C9;
  --hol-border: #E0707A;
  --export-bg: #B89A5E;
  --export-text: #141414;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Navy: deep ink blue with warm gold */
:root[data-theme="navy"] {
  color-scheme: dark;
  --bg: #131A2A;
  --shade: #1B2438;
  --line: #2A3550;
  --text: #DDE2EC;
  --dim: #8490A8;
  --label: #D6BD8C;
  --link: #C8AE7B;
  --today: #1C2740;
  --accent-fill: #2C3654;
  --gray-border: #8490A8;
  --hol-bg: #35202A;
  --hol-text: #F2C6D0;
  --hol-border: #E8708C;
  --export-bg: #B89A63;
  --export-text: #10141F;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Espresso: dark roast brown with soft copper */
:root[data-theme="espresso"] {
  color-scheme: dark;
  --bg: #1F1B19;
  --shade: #2A2522;
  --line: #3B3431;
  --text: #E8E0D8;
  --dim: #958A80;
  --label: #D8A47F;
  --link: #C99673;
  --today: #2E2723;
  --accent-fill: #43332A;
  --gray-border: #958A80;
  --hol-bg: #3A2020;
  --hol-text: #F2C6C0;
  --hol-border: #E07466;
  --export-bg: #B7805C;
  --export-text: #161210;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Pine: deep evergreen with sage */
:root[data-theme="pine"] {
  color-scheme: dark;
  --bg: #18211D;
  --shade: #212C27;
  --line: #313F38;
  --text: #DCE6DF;
  --dim: #86978D;
  --label: #A9CDB4;
  --link: #97BEA3;
  --today: #1F2C26;
  --accent-fill: #2B4135;
  --gray-border: #86978D;
  --hol-bg: #35201F;
  --hol-text: #F0C8C4;
  --hol-border: #E0766B;
  --export-bg: #6E9A7E;
  --export-text: #0F1512;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}
/* Plum: dark aubergine with dusty mauve */
:root[data-theme="plum"] {
  color-scheme: dark;
  --bg: #1F1A24;
  --shade: #29222F;
  --line: #3A3142;
  --text: #E6DEEA;
  --dim: #958A9E;
  --label: #C9A7D0;
  --link: #B996C1;
  --today: #2A2231;
  --accent-fill: #3D2E47;
  --gray-border: #958A9E;
  --hol-bg: #3A1F2A;
  --hol-text: #F4C6D6;
  --hol-border: #E86E98;
  --export-bg: #9A76A6;
  --export-text: #141017;
  --shadow: 0 8px 28px rgba(0, 0, 0, .7);
}

/* ---------- Font: Myriad Pro Light SemiCond ----------
   Myriad Pro is Adobe's paid font, so it can't be downloaded for every visitor.
   These faces use it when it is installed on the computer (it comes with Adobe apps);
   otherwise the page falls back to Open Sans Light, semi-condensed, which looks close. */
@font-face { font-family: "Cal Myriad"; font-weight: 100 450; src: local("Myriad Pro Light SemiCond"), local("MyriadPro-LightSemiCn"), local("Myriad Pro Light SemiCondensed"), local("MyriadPro-LightSemiCond"); }
@font-face { font-family: "Cal Myriad"; font-weight: 451 900; src: local("Myriad Pro Semibold SemiCond"), local("MyriadPro-SemiboldSemiCn"), local("Myriad Pro Semibold SemiCondensed"), local("MyriadPro-SemiboldSemiCond"); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font, "Cal Myriad", "Myriad Pro", "Open Sans", system-ui, sans-serif);
  font-stretch: 87.5%;   /* semi-condensed */
  font-weight: var(--font-w, 300);      /* light */
  font-size: 13pt;
  overflow-x: hidden;
}
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
.phone-only { display: none !important; }
.note { color: var(--dim); padding: 0 19px; }
[hidden] { display: none !important; }

/* ---------- App shell: header, sidebar, main, side panel, rail (like Google Calendar) ---------- */
.app {
  --hdr: 72px; --side: 283px; --panel: 283px; --rail: 28px;
  display: grid; height: 100vh; height: 100dvh;
  grid-template-columns: calc(var(--side) + var(--side-x, 0px)) minmax(0, 1fr) 0 var(--rail);
  grid-template-rows: var(--hdr) minmax(0, 1fr);
  grid-template-areas: "hdr hdr hdr hdr" "side main panel rail";
}
.app.no-side { grid-template-columns: 0 minmax(0, 1fr) 0 var(--rail); }
.app.tasks-open { grid-template-columns: calc(var(--side) + var(--side-x, 0px)) minmax(0, 1fr) calc(var(--panel) + var(--panel-x, 0px)) var(--rail); }
.app.no-side.tasks-open { grid-template-columns: 0 minmax(0, 1fr) calc(var(--panel) + var(--panel-x, 0px)) var(--rail); }
.app.no-side .side, .app:not(.tasks-open) .panel { visibility: hidden; }

/* ---------- Header ---------- */
.hdr {
  grid-area: hdr; display: flex; align-items: center; gap: 5px;
  padding: 0 14px 0 10px; border-bottom: 1px solid var(--line); min-width: 0;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 48px; height: 48px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--dim);
}
.icon-btn svg { width: 29px; height: 29px; fill: currentColor; }
.icon-btn:hover { background: var(--shade); color: var(--text); }
.logo { display: flex; align-items: center; gap: 10px; margin: 0 26px 0 6px; }
.logo-icon {
  position: relative; display: inline-flex; flex-direction: column; width: 38px; height: 40px;
  border: 2px solid var(--label); border-radius: 6px; overflow: hidden;
}
.logo-top { height: 9px; background: var(--label); }
.logo-num { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12pt; color: var(--label); }
.logo-text { white-space: nowrap; font-size: 20pt; font-weight: 300; color: var(--label); }
.btn-pill {
  border: 1px solid var(--line); background: var(--shade); border-radius: 7px;
  padding: 4px 16px; font-size: 13pt; cursor: pointer;
}
.btn-pill:hover { border-color: var(--label); }
#todayBtn { margin-right: 10px; }
.hdr-title { margin: 0 0 0 10px; font-size: 20pt; font-weight: 300; color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.search { display: flex; align-items: center; }
.search input {
  font: inherit; color: var(--text); background: var(--shade); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 14px; width: 260px;
}
.search input:focus { outline: none; border-color: var(--label); background: var(--bg); }
.btn-drop { display: inline-flex; align-items: center; gap: 4px; padding-right: 12px; margin-left: 8px; }
.btn-drop svg { width: 24px; height: 24px; fill: currentColor; }
.hdr .gsync { margin-left: 10px; }
/* Day / Week / Month ... as tabs */
.view-tabs { display: flex; margin-left: 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.view-tabs button {
  background: var(--shade); border: 0; border-left: 1px solid var(--line); padding: 5px 12px;
  font-size: 11.5pt; color: var(--text); cursor: pointer; white-space: nowrap;
}
.view-tabs button:first-child { border-left: 0; }
.view-tabs button:hover { color: var(--label); }
.view-tabs button[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); font-weight: 600; }

/* Drop-down menus (view picker, Create) */
.menu-wrap { position: relative; }
.menu {
  position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; min-width: 190px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  padding: 8px 0; display: flex; flex-direction: column;
}
.menu button {
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  background: none; border: 0; text-align: left; padding: 10px 19px; cursor: pointer; font-size: 13pt;
}
.menu button:hover, .menu button:focus-visible { background: var(--shade); }
.menu button[aria-checked="true"] { background: var(--accent-fill); font-weight: 600; }
.menu kbd { font: inherit; font-size: 11pt; color: var(--dim); }

.theme-menu button { padding: 7px 16px; }
.theme-sw { width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); flex: 0 0 auto; }

/* ---------- Sidebar ---------- */
.side { grid-area: side; overflow-y: auto; overflow-x: hidden; padding: 10px 4px 20px 6px; min-width: 0; font-size: 10.5pt; }
.create-wrap { display: inline-block; margin: 4px 0 10px 4px; }
.create-wrap .menu { left: 0; right: auto; }
.create {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 12px 7px 10px; border-radius: 7px; border: 1px solid var(--export-bg);
  background: var(--export-bg); color: var(--export-text); font-size: 12pt; font-weight: 600;
}
.create:hover { filter: brightness(1.12); }
.create-plus { width: 22px; height: 22px; fill: currentColor; }
.create-caret { width: 18px; height: 18px; fill: currentColor; }
.create-row { display: flex; align-items: center; gap: 8px; margin: 4px 4px 10px; }
.create-row .create-wrap { margin: 0; flex: 0 0 auto; }
.create-row { gap: 4px; flex-wrap: wrap; }
.create-row .speak-row { gap: 3px; }
.create-row .create { padding: 6px 4px 6px 7px; gap: 3px; font-size: 11.5pt; }
.create-row .create-plus { width: 19px; height: 19px; }
.create-row .create-caret { width: 15px; height: 15px; }
.create-row .speak-row .speak { padding: 2px 4px 2px 2px; gap: 2px; }
.speak-row { display: flex; gap: 4px; margin: 0; }
.speak-row .speak { flex: 0 0 auto; justify-content: center; font-size: 10.5pt; padding: 2px 6px 2px 4px; white-space: nowrap; }
.speak-row .speak svg { width: 16px; height: 16px; flex: 0 0 auto; }
.speak, .mic-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px 4px 8px; }
.speak svg, .mic-pill svg { width: 22px; height: 22px; fill: currentColor; }

/* Mini month */
.mini { padding: 2px 2px 6px 2px; }
.mini-jump { display: flex; gap: 4px; margin: 0 2px 4px; }
.mini-jump select {
  flex: 1 1 0; min-width: 0; font-size: 10pt; padding: 2px 4px; cursor: pointer;
  background: var(--shade); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
}
.mini-jump select:hover, .mini-jump select:focus { border-color: var(--label); outline: none; }
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; }
.mini-title { font-size: 10pt; font-weight: 600; padding-left: 4px; white-space: nowrap; }
.mini-head > span:last-child { display: flex; flex: 0 0 auto; }
.mini-head .icon-btn { width: 24px; height: 24px; padding: 0; }
.mini-head .icon-btn svg { width: 18px; height: 18px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.mini-dow { font-size: 8pt; color: var(--dim); font-weight: 600; height: 16px; line-height: 16px; }
.mini-day {
  width: 22px; height: 20px; margin: 0 auto; border: 0; border-radius: 10px; background: none;
  font-size: 10.5pt; line-height: 20px; cursor: pointer; padding: 0;
}
.mini-day:hover { background: var(--shade); }
.mini-day.out { color: var(--dim); }
.mini-day.in-range { background: var(--today); }
.mini-day.sel { background: var(--accent-fill); font-weight: 700; }
.mini-day.today { background: var(--export-bg); color: var(--export-text); font-weight: 700; }

/* Calendar lists */
.side-sec { margin-top: 6px; }
.side-head {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  background: none; border: 0; border-radius: 7px; padding: 4px 6px; cursor: pointer; font-size: 12pt;
  letter-spacing: .01em; color: var(--dim);
}
.side-head:hover { background: var(--shade); }
.side-head svg { width: 20px; height: 20px; fill: var(--dim); transition: transform .15s; }
.side-head[aria-expanded="false"] svg { transform: rotate(180deg); }
.cal-list { display: grid; }
.cal-item {
  display: flex; align-items: center; gap: 8px; padding: 2px 6px; border-radius: 7px; cursor: pointer; font-size: 10.5pt;
}
.cal-item:hover { background: var(--shade); }
.cal-item input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--sw); }
.export-list.tab-row { margin: 2px 6px 4px; }
.export-list.tab-row { display: grid; grid-template-columns: 1fr 1fr; }
.export-list.tab-row button { border-left: 0; }
.export-list.tab-row button:nth-child(even) { border-left: 1px solid var(--line); }
.export-list.tab-row button:nth-child(n+3) { border-top: 1px solid var(--line); }
.export-list.tab-row[hidden] { display: none; }

/* ---------- Main calendar area ---------- */
.main {
  grid-area: main; min-width: 0; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; padding: 8px 12px 12px 4px;
}
.app.no-side .main { padding-left: 14px; }
/* The calendar sits in a card with rounded corners, as in the original design. */
#view {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto;
  border: 1px solid var(--oc-line); border-radius: 12px; background: var(--oc-bg);
}

/* ---------- Month view (original look, a little bigger) ---------- */
.m-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.m-head, .m-week { display: grid; grid-template-columns: 34px repeat(7, minmax(0, 1fr)); }
.m-week { flex: 1 0 auto; min-height: 120px; }
.m-week:last-child .m-day, .m-week:last-child .m-wk { border-bottom: 0; }
.m-head div {
  font-size: 11pt; letter-spacing: .03em; color: var(--label);
  padding: 6px 10px; border-left: 1px solid var(--oc-line); border-bottom: 1px solid var(--oc-line);
}
.m-head div:first-child { border-left: 0; }
.m-head div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-head .is-today { font-weight: 700; }
.m-wk {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--oc-line); line-height: 1.15;
}
.m-wk span { white-space: nowrap; font-size: 8.5pt; color: var(--dim); }
.m-day {
  padding: 5px 7px 7px; min-width: 0;
  border-left: 1px solid var(--oc-line); border-bottom: 1px solid var(--oc-line);
  cursor: pointer;
}
.m-day.out { background: var(--oc-out); }
.m-day.out .m-num { color: var(--dim); }
.m-day.today { background: var(--today); box-shadow: inset 0 0 0 1px var(--label); }
.m-num {
  display: inline-block; margin: 1px 4px 4px; font-size: 12.5pt;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.m-num:hover { text-decoration: underline; }
.m-num.strong { font-weight: 700; }
.m-dow { display: none; }
.m-more {
  display: block; width: 100%; margin-top: 4px; padding: 1px 7px;
  background: var(--oc-out); border: 1px solid var(--oc-line); border-radius: 5px;
  font-size: 11pt; cursor: pointer; text-align: left;
}
.m-more:hover { border-color: var(--label); }
.m-day:not(.expanded) .ev.extra { display: none; }

/* ---------- Week / day / 4-day view (original look, a little bigger) ---------- */
.t-wrap { --hour: 62px; --cols: 7; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.t-head, .t-allday, .t-body {
  display: grid; grid-template-columns: 70px repeat(var(--cols), minmax(0, 1fr));
}
.t-head div {
  padding: 6px 10px; font-size: 11pt; letter-spacing: .03em; color: var(--label);
  border-left: 1px solid var(--oc-line); border-bottom: 1px solid var(--oc-line);
}
.t-head div:first-child { border-left: 0; }
.t-head .t-date { display: block; font-size: 18pt; font-weight: 300; letter-spacing: 0; color: var(--text); }
.t-head .is-today, .t-head .is-today .t-date { color: var(--label); font-weight: 700; }
.t-head button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: inherit; }
.t-allday > div {
  min-height: 32px; padding: 0 5px 4px; min-width: 0;
  border-left: 1px solid var(--oc-line); border-bottom: 1px solid var(--oc-line);
}
.t-allday > div:first-child {
  border-left: 0; font-size: 8.5pt; color: var(--dim); padding: 7px 5px 0; text-align: right;
}
.t-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.t-gutter > div {
  height: var(--hour); font-size: 8.5pt; color: var(--dim);
  text-align: right; padding-right: 7px; transform: translateY(-.6em);
}
.t-gutter > div:first-child { visibility: hidden; }
.t-col {
  position: relative; height: calc(var(--hour) * 24);
  border-left: 1px solid var(--oc-line);
  background-image: repeating-linear-gradient(to bottom, var(--oc-line) 0 1px, transparent 1px var(--hour));
  cursor: pointer;
}
.t-col.today { background-color: var(--today); }
.t-wrap.single .t-col.today { background-color: transparent; }
.t-ev {
  position: absolute; margin: 0; padding: 2px 6px;
  white-space: normal; overflow: hidden; font-size: var(--tev-fs, 10pt); line-height: 1.25;
  box-shadow: 0 0 0 1px var(--oc-bg);
}
.t-ev .ev-time { display: block; margin: 0; }
.t-ev.short { white-space: nowrap; text-overflow: ellipsis; }
.t-ev.short .ev-time { display: inline; margin-right: 5px; }
.t-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--oc-now); pointer-events: none; z-index: 2; }
.t-now::before {
  content: ""; position: absolute; left: -6px; top: -5px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--oc-now);
}

/* ---------- Year view ---------- */
.y-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 34px 29px; padding: 24px 29px;
}
.y-month h3 { margin: 0 0 8px 8px; font-size: 15pt; font-weight: 300; color: var(--label); }
.y-month .mini-dow { font-size: 10pt; height: 29px; line-height: 29px; }
.y-month .mini-day { width: 31px; height: 31px; font-size: 10.5pt; }
.y-month .mini-day.has { font-weight: 700; color: var(--label); }
.y-month .mini-day.today { color: var(--export-text); }

/* ---------- Schedule view ---------- */
.s-list { padding: 10px 0 24px; }
.s-day { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0 10px; padding: 8px 19px; border-bottom: 1px solid var(--oc-line); }
.s-date { display: flex; align-items: center; gap: 10px; align-self: start; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.s-num { display: inline-flex; align-items: center; justify-content: center; width: 41px; height: 41px; border-radius: 50%; font-size: 17pt; }
.s-date:hover .s-num { background: var(--shade); }
.s-dow { font-size: 10.5pt; font-weight: 600; letter-spacing: .01em; color: var(--dim); }
.s-day.today .s-num { background: var(--export-bg); color: var(--export-text); }
.s-day.today .s-dow { color: var(--label); }
.s-events { display: grid; gap: 2px; padding-top: 4px; }
.s-row {
  display: grid; grid-template-columns: 22px 190px minmax(0, 1fr); align-items: center;
  background: none; border: 0; border-radius: 8px; padding: 6px 8px; text-align: left; cursor: pointer;
}
.s-row:hover { background: var(--shade); }
.s-row.holiday { cursor: default; }
.s-row.holiday:hover { background: none; }
.s-dot { width: 12px; height: 12px; border-radius: 50%; }
.s-time { color: var(--text); }
.s-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-empty { padding: 29px; color: var(--dim); }

/* ---------- To-do side panel ---------- */
.panel {
  grid-area: panel; min-width: 0; overflow-y: auto; overflow-x: hidden;
  border-left: 1px solid var(--line); display: flex; flex-direction: column;
}
/* The panel scrolls as a whole; its parts never squeeze (a long list used to
   flatten the To do / Archive / Trash tabs to a thin line). */
.panel > * { flex-shrink: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 2px 10px; }
.panel-title { margin: 0; font-size: 12pt; letter-spacing: -.02em; font-weight: 300; color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* To do / Archive / Trash as tabs */
/* To do / Archive / Trash as tabs, the same look as Day / Week / Month */
.todo-tabs, .tab-row { display: flex; margin: 2px 8px 6px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.todo-tabs button, .tab-row button {
  flex: 1 1 0; min-width: 0; background: var(--shade); border: 0; border-left: 1px solid var(--line);
  padding: 3px 4px; font-size: 10.5pt; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.todo-tabs button:first-child, .tab-row button:first-child { border-left: 0; }
.todo-tabs button:hover, .tab-row button:hover { color: var(--label); }
.todo-tabs button[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); font-weight: 600; }
.todo-tabs .count { color: inherit; font-weight: 300; }
.rail {
  grid-area: rail; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 14px; border-left: 1px solid var(--line);
}
.rail-btn {
  width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 0; background: none; cursor: pointer; color: var(--dim);
  display: inline-flex; align-items: center; justify-content: center;
}
.rail-btn svg { width: 11px; height: 11px; fill: currentColor; }
.rail-btn:hover { background: var(--shade); }
.rail-btn[aria-pressed="true"] { background: var(--accent-fill); color: var(--label); }
/* ---------- Buttons ---------- */
.btn {
  background: var(--shade);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px 14px;
  font-size: 13pt;
  cursor: pointer;
}
.btn:hover { border-color: var(--label); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { border-color: var(--line); }
.btn-arrow { font-size: 15.5pt; padding: 2px 12px; line-height: 1.1; }
.btn-primary { background: var(--export-bg); color: var(--export-text); border-color: var(--export-bg); }
.btn-danger { color: var(--hol-border); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

/* ---------- Event bars (shared) ---------- */
.ev {
  display: block; width: 100%; text-align: left;
  border: 0; border-left: 3px solid; border-radius: 5px;
  padding: 2px 8px; margin-top: 3px;
  font-size: var(--ev-fs, 11.5pt); line-height: 1.3; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.ev:hover { filter: brightness(1.12); }
.ev-event { background: var(--oc-ev-bg); border-color: var(--oc-ev-border); }
.ev-task { background: var(--oc-task-bg); border-color: var(--oc-task-border); }
.ev-holiday { background: var(--oc-hol-bg); border-color: var(--oc-hol-border); color: var(--oc-hol-text); cursor: default; }
.ev-holiday:hover { filter: none; text-decoration: none; }
.ev-time { color: var(--dim); margin-right: 5px; }
.ev-holiday .ev-time { color: inherit; }

/* ---------- Editor dialog ---------- */
.modal {
  border: 1px solid var(--line); border-radius: 14px; padding: 0;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow);
  width: min(528px, calc(100vw - 32px));
}
.modal::backdrop { background: rgba(0, 0, 0, .35); }
.modal form { padding: 19px 22px; }
.modal h3 { margin: 0 0 12px; font-weight: 300; font-size: 19pt; color: var(--label); }
.field { display: flex; flex-direction: column; gap: 3px; margin: 0 0 12px; flex: 1; min-width: 0; border: 0; padding: 0; }
.field > span, .field legend { font-size: 12pt; color: var(--dim); padding: 0; }
.field input[type="text"], .field input[type="date"], .field input[type="time"], .field textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--label); outline: none; }
.field-row { display: flex; gap: 14px; align-items: flex-end; }
.field.check { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 7px; padding-bottom: 8px; }
.radio { display: inline-flex; align-items: center; gap: 7px; margin-right: 19px; cursor: pointer; }
.dot { width: 14px; height: 14px; border-radius: 3px; border-left: 3px solid; }
.dot-event { background: var(--oc-ev-bg); border-color: var(--oc-ev-border); }
.dot-task { background: var(--oc-task-bg); border-color: var(--oc-task-border); }
.form-error { color: var(--hol-border); min-height: 1em; margin: 0 0 7px; font-size: 12pt; }
.modal-actions { display: flex; gap: 10px; align-items: center; }
.modal-actions .spacer { flex: 1; }
.phone-only { display: none !important; }
.modal-actions .btn { padding: 5px 17px; }


/* ---------- Plus and microphone buttons ---------- */
.btn-plus .plus { font-weight: 700; font-size: 15.5pt; line-height: 1; margin-right: 2px; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; padding: 2px 10px; }
.btn-icon svg { width: 22px; height: 22px; fill: currentColor; }
.btn-mic { color: var(--label); }
.btn-mic.listening {
  background: var(--hol-border); border-color: var(--hol-border); color: #FFFFFF;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192, 0, 0, .45); } 50% { box-shadow: 0 0 0 7px rgba(192, 0, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .btn-mic.listening { animation: none; } }
.form-error.info { color: var(--label); }

/* ---------- To-do list ---------- */
.todo-add { display: flex; gap: 10px; padding: 12px 17px; border-bottom: 1px solid var(--oc-line); }
.todo-add[hidden] { display: none; }
.todo-add input {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; min-width: 0;
}
.todo-add input:focus { border-color: var(--label); outline: none; }
#todoText { flex: 1; }
#todoDue { flex: 0 0 auto; color: var(--dim); }
.todo-msg { margin: 0; padding: 0 17px; font-size: 12pt; color: var(--label); min-height: 0; }
.todo-msg:not(:empty) { padding: 7px 17px; border-bottom: 1px solid var(--oc-line); }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 17px;
}
.todo-item:hover { background: var(--oc-out); }
.todo-item input[type="checkbox"] { width: 19px; height: 19px; margin: 0; accent-color: var(--label); flex: 0 0 auto; cursor: pointer; }
.todo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--dim); }
.todo-edit {
  flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--label); border-radius: 5px; padding: 1px 7px;
}
.todo-due {
  flex: 0 0 auto; font-size: 12pt; padding: 0 10px; border-radius: 6px; border: 1px solid var(--oc-task-border);
  background: var(--oc-task-bg);
}
.todo-due.today { background: var(--oc-ev-bg); border-color: var(--oc-ev-border); }
.todo-due.overdue { background: var(--oc-hol-bg); border-color: var(--oc-hol-border); color: var(--oc-hol-text); }
.todo-acts { display: flex; gap: 2px; flex: 0 0 auto; }
.todo-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid transparent; border-radius: 7px;
  background: none; color: var(--text); opacity: .6; cursor: pointer;
}
.todo-act:hover { opacity: 1; }
.todo-act svg { width: 24px; height: 24px; fill: currentColor; }
.todo-act:hover { color: var(--label); border-color: var(--line); background: var(--bg); }
/* The trash icon is solid white on dark themes (dark text on light ones), not dimmed gray. */
.todo-act.todo-act-trash { color: light-dark(var(--text), #FFFFFF); opacity: 1; }
.todo-act.todo-act-trash:hover, .todo-act.danger:hover { color: var(--hol-border); }
.todo-empty { padding: 17px; color: var(--dim); }
.todo-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 17px; }
.todo-foot[hidden] { display: none; }


/* ---------- Google Calendar connection ---------- */
.gsync { display: flex; align-items: center; gap: 7px; }
.g-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 17px; white-space: nowrap; }
.g-btn svg { width: 22px; height: 22px; }
.g-btn.btn-primary { background: var(--export-bg); color: var(--export-text); border-color: var(--export-bg); }
.gsync .g-status { color: var(--dim); }
.g-off { font-size: 12pt; color: var(--dim); }
.g-cal-list { display: grid; gap: 2px; margin-bottom: 14px; max-height: 50vh; overflow-y: auto; }
.g-cal-list .radio { align-items: center; gap: 8px; margin: 0; padding: 4px 0; }
.g-cal-dot { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }

/* ---------- Custom event colors, repeat marker ---------- */
.ev.ev-color { background: var(--c); border-color: var(--ce); color: #1E1E1E; }
.ev.ev-color .ev-time, .ev.ev-color .ev-rep { color: #3A3A3A; }
.ev.ev-color.ev-ink { color: #FFFFFF; }
.ev.ev-color.ev-ink .ev-time, .ev.ev-color.ev-ink .ev-rep { color: rgba(255, 255, 255, .85); }
.ev-rep { margin-right: 5px; color: var(--dim); }
.ev-cont { border-left-style: dashed; }

/* ---------- Full event editor ---------- */
.modal-wide { width: min(864px, calc(100vw - 24px)); }
.modal select, .modal input[type="number"], .modal input[type="date"], .modal input[type="time"],
.modal input[type="email"], .modal input[type="url"], .modal input[type="text"], .modal textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; min-width: 0;
}
.modal select:focus, .modal input:focus, .modal textarea:focus { border-color: var(--label); outline: none; }
.ed-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.modal input.ed-title {
  flex: 1; font-size: 21.5pt; font-weight: 300; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 5px 2px;
}
.modal input.ed-title:focus { border-bottom: 2px solid var(--label); }
.icon-x {
  background: none; border: 0; font-size: 26px; line-height: 1; color: var(--dim);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
}
.icon-x:hover { background: var(--shade); color: var(--text); }
.ed-kind { margin-bottom: 14px; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.ed-when .to { color: var(--dim); }
.is-allday .t-only { display: none; }
.ed-sub { margin-top: -2px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.tz { color: var(--dim); font-size: 12pt; }
.ed-custom { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--oc-out); }
.ed-custom[hidden] { display: none; }
.modal .num { width: 77px; }
.ed-days[hidden] { display: none; }
.day-tog {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); cursor: pointer; font-size: 12pt;
}
.day-tog[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); border-color: var(--export-bg); }
.ed-ends { display: grid; gap: 7px; }
.ed-ends .radio { margin: 0; }
.ed-grid { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px 10px; align-items: start; margin-top: 7px; }
.ed-grid > input, .ed-grid > textarea { width: 100%; }
.ed-icon { display: flex; justify-content: center; padding-top: 7px; }
.ed-icon svg { width: 24px; height: 24px; fill: var(--dim); }
.guest-add { display: flex; gap: 7px; }
.guest-add input { flex: 1; }
.chips { list-style: none; margin: 7px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.chips:empty { display: none; }
.chip-guest {
  display: inline-flex; align-items: center; gap: 7px; padding: 1px 5px 1px 2px;
  border: 1px solid var(--line); border-radius: 1199px; font-size: 12pt;
}
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%; background: var(--label); color: var(--bg);
  font-size: 11pt; font-weight: 700;
}
.chip-x {
  background: none; border: 0; cursor: pointer; color: var(--dim); font-size: 19px; line-height: 1;
  width: 29px; height: 29px; border-radius: 50%;
}
.chip-x:hover { background: var(--shade); color: var(--text); }
.rem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rem-list:empty { display: none; }
.rem-row { display: flex; align-items: center; gap: 7px; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--link); cursor: pointer; font-size: 13pt; }
.link-btn:hover { text-decoration: underline; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 5px; }
.swatch {
  width: 29px; height: 29px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
}
.swatch-default { background: linear-gradient(135deg, var(--oc-ev-bg) 50%, var(--oc-task-bg) 50%); }
.swatch[aria-checked="true"] { border-color: var(--bg); box-shadow: 0 0 0 2px var(--text); }
.radio.block { display: flex; margin: 0 0 10px; }

/* ---------- Event details card ---------- */
#details { width: min(552px, calc(100vw - 24px)); }
.dt-top { display: flex; justify-content: flex-end; gap: 2px; padding: 10px 10px 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 41px; height: 41px; border: 0; border-radius: 50%; background: none; cursor: pointer;
}
.icon-btn svg { width: 24px; height: 24px; fill: var(--dim); }
.icon-btn:hover { background: var(--shade); }
.icon-btn:hover svg { fill: var(--text); }
#dtBody { padding: 0 22px 19px; display: grid; gap: 14px; }
.dt-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; }
.dt-row a:not(.btn) { color: var(--link); }
.dt-row .btn { display: inline-block; justify-self: start; text-decoration: none; margin-top: 5px; padding: 5px 17px; }
.dt-row a.btn:not(.btn-primary) { color: var(--text); }
.dt-row > div > .btn { display: inline-block; }
.dt-title h3 { margin: 0; font-size: 21.5pt; font-weight: 300; color: var(--text); overflow-wrap: anywhere; }
.dt-when { margin-top: 2px; }
.dt-sub { color: var(--dim); font-size: 12pt; }
.dt-dot { display: block; width: 19px; height: 19px; border-radius: 5px; margin-top: 5px; }
.dt-dot-event { background: var(--oc-ev-border); }
.dt-dot-task { background: var(--oc-task-border); }
.dt-guests { list-style: none; margin: 5px 0; padding: 0; display: grid; gap: 5px; }
.dt-guests li { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.dt-notes { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 19px; bottom: 19px; z-index: 20; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 17px;
  background: var(--text); color: var(--bg); border-radius: 10px; padding: 12px 17px; box-shadow: var(--shadow);
}
.toast[hidden] { display: none; }
.toast-btn { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; }


/* ---------- To-do list inside the side panel ---------- */
.panel .todo-add { flex-direction: column; gap: 6px; padding: 4px 10px 8px; border-bottom: 0; font-size: 10.5pt; }
.panel .todo-add input { padding: 3px 8px; }
.panel .todo-add .btn { font-size: 10.5pt; }
.panel .todo-add-row #todoText { flex: 1; }
.panel .todo-add-row .btn-mic { flex: 0 0 auto; padding: 2px 7px; }
.panel .todo-add-row .btn-mic svg { width: 17px; height: 17px; }
.todo-add-row { display: flex; gap: 8px; }
.todo-add-row #todoDue { flex: 1; }
.panel .todo-item { padding: 0 4px 0 10px; gap: 6px; font-size: var(--todo-fs, 11.5pt); line-height: 1.2; }
.panel .todo-due { font-size: 8.5pt; padding: 0 5px; line-height: 1.3; }
.panel .todo-act { width: 20px; height: 20px; padding: 0; border: 0; }
.panel .todo-act svg { flex: 0 0 auto; }
.panel .todo-act svg { width: 15px; height: 15px; }
.panel .todo-item input[type="checkbox"] { width: 14px; height: 14px; }
.todo-item.active-row .todo-text, .todo-text[tabindex] { cursor: text; }
.todo-text[tabindex]:hover { text-decoration: underline dotted; }
.todo-due.editable { cursor: pointer; }
.todo-edit-date { flex: 0 0 auto; width: 128px; font-size: 9.5pt; }
.todo-group {
  --tab: var(--dim);
  position: relative; list-style: none; margin: 10px 8px 14px; padding: 0 0 4px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
/* Each section's header is a solid colored tab with white text */
.todo-group-urgent { --tab: #1F3A68; }
.todo-group-now { --tab: #6F6F6F; }
.todo-group-later { --tab: #5A8CC8; }
.todo-group-list { list-style: none; margin: 0; padding: 0; }
.todo-section {
  border-radius: 9px 9px 0 0; color: #fff !important;
  background: var(--tab) !important; border-bottom-color: var(--tab) !important;
  padding: 6px 10px 4px; font-size: 12pt; font-weight: 600;
  letter-spacing: .01em; color: var(--dim);
  background: var(--shade); border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.todo-section-urgent { color: var(--hol-border); }
.todo-section-now { color: var(--label); }
.todo-none { padding: 2px 12px 4px; font-size: 9.5pt; color: var(--dim); font-style: italic; }
.panel .todo-group .todo-item { padding-left: 8px; }
.todo-act.on { opacity: 1; }
.todo-act.on-urgent { color: var(--label); }
.todo-act.on-later { color: var(--label); }
.panel .todo-empty { padding: 10px; font-size: 10.5pt; }
.panel .todo-msg:not(:empty) { padding: 4px 10px; font-size: 10pt; border-bottom: 0; }
.panel .todo-foot { padding: 6px 10px; }
.panel .todo-foot .btn { font-size: 10pt; }

/* ---------- Add to-dos from a photo ---------- */
.btn-photo { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 2px 8px; }
.btn-photo svg { width: 17px; height: 17px; fill: var(--label); }
.btn-photo.busy { opacity: .7; cursor: progress; }
#photoDlg { width: min(560px, calc(100vw - 24px)); }
.ph-note { margin: 0 0 12px; color: var(--dim); font-size: 11.5pt; }
.ph-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.ph-row { display: flex; align-items: center; gap: 8px; }
.ph-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--label); }
.ph-row input[type="text"] { flex: 1; min-width: 0; }
.ph-row input[type="date"] { flex: 0 0 auto; width: 172px; }
.ph-row.off input[type="text"] { color: var(--dim); text-decoration: line-through; }
.ph-empty { color: var(--dim); }

/* ---------- Phones and narrow windows ---------- */
@media (max-width: 1750px) {
  .logo-text { display: none; }
  .logo { margin-right: 10px; }
}
.todo-add-row #todoDue { min-width: 0; font-size: 10pt; padding: 3px 4px; }
@media (max-width: 1100px) {
  .app { --side: 264px; --panel: 264px; }
  .logo-text { display: none; }
  .logo { margin-right: 10px; }
  .search input { width: 180px; }
}
@media (max-width: 760px) {
  body { font-size: 12pt; }
  /* The page scrolls normally: header, calendar, then the to-do list. */
  .app, .app.no-side, .app.tasks-open, .app.no-side.tasks-open {
    display: block; height: auto;
  }
  .hdr {
    position: sticky; top: 0; z-index: 10; background: var(--bg);
    flex-wrap: wrap; gap: 2px; padding: 6px 8px; height: auto;
  }
  .logo, #helpBtn { display: none; }
  .phone-only { display: inline-flex !important; }
  .mic-pill { padding: 4px 12px 4px 8px; order: 9; }
  .mic-pill svg { width: 19px; height: 19px; }
  .hdr-title { order: 10; flex-basis: 100%; margin: 2px 0 4px 8px; font-size: 17pt; }
  .btn-pill { padding: 5px 14px; font-size: 12pt; }
  #todayBtn { margin-right: 0; }
  .icon-btn { width: 42px; height: 42px; }
  .icon-btn svg { width: 25px; height: 25px; }
  .search input { width: 140px; }
  .hdr .gsync { margin-left: 0; order: 11; flex-basis: 100%; padding: 0 0 4px 8px; }
  .view-tabs { order: 10; margin: 2px 0 4px 8px; max-width: calc(100% - 16px); overflow-x: auto; }
  .view-tabs button { padding: 4px 9px; font-size: 10.5pt; }
  /* Sidebar slides in over the page from the left. */
  .side {
    position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(320px, 86vw);
    background: var(--bg); box-shadow: var(--shadow); visibility: visible;
  }
  .app.no-side .side { display: none; }
  .main, .app.no-side .main { overflow: visible; padding: 8px 8px 0; }
  #view { overflow: visible; }
  .panel, .app:not(.tasks-open) .panel { visibility: visible; border-left: 0; border-top: 1px solid var(--line); margin-top: 16px; overflow: visible; }
  #todoClose, .rail { display: none; }

  /* Month view becomes a list of days that have something on them. */
  .m-head { display: none; }
  .m-week { display: block; min-height: 0; }
  .m-wk { display: none; }
  .m-day { min-height: 0; border-left: 0; }
  .m-day.out, .m-day.empty { display: none; }
  .m-day.today { display: block; }
  .m-dow { display: inline; color: var(--label); font-size: 11pt; margin-right: 6px; }

  .t-wrap { --hour: 50px; }
  .t-head div { padding: 5px 2px; font-size: 9pt; text-align: center; }
  .t-head .t-date { font-size: 14pt; }
  .t-head button { text-align: center; width: 100%; }
  .t-gutter > div { font-size: 8pt; padding-right: 4px; }
  .t-head, .t-allday, .t-body { grid-template-columns: 44px repeat(var(--cols), minmax(0, 1fr)); }
  .t-ev, .t-allday .ev { font-size: 9pt; padding: 1px 3px; border-left-width: 2px; }
  .t-scroll { max-height: 70vh; flex: none; }
  .y-grid { padding: 14px 16px; gap: 22px; }
  .s-day { grid-template-columns: 1fr; padding: 8px 12px; }
  .s-row { grid-template-columns: 18px 110px minmax(0, 1fr); }

  .todo-item { padding: 6px 12px; gap: 10px; }
  .ed-when input[type="date"] { flex: 1 1 156px; }
  .modal form { padding: 17px; }
  .todo-act { width: 41px; height: 41px; }
  .ph-row { flex-wrap: wrap; }
  .ph-row input[type="text"] { flex-basis: calc(100% - 30px); }
  .ph-row input[type="date"] { margin-left: 26px; }
}

/* Place suggestions under the event location field */
.loc-wrap { position: relative; min-width: 0; }
.loc-wrap > input { width: 100%; box-sizing: border-box; }
.loc-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: 2px 0 0; padding: 4px 0; list-style: none;
  background: var(--bg); color: inherit; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); max-height: 240px; overflow-y: auto; }
.loc-list li { padding: 5px 10px; cursor: pointer; line-height: 1.25; }
.loc-list li.active, .loc-list li:hover { background: var(--shade); }
.loc-main { display: block; font-weight: 600; }
.loc-rest { display: block; font-size: .85em; opacity: .7; }

/* Long to-dos wrap onto more lines in their own column, so no line runs
   under the icons. The date sits at the end of the words. */
.todo-item { display: flex; align-items: flex-start; }
.todo-item input[type="checkbox"] { margin: 2px 0 0; }
.todo-body { flex: 1; min-width: 0; }
.todo-text { display: inline; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.todo-body .todo-due { display: inline-block; vertical-align: 1px; white-space: nowrap; }
.todo-item .todo-acts { align-self: flex-start; }
.todo-edit { width: 100%; box-sizing: border-box; }

/* Day buttons in the top right of each day: new event, new to-do, open day */
.m-day, .t-head > div { position: relative; }
.day-tools { position: absolute; top: 3px; right: 3px; display: flex; gap: 1px; opacity: .7; }
.m-day:hover .day-tools, .t-head > div:hover .day-tools, .day-tools:focus-within { opacity: 1; }
.day-tool { width: 20px; height: 20px; padding: 2px; border: 0; border-radius: 4px; background: none; cursor: pointer; display: grid; place-items: center; }
.day-tool svg { width: 15px; height: 15px; fill: var(--dim); }
.day-tool:hover { background: var(--oc-out); }
.day-tool:hover svg { fill: var(--label); }
.m-day.out .day-tool:hover { background: var(--oc-bg); }
@media (max-width: 760px) { .day-tools { display: none; } }
.day-tool.listening { opacity: 1; background: #D93025; }
.day-tool.listening svg { fill: #fff; }
.day-tools:has(.listening) { opacity: 1; }


/* To-dos on the calendar */
.ev-todo .ev-check { margin-right: 5px; }
.ev-todo.done { text-decoration: line-through; color: var(--dim); }
.ev-todo.urgent { border-color: var(--hol-border); }
@keyframes todo-flash { from { background: var(--accent-fill); } to { background: transparent; } }
.todo-item.flash { animation: todo-flash 1.6s ease-out; }

/* Hover labels (tips.js): dark bubble with rounded corners */
.tip-bubble {
  position: fixed; z-index: 1000; max-width: 280px; padding: 5px 10px; border-radius: 8px;
  background: rgba(32, 33, 36, .94); color: #fff; font-size: 9.5pt; line-height: 1.35;
  white-space: pre-line; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.week-start { white-space: nowrap; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin: 4px 2px 6px; font-size: 9pt; color: var(--dim); }
.week-start select { font: inherit; font-size: 9pt; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 4px; }

/* Event / Task switch at the top of the event form */
.ed-kind.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ed-kind.seg button {
  font: inherit; font-size: 11pt; padding: 4px 16px; border: 0; background: var(--bg); color: var(--text); cursor: pointer;
}
.ed-kind.seg button + button { border-left: 1px solid var(--line); }
.ed-kind.seg button:hover { background: var(--shade); }
.ed-kind.seg button[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); font-weight: 600; }

/* Events that last several days: one bar across the days */
.m-week, .t-allday { position: relative; }
.m-week { --gut: 34px; }
.t-allday { --gut: 70px; }
.span-space { flex: none; }
.ev.span-bar {
  position: absolute; z-index: 2; margin: 0; height: var(--bar-h, 24px); box-sizing: border-box;
}
.ev.span-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-style: dashed; }
.ev.span-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
/* Stretch handles on the ends of a bar */
.ev:not(.t-ev):not(.span-bar) { position: relative; }
.ev-grip { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; z-index: 1; }
.ev-grip-l { left: 0; }
.ev-grip-r { right: 0; }
/* On hover, a short bar on each end shows where to grab. */
.ev-grip::after { content: ''; position: absolute; top: 25%; bottom: 25%; width: 3px; border-radius: 2px; background: currentColor; opacity: 0; }
.ev-grip-l::after { left: 2px; }
.ev-grip-r::after { right: 2px; }
.ev:hover .ev-grip::after { opacity: .45; }
.ev-grip:hover::after { opacity: .8; }
.ev-grip-b { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 8px; cursor: ns-resize; }
.ev-grip-b::after { top: auto; bottom: 2px; left: 50%; width: 22px; height: 3px; margin-left: -11px; }
body.is-lengthening, body.is-lengthening * { cursor: ns-resize !important; user-select: none; }
.drag-sel { background: var(--accent-fill) !important; }
body.is-stretching, body.is-stretching * { cursor: ew-resize !important; user-select: none; }
@media (max-width: 760px) { .t-allday { --gut: 44px; } .ev-grip { display: none; } }
/* Dragging events to another day or time */
.ev:not(.ev-holiday) { cursor: grab; }
.ev.ev-moving { opacity: .75; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); z-index: 5; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
body.is-dragging .ev.span-bar:not(.ev-moving), body.is-stretching .ev.span-bar { pointer-events: none; }

/* Right-click menu on events and to-dos: same look as the Settings window */
.ctx-menu { position: fixed; z-index: 1001; min-width: 200px; max-width: 320px; padding: 6px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ctx-menu .ctx-title { font-size: 14pt; font-weight: 300; color: var(--label); padding: 6px 12px 8px; margin: 0 -6px 4px; border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 18px; padding-right: 18px; }
.ctx-menu .ctx-item { font: inherit; font-size: 12pt; text-align: left; color: var(--text); background: none; border: 0;
  border-radius: 8px; padding: 5px 12px; line-height: 1.25; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-menu .ctx-item:hover { background: var(--shade); }
.ctx-menu .ctx-danger { color: light-dark(#B3261E, #FF8A80); }
.ctx-menu .ctx-head { font-size: 11pt; font-weight: 600; color: var(--label); padding: 6px 12px 4px; }
.ctx-menu .ctx-item:focus-visible { outline: none; background: var(--shade); box-shadow: inset 0 0 0 1px var(--line); }

/* Keyboard picking: the chosen day and the chosen event or to-do */
.kb-day { outline: 2px solid var(--label); outline-offset: -2px; }
.ev.kb-sel { outline: 2px solid var(--text, #111); outline-offset: 1px; z-index: 5; }

/* Background slideshow: bg.js sets --scene-light and --scene-dark on #view;
   dark themes use the lighter drawings. */
#view { --scene: var(--scene-light, none); }
:root[data-theme="dark"] #view, :root[data-theme="slate"] #view, :root[data-theme="graphite"] #view, :root[data-theme="navy"] #view,
:root[data-theme="espresso"] #view, :root[data-theme="pine"] #view, :root[data-theme="plum"] #view,
:root[data-theme="slatered"] #view, :root[data-theme="slateorange"] #view, :root[data-theme="slategold"] #view, :root[data-theme="slatelime"] #view, :root[data-theme="slategreen"] #view, :root[data-theme="slateteal"] #view, :root[data-theme="slatesky"] #view, :root[data-theme="slateindigo"] #view, :root[data-theme="slateviolet"] #view, :root[data-theme="slaterose"] #view { --scene: var(--scene-dark, none); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) #view { --scene: var(--scene-dark, none); } }
#view { background: linear-gradient(color-mix(in srgb, var(--oc-bg) var(--wash, 0%), transparent), color-mix(in srgb, var(--oc-bg) var(--wash, 0%), transparent)),
  var(--scene, none) center bottom / 100% 60% no-repeat, var(--oc-bg); transition: background-image var(--fade, .8s) ease-in-out; }
/* The same two layers by name, so themes with their own background (glass)
   still get the Fade wash and full-size photos. */
#view {
  --wash-layer: linear-gradient(color-mix(in srgb, var(--oc-bg) var(--wash, 0%), transparent), color-mix(in srgb, var(--oc-bg) var(--wash, 0%), transparent));
  --scene-layer: var(--scene, none) center bottom / 100% 60% no-repeat;
}
#view.bg-photo {
  --wash-layer: linear-gradient(color-mix(in srgb, var(--oc-bg) var(--wash, 72%), transparent), color-mix(in srgb, var(--oc-bg) var(--wash, 72%), transparent));
  --scene-layer: var(--scene-light, none) center / cover no-repeat;
}
@media (prefers-reduced-motion: reduce) { #view { transition: none; } }
/* Let the background show through the shaded days and today's column. */
.m-day.out { background: color-mix(in srgb, var(--oc-out) 55%, transparent); }
.m-day.today { background: color-mix(in srgb, var(--today) 70%, transparent); }
.t-col.today { background-color: color-mix(in srgb, var(--today) 70%, transparent); }

/* Holidays get a red circle in the small calendar */
.mini-day.hol { box-shadow: inset 0 0 0 1.5px var(--label); color: var(--label); font-weight: 600; }
.mini-day.hol.today { color: var(--export-text); }
.mini-day.hol.out { box-shadow: none; }

/* Stock market holidays */
.ev.ev-market { background: color-mix(in srgb, var(--mkt-border) 14%, transparent); border-color: var(--mkt-border); color: var(--text); }

/* No week-number column: the days get all the width */
.m-head, .m-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.m-wk, .m-head > div:first-child { display: none; }
.m-head > div:nth-child(2), .m-week > .m-day:nth-child(2) { border-left: 0; }
.m-week { --gut: 0px; }

/* Shopping list (left column, under the calendars) */
.shop .side-head .shop-count { margin: 0 auto 0 5px; letter-spacing: 0; text-transform: none; }
.shop-add { display: flex; gap: 4px; padding: 2px 6px 3px; }
.shop-add input { flex: 1; min-width: 0; font: inherit; font-size: 10pt; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.shop-mic { flex: 0 0 auto; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.shop-mic svg { width: 14px; height: 14px; fill: currentColor; }
.shop-list { list-style: none; margin: 0; padding: 0 6px; }
.shop-item { display: flex; align-items: flex-start; gap: 6px; padding: 1px 0; font-size: 10.5pt; line-height: 1.25; }
.shop-item input { width: 14px; height: 14px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--label); cursor: pointer; }
.shop-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shop-item.got .shop-text { text-decoration: line-through; color: var(--dim); }
.shop-x { flex: 0 0 auto; border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 12pt; line-height: 1; padding: 0 2px; visibility: hidden; }
.shop-item:hover .shop-x, .shop-x:focus-visible { visibility: visible; }
.shop-x:hover { color: var(--text); }
.shop-foot { padding: 0 6px 4px; }
.shop-none { margin: 2px 0; font-size: 9.5pt; color: var(--dim); font-style: italic; }
.shop-clear { font-size: 9.5pt; padding: 2px 0; }
@media (hover: none) { .shop-x { visibility: visible; } }

/* Wider task list: the left column's room goes to the task list */
.panel-btns { display: inline-flex; align-items: center; }
.icon-wide { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.icon-wide svg { width: 20px; height: 20px; fill: currentColor; transition: transform .15s; }
.icon-wide[aria-pressed="true"] svg { transform: rotate(180deg); }
.app.tasks-wide { --panel: calc(283px + 283px); }
@media (max-width: 1100px) { .app.tasks-wide { --panel: calc(264px + 264px); } }
@media (max-width: 760px) { .icon-wide { display: none; } }

/* The shopping list sits at the very bottom of the left column, in its own card */
@media (min-width: 761px) {
  .side { display: flex; flex-direction: column; }
  .side > * { flex: 0 0 auto; }
  .side > .create-row { align-self: stretch; }
}
.side > :nth-last-child(2) { margin-bottom: 18px; }
.shop .shop-add input, .shop .shop-mic { background: var(--bg); }

/* Background slideshow settings (left column) */
.bg-box { padding: 0 0 4px; }
.bg-row { display: flex; align-items: center; gap: 4px; padding: 3px 6px; }
.bg-btn { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
  color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bg-btn:hover:not(:disabled) { background: var(--shade); }
.bg-btn svg { width: 14px; height: 14px; fill: currentColor; }
.bg-btn .bg-play { display: none; }
.bg-btn[aria-pressed="true"] .bg-play { display: block; }
.bg-btn[aria-pressed="true"] .bg-pause { display: none; }
.bg-now { flex: 1; min-width: 0; font-size: 9.5pt; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-sec > .side-head { text-align: left; white-space: nowrap; }
.bg-field { white-space: nowrap; display: flex; align-items: center; gap: 5px; padding: 2px 6px; font-size: 10pt; }
.bg-field input, .bg-field select { font: inherit; font-size: 10pt; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 4px; }
.bg-field input { width: 52px; }
.bg-field input[type=range] { width: 100px; padding: 0; border: 0; background: none; accent-color: var(--label); }
#bgWashVal { min-width: 3ch; }
.bg-sub { padding: 4px 6px 0; font-size: 12pt; letter-spacing: .01em; color: var(--dim); }
.bg-box.bg-off .bg-row, .bg-box.bg-off .bg-field, .bg-box.bg-off > .cal-item:nth-of-type(2) { opacity: .5; }
.bg-group { padding: 3px 6px 0; font-size: 9pt; font-weight: 600; color: var(--dim); }
.bg-btn:disabled { cursor: default; }

/* Shopping list: Amazon product under each item, picker, send button */
.shop-item { position: relative; flex-wrap: wrap; }
.shop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shop-body .shop-text { flex: none; }
.shop-prod { align-self: flex-start; max-width: 100%; border: 0; background: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; font-size: 8.5pt; line-height: 1.2; color: var(--dim); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-prod:hover { color: var(--text); text-decoration: underline; }
.shop-prod.guess { font-style: italic; }
.shop-prod.none { color: var(--label); opacity: .75; }
.shop-pick { flex: 0 0 100%; margin: 3px 0 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  display: grid; gap: 1px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.shop-pick-row { display: block; width: 100%; border: 0; background: none; text-align: left; font: inherit; font-size: 9pt;
  padding: 3px 5px; border-radius: 5px; color: var(--text); cursor: pointer; text-decoration: none; line-height: 1.25; }
.shop-pick-row:hover { background: var(--shade); }
.shop-pick-row.on { font-weight: 600; background: var(--accent-fill); }
.shop-pick-row.dim { color: var(--dim); }
.shop-pick-note { margin: 2px 5px; font-size: 9pt; color: var(--dim); }
.shop-pick-link input { width: 100%; box-sizing: border-box; font: inherit; font-size: 9pt; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; margin: 2px 0; }
.shop-send { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; text-align: center; text-decoration: none; margin: 4px 0 2px; padding: 3px 6px; font-size: 9.5pt;
  border-radius: 7px; background: var(--export-bg); color: var(--export-text); }
.shop-send:hover { filter: brightness(1.08); }
.shop-amz { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; font-size: 9pt; color: var(--dim); }
.shop-wf { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.shop-wf input { margin: 0; width: 12px; height: 12px; accent-color: var(--label); }
.shop-import { font-size: 9pt; padding: 2px 0; }

/* iPhone Month view: a real grid, pinch to zoom (app.js sets --mz from 1 to 3.5) */
@media (max-width: 760px) {
  .m-scroll { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--oc-line); border-radius: 10px; touch-action: pan-x pan-y; }
  .m-wrap.pz { --mz: 1; width: calc(100% * var(--mz)); font-size: calc(7.5pt * (0.75 + var(--mz) / 4)); }
  .m-wrap.pz .m-head { display: grid; }
  .m-wrap.pz .m-head div { font-size: 1em; padding: 3px 2px; text-align: center; letter-spacing: 0; text-overflow: clip; }
  .m-wrap.pz .m-week { display: grid; min-height: calc(78px * var(--mz)); }
  .m-wrap.pz .m-day, .m-wrap.pz .m-day.out, .m-wrap.pz .m-day.empty {
    display: block; min-height: calc(78px * var(--mz)); padding: 1px 1px 2px; border-left: 1px solid var(--oc-line);
  }
  .m-wrap.pz .m-week > .m-day:first-of-type { border-left: 0; }
  .m-wrap.pz .m-dow, .m-wrap.pz .day-tools { display: none; }
  .m-wrap.pz .m-num { font-size: 1.15em; margin: 1px 2px 1px; }
  .m-wrap.pz .ev { font-size: 1em; padding: 0 2px; margin-top: 1px; border-left-width: 2px; border-radius: 3px; line-height: 1.3; text-overflow: clip; }
  .m-wrap.pz .ev-time { margin-right: 2px; }
  .m-wrap.pz .m-more { font-size: .95em; padding: 0 2px; margin-top: 1px; }
  .m-wrap.pz.pz-big .ev { white-space: normal; overflow-wrap: anywhere; }
  .m-wrap.pz.pz-big .ev.extra { display: block; }
  .m-wrap.pz.pz-big .m-more { display: none; }
}

/* Drag the border between a side column and the calendar to widen the column
   (resize.js). The calendar is at its widest by default; this only shrinks it. */
.col-grip { grid-area: main; align-self: stretch; width: 10px; z-index: 6; cursor: col-resize; touch-action: none; position: relative; }
.col-grip-l { justify-self: start; margin-left: -5px; }
.col-grip-r { justify-self: end; margin-right: -5px; }
.col-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; border-radius: 1px; background: transparent; transition: background .15s; }
.col-grip:hover::after, .col-grip.dragging::after { background: var(--label); }
.app.no-side .col-grip-l, .app:not(.tasks-open) .col-grip-r { display: none; }
.app.col-resizing, .app.col-resizing * { cursor: col-resize !important; user-select: none; }
@media (max-width: 760px) { .col-grip { display: none; } }

/* Month view on a computer: the weeks share the height evenly and each day box
   keeps its size; what doesn't fit goes behind "N more" (app.js fitMonth). */
@media (min-width: 761px) {
  .m-wrap:not(.pz) .m-week { flex: 1 1 0; min-height: 110px; overflow: hidden; }
  .m-wrap:not(.pz) .m-day { overflow: hidden; min-height: 0; }
  .m-wrap:not(.pz) .ev.extra { display: none; }
}
.m-more { border: 0; background: none; padding: 1px 8px; margin-top: 2px; font-size: 10.5pt; font-weight: 600; color: var(--text); border-radius: 5px; }
.m-more:hover { background: var(--shade); border: 0; }
.m-more[hidden] { display: none; }

/* The day popup ("N more") */
.day-pop {
  position: fixed; z-index: 60; max-height: min(70vh, 520px); overflow: auto; box-sizing: border-box;
  padding: 10px 10px 12px; border-radius: 10px; background: var(--bg); color: var(--text);
  box-shadow: 0 6px 24px rgba(0,0,0,.22), 0 1px 3px rgba(0,0,0,.18); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
}
.day-pop-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 18pt; line-height: 1; color: var(--dim); cursor: pointer; padding: 2px 6px; border-radius: 50%; }
.day-pop-x:hover { background: var(--shade); color: var(--text); }
.day-pop-dow { font-size: 9pt; letter-spacing: .06em; color: var(--dim); margin-top: 2px; }
.day-pop-num { border: 0; background: none; font: inherit; font-size: 20pt; line-height: 1; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; color: var(--text); margin: 2px 0 8px; }
.day-pop-num:hover { background: var(--shade); }
.day-pop-num.today { background: var(--export-bg); color: var(--export-text); }
.day-pop-list { align-self: stretch; display: grid; gap: 0; }
.day-pop .ev { margin-top: 3px; }
.day-pop .ev-grip { display: none; }

/* ---------- Settings window (settings.js) ---------- */
.modal-settings { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); }
.modal-settings[open] { display: flex; flex-direction: column; }
.set-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px 22px; border-bottom: 1px solid var(--line); }
.set-head h3 { margin: 0; }
.set-body { overflow-y: auto; padding: 4px 22px 18px; }
.set-sec { padding: 10px 0 8px; border-bottom: 1px solid var(--oc-line); }
.set-sec:last-child { border-bottom: 0; }
.set-sec h4 { margin: 4px 0 8px; font-size: 12.5pt; font-weight: 600; color: var(--label); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; font-size: 12pt; }
.set-row > span:first-child { flex: 1 1 auto; min-width: 0; }
.set-row select { flex: 0 0 auto; max-width: 58%; }
.set-row input[type="text"] { flex: 0 1 58%; min-width: 0; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: inherit; font: inherit; }
.set-btns { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.set-row .btn { padding: 3px 12px; font-size: 11.5pt; }
.set-row input[type="color"] { width: 38px; height: 28px; padding: 0 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); cursor: pointer; }
.set-note { margin: 2px 0 4px; font-size: 10.5pt; color: var(--dim); }
.set-sec .cal-item input { accent-color: var(--label); }
.modal-settings .bg-box { font-size: 12pt; }

/* Show or hide (Settings) */
.hide-mini #mini, .hide-topMic #topMic, .hide-shop #shopBtn, .hide-shop #shopPanel, .hide-other .other-sec,
.hide-dayMics .day-tool-event, .hide-dayMics .day-tool-todo { display: none !important; }

/* Month view: hovering a day highlights the whole box and shows its full date */
.m-hover-date {
  display: none; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 96px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10pt; font-weight: 600; color: var(--label); pointer-events: none;
}
.m-hover-date .hd-short { display: none; }
@media (hover: hover) and (min-width: 761px) {
  :root:not(.hover-off) .m-wrap:not(.pz) .m-day:hover { background: color-mix(in srgb, var(--accent-fill) 70%, transparent); box-shadow: inset 0 0 0 1px var(--label); }
  .m-wrap:not(.pz) .m-day:hover .m-hover-date { display: block; }
  .hover-box .m-wrap .m-day:hover .m-hover-date { display: none; }
  .hover-off .m-wrap .m-day:hover .m-hover-date { display: none; }
}
/* The day number turns into the date (5/1/26) in white on the accent color, same size. */
.m-num .n-hover { display: none; }
@media (hover: hover) and (min-width: 761px) {
  :root:not(.hover-off) .m-wrap:not(.pz) .m-day:hover .m-num {
    color: #FFFFFF; background: color-mix(in srgb, var(--label) 55%, #000); border-radius: 5px;
    padding: 0 5px; margin-left: -1px; margin-right: -1px; text-decoration: none; position: relative; z-index: 3;
  }
  :root:not(.hover-off) .m-wrap:not(.pz) .m-day:hover .m-num .n-day { display: none; }
  :root:not(.hover-off) .m-wrap:not(.pz) .m-day:hover .m-num .n-hover { display: inline; }
}
/* Narrower boxes get a shorter full date in the middle, or none when there's no room. */
.m-hover-date { max-width: calc(100% - 150px); }
@container mday (max-width: 330px) { .m-hover-date .hd-long { display: none; } .m-hover-date .hd-short { display: inline; } }
@container mday (max-width: 230px) { .m-hover-date { visibility: hidden; } }
.m-wrap:not(.pz) .m-day { container: mday / inline-size; }

/* Past events are faded, as in Google Calendar (Settings can turn it off) */
:root:not(.past-same) .ev.past:not(:hover) { opacity: .5; }

/* Windows Spotlight photos fill the calendar, under a wash so events stay easy to read */
#view.bg-photo {
  background:
    linear-gradient(color-mix(in srgb, var(--oc-bg) var(--wash, 72%), transparent), color-mix(in srgb, var(--oc-bg) var(--wash, 72%), transparent)),
    var(--scene-light, none) center / cover no-repeat, var(--oc-bg);
}

/* Task list: three buttons instead of a typing bar (Say / + Add / Photo) */
.panel .todo-add.todo-add-btns { flex-direction: row; gap: 6px; padding: 4px 10px 8px; }
.todo-add-btns .add-act {
  border: 1px solid var(--line); border-radius: 7px; background: var(--shade); font-size: 10.5pt;
  flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 4px 6px; white-space: nowrap; overflow: hidden;
}
.todo-add-btns .add-act svg { width: 17px; height: 17px; flex: none; fill: currentColor; }
.todo-add-btns .btn-photo svg { fill: var(--label); }
.todo-add-btns .add-act:hover { border-color: var(--label); }
.todo-add-btns .btn-primary { background: var(--export-bg); color: var(--export-text); border-color: var(--export-bg); }
.todo-add-btns .btn-mic.listening { background: var(--hol-border); border-color: var(--hol-border); color: #FFFFFF; }
.todo-add-btns .add-act .plus { font-weight: 700; font-size: 14pt; line-height: 1; }

/* Shopping list: Clear ticked / Delete all */
.shop-btns { display: flex; gap: 6px; margin: 4px 0 2px; }
.shop-btns .btn { flex: 1 1 0; font-size: 9.5pt; padding: 2px 6px; white-space: nowrap; }
.shop-btns .shop-delall:hover { border-color: var(--hol-border); color: var(--hol-border); }

/* Drag a task section's colored header to reorder the sections (todo.js) */
.todo-section { display: flex; align-items: center; justify-content: space-between; cursor: grab; touch-action: none; user-select: none; }
.todo-group.sec-dragging { box-shadow: var(--shadow); position: relative; z-index: 2; }
.sec-sorting, .sec-sorting .todo-section { cursor: grabbing; }

/* Maps, Notes and Contacts share the right-hand column with the task list */
.app .panel.side-app { display: none; }
.app[data-panel="shop"] #shopPanel, .app[data-panel="maps"] #mapsPanel, .app[data-panel="notes"] #notesPanel, .app[data-panel="contacts"] #contactsPanel, .app[data-panel="calc"] #calcPanel { display: flex; }
.app[data-panel]:not([data-panel="todo"]) #todo { display: none; }
.rail .rail-btn { width: 26px; height: 26px; }
.rail .rail-btn svg { width: 15px; height: 15px; }
.app-search { display: flex; gap: 6px; margin: 2px 8px 6px; }
.app-search input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 11pt; padding: 3px 8px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--bg); color: var(--text); }
.app-search .btn { font-size: 11pt; padding: 2px 10px; }
.app-btns { display: flex; gap: 6px; padding: 0 8px 8px; }
.app-btns .btn { font-size: 11pt; padding: 3px 12px; display: inline-flex; align-items: center; gap: 5px; }
.map-frame { margin: 0 8px; height: 300px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--shade); flex: 0 0 auto; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-links { display: flex; gap: 6px; padding: 6px 8px 0; }
.map-links .btn { font-size: 10.5pt; padding: 2px 10px; text-decoration: none; color: var(--text); }
.app-sub { font-size: 12pt; font-weight: 600; color: var(--dim); margin: 12px 10px 4px; }
.app-empty { color: var(--dim); font-size: 10.5pt; padding: 10px; margin: 0; }
.app-list { list-style: none; margin: 0; padding: 0 8px 12px; }
.app-list li { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; margin-bottom: 5px; font-size: 11pt; }
.app-list .place { cursor: pointer; }
.app-list .place:hover { background: var(--shade); }
.app-list .place small, .contact-list small { display: block; color: var(--dim); font-size: 9.5pt; }
.note-list { list-style: none; margin: 0; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.note { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--oc-task-bg, var(--shade)); }
.note input, .note textarea { width: 100%; box-sizing: border-box; border: 0; background: none; color: var(--text); font: inherit; resize: none; }
.note input { font-size: 12pt; font-weight: 600; }
.note textarea { font-size: 11pt; min-height: 3.5em; field-sizing: content; }
.note input:focus, .note textarea:focus { outline: none; }
.note-foot, .contact-acts { display: flex; justify-content: flex-end; gap: 4px; }
.note-foot button, .contact-acts button { font: inherit; font-size: 9.5pt; border: 1px solid var(--line); background: var(--bg); color: var(--dim); border-radius: 6px; padding: 1px 8px; cursor: pointer; }
.contact-list .c-name { font-weight: 600; }
.contact-list a { color: var(--link); text-decoration: none; }
.contact-edit input { width: 100%; box-sizing: border-box; font: inherit; font-size: 10.5pt; margin: 2px 0; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
@media (max-width: 760px) { .app .panel.side-app:not(#shopPanel) { display: none !important; } .app #todo, :root:not(.hide-shop) .app #shopPanel { display: flex !important; }
  #shopPanel [data-close-panel] { display: none; } }

/* Month view weekday header: a soft accent band, names centered, today's name in a filled pill */
.m-head { background: linear-gradient(to bottom, color-mix(in srgb, var(--label) 12%, var(--oc-bg)), color-mix(in srgb, var(--label) 4%, var(--oc-bg)));
  border-radius: 11px 11px 0 0; }
.m-head div { text-align: center; padding: 7px 4px 6px; font-size: 11pt; font-weight: 600; letter-spacing: .02em;
  color: var(--label); border-left-color: color-mix(in srgb, var(--label) 14%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--label) 30%, transparent); }
.m-head div.is-wkend { color: color-mix(in srgb, var(--label) 70%, var(--oc-bg)); }
.m-head div span { display: inline-block; padding: 1px 2px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.m-head div.is-today span { padding: 1px 10px; background: var(--export-bg); color: var(--export-text); font-weight: 700; }
.m-wrap.pz .m-head div { font-size: 1em; padding: 3px 2px; }
.m-wrap.pz .m-head div span { padding: 0 4px; }
/* Slideshow picture list: a tiny preview beside each name */
#bgPics .cal-item { align-items: center; }
.bg-thumb { width: 52px; height: 32px; flex: 0 0 auto; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); background: #fff; }

/* Shopping list: its own panel on the right, opened from the cart icon */
#shopPanel { flex-direction: column; }
#shopPanel .shop-count { font-size: 10pt; color: var(--dim); font-weight: 400; margin-left: 4px; }
#shopBox { padding: 2px 4px 8px; overflow-y: auto; }
#shopPanel .shop-item { font-size: 11pt; }

/* Several Google calendars, and calendars added by link */
.g-def-tag { margin-left: auto; font-size: 8.5pt; color: var(--dim); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; white-space: nowrap; }
.g-more, .sub-add { justify-self: start; margin: 3px 6px 4px; font-size: 10pt; padding: 2px 10px; }
.g-cal-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.g-cal-show { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.g-cal-show span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-cal-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.g-cal-def { display: flex; align-items: center; gap: 4px; font-size: 10pt; color: var(--dim); white-space: nowrap; cursor: pointer; }
.sub-row { display: flex; align-items: center; }
.sub-row .cal-item { flex: 1; min-width: 0; }
.sub-row .cal-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-warn { color: #d93025; font-weight: 700; margin-left: auto; }
.sub-x { border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 13pt; line-height: 1; padding: 0 4px; visibility: hidden; }
.sub-row:hover .sub-x, .sub-x:focus-visible { visibility: visible; }
.sub-x:hover { color: var(--text); }
@media (hover: none) { .sub-x { visibility: visible; } }
.sub-field { display: block; font-size: 11pt; font-weight: 600; margin: 10px 0 3px; }
.modal input[type="url"] { width: 100%; box-sizing: border-box; }
.sub-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.sub-color[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.sub-err { color: #d93025; font-size: 10.5pt; min-height: 1.2em; margin: 8px 0 0; }
.ed-gcal { display: flex; align-items: center; gap: 8px; font-size: 11pt; margin: 6px 0; }
.ed-gcal[hidden] { display: none; }
.ed-gcal select { font: inherit; padding: 2px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); }

/* Blues, black and grays only (Jeff, 9/29/26): holidays, market days, the
   "now" line and overdue dates use theme shades instead of red and green.
   Red stays only for warnings (delete, errors). */
:root:root:root {
  --oc-hol-bg: color-mix(in srgb, var(--dim) 14%, var(--bg));
  --oc-hol-text: var(--text);
  --oc-hol-border: var(--dim);
  --oc-now: var(--label);
  --mkt-border: color-mix(in srgb, var(--label) 55%, var(--dim));
}
.ev-todo.urgent, .todo-section-urgent { border-color: var(--text); }

/* YouTube player at the bottom of the left column (youtube.js) */
.yt-sec { margin-top: 6px; }
.hide-youtube .yt-sec { display: none !important; }
.yt-add { display: flex; gap: 4px; padding: 2px 6px 4px; }
.yt-add input { flex: 1; min-width: 0; font: inherit; font-size: 10pt; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.yt-go { font-size: 10pt; padding: 1px 8px; }
.yt-err { margin: 0 6px 4px; font-size: 9.5pt; color: #d93025; }
.yt-player { margin: 0 6px 4px; }
.yt-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-btns { display: flex; gap: 4px; margin-top: 4px; }
.yt-btns .btn { flex: 1; font-size: 9.5pt; padding: 1px 6px; }
.yt-find { display: block; margin: 0 6px 4px; font-size: 9.5pt; padding: 1px 6px; text-align: center; text-decoration: none; color: var(--text); }
.yt-player.yt-big { position: fixed; left: 12px; bottom: 12px; width: min(480px, calc(100vw - 24px)); margin: 0; z-index: 60;
  padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow, 0 6px 24px rgba(0,0,0,.25)); }

/* Per-item Instacart search button (shop.js) */
.shop-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shop-ic { font-size: 8.5pt; padding: 0 6px; line-height: 1.5; text-decoration: none; color: var(--text); border-radius: 6px; }

/* Printed task list (Print button in the task list; todo.js printList) */
#printList { display: none; }
@media print {
  body > *:not(#printList) { display: none !important; }
  body { background: #fff !important; }
  #printList { display: block; color: #000; font-family: "Cal Myriad", "Myriad Pro", "Open Sans", sans-serif; font-weight: 300; font-size: 12pt; }
  #printList h1, #printList h2 { font-size: 12pt; font-weight: 300; margin: 0 0 10pt; }
  #printList h2 { margin-top: 16pt; }
  #printList ul { list-style: none; margin: 0; padding: 0; }
  #printList li { display: flex; align-items: flex-start; gap: 8pt; margin: 0 0 6pt; break-inside: avoid; }
  #printList .print-box { flex: 0 0 auto; width: 10pt; height: 10pt; margin-top: 2pt; border: 1pt solid #000; border-radius: 2pt; }
}
#todoPrint { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 30px; }
#todoPrint svg { width: 17px; height: 17px; fill: currentColor; }
#todo .panel-btns .icon-x { width: 28px; }

/* Player box: YouTube or the slideshow pictures (youtube.js) */
.yt-tabs { margin: 2px 6px 5px; }
.slide-frame { background: var(--shade); }
.slide-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-frame img:not([src]) { display: none; }
.slide-name { margin: 3px 0 0; font-size: 9pt; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-note { margin: 0 6px 4px; font-size: 9pt; }
#slidePane .yt-btns .btn:not(#slideSize) { flex: 0 0 34px; font-size: 12pt; line-height: 1; }
.yt-tabs button { font-size: 9.5pt; padding: 2px 2px; }

/* Event from a photo or link (evphoto.js) */
#evPhotoDlg { width: min(560px, calc(100vw - 24px)); }
.ep-row { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.ep-row input[type="url"] { flex: 1; min-width: 0; }
.ep-row .add-act { display: inline-flex; align-items: center; gap: 6px; }
.ep-row .add-act svg { width: 18px; height: 18px; fill: currentColor; }
.ep-status { min-height: 1.3em; margin: 0 0 8px; color: var(--dim); font-size: 11pt; }
.ep-status.err { color: var(--danger, #B3261E); }
.ep-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.ep-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.ep-item .ep-what { flex: 1; min-width: 0; }
.ep-item .ep-name { font-weight: 600; }
.ep-item .ep-when { color: var(--dim); font-size: 10.5pt; }
.ep-item.added { opacity: .55; }
#evPhotoDlg.drop-on { outline: 2px dashed var(--label); outline-offset: -6px; }

/* Photo buttons on the shopping list and contacts (photoread.js) */
#shopPhoto.busy, #contactPhoto.busy { opacity: .6; cursor: progress; }
.app-btns .btn { white-space: nowrap; }
.app-btns #contactPhoto { padding: 3px 9px; }
.app-btns #contactPhoto svg { width: 16px; height: 16px; fill: currentColor; }
.contact-list .c-job { color: var(--dim); }

/* Webcam window (photoread.js) */
.cam-dlg { width: min(720px, calc(100vw - 24px)); padding: 19px 22px; box-sizing: border-box; }
.cam-box { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 12px; }
.cam-box video { display: block; width: 100%; height: 100%; object-fit: contain; }
.cam-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 20px; text-align: center; color: #fff; font-size: 12pt; }
.cam-dlg [hidden] { display: none !important; }
.cam-phone { display: flex; gap: 22px; align-items: center; margin-bottom: 14px; }
.cam-qr { flex: 0 0 auto; width: 230px; height: 230px; background: #fff; border-radius: 10px; padding: 8px; box-sizing: border-box; }
.cam-qr svg { display: block; width: 100%; height: 100%; }
.cam-steps p { margin: 0 0 8px; }
.cam-steps ol { margin: 0 0 12px; padding-left: 20px; line-height: 1.5; }
.cam-wait { color: var(--dim); }
.cam-wait.err { color: var(--danger, #B3261E); }
@media (max-width: 600px) { .cam-phone { flex-direction: column; } }

/* English / 中文 switch beside the main mics (Settings > Voice) */

/* A Photo button flashes red while its photo is being read */
.photo-reading, .photo-reading:disabled, .photo-reading.busy {
  opacity: 1 !important; cursor: progress;
  animation: photoFlash 0.9s ease-in-out infinite;
}
.photo-reading svg { fill: currentColor; }
@keyframes photoFlash {
  0%, 100% { background: #C00000; border-color: #C00000; color: #FFFFFF; }
  50% { background: #FF5A5A; border-color: #FF5A5A; color: #FFFFFF; }
}
@media (prefers-reduced-motion: reduce) { .photo-reading { animation: none; background: #C00000; border-color: #C00000; color: #FFFFFF; } }

/* Settings > Notifications: link an iPhone for traffic alerts */
#pushBox .set-btns input { width: 9em; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: inherit; font: inherit; text-transform: none; }
.push-code { margin: 6px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.push-code-big { font-size: 22pt; letter-spacing: 6px; font-weight: 600; color: var(--label); }
.push-code ol { margin: 6px 0 0; padding-left: 20px; }
.push-msg.err { color: #C00000; }

/* Right-click menu: color swatches, ticks, more-choices arrows, dividers */
.ctx-menu .ctx-swatches { display: grid; grid-template-columns: repeat(7, 22px); gap: 6px; padding: 6px 12px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--oc-line); }
.ctx-menu .ctx-sw { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); padding: 0; cursor: pointer; }
.ctx-menu .ctx-sw:hover, .ctx-menu .ctx-sw:focus-visible { outline: 2px solid var(--line); outline-offset: 1px; }
.ctx-menu .ctx-sw.on { outline: 2px solid var(--label); outline-offset: 2px; }
.ctx-menu .ctx-sw-default { position: relative; }
.ctx-menu .ctx-sw-default::after { content: ''; position: absolute; inset: 9px 3px; border-top: 2px solid rgba(255, 255, 255, .9); transform: rotate(-45deg); }
.ctx-menu .ctx-check { position: relative; padding-left: 32px; }
.ctx-menu .ctx-on::before { content: '\2713'; position: absolute; left: 12px; color: var(--label); font-weight: 600; }
.ctx-menu .ctx-more::after { content: '\203A'; float: right; margin-left: 18px; color: var(--dim); }
.ctx-menu .ctx-back::before { content: '\2039'; margin-right: 8px; color: var(--dim); }
.ctx-menu .ctx-toggle { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ctx-menu .ctx-toggle::after { content: ''; flex: none; width: 26px; height: 14px; border-radius: 8px; background: var(--line);
  box-shadow: inset 0 0 0 1px var(--line); background-image: radial-gradient(circle at 7px 7px, var(--bg) 5px, transparent 5.5px); }
.ctx-menu .ctx-toggle-on::after { background-color: var(--label); background-image: radial-gradient(circle at 19px 7px, var(--bg) 5px, transparent 5.5px); }
.ctx-menu .ctx-line { height: 1px; margin: 4px 6px; background: var(--oc-line); }

/* My views (left column) */
.cv-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); margin: 2px 6px 4px; }
.cv-tabs button { border-left: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.cv-tabs button[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); font-weight: 600; }
.view-acts { display: flex; gap: 6px; margin: 3px 6px 4px; }
.view-btn { font-size: 10pt; padding: 2px 10px; }
.view-new, .view-edit { display: flex; gap: 4px; align-items: center; margin: 3px 6px; }
.view-name { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 10.5pt; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg, #fff); color: var(--text); }
.view-edit .view-btn { padding: 2px 6px; white-space: nowrap; }
.view-del { color: #C62828; }
.view-note { margin: 0 8px; font-size: 9.5pt; color: var(--dim); }

/* ---------- "Are you sure?" window (ask.js) ---------- */
.modal-ask { width: min(420px, calc(100vw - 32px)); }
.ask-msg { margin: 0 0 18px; white-space: pre-line; }
.ask-check { display: flex; align-items: center; gap: 8px; margin: -6px 0 16px; cursor: pointer; }
.ask-check[hidden] { display: none; }

/* Shorter to-do rows (Jeff, 9/30/26): the icons and date chip no longer set the row height. */
.panel .todo-item { line-height: 1.1; }
.panel .todo-act { height: 16px; }
.panel .todo-due { line-height: 1.1; }
.panel .todo-item input[type="checkbox"] { margin-top: 1px; }

/* Today's date: a bold red border (Jeff, 9/30/26). */
:root { --today-ring: #E0342F; }
.m-day.today { box-shadow: inset 0 0 0 3px var(--today-ring); }
.t-head div.is-today { box-shadow: inset 0 0 0 3px var(--today-ring); }
.mini-day.today, .day-pop-num.today, .s-day.today .s-num { box-shadow: 0 0 0 2px var(--today-ring); }

/* Month view "Taller days": each week row is twice its normal height and the month scrolls. */
#tallBtn[aria-pressed="true"] { background: var(--export-bg); }
#tallBtn[aria-pressed="true"] svg { fill: var(--export-text); }
@media (min-width: 761px) {
  .m-wrap.tall:not(.pz) { flex: 0 0 auto; }
  .m-wrap.tall:not(.pz) .m-week { flex: 0 0 auto; height: var(--wkh, 240px); }
  .m-wrap.tall .m-head { position: sticky; top: 0; z-index: 3; background: var(--oc-bg); }
}

/* Sticky notes (stickies.js): the button sits at the bottom of the right-edge icons. */
#stickyBtn { margin-top: auto; margin-bottom: 14px; }
.stickies { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.stickies[hidden] { display: none; }
.sticky {
  position: fixed; box-sizing: border-box; display: flex; flex-direction: column; pointer-events: auto;
  min-width: 160px; min-height: 110px; max-width: 90vw; max-height: 90vh; resize: both; overflow: hidden;
  border-radius: 8px; border: 1px solid rgba(0, 0, 0, .12); box-shadow: 0 4px 14px rgba(0, 0, 0, .28); color: #1F2328;
}
.sticky.dragging { box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.sticky-bar { display: flex; align-items: center; gap: 2px; padding: 3px 4px; background: rgba(0, 0, 0, .06); cursor: move; touch-action: none; }
.sticky-grip { flex: 1; align-self: stretch; }
.sticky-btn { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: none; color: #3A3F46; cursor: pointer; }
.sticky-btn:hover { background: rgba(0, 0, 0, .1); }
.sticky-btn svg { width: 15px; height: 15px; fill: currentColor; }
.sticky-colors { display: flex; gap: 6px; padding: 6px 8px; background: rgba(0, 0, 0, .04); }
.sticky-colors[hidden] { display: none; }
.sticky-swatch { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); cursor: pointer; }
.sticky-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #3A3F46; }
.sticky-text {
  flex: 1; min-height: 0; width: 100%; box-sizing: border-box; resize: none; border: 0; outline: 0;
  padding: 8px 10px; background: transparent; color: inherit; font: inherit; font-size: 11.5pt; line-height: 1.35;
}
.sticky-text::placeholder { color: rgba(0, 0, 0, .45); }
@media (max-width: 760px) { .stickies { display: none; } }
@media print { .stickies { display: none; } }
/* Sticky notes take their colors from the theme. */
.sticky { background: color-mix(in srgb, var(--accent-fill) 38%, var(--bg)); color: var(--text); border-color: color-mix(in srgb, var(--label) 45%, transparent); }
.sticky-bar { background: color-mix(in srgb, var(--accent-fill) 75%, var(--bg)); }
.sticky-btn { color: var(--label); }
.sticky-btn:hover { background: color-mix(in srgb, var(--label) 15%, transparent); }
.sticky-text::placeholder { color: var(--dim); }
/* The note that comes to the top when flipping with the mouse wheel. */
@keyframes sticky-flash { from { box-shadow: 0 0 0 3px var(--label), 0 4px 14px rgba(0, 0, 0, .28); } to { box-shadow: 0 4px 14px rgba(0, 0, 0, .28); } }
.sticky.flash { animation: sticky-flash .6s ease-out; }
.sticky-grip { font-size: 9pt; color: var(--dim); text-align: center; line-height: 22px; user-select: none; }
/* No dark edge around sticky notes (Jeff, 9/30/26): no border, only a soft shadow. */
.sticky { border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); }
.sticky.dragging { box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
@keyframes sticky-flash { from { box-shadow: 0 0 0 2px var(--label), 0 2px 10px rgba(0, 0, 0, .14); } to { box-shadow: 0 2px 10px rgba(0, 0, 0, .14); } }
.sticky-star[aria-pressed="true"] { color: var(--label); }
.sticky-star[aria-pressed="true"] svg { width: 17px; height: 17px; }
/* No shadow at all on sticky notes (Jeff, 9/30/26). */
.sticky, .sticky.dragging { box-shadow: none; }
@keyframes sticky-flash { from { box-shadow: 0 0 0 2px var(--label); } to { box-shadow: 0 0 0 0 transparent; } }
/* Search all sticky notes: a small box that floats just above the pile. */
.sticky-search { position: fixed; z-index: 41; display: flex; align-items: center; gap: 2px; box-sizing: border-box; padding: 3px 4px 3px 8px;
  border-radius: 8px; background: color-mix(in srgb, var(--accent-fill) 75%, var(--bg)); color: var(--text); }
.sticky-search[hidden] { display: none; }
.sticky-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 11pt; padding: 4px 0; }
.sticky-search-n { font-size: 9pt; color: var(--dim); white-space: nowrap; padding: 0 4px; }
@media (max-width: 760px) { .sticky-search { display: none; } }
/* Room under the side panel for the sticky notes, so a long list scrolls above them. */
/* Room under the list for the sticky notes, inside the panel so its dividing line still runs to the bottom. */
.app.notes-room .panel { padding-bottom: var(--notes-space, 0px); }
/* Minimized notes show only their top bars. */
.stickies.min .sticky { height: 30px !important; min-height: 0; resize: none; }
.stickies.min .sticky-text, .stickies.min .sticky-colors { display: none; }
.stickies.min .sticky-mini svg { transform: rotate(180deg); }
/* Note colors (the color button): light colors with dark writing. */
.sticky.colored { color: #1F2328; }
.sticky.colored .sticky-bar { background: rgba(0, 0, 0, .07); }
.sticky.colored .sticky-btn { color: #3A3F46; }
.sticky.colored .sticky-btn:hover { background: rgba(0, 0, 0, .1); }
.sticky.colored .sticky-grip { color: #5A6068; }
.sticky.colored .sticky-text::placeholder { color: rgba(0, 0, 0, .45); }
.sticky-colors { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; }
.sticky-colors[hidden] { display: none; }
.sticky-swatch { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid rgba(128, 128, 128, .5); cursor: pointer; }
.sticky-swatch.theme { background: linear-gradient(135deg, var(--bg) 50%, var(--accent-fill) 50%); }
.sticky-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--label); }
.sticky-bar { gap: 0; }
.sticky-btn { width: 21px; }
/* Task sections by color: red = Urgent, yellow = Do it now, green = Take your time.
   The circles on a task move it to that section; each header shows its own dot. */
.todo-dot-urgent { --dot: #E0342F; }
.todo-dot-now { --dot: #E8B400; }
.todo-dot-later { --dot: #2FA35A; }
.todo-sec-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); flex: none; pointer-events: none; }
.panel .todo-act.todo-dot, .todo-act.todo-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; cursor: pointer; }
.todo-act.todo-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); transition: transform .12s; }
.todo-act.todo-dot:hover::before { transform: scale(1.35); }

/* CNBC on YouTube TV (opens in its own window) */
.yt-tv { margin: 0 6px 4px; }
.yt-tv #tvOpen { font-weight: 600; }
.yt-tv-help { margin: 0 6px 4px; font-size: 9pt; line-height: 1.3; color: var(--dim); }

.ask-input { display:block; width:100%; box-sizing:border-box; margin:6px 0 2px; font:inherit; color:var(--text); background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:4px 8px; }
.ask-pick { display:block; width:100%; box-sizing:border-box; margin:6px 0 0; font:inherit; color:var(--text); background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:3px 6px; }
#reloadBtn.spinning svg { animation: reloadSpin .8s linear infinite; }
@keyframes reloadSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #reloadBtn.spinning svg { animation: none; } }

/* Calculator panel */
.calc-box { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.calc-screen { background: color-mix(in srgb, var(--accent-fill) 10%, var(--bg)); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 6px; text-align: right; }
.calc-expr { font-size: 20pt; line-height: 1.2; color: var(--text); white-space: nowrap; overflow-x: auto; scrollbar-width: none; font-variant-numeric: tabular-nums; }
.calc-expr::-webkit-scrollbar { display: none; }
.calc-out { min-height: 1.3em; font-size: 12pt; color: var(--dim); font-variant-numeric: tabular-nums; }
.calc-out.calc-err { color: #d93025; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.calc-key { font: inherit; font-size: 15pt; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; transition: background .1s, transform .05s; }
.calc-key:hover { background: color-mix(in srgb, var(--accent-fill) 12%, var(--bg)); }
.calc-key:active, .calc-key.calc-hit { transform: scale(.96); background: color-mix(in srgb, var(--accent-fill) 22%, var(--bg)); }
.calc-key.calc-fn { color: var(--dim); font-size: 13pt; }
.calc-key.calc-op { color: var(--link); font-weight: 600; }
.calc-key.calc-eq { background: var(--export-bg); border-color: var(--export-bg); color: var(--export-text); font-weight: 600; }
.calc-key.calc-eq:hover, .calc-key.calc-eq.calc-hit { background: color-mix(in srgb, var(--export-bg) 85%, var(--text)); }
.calc-foot { display: flex; gap: 5px; }
.calc-foot .btn { flex: 1; font-size: 9.5pt; padding: 1px 6px; }
.calc-hist { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; }
.calc-hist button { display: flex; justify-content: space-between; gap: 8px; width: 100%; font: inherit; font-size: 9.5pt; padding: 2px 4px; border: 0; border-radius: 5px; background: none; color: var(--dim); cursor: pointer; text-align: left; }
.calc-hist button:hover { background: color-mix(in srgb, var(--accent-fill) 10%, var(--bg)); color: var(--text); }
.calc-h-r { color: var(--text); font-variant-numeric: tabular-nums; }
.calc-foot .calc-mic { flex: 1.4; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 10.5pt; font-weight: 600; }
.calc-foot .calc-mic svg { width: 15px; height: 15px; fill: currentColor; }

/* Ask Claude: takes the calendar's place while open */
.ai-view { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); overflow: hidden; }
.ai-view[hidden] { display: none; }
.ai-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ai-title { margin: 0; font-size: 15pt; font-weight: 400; color: var(--link); flex: 1; }
.ai-head-btns { display: flex; gap: 6px; }
.ai-head-btns .btn { font-size: 10pt; padding: 2px 10px; }
.ai-list { list-style: none; margin: 0; padding: 14px 16px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { display: flex; }
.ai-user { justify-content: flex-end; }
.ai-bubble { max-width: min(760px, 85%); padding: 8px 12px; border-radius: 14px; font-size: 12pt; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.ai-user .ai-bubble { background: var(--export-bg); color: var(--export-text); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ai-assistant .ai-bubble { background: color-mix(in srgb, var(--accent-fill) 14%, var(--bg)); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-bubble p { margin: 0 0 6px; } .ai-bubble p:last-child { margin-bottom: 0; }
.ai-bubble ul { margin: 2px 0 6px; padding-left: 20px; }
.ai-bubble a { color: var(--link); }
.ai-empty { margin: auto; text-align: center; color: var(--dim); font-size: 12pt; }
.ai-empty p { margin: 4px 0; } .ai-eg { font-size: 10.5pt; }
.ai-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); animation: aiDot 1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ai-dots i { animation: none; opacity: .6; } }
.ai-form { display: flex; align-items: flex-end; gap: 6px; padding: 8px 12px 10px; border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 12pt; line-height: 1.4; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; max-height: 160px; }
.ai-form .btn { height: 34px; font-size: 11pt; padding: 0 12px; }
.ai-mic { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ai-mic svg { width: 16px; height: 16px; fill: currentColor; }
#aiBtn[aria-pressed="true"] { background: var(--export-bg); }
#aiBtn[aria-pressed="true"] svg { fill: var(--export-text); }
.ai-wake-note { font-size: 9.5pt; color: var(--dim); }
.ai-toggle[aria-pressed="true"], #aiSave[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); border-color: var(--export-bg); }

/* AI chat: saved chats column, temporary-chat tag, stop-talking button */
.ai-body { flex: 1; min-height: 0; display: flex; }
.ai-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-chats { width: 190px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; padding: 6px 0; font-size: 10pt; }
.ai-chats[hidden] { display: none; }
.ai-chats h3 { margin: 2px 10px 4px; font-size: 10pt; font-weight: 600; color: var(--dim); }
.ai-chats ul { list-style: none; margin: 0; padding: 0; }
.ai-chat { display: flex; align-items: center; gap: 2px; padding: 0 4px 0 0; }
.ai-chat.current { background: color-mix(in srgb, var(--accent-fill) 22%, var(--bg)); }
.ai-chat-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 3px 4px 3px 10px; font: inherit; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-chat-open:hover { color: var(--link); }
.ai-chat-pin, .ai-chat-dl, .ai-chat-del { flex: none; width: 20px; height: 20px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ai-chat-pin svg, .ai-chat-dl svg, .ai-chat-del svg { width: 13px; height: 13px; fill: currentColor; }
.ai-chat-pin:hover, .ai-chat-dl:hover, .ai-chat-del:hover { border-color: var(--line); color: var(--text); }
.ai-chat-pin[aria-pressed="true"] { color: var(--link); }
.ai-chat:not(:hover):not(.current) .ai-chat-del, .ai-chat:not(:hover):not(.current) .ai-chat-dl { visibility: hidden; }
.ai-temp { font-size: 9.5pt; color: var(--dim); border: 1px dashed var(--line); border-radius: 8px; padding: 0 6px; }
.ai-temp[hidden] { display: none; }
.ai-hush[hidden] { display: none; }
.ai-cough { font-style: italic; color: var(--dim); }
@media (max-width: 700px) { .ai-chats { width: 130px; } }

/* Red flashing mic at the top whenever any microphone is on */
.mic-live { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 7px; margin-right: 6px; border: 1px solid #D93025; border-radius: 14px; background: #D93025; color: #FFFFFF; font: inherit; font-size: 10pt; font-weight: 600; cursor: pointer; white-space: nowrap; animation: micLive 1s ease-in-out infinite; }
.mic-live[hidden] { display: none; }
.mic-live svg { width: 16px; height: 16px; fill: currentColor; }
.mic-live:hover { filter: brightness(1.1); }
@keyframes micLive { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(217, 48, 37, .5); } 50% { opacity: .55; box-shadow: 0 0 0 6px rgba(217, 48, 37, 0); } }
@media (prefers-reduced-motion: reduce) { .mic-live { animation: none; } }

/* Add calendar: pick an .ics file */
.sub-file-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.sub-file-note { font-size: 10pt; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Weather in the top bar (weather.js) */
.wx-wrap { position: relative; flex: 0 0 auto; }
.wx-btn { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 10px 0 8px; border: 1px solid transparent; border-radius: 19px;
  background: none; color: var(--label); font: inherit; font-size: 14pt; font-weight: 300; cursor: pointer; }
.wx-btn:hover, .wx-btn[aria-expanded="true"] { background: var(--shade); border-color: var(--line); }
.wx-btn svg { width: 26px; height: 26px; fill: currentColor; }
.wx-pop { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 250px; padding: 12px 14px 10px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); font-size: 11pt; }
.wx-pop[hidden] { display: none; }
.wx-place { font-size: 13pt; font-weight: 300; color: var(--label); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-now { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.wx-now svg { width: 38px; height: 38px; fill: var(--label); flex: none; }
.wx-big { font-size: 24pt; font-weight: 300; line-height: 1; }
.wx-words { font-size: 10.5pt; line-height: 1.3; }
.wx-dim { color: var(--dim); }
.wx-day { display: grid; grid-template-columns: 52px 22px 1fr auto; align-items: center; gap: 6px; padding: 3px 0; }
.wx-day svg { width: 20px; height: 20px; fill: var(--label); }
.wx-dname { color: var(--text); }
.wx-rain { font-size: 9.5pt; color: var(--link); }
.wx-hl { text-align: right; }
.wx-acts { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.wx-acts .btn { flex: 1; padding: 3px 8px; font-size: 10.5pt; }
.wx-chip { font-size: 9.5pt; font-weight: 400; padding: 1px 6px; border-radius: 9px; margin-left: 3px; white-space: nowrap;
  background: color-mix(in srgb, var(--label) 12%, transparent); color: var(--label); }
/* Higher levels get stronger, still in the theme's own color. */
.wx-chip.wx-l1 { background: color-mix(in srgb, var(--label) 24%, transparent); }
.wx-chip.wx-l2, .wx-chip.wx-l3 { background: var(--label); color: var(--bg); }
.wx-chip.wx-l3 { font-weight: 600; }
.wx-sun { display: inline-flex; align-items: center; gap: 2px; font-size: 10pt; font-weight: 400; margin-left: 4px; white-space: nowrap; }
.wx-btn svg.wx-sm { width: 17px; height: 17px; }
.wx-fact { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.wx-fact > span:first-child { white-space: nowrap; }
.wx-gap { height: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.wx-pop { width: 270px; }
.wx-credit { margin-top: 6px; font-size: 8.5pt; color: var(--dim); text-align: right; }
.hide-weather .wx-wrap { display: none !important; }
@media (max-width: 760px) { .wx-wrap { display: none; } }
/* Keep the month name readable: the weather gives up its extras first. */
.hdr-title { min-width: 6.5em; }
@media (max-width: 1560px) { .wx-sun { display: none; } }
@media (max-width: 1400px) { .wx-chip { display: none; } }

/* World times under the view tabs */
.view-col { position: relative; display: flex; flex-direction: column; margin-left: 8px; flex: 0 0 auto; }
.view-col .view-tabs { margin-left: 0; }
.world-clocks { position: absolute; left: 0; right: 0; top: calc(100% + (var(--hdr) - 100%) / 2 - 15px); display: flex; justify-content: space-between; gap: 8px; font-size: 8.5pt; line-height: 1.1; color: var(--dim); white-space: nowrap; }
.world-clocks b { font-weight: 600; color: var(--label); }
.hide-clocks .world-clocks { display: none; }
@media (max-width: 760px) {
  .view-col { order: 10; margin: 2px 0 4px 8px; max-width: calc(100% - 16px); }
  .view-col .view-tabs { margin: 0; max-width: 100%; }
  .world-clocks { display: none; }
}
/* Translate: takes the calendar's place while open, like Ask Claude */
.hide-translate #trBtn { display: none; }
#trBtn[aria-pressed="true"] { background: var(--export-bg); }
#trBtn[aria-pressed="true"] svg { fill: var(--export-text); }
/* One card: language tabs on top, the two text boxes side by side */
.tr-view { overflow-y: auto; }
.tr-card { flex: none; width: min(100% - 28px, 1100px); margin: 14px auto 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow: hidden; }
.tr-langs { display: flex; align-items: center; gap: 6px; padding: 8px 8px; border-bottom: 1px solid var(--line); background: var(--shade); }
.tr-side { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 6px; }
.tr-tabs { flex: 0 1 auto; min-width: 0; display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tr-tabs button { flex: 0 1 auto; min-width: 3em; background: var(--bg); border: 0; border-left: 1px solid var(--line); padding: 5px 8px; font: inherit; font-size: 10pt; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-tabs button:first-child { border-left: 0; }
.tr-tabs button:hover { color: var(--label); background: var(--shade); }
.tr-tabs button[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); font-weight: 600; }
.tr-more { flex: none; width: 70px; margin-left: auto; font: inherit; font-size: 10pt; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; cursor: pointer; }
.tr-swap { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.tr-swap svg { width: 19px; height: 19px; fill: currentColor; transition: transform .25s; }
.tr-swap:hover svg { transform: rotate(180deg); }
.tr-panes { display: flex; height: clamp(230px, 44vh, 420px); }
.tr-view:has(.tr-hist[hidden]) .tr-panes { height: clamp(260px, 62vh, 600px); }
.tr-pane { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 10px; }
.tr-pane-out { border-left: 1px solid var(--line); background: color-mix(in srgb, var(--accent-fill) 22%, var(--bg)); }
.tr-pane textarea { flex: 1 1 auto; min-height: 60px; resize: none; border: 0; background: none; padding: 0 30px 0 0; outline: none; }
.tr-pane textarea, .tr-out { font: inherit; font-size: 16pt; line-height: 1.45; color: var(--text); overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.tr-out { flex: 0 1 auto; min-height: 0; }
.tr-out.tr-empty { color: var(--dim); }
.tr-busy .tr-out { opacity: .45; }
.tr-busy .tr-pane-out::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--export-bg), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: trLoad 1s linear infinite; }
@keyframes trLoad { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { .tr-busy .tr-pane-out::before { animation: none; background-size: 100% 100%; opacity: .5; } .tr-swap svg { transition: none; } }
.tr-x { position: absolute; top: 12px; right: 10px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tr-x:hover { background: var(--shade); color: var(--text); }
.tr-x svg { width: 18px; height: 18px; fill: currentColor; }
.tr-x[hidden] { display: none; }
.tr-say { margin: 0; font-size: 11.5pt; color: var(--dim); font-style: italic; white-space: pre-wrap; max-height: 30%; overflow-y: auto; flex: none; }
.tr-say:empty, .tr-msg:empty { display: none; }
.tr-msg { margin: 0; font-size: 10.5pt; color: #b3261e; }
.tr-bar { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.tr-bar .btn[hidden] { display: none; }
.tr-round { width: 38px; height: 38px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.tr-round svg { width: 20px; height: 20px; fill: currentColor; }
.tr-round.speaking { background: var(--export-bg); color: var(--export-text); border-color: var(--export-bg); }
.tr-go { height: 34px; padding: 0 18px; font-size: 11pt; border-radius: 17px; }
.tr-copy { height: 32px; padding: 0 12px; font-size: 10.5pt; display: inline-flex; align-items: center; gap: 5px; }
.tr-copy svg { width: 15px; height: 15px; fill: currentColor; }
.tr-count { flex: 1; font-size: 9.5pt; color: var(--dim); text-align: right; }
.tr-hist { flex: none; width: min(100% - 28px, 1100px); margin: 6px auto 14px; display: flex; flex-direction: column; }
.tr-hist[hidden] { display: none; }
.tr-hist-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 6px; }
.tr-hist-head h3 { margin: 0; font-size: 11pt; font-weight: 600; color: var(--label); }
.tr-hist-head .btn { font-size: 9.5pt; padding: 1px 10px; }
.tr-hist ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tr-h { display: flex; align-items: center; gap: 4px; padding-right: 8px; border-top: 1px solid var(--line); }
.tr-h:first-child { border-top: 0; }
.tr-h:hover { background: var(--shade); }
.tr-h-open { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; text-align: left; background: none; border: 0; padding: 7px 12px; font: inherit; font-size: 11pt; color: var(--text); cursor: pointer; }
.tr-h-langs { grid-column: 1 / -1; font-size: 8.5pt; color: var(--dim); }
.tr-h-src, .tr-h-out { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-h-out { color: var(--dim); }
.tr-h-del { flex: none; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--dim); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tr-h-del svg { width: 13px; height: 13px; fill: currentColor; }
.tr-h-del:hover { border-color: var(--line); color: var(--text); }
.tr-h:not(:hover) .tr-h-del { visibility: hidden; }
@media (max-width: 760px) {
  .tr-langs { flex-wrap: wrap; }
  .tr-side { flex-basis: 100%; }
  .tr-swap { margin: 0 auto; transform: rotate(90deg); }
  .tr-panes { flex-direction: column; height: auto; }
  .tr-pane { min-height: 170px; }
  .tr-pane-out { border-left: 0; border-top: 1px solid var(--line); }
  .tr-h-del { visibility: visible !important; }
}

/* Stream: newest posts from news sites, YouTube and Bluesky, in one list */
.hide-stream #stBtn { display: none; }
#stBtn[aria-pressed="true"] { background: var(--export-bg); }
#stBtn[aria-pressed="true"] svg { fill: var(--export-text); }
.st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px 0; }
.st-sources { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.st-src { display: inline-flex; align-items: center; gap: 5px; font-size: 10pt; border: 1px solid var(--line); border-left: 4px solid var(--st); border-radius: 8px; padding: 1px 2px 1px 6px; background: var(--bg); max-width: 240px; }
.st-src.st-bad { border-style: dashed; border-left-style: solid; opacity: .75; }
.st-src-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-src-x { border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 13pt; line-height: 1; padding: 0 4px; border-radius: 5px; }
.st-src-x:hover { color: var(--text); background: var(--shade); }
.st-ic { display: inline-flex; flex: none; }
.st-ic svg { width: 15px; height: 15px; fill: color-mix(in srgb, var(--st) 70%, var(--text)); }
.st-tabs { margin-left: 0; }
.st-tabs[hidden] { display: none; }
.st-tabs button { font-size: 10pt; padding: 2px 10px; }
.st-msg { margin: 4px 14px 0; font-size: 10pt; color: var(--dim); }
.st-msg:empty { display: none; }
.st-list { list-style: none; margin: 0; padding: 10px 14px 14px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.st-busy .st-list { opacity: .7; }
.st-empty { margin: auto; max-width: 560px; text-align: center; color: var(--dim); font-size: 12pt; }
.st-sugg { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: 10.5pt; }
.st-sugg .btn { font-size: 10pt; padding: 2px 10px; }
.st-post { max-width: 900px; width: 100%; margin: 0 auto; }
.st-card { display: block; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-left: 5px solid var(--st); border-radius: 10px; padding: 8px 12px; background: var(--bg); }
.st-card:hover { background: color-mix(in srgb, var(--st) 7%, var(--bg)); }
.st-head { display: flex; align-items: center; gap: 6px; font-size: 9.5pt; color: var(--dim); margin-bottom: 3px; }
.st-name { font-weight: 600; color: color-mix(in srgb, var(--st) 60%, var(--text)); }
.st-by { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.st-when { margin-left: auto; white-space: nowrap; }
.st-body { display: flex; gap: 12px; align-items: flex-start; }
.st-words { flex: 1; min-width: 0; }
.st-title { font-size: 12.5pt; font-weight: 600; line-height: 1.3; }
.st-text { font-size: 11pt; line-height: 1.4; color: var(--text); opacity: .85; margin-top: 2px; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.st-img { flex: none; width: 150px; height: 100px; object-fit: cover; border-radius: 8px; background: var(--shade); }
.st-img.st-yt { width: 178px; }
@media (max-width: 760px) { .st-img { width: 96px; height: 72px; } .st-img.st-yt { width: 110px; } }

/* Weather sits in its own box, with a divider before the icons to its right (Jeff, 9/30/26) */
.wx-wrap { display: flex; align-items: center; margin: 0 4px 0 6px; padding-right: 12px; border-right: 1px solid var(--line); }
.wx-btn { border-color: var(--line); border-radius: 10px; background: color-mix(in srgb, var(--shade) 60%, var(--bg)); }
.wx-btn:hover, .wx-btn[aria-expanded="true"] { border-color: var(--label); }

/* Daily routine (routine.js): light blocks in Day/Week views, ticked off by clicking */
.ev.ev-routine { opacity: .9; border-style: dashed; }
.ev.ev-routine .ev-check { margin-right: 4px; }
.ev.ev-routine.rt-done { opacity: .5; text-decoration: line-through; }
.modal-routine { width: min(780px, calc(100vw - 24px)); }
.rt-stats { margin: 0 0 8px; font-size: 11.5pt; color: var(--label); font-weight: 600; }
.rt-stats:empty { display: none; }
.rt-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.rt-row { display: flex; align-items: center; gap: 6px; }
.rt-row input[type=time] { font: inherit; font-size: 11pt; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 3px 4px; width: 8.6em; }
.ev-routine .ev-rep { display: none; }
.rt-row input[type=text] { flex: 1; min-width: 0; font: inherit; font-size: 11.5pt; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; }
.rt-to { font-size: 10pt; color: var(--dim); }
.rt-days { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; flex: none; }
.rt-day { width: 22px; height: 26px; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--bg); color: var(--dim); font: inherit; font-size: 9.5pt; cursor: pointer; }
.rt-day:first-child { border-left: 0; }
.rt-day[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); font-weight: 600; }
.rt-del { flex: none; }
.rt-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.rt-actions .btn[hidden] { display: none; }
.modal-routine .modal-actions { justify-content: flex-end; padding: 8px 22px 14px; }
@media (max-width: 760px) { .rt-row { flex-wrap: wrap; } .rt-row input[type=text] { flex-basis: 100%; order: -1; } }

/* Drinks page (drinks.js) */
.hide-drinks #drBtn { display: none; }
#drBtn[aria-pressed="true"] { background: var(--export-bg); }
#drBtn[aria-pressed="true"] svg { fill: var(--export-text); }
.dr-view { overflow: auto; }
.dr-tabs button { font-size: 10pt; padding: 2px 10px; }
.dr-yearnav { display: inline-flex; align-items: center; gap: 4px; }
.dr-yearnav[hidden] { display: none; }
.dr-year { min-width: 3em; text-align: center; font-size: 12pt; }
.dr-day { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px 0; font-size: 10.5pt; }
.dr-day[hidden] { display: none; }
.dr-date { min-width: 13em; }
.dr-step { min-width: 2em; padding: 1px 6px; font-size: 12pt; line-height: 1.2; }
.dr-val { min-width: 2.4em; text-align: center; font-size: 14pt; }
.dr-dessert { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; }
.dr-note { flex: 1; min-width: 140px; max-width: 360px; font: inherit; font-size: 10pt; padding: 3px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); }
.dr-body { padding: 4px 14px 14px; }
.dr-sum { font-size: 10.5pt; margin: 8px 0; color: var(--text); }
.dr-scroll { overflow-x: auto; }
.dr-grid { border-collapse: separate; border-spacing: 2px; font-size: 9pt; }
.dr-grid th { font-weight: normal; color: var(--dim); padding: 0 2px; }
.dr-grid th.dr-m { text-align: left; padding-right: 6px; }
.dr-grid td { padding: 0; }
.dr-grid td.dr-none { background: none; }
.dr-grid .dr-st { text-align: right; padding: 0 6px; min-width: 3em; color: var(--text); }
.dr-grid th.dr-st { color: var(--dim); }
.dr-cell { position: relative; width: 24px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--text); font: inherit; font-size: 8.5pt; cursor: pointer; }
.dr-cell.dr-wkend { background: color-mix(in srgb, var(--line) 35%, var(--bg)); }
.dr-cell:disabled { opacity: .35; cursor: default; }
.dr-cell:not(:disabled):hover { border-color: var(--dim); }
.dr-0 { background: color-mix(in srgb, #9bb4cf 18%, var(--bg)) !important; }
.dr-1 { background: color-mix(in srgb, #5b8fc7 30%, var(--bg)) !important; }
.dr-2 { background: color-mix(in srgb, #3a73b5 50%, var(--bg)) !important; }
.dr-3 { background: color-mix(in srgb, #1f5494 70%, var(--bg)) !important; color: #fff !important; }
.dr-4 { background: #173e6e !important; color: #fff !important; }
.dr-cell.dr-dess::after, .dr-key.dr-dess::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 7px 7px 0; border-color: transparent #7a8a99 transparent transparent; border-top-right-radius: 4px; }
.dr-cell.dr-hasnote::before, .dr-key.dr-hasnote::before { content: ""; position: absolute; left: 2px; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: #8aa0b5; box-shadow: 0 0 0 1px var(--bg); }
.dr-cell.dr-today { box-shadow: inset 0 0 0 1px var(--text); }
.dr-cell.dr-sel { outline: 2px solid #3a73b5; outline-offset: 1px; }
.dr-ok { color: #2f6db3; }
.dr-over { color: #7a8a99; font-weight: 600; }
.dr-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 9.5pt; color: var(--dim); margin: 10px 0 0; }
.dr-legend .btn { margin-left: auto; }
.dr-key { position: relative; display: inline-block; min-width: 22px; height: 18px; line-height: 18px; text-align: center; border: 1px solid var(--line); border-radius: 5px; font-size: 8.5pt; color: var(--text); background: var(--bg); }
.dr-years { border-collapse: collapse; font-size: 10pt; margin-top: 10px; }
.dr-years th, .dr-years td { padding: 3px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dr-years th { font-weight: normal; color: var(--dim); }
.dr-years tr:not(:first-child) { cursor: pointer; }
.dr-years tr:not(:first-child):hover { background: var(--shade); }
.dr-chartbox { max-width: 760px; }
.dr-chart { width: 100%; height: auto; }
.dr-bar { fill: #5b8fc7; }
.dr-gl { stroke: var(--line); }
.dr-goal { stroke: var(--text); stroke-width: 2; stroke-dasharray: 4 3; }
.dr-ax { fill: var(--dim); font-size: 11px; }
.dr-bv { fill: var(--text); font-size: 11px; }
.modal-quicklog { width: min(460px, calc(100vw - 24px)); }
.ql-when { display: inline-flex; width: auto; margin: 0 0 4px; }
.ql-when button { font-size: 11pt; padding: 4px 16px; }
.ql-date { margin: 4px 0 10px; color: var(--dim); font-size: 10.5pt; }
.ql-h { margin: 10px 0 6px; font-weight: normal; font-size: 12pt; }
.ql-sub { color: var(--dim); font-size: 9.5pt; }
.ql-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ql-chip { min-width: 44px; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 13pt; cursor: pointer; }
.ql-chip:hover { border-color: var(--dim); }
.ql-chip[aria-pressed="true"] { background: var(--export-bg); color: var(--export-text); border-color: var(--export-bg); }
.ql-more { color: var(--dim); }
.ql-note { display: block; width: 100%; max-width: none; margin: 12px 0 0; box-sizing: border-box; font-size: 11pt; padding: 6px 9px; }
.ql-saved { min-height: 1.3em; margin: 8px 0 4px; font-size: 10pt; color: var(--dim); }
.dr-sval { min-width: 1.6em; font-size: 12pt; }
.dr-dessert { gap: 3px; }
.tk-items { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px 0; }
.tk-tabs button { font-size: 10.5pt; padding: 3px 14px; }
.dr-ctl { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.dr-ctl-name { color: var(--dim); margin-right: 2px; }
.dr-yn button { font-size: 10pt; padding: 2px 10px; }
.dr-num { width: 5.5em; font: inherit; font-size: 10.5pt; padding: 3px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); }
.ql-numin { width: 8em; height: 40px; box-sizing: border-box; font-size: 13pt; }
.modal-tk { width: min(440px, calc(100vw - 24px)); }
.tk-form label { display: flex; flex-direction: column; gap: 3px; margin: 0 0 10px; font-size: 10.5pt; color: var(--dim); }
.tk-form input, .tk-form select { font: inherit; font-size: 11pt; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; }
.tk-goal { display: flex; align-items: flex-end; gap: 8px; }
.tk-goal[hidden] { display: none; }
.tk-goal label { margin: 0; }
.tk-goal input { width: 6em; }
.modal-tk .modal-actions #tkRemove { margin-right: auto; }
.tk-items .btn, .dr-day .btn:not(.dr-step), .dr-legend .btn { font-size: 10pt; padding: 2px 10px; }
.dr-cell { width: 23px; font-size: 8pt; }
.dr-grid .dr-st { padding: 0 4px; min-width: 2.4em; }

/* ---------- Notifications in the app (notices.js) ---------- */
.nt-wrap { position: relative; }
#noticeBtn { position: relative; }
.nt-badge { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 3px; box-sizing: border-box; border-radius: 8px; background: var(--export-bg); color: var(--export-text); font-size: 8pt; line-height: 15px; text-align: center; font-weight: 600; pointer-events: none; }
.nt-badge[hidden] { display: none; }
.nt-panel { position: absolute; z-index: 40; top: calc(100% + 6px); right: -60px; width: 340px; max-width: calc(100vw - 24px); max-height: 70vh; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.nt-panel[hidden] { display: none; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.nt-head h3 { margin: 0; font-size: 12pt; font-weight: normal; }
.nt-head-btns { display: flex; gap: 6px; }
.nt-head-btns .btn { font-size: 9.5pt; padding: 2px 8px; }
.nt-empty { margin: 0; padding: 18px 14px; color: var(--dim); font-size: 10pt; }
.nt-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.nt-item { display: flex; align-items: flex-start; border-bottom: 1px solid var(--line); }
.nt-item:last-child { border-bottom: 0; }
.nt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; background: none; border: 0; padding: 8px 4px 8px 12px; color: var(--text); font: inherit; cursor: pointer; }
.nt-main:hover { background: var(--shade); }
.nt-new .nt-main { border-left: 3px solid var(--export-bg); padding-left: 9px; }
.nt-title { font-size: 10.5pt; }
.nt-new .nt-title { font-weight: 600; }
.nt-text { font-size: 9.5pt; color: var(--dim); overflow-wrap: anywhere; }
.nt-time { font-size: 8.5pt; color: var(--dim); }
.nt-x { flex: none; margin: 6px 6px 0 0; }
.nt-stack { position: fixed; right: 18px; bottom: 18px; z-index: 45; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.nt-card { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; width: 320px; max-width: calc(100vw - 36px); box-sizing: border-box; padding: 10px 10px 10px 14px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-left: 4px solid var(--export-bg); border-radius: 10px; box-shadow: var(--shadow); animation: nt-in .25s ease-out; }
.nt-card-body { flex: 1; min-width: 0; }
.nt-card .nt-title { font-weight: 600; }
.nt-card-btns { display: flex; align-items: center; gap: 4px; }
.nt-card-btns .btn { font-size: 9.5pt; padding: 2px 10px; }
@keyframes nt-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.dr-alltime { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.dr-at-h { margin: 0 0 6px; font-size: 11.5pt; font-weight: normal; }
.dr-at-box { width: 100%; }
.dr-at { width: 100%; height: auto; display: block; }
.dr-at .dr-yr { stroke-dasharray: 2 3; }
.dr-at-m { fill: none; stroke: #8fb0d6; stroke-width: 1.5; }
.dr-at-r { fill: none; stroke: #1f5494; stroke-width: 3; }
.dr-at-dot { fill: #5b8fc7; }
.dr-at-dot:hover { fill: #1f5494; r: 5; }
.dr-at-k { display: inline-block; width: 18px; height: 0; border-top: 2px solid #8fb0d6; vertical-align: middle; }
.dr-at-kr { border-top: 3px solid #1f5494; }
.dr-at-kg { border-top: 2px dashed var(--text); }
.dr-at .dr-ax { font-size: 14px; }
/* Filled area charts (Tracker) */
.dr-area-box { position: relative; width: 100%; }
.dr-area { width: 100%; height: auto; display: block; overflow: visible; }
.dr-fill-top { stop-color: #4f86c6; stop-opacity: .42; }
.dr-fill-bot { stop-color: #4f86c6; stop-opacity: .02; }
.dr-area-line { fill: none; stroke: #3b78c2; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.dr-area-soft { stroke-width: 1.5; stroke-opacity: .75; }
.dr-trend { fill: none; stroke: color-mix(in srgb, #2a64a8 72%, var(--text)); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.dr-grid-l { stroke: var(--line); stroke-opacity: .6; }
.dr-base { stroke: var(--dim); stroke-opacity: .6; }
.dr-area .dr-ax { fill: var(--dim); font-size: 14px; }
.dr-area .dr-bv { fill: var(--text); font-size: 14px; }
.dr-area .dr-goal { stroke: var(--text); stroke-width: 2; stroke-dasharray: 6 5; stroke-opacity: .7; }
.dr-dot { fill: var(--bg); stroke: #3b78c2; stroke-width: 2.5; }
.dr-hover-l { stroke: var(--dim); stroke-dasharray: 3 3; }
.dr-hover-d { fill: #3b78c2; stroke: var(--bg); stroke-width: 2; }
.dr-tip { position: absolute; pointer-events: none; z-index: 2; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 6px 10px; font-size: 9.5pt; white-space: nowrap; }
.dr-tip[hidden] { display: none; }
.dr-tip-h { font-weight: 600; }
.dr-tip-sub { color: var(--dim); }
.dr-at-km { height: 10px; border: 0; border-top: 2px solid #3b78c2; background: linear-gradient(rgba(79,134,198,.42), rgba(79,134,198,.05)); }
.dr-at-kr { border-top-color: color-mix(in srgb, #2a64a8 72%, var(--text)); border-top-width: 3.5px; }
/* Hero-style Tracker charts: see-through layers of one blue, like the BeatOrMiss home chart */
:root { --hero-c: color-mix(in srgb, #2f6aa6 72%, var(--text)); }
.dr-hero { width: 100%; height: auto; display: block; overflow: visible; }
.dr-hero-l { fill: var(--hero-c); stroke: none; }
.dr-hero-0 { fill-opacity: .42; }
.dr-hero-1 { fill-opacity: .30; }
.dr-hero-2 { fill-opacity: .26; }
.dr-hero .dr-ax { fill: var(--dim); font-size: 13px; }
.dr-hero .dr-bv { fill: var(--text); font-size: 14px; }
.dr-hero .dr-goal { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 6 5; stroke-opacity: .65; }
.dr-hero .dr-base { stroke: var(--line); stroke-opacity: 1; }
.dr-at-k.dr-hero-0, .dr-at-k.dr-hero-1, .dr-at-k.dr-hero-2 { width: 16px; height: 10px; border: 0; border-radius: 2px; background: var(--hero-c); }
.dr-at-k.dr-hero-0 { opacity: .75; }
.dr-at-k.dr-hero-1 { opacity: .45; }
.dr-at-k.dr-hero-2 { opacity: .25; }
/* Invitations you haven't answered look like an outline (as in Google Calendar); "No" is struck through; "Maybe" is striped lightly. */
.ev.ev-unanswered { background: var(--bg) !important; border: 1px dashed var(--ce, var(--dim)); color: var(--text) !important; }
.ev.ev-declined { opacity: .55; text-decoration: line-through; }
.ev.ev-maybe { opacity: .8; font-style: italic; }
.dt-rsvp-q { margin-bottom: 4px; }
.dt-rsvp button { font-size: 10.5pt; padding: 3px 16px; }
.dt-rsvp-scope { display: flex; flex-wrap: wrap; gap: 6px; }
.dt-rsvp { display: inline-flex; width: auto; }
.ev.ev-unanswered * { color: var(--text) !important; }
/* Grabbing a task (todo.js): drop outside the list to throw it away. */
.todo-ghost { position: fixed; z-index: 60; pointer-events: none; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); opacity: .95; transform: rotate(-1.5deg); }
.todo-ghost .todo-acts { display: none; }
.todo-ghost.todo-ghost-del { border-color: #A51C30; background: color-mix(in srgb, #A51C30 12%, var(--bg)); }
.todo-ghost[data-hint]:not([data-hint=""])::after { content: attr(data-hint); position: absolute; left: 8px; top: 100%; margin-top: 4px; font-size: 9pt; color: #fff; background: #A51C30; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.todo-lifted { opacity: .35; }
body.todo-grabbing, body.todo-grabbing * { cursor: grabbing !important; user-select: none; }
.todo-group.drop-here { outline: 2px dashed var(--dim); outline-offset: -2px; }
.todo-item .todo-body { cursor: grab; }

/* ---------- Glass themes (Jeff, 10/1/26): the calendar looks like a glossy
   screen in a dim room, with a diagonal reflection cutting across its lower
   right corner: the rest in shadow, that corner catching a soft light. Everything around the calendar
   stays plain. Blues and grays only. ---------- */
:root[data-theme="glass"] {
  color-scheme: light;
  --bg: #F7F9FB;
  --shade: #EDF1F5;
  --line: #D9E0E7;
  --text: #0F1E2C;
  --dim: #6A7887;
  --label: #1F4E79;
  --link: #2E75B6;
  --today: #DCE9F5;
  --accent-fill: #CFE0F0;
  --gray-border: #8494A5;
  --hol-bg: #F8E1E1;
  --hol-text: #5C0F0B;
  --hol-border: #C00000;
  --export-bg: #1F4E79;
  --export-text: #FFFFFF;
  --shadow: 0 8px 28px rgba(31, 60, 100, .16);
  --oc-bg: #F3F6FA;
  --oc-line: #DCE3EA;
  --oc-out: #E9EEF3;
  --screen: linear-gradient(170deg, #FBFCFE, #E6ECF3);
  --glare-dark: rgba(15, 35, 60, .12);
  --glare-dark2: rgba(15, 35, 60, .03);
  --glare-light: rgba(255, 255, 255, .38);
  --glare-light2: rgba(255, 255, 255, .1);
  --glare-edge: rgba(255, 255, 255, .7);
  --card-shadow: 0 18px 44px rgba(20, 40, 70, .18), 0 2px 6px rgba(20, 40, 70, .08);
}
:root[data-theme="glassdark"] {
  color-scheme: dark;
  --bg: #0B0F15;
  --shade: #161D27;
  --line: #262F3B;
  --text: #DCE4EE;
  --dim: #7F8D9C;
  --label: #9DC3E6;
  --link: #8FBDE6;
  --today: #142538;
  --accent-fill: #1C3550;
  --gray-border: #6F7D8C;
  --hol-bg: #3A1820;
  --hol-text: #F2C4C4;
  --hol-border: #FF7A9A;
  --export-bg: #9DC3E6;
  --export-text: #0B1420;
  --shadow: 0 8px 28px rgba(0, 0, 0, .6);
  --oc-bg: #0C1219;
  --oc-line: #1E2733;
  --oc-out: #0A0F15;
  --screen: linear-gradient(170deg, #111923, #070A0F);
  --glare-dark: rgba(0, 0, 0, .35);
  --glare-dark2: rgba(0, 0, 0, .12);
  --glare-light: rgba(170, 205, 240, .16);
  --glare-light2: rgba(170, 205, 240, .04);
  --glare-edge: rgba(200, 225, 250, .35);
  --card-shadow: 0 24px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(157, 195, 230, .08);
}
:root[data-theme="glassdark"] #view { --scene: var(--scene-dark, none); }
:root[data-theme^="glass"] #view {
  background: var(--wash-layer), var(--scene-layer), var(--screen);
  box-shadow: var(--card-shadow);
}
:root[data-theme^="glass"] .m-day.out { background: color-mix(in srgb, var(--oc-out) 70%, transparent); }
/* The reflection sits over the calendar (it doesn't catch clicks), lined up
   with the calendar card inside .main, so it stays put while the days scroll. */
:root[data-theme^="glass"] .main { position: relative; }
:root[data-theme^="glass"] .main::after {
  content: ""; position: absolute; pointer-events: none; z-index: 6;
  top: 8px; right: 12px; bottom: 12px; left: 4px; border-radius: 12px;
  background:
    linear-gradient(153.4deg,
      var(--glare-dark) 0%, var(--glare-dark2) 74%,
      var(--glare-edge) 76.6%, color-mix(in srgb, var(--glare-edge) 50%, var(--glare-light)) 79.5%,
      var(--glare-light) 85%, var(--glare-light2) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 18%);
  mix-blend-mode: normal;
}
:root[data-theme^="glass"] .app.no-side .main::after { left: 14px; }
:root[data-theme="glassdark"] .main::after { mix-blend-mode: screen; }
:root[data-theme="glassdark"] .main::after {
  background:
    linear-gradient(153.4deg,
      transparent 0%, transparent 74%,
      var(--glare-edge) 76.6%, color-mix(in srgb, var(--glare-edge) 50%, var(--glare-light)) 79.5%,
      var(--glare-light) 85%, var(--glare-light2) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 18%);
}
/* The shadow side in the dark version: a separate darkening layer. */
:root[data-theme="glassdark"] #view { background:
  linear-gradient(153.4deg, var(--glare-dark) 0%, var(--glare-dark2) 74%, transparent 76.8%),
  var(--wash-layer), var(--scene-layer), var(--screen); }
@media (prefers-reduced-transparency: reduce) { :root[data-theme^="glass"] .main::after { display: none; } }

/* ---------- Month flip (flip.js): the calendar turns over like a thick tablet ---------- */
.flip-stage { position: fixed; z-index: 50; pointer-events: none; perspective: 2000px; perspective-origin: 50% 40%; }
.flip-box { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.flip-side { position: absolute; left: 0; top: 0; }
.flip-front, .flip-back { width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; overflow: hidden; }
.flip-front > #view, .flip-back > #view { visibility: visible !important; }
.flip-shade { inset: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .2)); opacity: 0; border-radius: 12px; }
/* The rim slices: brushed metal in light themes, dark graphite in dark ones. */
.flip-slice { border-radius: 12px; background: #9AA3AD; }
:root[data-theme="dark"] .flip-slice, :root[data-theme^="slate"] .flip-slice, :root[data-theme="glassdark"] .flip-slice,
:root[data-theme="graphite"] .flip-slice, :root[data-theme="navy"] .flip-slice, :root[data-theme="espresso"] .flip-slice,
:root[data-theme="pine"] .flip-slice, :root[data-theme="plum"] .flip-slice { background: #353C45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .flip-slice { background: #353C45; } }
/* The glare belongs to the still calendar: hide it while the calendar flips. */
:root body.cal-flipping .main::after { display: none !important; }

/* The glare on the flipping screen (glass themes). --g is where the bright
   edge crosses the screen; flip.js slides it as the screen tilts. */
@property --g { syntax: '<percentage>'; inherits: false; initial-value: 76%; }
.flip-glare { inset: 0; width: 100%; height: 100%; border-radius: 12px; pointer-events: none;
  background: linear-gradient(153.4deg, var(--glare-dark) 0%, var(--glare-dark2) calc(var(--g) - 2%),
    var(--glare-edge) calc(var(--g) + .6%), color-mix(in srgb, var(--glare-edge) 50%, var(--glare-light)) calc(var(--g) + 3.5%),
    var(--glare-light) calc(var(--g) + 9%), var(--glare-light2) calc(var(--g) + 24%), transparent calc(var(--g) + 40%)); }
/* Glass night's shade normally lives in the calendar's own background; on the
   flipping copies the moving glare layer carries it instead. */
:root[data-theme="glassdark"] .flip-face { background: var(--wash-layer), var(--scene-layer), var(--screen) !important; }


/* ---------- Home screen (phones): what's next, big buttons, today and tomorrow ---------- */
.home { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.home-next { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--oc-out, transparent); cursor: pointer; }
.home-k { font-size: 10pt; color: var(--dim); }
.home-when { font-size: 12pt; color: var(--label); }
.home-title { font-size: 19pt; line-height: 1.15; overflow-wrap: anywhere; }
.home-sub { font-size: 11.5pt; color: var(--dim); }
.home-day h3 { margin: 0 0 4px; font-size: 12.5pt; font-weight: 400; color: var(--label); }
.home-row { display: grid; grid-template-columns: 14px 64px minmax(0, 1fr); align-items: center; gap: 6px; width: 100%; text-align: left;
  padding: 7px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; }
.home-row.past { opacity: .5; }
.home-t { color: var(--dim); font-size: 11pt; }
.home-name { overflow-wrap: anywhere; }
.home-empty { margin: 4px 0; color: var(--dim); }
.home-cal { align-self: flex-start; padding: 8px 16px; }
@media (max-width: 760px) {
  /* Home keeps the top bar to the menu, the date, settings and the view tabs. */
  .app.v-home .hdr #todayBtn, .app.v-home .hdr #prevBtn, .app.v-home .hdr #nextBtn, .app.v-home .hdr #phoneAdd,
  .app.v-home .hdr #phoneMic, .app.v-home .hdr #phonePhoto, .app.v-home .hdr #wxWrap, .app.v-home .hdr #searchBox,
  .app.v-home .hdr .nt-wrap, .app.v-home .hdr #themeBtn, .app.v-home .hdr #reloadBtn, .app.v-home .hdr #tallBtn,
  .app.v-home .hdr .mic-lang { display: none !important; }
  .app.v-home .hdr-title { flex-basis: auto; flex: 1; order: 0; font-size: 15pt; margin: 0 0 0 4px; }
  .app.v-home #settingsBtn { order: 1; }
  .app.v-home #view { border: 0; background: none; }
}

/* Settings: Speak Calendar Pro (coming soon; no payments yet) */
.pro-plan { color: var(--label); text-align: right; }
.pro-list { margin: 2px 0 6px; padding-left: 20px; font-size: 11pt; }
.pro-list li { margin: 1px 0; }
#setUpgrade:disabled { opacity: .6; cursor: default; }

/* Sideways swipes change the month on phones, not the browser page. */
html, body { overscroll-behavior-x: none; }

/* ---------- Phone quick add: Event and Task boxes at the top, each with Say, Photo, Type ---------- */
.quick-add { display: none; }
@media (max-width: 760px) {
  .quick-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 10px; }
  .qa-box { border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 7px; min-width: 0; }
  .qa-box h3 { margin: 0 0 5px 4px; font-size: 11pt; font-weight: 400; color: var(--label); }
  .qa-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .qa-btn { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-width: 0; padding: 7px 0 5px; border-radius: 9px; font-size: 9.5pt; }
  .qa-btn svg { width: 22px; height: 22px; fill: currentColor; }
  .qa-btn.listening { background: var(--qa-bg); border-color: var(--qa-bg); color: var(--qa-text); }
  .qa-box .mic-lang { display: none !important; }
  /* The quick-add boxes replace the header's own phone buttons. */
  .hdr #phoneAdd, .hdr #phoneMic, .hdr #phonePhoto { display: none !important; }
}

/* Google sync bar: the calendars picker and Disconnect are real buttons. */
.gsync .btn.g-off { padding: 3px 12px; font-size: 11.5pt; color: var(--text); }
.phone-note { display: none; }

/* ---------- iPhone cleanup (Jeff, 10/1/26) ---------- */
@media (max-width: 760px) {
  .desk-only { display: none !important; }
  .phone-note { display: block; margin: 0 0 8px; }
  /* Add Event / Add Task buttons stand out in red. */
  .qa-btn { background: var(--qa-bg); border-color: var(--qa-bg); color: var(--qa-text); }
  .qa-btn.listening { background: var(--qa-down); border-color: #ff8a80; color: #fff; }
  /* Task list: adding happens in the boxes at the top; no printing on a phone. */
  #todoForm, #todoPrint { display: none !important; }
  /* Bigger tasks, spaced for fingers. */
  .todo-item { padding: 12px 10px; gap: 14px; font-size: 14pt; min-height: 52px; align-items: center; border-bottom: 1px solid var(--line); }
  .todo-item input[type="checkbox"], .todo-item .todo-acts { align-self: center; margin-top: 0; }
  .set-pro .set-row { flex-wrap: wrap; } .pro-plan { text-align: left; }
  .todo-item input[type="checkbox"] { width: 28px; height: 28px; }
  .todo-acts { gap: 8px; }
  .todo-act { width: 46px; height: 46px; }
  .todo-act svg { width: 28px; height: 28px; }
  /* Side menu (three bars): no players, no Create / Event / Photo row. */
  .side .create-row, #ytSec { display: none !important; }
  /* Pop-ups fit a phone held upright. */
  .theme-menu, .nt-panel { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; max-width: none; min-width: 0; max-height: 75vh; overflow-y: auto; }
  .gsync { flex-wrap: wrap; }
}

/* "Back to calendar" stands apart from the other header buttons (Jeff, 10/1/26). */
.ai-head-btns .btn.btn-back { position: relative; margin-left: 14px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 14px 3px 10px; border-radius: 999px; font-weight: 600;
  background: var(--export-bg); color: var(--export-text); border-color: var(--export-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--export-bg) 30%, transparent); }
.ai-head-btns .btn.btn-back::before { content: ''; position: absolute; left: -10px; top: 2px; bottom: 2px; width: 1px; background: var(--line); }
.ai-head-btns .btn.btn-back svg { width: 16px; height: 16px; fill: currentColor; }
.ai-head-btns .btn.btn-back:hover { filter: brightness(1.12); }

/* ---------- Computer: the phone's Add Event box at the top of the left column, Add Task box in the task list ---------- */
@media (min-width: 761px) {
  .side > .quick-add { display: block; margin: 4px 4px 10px; }
  .side .qa-box, #todo > .qa-box { border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 5px; min-width: 0; }
  #todo > .qa-box { margin: 2px 8px 8px; }
  #todo > .qa-box[hidden] { display: none; }
  .side .qa-box h3, #todo > .qa-box h3 { margin: 0 0 4px 3px; font-size: 10pt; font-weight: 600; color: var(--label); }
  .side .qa-btns, #todo > .qa-box .qa-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .side .qa-btn, #todo > .qa-box .qa-btn { display: flex !important; flex-direction: row; align-items: center; justify-content: center; gap: 4px;
    min-width: 0; padding: 4px 0; border-radius: 7px; font-size: 10pt; line-height: 1.1;
    background: var(--qa-bg); border-color: var(--qa-bg); color: var(--qa-text); }
  .side .qa-btn:hover, #todo > .qa-box .qa-btn:hover { background: var(--qa-hover); border-color: var(--qa-hover); }
  .side .qa-btn svg, #todo > .qa-box .qa-btn svg { width: 17px; height: 17px; fill: currentColor; }
  .side .qa-btn.listening, #todo > .qa-box .qa-btn.listening { background: var(--qa-down); border-color: #ff8a80; color: #fff; }
  .side .qa-box .mic-lang, #todo > .qa-box .mic-lang { display: none !important; }
  /* The boxes replace the smaller Event/Photo buttons by Create and the task list's Add/Task/Photo row.
     Create keeps its menu (Daily routine, Tracker). */
  html:not(.hide-deskAdd) .create-row .speak-row, html:not(.hide-deskAdd) #todoForm { display: none !important; }
  .hide-deskAdd .side > .quick-add, .hide-deskAdd #todo > .qa-box { display: none !important; }
}

/* World times: click to choose the places */
.world-clocks { cursor: pointer; }
.world-clocks:hover b, .world-clocks:focus-visible b { text-decoration: none; color: var(--link); }
.world-clocks:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.modal-wc { width: min(560px, 94vw); }
.wc-rows { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.wc-row { display: flex; gap: 6px; align-items: center; }
.wc-row .wc-name { flex: 0 0 120px; min-width: 0; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.wc-row .wc-zone { flex: 1 1 auto; min-width: 0; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; }
.wc-row .wc-mini { flex: 0 0 auto; padding: 2px 8px; }
.modal-wc .modal-actions { flex-wrap: wrap; gap: 6px; }

/* Task picked with the arrow keys */
.todo-item.kb-sel { outline: 2px solid var(--link); outline-offset: -2px; border-radius: 6px; background: color-mix(in srgb, var(--link) 12%, transparent); }

/* Jeff 10/1/26: no Create button (the Add boxes and the right-edge icons cover it) */
.create-row .create-wrap { display: none !important; }
html:not(.hide-deskAdd) .side > .create-row { display: none !important; }
#todo > .qa-box { margin-top: 4px; }
/* Bold text option (Settings > Text weight) */
.text-bold .todo-text, .text-bold .ev, .text-bold .hdr-title, .text-bold .side-head, .text-bold .mini-day { font-weight: 600; }

/* Month view: the day's weather shows at the bottom of the box while the mouse is over it */
.m-hover-wx { display: none; }
@media (hover: hover) and (min-width: 761px) {
  .m-wrap:not(.pz) .m-day:hover .m-hover-wx {
    display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; position: absolute; left: 4px; right: 4px; bottom: 4px; z-index: 4;
    padding: 2px 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--label);
    font-size: 9.5pt; line-height: 1.2; color: var(--text); white-space: nowrap; overflow: hidden; pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  }
  .m-hover-wx svg { flex: 0 0 auto; width: 16px; height: 16px; fill: var(--label); }
  .m-hover-wx b { font-weight: 600; }
  .m-hover-wx .wx-words { flex: 1 0 100%; font-size: 8.5pt; color: var(--dim); white-space: normal; }
}

/* The calendar's own name at the top of the left column (Jeff, 10/1/26) */
.cal-name-row { display: flex; align-items: center; gap: 2px; margin: 0 0 2px; }
.cal-name-row .icon-wide { flex: 0 0 auto; margin: 0; }
.cal-name { flex: 1 1 auto; min-width: 0; display: block; margin: 0 0 0 4px; padding: 2px 6px; min-height: 1.3em;
  font-size: 12pt; font-weight: 600; line-height: 1.3; color: var(--label); overflow-wrap: anywhere;
  border: 1px solid transparent; border-radius: 6px; cursor: text; }
.cal-name:empty::before { content: attr(data-placeholder); color: var(--dim); font-weight: 300; }
.cal-name:hover { border-color: var(--line); }
.cal-name:focus { outline: none; border-color: var(--label); background: var(--bg); }
@media (max-width: 760px) { .cal-name, .cal-name-row { display: none; } }

/* Three-line menu: left column and account (Jeff, 10/1/26) */
.acct-wrap { flex: 0 0 auto; }
.acct-menu { left: 0; right: auto; min-width: 320px; }
.acct-menu button { white-space: nowrap; }
.acct-menu button { font-size: 11.5pt; padding: 7px 16px; }
.acct-menu .soon { font-size: 9pt; color: var(--dim); }
.menu-sep { height: 1px; margin: 6px 0; background: var(--line); }
.menu-label { padding: 2px 16px 4px; font-size: 9.5pt; font-weight: 600; color: var(--label); }

/* Add Event / Add Task buttons: blue RGB(28,95,166) unless changed in Settings > Look > Add buttons color */
:root { --qa-bg: #1C5FA6; --qa-text: #FFFFFF;
  --qa-hover: color-mix(in srgb, var(--qa-bg) 84%, #000); --qa-down: color-mix(in srgb, var(--qa-bg) 62%, #000); }

/* Help window: topics on the left, one page at a time on the right */
.modal-help { width: min(860px, 96vw); height: min(640px, 90vh); padding: 0; display: none; }
.modal-help[open] { display: flex; flex-direction: column; }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px 20px; border-bottom: 1px solid var(--line); }
.help-head h3 { margin: 0; }
.help-body { flex: 1; display: flex; min-height: 0; }
.help-nav { flex: 0 0 210px; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-right: 1px solid var(--line); overflow-y: auto; }
.help-nav button { text-align: left; background: none; border: 1px solid transparent; border-radius: 7px; padding: 6px 10px; font: inherit; font-size: 11pt; color: var(--text); cursor: pointer; }
.help-nav button:hover { border-color: var(--line); }
.help-nav button[aria-selected="true"] { background: var(--export-bg); color: var(--export-text); font-weight: 600; }
.help-pages { flex: 1; overflow-y: auto; padding: 14px 22px 22px; font-size: 11.5pt; line-height: 1.45; }
.help-pages h4 { margin: 0 0 10px; font-size: 14pt; color: var(--label); }
.help-pages ul { padding-left: 20px; margin: 0 0 10px; } .help-pages li { margin: 0 0 8px; }
.help-keys { border-collapse: collapse; width: 100%; }
.help-keys td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-keys td:first-child { white-space: nowrap; width: 1%; }
.help-keys kbd, .help-pages kbd { display: inline-block; min-width: 1.4em; text-align: center; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; font: inherit; font-size: 10pt; background: var(--shade); }
@media (max-width: 760px) {
  .help-body { flex-direction: column; }
  .help-nav { flex: 0 0 auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .help-nav button { white-space: nowrap; }
}

/* Header text in plain white, black or gray (Settings > Look > Header text) */
.hdr-ink .hdr-title, .hdr-ink .hdr .icon-btn, .hdr-ink .hdr .btn-pill, .hdr-ink .hdr .wx-btn,
.hdr-ink .hdr .view-tabs button:not([aria-pressed="true"]), .hdr-ink .hdr .world-clocks, .hdr-ink .hdr .world-clocks b { color: var(--hdr-ink, var(--text)); }
.hdr-ink .hdr .icon-btn:hover, .hdr-ink .hdr .view-tabs button:not([aria-pressed="true"]):hover { color: var(--hdr-ink, var(--text)); background: var(--shade); }
.hdr-ink .hdr .icon-btn svg, .hdr-ink .hdr .icon-btn:hover svg { fill: var(--hdr-ink, var(--text)); }
.help-made { margin-top: 18px; font-size: 10pt; color: var(--dim); }

/* Help: Speak Calendar logo (lettering follows the theme; icon stays brand blue) */
.help-logo { display: block; width: 220px; max-width: 100%; height: auto; margin: 2px 0 10px; }
.help-logo .lg-a { fill: var(--text); }
.help-logo .lg-b { fill: var(--dim); }

/* Speak Calendar logo next to the menu button (lettering follows the theme) */
.hdr-logo { display: inline-flex; align-items: center; flex: none; margin: 0 14px 0 2px; }
.hdr-logo-svg { height: 30px; width: auto; display: block; }
.hdr-logo .lg-a { fill: var(--text); }
.hdr-logo .lg-b { fill: var(--dim); }
.hdr-ink .hdr-logo .lg-a { fill: var(--hdr-ink, var(--text)); }
@media (max-width: 700px) { .hdr-logo { display: none; } }

/* Tighter header on computers: smaller icons packed closer, smaller Weather button */
@media (min-width: 701px) {
  .hdr { gap: 1px; }
  .hdr .icon-btn { width: 36px; height: 36px; }
  .hdr .icon-btn svg { width: 22px; height: 22px; }
  .hdr .wx-btn { height: 32px; padding: 0 8px 0 6px; gap: 4px; font-size: 12pt; }
  .hdr .wx-btn svg { width: 21px; height: 21px; }
  .hdr .wx-btn svg.wx-sm { width: 14px; height: 14px; }
}
/* Sign in with Google window and the account rows in Settings > Pro. */
.modal-signin { width: min(380px, calc(100vw - 32px)); }
.modal-signin .signin-btn { display: flex; justify-content: center; min-height: 44px; margin: 14px 0 6px; color: var(--dim); }
.pro-acct, .pro-btns { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; }
.pro-acct #setAcct { color: var(--label); }
.set-usage { margin: 4px 0 8px; }
.set-usage-h { color: var(--dim); margin-bottom: 2px; }
