/* ProDo — 16b: the premium-minimal version.
 *
 * White paper, one blue, grey for everything that is not the point. Big
 * headline tabs instead of a toolbar, hairlines instead of cards, a wide pill
 * at the bottom to talk to DoDoo. Nothing glows, nothing moves unless you move it.
 *
 * Legacy token names (--paper, --tactile, --cyan…) still resolve so the
 * calendar grid and the editors keep working; they now all point at the same
 * few flat colours.
 */
:root {
  /* ---- design tokens (16b) ---- */
  --bg-app:            #F7F8FA;
  --bg-surface:        #FFFFFF;
  --bg-sidebar:        #171C28;
  --bg-sidebar-active: #262D3D;
  --text-primary:      #131722;
  --text-secondary:    #667085;
  --text-muted:        #98A2B3;
  --text-inverse:      #FFFFFF;
  --border-subtle:     #E8ECF2;
  --primary:           #4169F6;
  --primary-hover:     #3459E6;
  --primary-soft:      #EEF2FF;
  --violet:            #7857F6;
  --violet-soft:       #F1EDFF;
  --green:             #30B878;
  --orange:            #F5A623;
  --red:               #E5484D;
  --red-soft:          #FDECEC;
  --radius-sm: 10px; --radius-md: 14px; --radius-lg: 18px; --radius-xl: 22px;
  --shadow-card:  0 4px 16px rgba(16,24,40,.06);
  --shadow-float: 0 12px 32px rgba(16,24,40,.12), 0 0 0 1px var(--border-subtle);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px;
  --row-h: 52px;
  --focus: 0 0 0 3px rgba(65,105,246,.28);

  /* ---- names the rest of the sheet uses ---- */
  --bg:           var(--bg-app);
  --ink:          var(--text-primary);
  --ink-2:        #3C4250;
  --muted:        var(--text-secondary);
  --muted-2:      #4B5565;
  --line:         var(--border-subtle);
  --line-2:       #DCE1E9;
  --tile:         #F2F4F7;
  --tile-2:       #F7F8FA;
  --accent:       var(--primary);
  --accent-lift:  var(--primary-hover);
  --accent-2:     var(--primary);
  --accent-title: var(--text-primary);
  --tint:         var(--primary-soft);
  --tint-2:       #F5F7FF;
  --accent-soft:  var(--tint);
  --on-accent:    #FFFFFF;
  --danger:       var(--red);
  --ok:           var(--green);
  --purple:       var(--violet);
  --purple-glow:  rgba(120,87,246,.16);
  --green-glow:   rgba(48,184,120,.16);
  --scene: #FFFFFF; --glass: #FFFFFF; --glass-edge: transparent;
  --paper: #FFFFFF; --paper-2: var(--tile-2); --paper-solid: #FFFFFF; --base: #FFFFFF;
  --tactile: #1E2230; --tactile-2: #2B3040;
  --cyan: var(--accent); --cyan-glow: rgba(65,105,246,.2);
  --rim: none; --sheen: none;
  --shadow:       0 0 0 1px var(--line);
  --shadow-lift:  var(--shadow-float);
  --blue-glow:    0 6px 16px rgba(65,105,246,.2);
  --shadow-sm: var(--shadow); --hairline: var(--line); --glass-brd: var(--line); --highlight: none;
  --radius:       var(--radius-lg);
  --radius-sm:    var(--radius-md);
  --pill:         999px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overscroll-behavior: none; touch-action: pan-x pan-y; }
body { position: fixed; inset: 0; overflow: hidden; }
/* iOS zooms the page when a field with text smaller than 16px is focused. Never on a phone. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]), textarea, select { font-size: 16px !important; }
}
body {
  margin: 0; color: var(--ink); font-family: var(--font); font-size: 14px; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  background: #F7F8FA url("/bg.jpg") center / cover no-repeat fixed;
}
@media (min-width: 900px) { body { background-attachment: fixed; } }
button, input, textarea, select { font-family: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------- the frame
 * Phone: one column, the navigation panel slides in from the left.
 * Desktop/tablet (>= 900px): the dark panel stays put on the left, content
 * is a centred column on a very light grey ground.
 */
.app {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  height: calc(100dvh - var(--kb, 0px)); width: 100%; margin: 0 auto; overflow: hidden;
  background: transparent; padding-top: env(safe-area-inset-top);
  transition: height .2s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 900px) {
  /* app.js moves #sidebar up to be the first child of .app on wide screens */
  .app { display: grid; grid-template-columns: 264px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding-top: 0; background: transparent; }
  .app > .topbar { display: none; }
  .app > .sidebar { grid-column: 1; grid-row: 1 / -1; position: relative; transform: none !important; height: 100%; width: 264px; }
  .app > .views-bar { grid-column: 2; grid-row: 1; padding: 24px 40px 0; max-width: 840px; width: 100%; margin: 0 auto; }
  .shell { grid-column: 2; grid-row: 2; min-width: 0; }
  .scrim { display: none !important; }
  .main { max-width: 840px; margin: 0 auto; width: 100%; }
  .app > .views-bar .desk-head { display: flex; }
  .bottom-row { left: 264px; right: 0; margin: 0 auto; width: min(840px, calc(100% - 264px)); padding: 0 40px; box-sizing: border-box; }
  .add-menu { left: auto; right: 40px; width: 360px; }
  .dock { left: auto; right: 24px; width: 420px; bottom: 24px; height: min(720px, calc(100% - 48px - var(--kb, 0px))); border-radius: var(--radius-xl); box-shadow: var(--shadow-float); }
  .sidebar.open ~ * { }
}
@media (min-width: 700px) and (max-width: 899px) {
  .main { max-width: 640px; margin: 0 auto; }
}

/* ---------------------------------------------------------------- topbar
 * Phone: menu · search · alerts. The greeting lives in the header below.
 */
.topbar { display: flex; align-items: center; gap: var(--s2); flex-shrink: 0; height: 56px; padding: 4px var(--s4) 0; }
.nav-toggle, .icon-btn, .search-open { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 0; background: none; color: var(--text-secondary); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; position: relative; transition: background .15s ease, color .15s ease; }
.nav-toggle { margin-left: -8px; color: var(--text-primary); }
.nav-toggle svg, .icon-btn svg, .search-open svg { width: 22px; height: 22px; }
.icon-btn:hover, .search-open:hover, .nav-toggle:hover { background: var(--tile); color: var(--text-primary); }
.icon-btn:active, .search-open:active, .nav-toggle:active { transform: scale(.94); }
.topbar .avatar, .topbar .logo-tile, .topbar .wordmark { display: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.search-open span, .search-open kbd { display: none; }
.upgrade-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer; margin-right: 6px;
  background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.upgrade-pill:active { transform: scale(.97); }
.upgrade-pill .spark { font-size: 12px; }
.dodoo-btn .dodoo { width: 28px; height: 28px; }
.alert-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 999px; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.pill-link { padding: 9px 16px; border-radius: 999px; background: var(--tile); font-size: 13px; font-weight: 600; color: var(--ink); }

/* ----------------------------------------------------------- page header
 * "Good morning," / Mehmet / the date, then the segmented control and the
 * filter chips. On desktop the same header, with search and alerts on the right.
 */
.views-bar { flex-shrink: 0; padding: 0 var(--s4); }
.views-bar[hidden] { display: none; }
.page-title { padding: 2px 0 0; display: flex; align-items: baseline; gap: 12px; min-height: 40px; }
.page-title h1 { font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; color: var(--text-primary); margin: 0; animation: titleIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes titleIn { from { opacity: 0; transform: translateY(6px); } }
.greet-date { font-size: 13px; color: var(--text-muted); font-weight: 500; }
/* Inside a project the title gets a way out: a small "‹ All" pill before the name. */
.proj-back { display: inline-flex; align-items: center; gap: 2px; align-self: center; height: 28px; padding: 0 10px 0 6px;
  border: 0; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; animation: titleIn .28s cubic-bezier(.2,.8,.2,1); }
.proj-back svg { width: 16px; height: 16px; }
.proj-back:active { transform: scale(.96); }
.page-title.in-project h1 { font-size: 26px; }
.greet-date:empty { display: none; }
.desk-head { display: none; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.desk-head .topbar-right { margin-left: auto; }

/* segmented control: Do · Notes · Calendar */
.seg { position: relative; display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-md); margin-top: 14px; isolation: isolate;
  background: rgba(238,240,244,.72); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(255,255,255,.4); }
.seg-thumb { position: absolute; top: 4px; left: 4px; height: calc(100% - 8px); width: 0; border-radius: 10px; z-index: 0; opacity: 0;
  background: linear-gradient(180deg, #4F78FF, var(--primary)); box-shadow: 0 2px 8px rgba(65,105,246,.3), inset 0 1px 0 rgba(255,255,255,.35); }
.seg-thumb.ready { opacity: 1; transition: transform .3s cubic-bezier(.3,1.15,.3,1); will-change: transform; }
.seg .view, .seg a { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 10px; border: 0; background: none; color: var(--text-secondary);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: background .15s ease, color .15s ease, box-shadow .15s ease; line-height: 1.2; }
.seg .view { position: relative; z-index: 1; flex: 1; justify-content: center; }
.seg .view.on { color: #fff; }
.seg .view:not(.on):hover { color: var(--text-primary); }
.seg .view:active { transform: scale(.96); }
.seg .view { transition: color .2s ease, transform .15s ease; }
.seg .view .n { display: none; }
.seg { display: flex; }
.views { list-style: none; margin: 0; padding: 0; display: contents; }
.views li { display: contents; }

/* filter chips: All · Today · Upcoming */
.filter-row { display: flex; gap: 8px; margin: 14px 0 6px; align-items: center; }
.filter-row[hidden] { display: none; }
.chip-toggle { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  background: var(--tile); color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; min-height: 36px; transition: background .15s ease, color .15s ease; }
.chip-toggle .n { color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip-toggle .n:empty { display: none; }
.chip-toggle:hover { background: #E9ECF1; }
.chip-toggle.on { background: var(--primary-soft); color: var(--primary); }
.chip-toggle.on .n { color: var(--primary); opacity: .8; }
.filter-more { margin-left: auto; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--tile); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Up next: a card of the next couple of events */
.upnext { margin: 14px 0 0; }
.upnext[hidden] { display: none; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.sec-head h2 { font-size: 16px; font-weight: 650; margin: 0; letter-spacing: -.01em; color: var(--text-primary); }
.sec-head .link, .upnext-link { font: inherit; font-size: 13px; font-weight: 600; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
.sec-head .cnt { font-size: 13px; font-weight: 600; color: var(--primary); }
.sec-head h2, .block-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.sec-add { width: 26px; height: 26px; border-radius: 999px; border: 0; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; vertical-align: middle; transition: transform .15s ease, background .15s ease; position: relative; }
.sec-add svg { width: 14px; height: 14px; }
.sec-add::after { content: ""; position: absolute; inset: -9px; }
.sec-add:hover { background: #E0E7FF; }
.sec-add:active { transform: scale(.9); }
.block-head .sec-add { margin-left: 2px; }
.upnext-head { display: none; }
.upnext-foot { display: none; }
.card { background: rgba(255,255,255,.86); border: 1px solid rgba(232,236,242,.9); border-radius: var(--radius-lg); }
.upnext-list { display: flex; flex-direction: column; }
.upnext-row { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; min-height: 56px; cursor: pointer; border-radius: var(--radius-md); transition: background .15s ease; }
.upnext-row:hover { background: var(--tile-2); }
.upnext-row + .upnext-row { border-top: 1px solid var(--border-subtle); }
.upnext-row .pd { width: 8px; height: 8px; border-radius: 999px; background: var(--pc, var(--primary)); flex: none; }
.upnext-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upnext-row .t { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; font-weight: 500; }
.upnext-row .ti { font-size: 14px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upnext-row .cl { font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.upnext-row .go { width: 32px; height: 32px; border-radius: 999px; background: var(--tile); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; flex: none; }
.upnext-empty { padding: 16px 14px; font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* --------------------------------------------------------------- sidebar
 * The dark navigation panel: logo, search, the four places, projects,
 * upgrade, settings, you.
 */
.shell { flex: 1; display: flex; min-height: 0; position: relative; }
.scrim { position: fixed; inset: 0; z-index: 44; background: rgba(15,18,28,.45); transition: opacity .28s ease; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: var(--kb, 0px); width: min(300px, 84vw); z-index: 45;
  padding: calc(16px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto;
  background: rgba(23,28,40,.86); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  color: #E6E9F0; display: flex; flex-direction: column; gap: 2px; box-shadow: inset -1px 0 0 rgba(255,255,255,.06), 12px 0 40px rgba(0,0,0,.25);
  transform: translateX(-104%); transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.sidebar.open { transform: none; }
.side-top, .side-head, .side-close, .fold, .side-sub, .side-link, .side-card { display: none; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.side-brand .dodoo { width: 30px; height: 30px; }
.side-brand .name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: #fff; flex: 1; }
.side-brand .more { width: 28px; height: 28px; border: 0; background: none; color: #8A93A8; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.side-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,.06); color: #8A93A8; font-size: 13px; cursor: pointer; border: 0; width: 100%; text-align: left; margin-bottom: 14px; }
.side-search svg { width: 16px; height: 16px; flex: none; }
.side-search kbd { margin-left: auto; font: inherit; font-size: 11px; color: #6B7488; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-item, .side-row { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--radius-sm); border: 0; background: none; width: 100%;
  font: inherit; font-size: 14px; font-weight: 500; color: #C5CBD8; cursor: pointer; text-align: left; text-decoration: none; transition: background .15s ease, color .15s ease; }
.side-item svg, .side-row svg { width: 20px; height: 20px; flex: none; color: #8A93A8; }
.side-item:hover, .side-row:hover { background: rgba(255,255,255,.05); color: #fff; }
.side-item.on { background: var(--bg-sidebar-active); color: #fff; }
.side-item.on svg { color: var(--primary); }
.side-item .n, .client-btn .n { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary); color: #fff;
  font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.side-item .n:empty, .client-btn .n:empty { display: none; }
.client-btn .n { background: rgba(255,255,255,.08); color: #C5CBD8; }
.side-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #6B7488; font-weight: 600; letter-spacing: .02em; margin: 22px 12px 6px; }
.side-label button { width: 22px; height: 22px; border: 0; background: none; color: #8A93A8; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 0; }
.side-label button:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.client-btn { width: 100%; text-align: left; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; color: #C5CBD8;
  height: 40px; padding: 0 12px; border-radius: var(--radius-sm); border: 0; background: none; display: flex; align-items: center; gap: 12px; transition: background .15s ease; }
.client-btn:hover { background: rgba(255,255,255,.05); color: #fff; }
.client-btn.on { background: var(--bg-sidebar-active); color: #fff; }
.client-btn .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.pdot { flex: none; width: 10px; height: 10px; border-radius: 999px; background: var(--pc, var(--primary)); }
.side-add { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500;
  color: #8A93A8; cursor: pointer; text-align: left; border-radius: var(--radius-sm); }
.side-add:hover { color: #fff; background: rgba(255,255,255,.05); }
.side-add svg { width: 18px; height: 18px; margin: 0 1px; }
.side-empty { padding: 6px 12px; font-size: 13px; color: #6B7488; }
.clients.closed .client-btn { color: #6B7488; }
.clients.closed .client-btn .name { text-decoration: line-through; }
.side-bottom { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.upgrade-btn { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: var(--radius-sm); border: 0; cursor: pointer; width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--violet)); color: #fff; font: inherit; font-size: 14px; font-weight: 600; text-align: left; margin-bottom: 6px; }
.upgrade-btn svg { width: 18px; height: 18px; }
.upgrade-btn:active { transform: scale(.985); }
.side-me { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px; border-radius: var(--radius-sm); border: 0; background: none; width: 100%; cursor: pointer; text-align: left; margin-top: 6px; }
.side-me:hover { background: rgba(255,255,255,.05); }
.side-me .avatar { width: 32px; height: 32px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; border: 0; padding: 0; }
.side-me .avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-me .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-me .who b { font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me .who small { font-size: 11.5px; color: #8A93A8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me svg { color: #6B7488; width: 16px; height: 16px; }
.proj-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ main */
.main { flex: 1; min-width: 0; overflow: hidden; padding: 0; position: relative; }
.track { display: flex; height: 100%; width: 300%; will-change: transform; transform: translateX(calc(var(--pane, 0) * -33.3333%));
  transition: transform .42s cubic-bezier(.32,.72,0,1); }
.pane { width: 33.3333%; flex: none; height: 100%; overflow-y: auto; overflow-x: hidden; padding: 4px var(--s4) 150px; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
@media (min-width: 900px) { .pane { padding: 8px 40px 140px; } }
.view-head { margin: 14px 0 6px; position: relative; }
.view-head h1 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.03em; }
.view-head h1.editable { cursor: text; border-radius: 8px; }
.view-head h1.editing { box-shadow: var(--focus); }
.view-sub { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.view-head.plain { display: none; }
body.in-screen .views-bar, body.in-screen .upgrade-pill { display: none; }
body.in-screen .view-head { margin-top: 4px; }
.cal-new { display: none; }
.view-head.compact { margin: 6px 0 8px; }
.view-head.compact h1 { font-size: 28px; }
.view-head.compact .view-sub { display: block; }
.view-back { display: inline-flex; align-items: center; gap: 2px; font: inherit; font-size: 15px; font-weight: 500; color: var(--primary);
  background: none; border: 0; padding: 6px 0; margin: 0 0 6px -4px; cursor: pointer; }
.view-back svg { width: 18px; height: 18px; }
.ghost-btn { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-subtle); background: #fff; color: var(--text-primary); cursor: pointer; transition: background .15s ease; }
.ghost-btn:hover { background: var(--tile-2); }
.ghost-btn.danger { color: var(--red); }
.pswatch { width: 22px; height: 22px; border-radius: 999px; border: 0; background: var(--pc); cursor: pointer; box-shadow: 0 0 0 2px #fff; }
.pswatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pc); }
.proj-colors { display: flex; gap: 8px; align-items: center; margin-right: 6px; }

/* quick add: the row at the bottom of the board, and an inline form when opened from + */
.composer-row { display: none; align-items: center; gap: 8px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 4px 4px 4px 14px; margin: 12px 0 8px; }
.composer-row.show { display: flex; }
.composer-row input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 15px; color: var(--ink); padding: 11px 0; }
.composer-row input::placeholder { color: var(--text-muted); }
.add-project { max-width: 120px; border: 0; background: var(--tile); border-radius: 999px; padding: 8px 10px; font-size: 12.5px; color: var(--text-secondary); }
.add-go { width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.add-go:hover { background: var(--primary-hover); }
.parse-hint { font-size: 12.5px; color: var(--text-secondary); margin: -2px 0 8px 14px; }

/* ------------------------------------------------------------- task rows */
.block { margin-top: 24px; }
.block-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.block-head h2 { font-size: 16px; font-weight: 650; color: var(--text-primary); margin: 0; letter-spacing: -.01em; }
.block-head span { font-size: 13px; color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.block-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.block-tools input { border: 0; border-radius: 999px; padding: 8px 12px; font-size: 13px; background: var(--tile); width: 120px; }
.rows { list-style: none; margin: 0; padding: 0; background: rgba(255,255,255,.86); overflow: hidden; border: 1px solid rgba(232,236,242,.9); border-radius: var(--radius-lg); }
.rows li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px 12px 14px; min-height: var(--row-h); border-top: 1px solid var(--border-subtle); transition: opacity .25s ease, background .15s ease; }
.rows li:hover { background: var(--tile-2); }
.rows li:first-child, .rows li.day-head + li, li.day-head { border-top: 0; }
.rows li.day-head { display: block; padding: 14px 14px 6px; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); background: rgba(247,248,250,.8); }
.rows li.day-head:hover { background: rgba(247,248,250,.8); }
.day-head { font-size: 12px; font-weight: 600; color: var(--text-muted); }
/* swipe reveals: red to the right of the row (delete), green to its left (done) */
#tasks > li, #notes > li { position: relative; touch-action: pan-y; background: rgba(255,255,255,.9); }
#tasks > li::before, #notes > li::before, #tasks > li::after {
  position: absolute; top: 0; bottom: 0; width: 100vw; display: flex; align-items: center; font-size: 13px; font-weight: 600;
  color: #fff; letter-spacing: .02em; opacity: 0; transition: opacity .15s ease;
}
#tasks > li::before, #notes > li::before { content: "Delete"; left: 100%; padding-left: 18px; justify-content: flex-start; background: var(--red); }
#tasks > li::after { content: "Done"; right: 100%; padding-right: 18px; justify-content: flex-end; background: var(--green); }
#tasks > li.sw-l::before, #notes > li.sw-l::before, #tasks > li.sw-r::after { opacity: 1; }
#tasks > li.day-head::before, #tasks > li.day-head::after { display: none; }
.rows li.empty { color: var(--text-secondary); font-size: 14px; padding: 28px 16px; display: block; border-top: 0; text-align: center; }
li.striking { opacity: .45; }
li.striking .t-title { text-decoration: line-through; }
li.task.done-row .t-title { text-decoration: line-through; color: var(--text-muted); }
li.task.done-row { opacity: .7; }
.check { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; position: relative; border-radius: 999px; border: 1.5px solid #C7CDD8; background: #fff;
  cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; transition: background .15s ease, border-color .15s ease, transform .15s cubic-bezier(.34,1.56,.64,1); }
.check::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%,-50%); }
.check:hover { border-color: var(--primary); }
.check svg { display: none; width: 12px; height: 12px; }
.check.done { background: var(--primary); border-color: var(--primary); transform: scale(1.05); }
.check.done svg { display: block; }
.row-main { flex: 1; min-width: 0; cursor: pointer; }
.t-title { font-size: 15px; line-height: 1.35; font-weight: 500; color: var(--text-primary); }
.t-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 12.5px; font-weight: 500; padding: 0; border-radius: 0; border: 0; background: none; color: var(--text-secondary); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; }
.chip.pc::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--pc); }
.chip.pc { color: var(--text-secondary); background: none; }
button.chip { cursor: pointer; }
.chip.none { color: var(--text-muted); border: 0; }
.chip-select { font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--primary); background: #fff; color: var(--ink); max-width: 200px; }
.when { font-variant-numeric: tabular-nums; cursor: pointer; font-weight: 500; }
.when.late { color: var(--red); font-weight: 600; }
.when.soon { color: var(--primary); font-weight: 600; }
.time-input { border: 1px solid var(--line-2); border-radius: 10px; padding: 5px 7px; font-size: 13px; font-family: var(--font); margin-top: 6px; background: #fff; }
.row-x, .row-more { width: 32px; height: 32px; flex-shrink: 0; border-radius: 999px; padding: 0; position: relative; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: background .15s ease, color .15s ease; }
.row-x::after, .row-more::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%,-50%); }
.row-more:hover, .row-x:hover { background: var(--tile); color: var(--text-primary); }
.row-x:active { color: var(--red); }
.row-x { display: none; }   /* delete lives in the ⋯ menu and in the swipe */
.main.is-board #tasks-block .block-head span { display: inline; }

/* row menu (⋯) and other small floating menus */
.menu { position: fixed; z-index: 60; min-width: 200px; border-radius: var(--radius-md); padding: 6px; animation: menuIn .18s cubic-bezier(.2,.8,.2,1);
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 12px 32px rgba(16,24,40,.14), inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 1px rgba(16,24,40,.06); transform-origin: top right; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--text-primary); cursor: pointer; text-align: left; border-radius: 10px; }
.menu button svg { width: 18px; height: 18px; color: var(--text-secondary); }
.menu button:hover { background: var(--tile-2); }
.menu button.danger, .menu button.danger svg { color: var(--red); }
.menu hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 4px 6px; }

/* notes rows on a project page (the board's Notes tab is the wall) */
.cards { list-style: none; margin: 0; padding: 0; }
.cards > li + li { border-top: 1px solid var(--line); }
.note-card { padding: 12px 4px 12px 2px; position: relative; }
.note-card .row-x { position: absolute; top: 10px; right: 0; }
.n-title { font-size: 17px; font-weight: 500; line-height: 1.35; padding-right: 34px; }
.n-body { font-size: 14.5px; line-height: 1.5; color: var(--muted-2); margin-top: 4px; white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.note-card.open .n-body { -webkit-line-clamp: unset; display: block; }
.n-body.same { display: none; }
.n-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.cards li.empty { color: var(--muted); font-size: 15px; padding: 8px 4px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; border: 0; background: var(--tile); color: var(--ink-2); }
.tag.on { background: var(--accent); color: #fff; }
[data-edit] { border-radius: 6px; outline: none; }
[data-edit].editing { background: #fff; box-shadow: 0 0 0 2px rgba(59,102,230,.35); padding: 2px 6px; margin: -2px -6px; -webkit-line-clamp: unset; display: block; overflow: visible; }
.gmuted { font-size: 13px; color: var(--muted); }
.gok { font-size: 13px; color: var(--ok); font-weight: 600; }

/* ---- calendar (grid, week, month, agenda) ---- */
/* ------------------------------------------------------------- calendar */
/* ------------------------------------------------------------------ calendar
 *
 * Four views share one bar. The time grid is absolutely positioned inside a
 * column whose height IS the day (24h x PX_PER_MIN), so every block's top and
 * height are just minutes x a constant — the same arithmetic the drag handler
 * uses, in both directions.
 */
.cal { margin-bottom: 8px; display: flex; flex-direction: column; min-height: 0; }
.cal-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cal-nav {
  width: 40px; height: 40px; border-radius: 999px; border: 0; box-shadow: var(--shadow);
  background: var(--paper); color: var(--muted-2); font-size: 18px; line-height: 1; cursor: pointer;
}
.cal-nav:hover { border-color: var(--line-2); color: var(--ink); }
.cal-title { font-size: 15px; font-weight: 600; margin-left: 4px; }
/* Day / Week / Month / Agenda: one glass segment control, every segment a
   full thumb tall, the active one a lit blue pill. */
.cal-modes { margin-left: auto; display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--paper); box-shadow: var(--shadow); background-image: var(--sheen); }
.cal-mode {
  border: 0; background: transparent; color: var(--muted-2); box-shadow: none;
  border-radius: 999px; min-height: 40px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.cal-mode:active { transform: scale(.97); }
.cal-mode.on { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff;
  box-shadow: 0 6px 16px rgba(59,102,230,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.cal-new { width: 40px; height: 40px; flex: none; }

/* ---- month ---- */
.cal-dows {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.cal[data-mode="day"] .cal-dows,
.cal[data-mode="week"] .cal-dows,
.cal[data-mode="agenda"] .cal-dows { display: none; }
.cal-dows div { padding: 0 8px 6px; }
/* Six equal rows filling the available height — set by fitMonth() — so a busy
   day never makes its week taller than the rest. Cells clip; the overflow
   becomes "+N more". */
.cal-month {
  display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr);
  gap: 1px; height: 520px;
  background: var(--line); border: 0; box-shadow: var(--shadow);
  border-radius: var(--radius); overflow: hidden;
}
.cal-day {
  background: var(--paper); min-height: 0; padding: 4px 5px 3px; cursor: pointer;
  display: flex; flex-direction: column; overflow: hidden;
}
.cal-items { flex: none; min-height: 0; overflow: hidden; }
.cal-day.other { background: var(--paper-2); }
.cal-day.other .cal-num { color: var(--muted); opacity: .55; }
.cal-day.today .cal-num {
  background: var(--accent); color: var(--on-accent); border-radius: 999px;
  padding: 1px 6px; font-weight: 700; display: inline-block;
}
.cal-day.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-lift); }
.cal-num { font-size: 11.5px; color: var(--muted-2); margin-bottom: 3px; font-variant-numeric: tabular-nums;
  flex: none; align-self: flex-start; line-height: 1.3; }
.cal-items { display: flex; flex-direction: column; gap: 2px; }
.cal-more {
  border: 0; background: none; color: var(--muted); font-size: 11px; text-align: left;
  padding: 0 5px; cursor: pointer; flex: none; margin-top: 2px; line-height: 1.4;
}
.cal-more:hover { color: var(--ink); text-decoration: underline; }

/* One colour language across every view: appointments are the accent,
   tasks are quieter, reminders are the warning colour, notes are neutral. */
.cal-chip {
  flex: none;   /* keep full height inside the cell so overflow is real, not a squeeze */
  font-size: 11.5px; line-height: 1.3; padding: 1px 6px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent);
  border-left: 2.5px solid var(--accent-lift);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab;
}
.cal-chip.task { background: rgba(22,24,28,.05); color: var(--muted-2); border-left-color: var(--line-2); }
.cal-chip.reminder { background: rgba(154,46,46,.09); color: var(--danger); border-left-color: var(--danger); }
.cal-chip.note { background: rgba(30,107,79,.09); color: var(--ok); border-left-color: var(--ok); }
.cal-chip.allday { background: var(--accent); color: var(--on-accent); border-left-color: var(--accent); }
.cal-chip.pc { background: color-mix(in srgb, var(--pc) 14%, transparent); color: var(--pc); border-left-color: var(--pc); }
.cal-chip.allday.pc { background: var(--pc); color: #fff; }
.cal-chip.done { opacity: .45; text-decoration: line-through; }
.cal-chip.dragging { opacity: .4; }
.cal-chip .ct { font-variant-numeric: tabular-nums; opacity: .75; }
.cal-chip .rep { opacity: .6; }

/* ---- day + week time grid ---- */
.cal-time { display: flex; flex-direction: column; min-height: 0;
  border: 0; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.tg-head { border-bottom: 1px solid var(--line-2); background: var(--paper); }
.tg-dows, .tg-allday, .tg-body { display: grid; grid-template-columns: 56px repeat(var(--cols, 7), 1fr); }
.cal[data-mode="day"] .tg-dows,
.cal[data-mode="day"] .tg-allday,
.cal[data-mode="day"] .tg-body { grid-template-columns: 56px 1fr; }
.tg-dow { padding: 8px 2px 6px; text-align: center; }
.tg-dow .dw { display: block; font-size: 10.5px; letter-spacing: .04em; font-weight: 600;
  text-transform: uppercase; color: var(--muted); }
.tg-dow .dn { display: inline-flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; margin-top: 3px;
  font-variant-numeric: tabular-nums; width: 30px; height: 30px; border-radius: 999px; }
.tg-dow.today .dw { color: var(--accent); }
.tg-dow.today .dn { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 12px rgba(59,102,230,.35); }
/* all-day strip: same columns as the grid, its own label in the gutter */
.tg-allday { border-top: 1px solid var(--line); min-height: 32px; background: rgba(255,255,255,.35); }
.tg-allday .tg-gutter { display: flex; align-items: flex-start; justify-content: flex-end; padding: 7px 7px 0 0;
  font-size: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tg-adcol { border-left: 1px solid var(--line); padding: 4px 3px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tg-adcol.over { background: var(--accent-soft); }
.ad-chip { --pc: var(--accent); font-size: 11px; font-weight: 600; line-height: 1.25; padding: 3px 6px 3px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--pc) 16%, #fff); color: color-mix(in srgb, var(--pc) 72%, #000); cursor: grab;
  border-left: 3px solid var(--pc);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-chip.task { --pc: var(--muted-2); }
.ad-chip.reminder { --pc: var(--danger); }
.ad-chip.note { --pc: var(--purple); }

/* max-height is set from the real container height by fitGrid() in
   calendar.js; this is only the pre-measurement fallback. */
.tg-scroll { overflow: auto; max-height: 60vh; scrollbar-gutter: stable; }
.tg-gutter { position: relative; }
.tg-hour { position: relative; border-bottom: 1px solid transparent; }
.tg-hour span { position: absolute; top: -7px; right: 7px; font-size: 10.5px; font-weight: 500;
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tg-col { position: relative; border-left: 1px solid var(--line); }
.tg-col.today { background: rgba(59,102,230,.035); }
.tg-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.tg-now { position: absolute; left: 0; right: 0; height: 0;
  border-top: 2px solid var(--danger); z-index: 4; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px;
  border-radius: 999px; background: var(--danger); }

/* Blocks read like Apple's: a tinted pane of the item's colour, a solid bar
   down the left edge, text in the deep tone of the same colour. Every kind
   uses the same shape; only --pc changes. */
.tg-ev {
  --pc: var(--accent);
  position: absolute; border-radius: 7px; padding: 3px 6px 3px 8px; overflow: hidden; cursor: grab;
  background: color-mix(in srgb, var(--pc) 18%, #fff); color: color-mix(in srgb, var(--pc) 74%, #000); z-index: 2;
  border-left: 3px solid var(--pc);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 22%, transparent); font-size: 11.5px; line-height: 1.3;
  touch-action: none;   /* the grid owns vertical drags, not the scroller */
}
.tg-ev.task { --pc: var(--muted-2); }
.tg-ev.task.pc { background: color-mix(in srgb, var(--pc) 10%, #fff); }
.tg-ev.reminder { --pc: var(--danger); }
.tg-ev.note { --pc: var(--purple); }
.tg-ev.done { opacity: .5; text-decoration: line-through; }
.tg-ev.dragging { opacity: .8; z-index: 9; box-shadow: 0 6px 18px rgba(22,24,28,.22);
  pointer-events: none; }   /* so the grid under the cursor answers, not the block */
.tg-ev .ev-t { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; line-height: 1.2; }
.ag-row.pc { border-left-color: var(--pc); }
.tg-ev .ev-s, .tg-ev .ev-c { opacity: .8; font-size: 10.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-ev.short { padding: 1px 5px; display: flex; align-items: center; }
.tg-ev.short .ev-t { font-weight: 500; -webkit-line-clamp: 2; }
.ev-grip { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.ev-grip::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 2px; opacity: .5;
  transform: translateX(-50%); border-radius: 2px; background: currentColor; opacity: .35; }
.tg-ghost {
  position: absolute; left: 1px; right: 3px; border-radius: 6px; z-index: 5;
  background: var(--accent-soft); border: 1.5px dashed var(--accent-lift); color: var(--accent);
  font-size: 11px; padding: 2px 6px; pointer-events: none; font-variant-numeric: tabular-nums;
}

/* ---- agenda ---- */
.cal-agenda { border: 0; box-shadow: var(--shadow); border-radius: var(--radius);
  background: var(--paper); overflow: hidden; }
.ag-day { display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ag-day:last-child { border-bottom: 0; }
.ag-day.today { background: var(--accent-soft); }
.ag-date { flex: none; width: 46px; text-align: center; }
.ag-dw { display: block; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
.ag-dn { display: block; font-size: 20px; font-weight: 600; line-height: 1.15;
  font-variant-numeric: tabular-nums; }
.ag-mo { display: block; font-size: 10.5px; color: var(--muted); }
.ag-list { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ag-row { display: flex; align-items: baseline; gap: 9px; width: 100%; text-align: left;
  border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 7px;
  border-left: 3px solid var(--accent-lift); }
.ag-row:hover { background: var(--paper-2); }
.ag-row.task { border-left-color: var(--line-2); }
.ag-row.reminder { border-left-color: var(--danger); }
.ag-row.note { border-left-color: var(--ok); }
.ag-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums;
  flex: none; min-width: 88px; }
/* The title is the thing he is reading; it must never be the element that
   gets squeezed away. A long address used to shrink it to zero width, leaving
   a row that showed a time, a client and a street and no appointment name. */
.ag-title { font-size: 13.5px; flex: 1 1 auto; min-width: 45%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-client, .ag-where { font-size: 11px; color: var(--muted);
  flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; }

.cal-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.cal-legend { font-size: 11.5px; color: var(--muted); }

/* ---- the appointment editor ---- */
/* Bottom sheet: sits at the bottom when it fits, scrolls from the top when the
   keyboard shrinks the viewport (margin-top:auto instead of align-items:flex-end,
   for the same clipping reason as .onboard). */
.ev-editor { position: fixed; left: 0; right: 0; top: 0; bottom: var(--kb, 0px); z-index: 60; background: rgba(12,16,23,.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  transition: bottom .25s cubic-bezier(.2,.8,.2,1); }
.ev-card { background: rgba(242,246,252,.8); border-radius: 28px 28px 0 0;
  -webkit-backdrop-filter: blur(40px) saturate(1.6); backdrop-filter: blur(40px) saturate(1.6);
  box-shadow: 0 -18px 50px rgba(0,0,0,.28), var(--rim);
  width: 100%; max-width: 520px; margin-top: auto; flex: none; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 11px; }
.ev-head { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ev-title { font-size: 18px; font-weight: 600; border: 0; border-bottom: 1.5px solid var(--line-2);
  padding: 5px 2px; background: none; outline: none; }
.ev-title:focus { border-bottom-color: var(--accent); }
.ev-times { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ev-times label, .ev-row { display: flex; flex-direction: column; gap: 4px;
  font-size: 11.5px; color: var(--muted); }
.ev-check { flex-direction: row !important; align-items: center; gap: 6px; padding-bottom: 7px; }
.ev-when { display: flex; flex-direction: column; gap: 8px; }
.ev-when-row { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; }
.ev-when-l { font-size: 11.5px; color: var(--muted); }
.ev-when input[type="date"], .ev-when input[type="time"] {
  border: 0; border-radius: 12px; padding: 10px 12px; min-height: 42px; font-size: 15px; color: var(--ink);
  background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,.9); outline: none;
  -webkit-appearance: none; appearance: none; font-family: inherit; min-width: 0;
}
.ev-when input[type="time"] { min-width: 96px; text-align: center; }
.ev-when input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.ev-editor.allday .ev-t-in { opacity: .35; pointer-events: none; }
.ev-times input, .ev-row input, .ev-row select, .ev-row textarea, .ev-mono {
  border: 0; border-radius: 12px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 14px; color: var(--ink); background: rgba(255,255,255,.72); outline: none;
}
.ev-times input:focus, .ev-row input:focus, .ev-row select:focus,
.ev-row textarea:focus, .ev-mono:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.ev-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.ev-row textarea { resize: vertical; }
.ev-note { font-size: 11.5px; color: var(--muted); min-height: 0; }
.ev-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ev-actions .spacer { flex: 1; }
.ev-save { width: auto; padding: 9px 18px; }
.ghost-btn.danger { color: var(--danger); border-color: rgba(154,46,46,.3); }

/* ---- "this one, or the series?" ---- */
.scope-ask { position: fixed; left: 0; right: 0; top: 0; bottom: var(--kb, 0px); z-index: 70; background: rgba(12,16,23,.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.scope-card { background: rgba(242,246,252,.82); -webkit-backdrop-filter: blur(40px) saturate(1.6); backdrop-filter: blur(40px) saturate(1.6); border-radius: 24px; box-shadow: var(--shadow-lift);
  width: 100%; max-width: 340px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.scope-q { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.scope-opt { text-align: left; border: 0; background: var(--paper); box-shadow: var(--shadow);
  border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink); }
.scope-opt:hover { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 760px) {
  .cal-title { order: 10; width: 100%; margin-left: 0; }
  .cal-modes { margin-left: 0; width: 100%; order: 11; }
  .cal-mode { flex: 1; min-height: 44px; padding: 8px 6px; font-size: 14px; }
  .cal-bar { gap: 8px 6px; }
  .cal-day { padding: 4px; }
  .cal-month { height: 520px; }
  /* Week on a phone: real columns, 104px each, and the grid pans sideways
     (head and body together) — like flipping through days in Apple Calendar,
     but with titles you can read. */
  .tg-dows, .tg-allday, .tg-body { grid-template-columns: 42px repeat(var(--cols, 7), 1fr); }
  .cal[data-mode="week"] .cal-time { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* one horizontal scroller (.cal-time) moves head and body together; the
     body's own scroller keeps only the vertical axis */
  .cal[data-mode="week"] .tg-head, .cal[data-mode="week"] .tg-body, .cal[data-mode="week"] .tg-scroll { min-width: calc(42px + 7 * 104px); }
  .cal[data-mode="week"] .tg-scroll { overflow-x: hidden; }
  .cal[data-mode="week"] .tg-dows, .cal[data-mode="week"] .tg-allday, .cal[data-mode="week"] .tg-body { grid-template-columns: 42px repeat(7, 104px); }
  /* the hour column stays put while the days pan underneath it (the body's
     own vertical scroller sits between the gutter and the horizontal
     scroller, so sticky can't reach; the pan offset is mirrored in --panx) */
  .cal[data-mode="week"] .tg-gutter { position: relative; z-index: 3; background: var(--paper);
    transform: translateX(var(--panx, 0px)); will-change: transform; }
  .cal[data-mode="week"] .tg-body .tg-gutter { box-shadow: 1px 0 0 var(--line); }
  .cal[data-mode="week"] .tg-ev { padding: 3px 5px 3px 7px; font-size: 11.5px; border-radius: 7px; }
  .cal[data-mode="week"] .tg-ev .ev-s { display: block; }
  .cal-foot { display: none; }   /* the hint costs a line the grid needs */
  .tg-allday .tg-gutter { font-size: 8.5px; padding-right: 3px; letter-spacing: -.01em; }
  .ad-chip { font-size: 10px; padding: 2px 4px 2px 6px; }
  .cal[data-mode="week"] .tg-ev .ev-c { display: none; }
  .cal[data-mode="week"] .tg-ev .ev-t { -webkit-line-clamp: 3; }
  .cal-chip { font-size: 10px; line-height: 1.2; white-space: normal; padding: 2px 4px 2px 5px;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
  .cal-chip .ct { display: none; }
  .ag-time { min-width: 66px; }
  /* On a phone there is no room for all three; the address is the one
     you can look up, so it goes. */
  .ag-where { display: none; }
  .ag-title { min-width: 50%; }
}

.gmuted { font-size: 13px; color: var(--muted); }
.gmuted code { background: rgba(22,24,28,.06); padding: 1px 5px; border-radius: 4px; }
.gok { font-size: 13px; color: var(--ok); }




/* editors and asks: white sheets, a plain dim behind them (no blur) */
.ev-editor { background: rgba(20,24,32,.42); -webkit-backdrop-filter: none; backdrop-filter: none; }
.ev-card { background: #fff; border-radius: 28px 28px 0 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 -10px 40px rgba(0,0,0,.14); }
.ev-title { font-size: 20px; border-bottom-color: var(--line-2); }
.ev-times input, .ev-row input, .ev-row select, .ev-row textarea, .ev-mono, .ev-when input[type="date"], .ev-when input[type="time"] {
  background: var(--tile); box-shadow: none; }
.ev-times input:focus, .ev-row input:focus, .ev-row select:focus, .ev-row textarea:focus, .ev-mono:focus, .ev-when input:focus { box-shadow: 0 0 0 2px var(--accent); }
.scope-ask { background: rgba(20,24,32,.42); -webkit-backdrop-filter: none; backdrop-filter: none; }
.scope-card { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.scope-opt { background: var(--tile); box-shadow: none; }
.cal-modes { background: var(--tile); box-shadow: none; background-image: none; }
.cal-mode.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.cal-nav { box-shadow: none; background: var(--tile); }
.cal-time, .cal-month { box-shadow: 0 0 0 1px var(--line); }
.tg-head, .tg-allday { background: #fff; }
.cal-legend { color: var(--muted); }

/* ---------------------------------------------------------- bottom row
 * The board's own composer ("Add a new task…" + the round blue +) sits at
 * the bottom of the list; the DoDoo pill shows on Calendar and Account.
 */
.bottom-row { position: absolute; left: var(--s4); right: var(--s4); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
.bottom-row[hidden] { display: none; }
.bottom-row > * { pointer-events: auto; }
.bottom-composer { flex: 1; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 6px 0 16px; border-radius: var(--radius-md);
  background: var(--bg-surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-card); font: inherit; font-size: 14px; color: var(--text-muted); cursor: text; text-align: left; }
.bottom-composer:hover { border-color: var(--line-2); }
.bottom-composer .plus { color: var(--text-muted); width: 18px; height: 18px; flex: none; }
.bottom-composer span { flex: 1; }
.add-fab { width: 54px; height: 54px; border-radius: 999px; border: 0; cursor: pointer; color: #fff; flex: none;
  background: linear-gradient(180deg, #5A82FF, var(--primary)); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(65,105,246,.35), inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(0,0,0,.08); transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease; }
.add-fab svg { width: 22px; height: 22px; transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.add-fab:hover { background: var(--primary-hover); }
.add-fab:active { transform: scale(.94); }
.add-fab.open svg { transform: rotate(45deg); }
.bottom-composer { display: none; }
.glass { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 8px 28px rgba(16,24,40,.10), inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 1px rgba(255,255,255,.55), 0 0 0 1.5px rgba(16,24,40,.06); }
.chat-fab {
  position: relative; height: 54px; padding: 0 24px 0 12px; border-radius: 999px; border: 0; cursor: pointer;
  color: var(--text-primary); font: inherit; font-size: 14.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: rgba(255,255,255,.74); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 10px 30px rgba(16,24,40,.12), inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 1px rgba(255,255,255,.6), 0 0 0 1.5px rgba(16,24,40,.06);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}
.chat-fab::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.55), rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,.35)); mix-blend-mode: soft-light; }
.chat-fab:hover { box-shadow: var(--shadow-float); }
.chat-fab .dodoo { width: 30px; height: 30px; flex: none; }
.chat-fab:active { transform: scale(.96); }
.chat-fab.open { display: none; }
.chat-badge { position: absolute; top: -4px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cal-fab, .notes-bar { display: none !important; }
/* the little menu the + opens */
.add-menu { position: absolute; left: var(--s4); right: var(--s4); bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 41; border-radius: var(--radius-lg);
  background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 16px 40px rgba(16,24,40,.16), inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 1px rgba(16,24,40,.06); padding: 6px; animation: popIn .26s cubic-bezier(.3,1.3,.4,1); transform-origin: bottom right; }
@keyframes menuIn { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.92); } }
.add-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text-primary); cursor: pointer; text-align: left; border-radius: var(--radius-md); transition: background .15s ease; }
.add-menu button:hover, .add-menu button:active { background: var(--tile-2); }
.add-menu .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; color: var(--primary); flex: none; }
.add-menu .ico svg { width: 18px; height: 18px; }
.add-menu small { display: block; font-size: 12px; color: var(--text-secondary); font-weight: 400; margin-top: 1px; }

/* the DoDoo drawing: a hop when the face changes */
.dodoo { display: inline-block; vertical-align: middle; transform-origin: 50% 90%; }
.dodoo.dd-hop { animation: ddHop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes ddHop { 30% { transform: translateY(-6px) scale(1.04, .96); } 60% { transform: translateY(0) scale(.98, 1.03); } }
.dodoo.dd-listening { animation: ddLean 1.6s ease-in-out infinite; }
@keyframes ddLean { 50% { transform: rotate(-5deg) translateY(-1px); } }
.dodoo.dd-thinking .dd-dots circle { animation: ddDot 1.2s ease-in-out infinite; }
.dodoo.dd-thinking .dd-dots circle:nth-child(2) { animation-delay: .2s; }
.dodoo.dd-thinking .dd-dots circle:nth-child(3) { animation-delay: .4s; }
@keyframes ddDot { 50% { opacity: .25; } }
.dodoo .dd-waves { animation: ddWave 1.2s ease-in-out infinite; }
@keyframes ddWave { 50% { opacity: .25; } }

/* ------------------------------------------------------------ chat sheet
 * DoDoo AI: header with the bird, tool cards for what it did, suggestions
 * when the thread is fresh, a rounded composer.
 */
.dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 45;
  height: max(calc(min(82dvh, 680px) - var(--kb, 0px)), 76%);
  max-height: calc(100% - env(safe-area-inset-top));
  transition: height .2s cubic-bezier(.2,.8,.2,1);
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: 0 -8px 32px rgba(16,24,40,.12), inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 1px rgba(16,24,40,.06);
  display: flex; flex-direction: column; overflow: hidden; animation: dockIn .34s cubic-bezier(.32,.72,0,1);
}
@keyframes dockIn { from { transform: translateY(40px); opacity: 0; } }
.dock-head { display: flex; align-items: center; gap: 10px; position: relative; padding: 20px 12px 10px 16px;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; border-bottom: 1px solid var(--border-subtle); }
.dock-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); transform: translateX(-50%); }
@media (min-width: 900px) { .dock-head::before { display: none; } .dock-head { padding-top: 14px; cursor: default; } }
.dock-head .dodoo { width: 36px; height: 36px; }
.dock-head .dock-who { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.dock-head .dock-who > span { font-size: 15px; font-weight: 650; color: var(--text-primary); }
.dock-head .dock-who small { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.dock-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.dock-min { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; cursor: pointer; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; margin-left: 0; }
.dock-min:hover { background: var(--tile); color: var(--text-primary); }
.dock-min svg { width: 18px; height: 18px; }
.dock-log { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.ai-note { font-size: 12px; color: var(--text-muted); text-align: center; padding: 0 10px 6px; }
.msg-user, .msg-bot { font-size: 14.5px; line-height: 1.5; max-width: 100%; }
.msg-user { align-self: flex-end; color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; max-width: 85%; background: var(--primary); }
.msg-bot { color: var(--text-primary); white-space: pre-wrap; background: var(--tile); padding: 10px 14px; border-radius: 16px 16px 16px 4px; align-self: flex-start; max-width: 92%; position: relative; }
.msg-bot.proactive { box-shadow: inset 3px 0 0 var(--primary); }
.report-btn { display: block; margin-top: 8px; border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; color: var(--text-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; white-space: normal; }
.report-btn:disabled { text-decoration: none; }
.msg-err { color: var(--red); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.pending { color: var(--text-muted); font-size: 14px; }
.mic-notice { color: var(--red); font-size: 13px; padding: 6px 16px; }
/* tool cards: what DoDoo just did */
.tool-card { align-self: flex-start; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--bg-surface); max-width: 92%; min-width: 240px; }
.tool-card .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.tool-card .ico svg { width: 18px; height: 18px; }
.tool-card.reminder .ico { background: #FFF4E0; color: var(--orange); }
.tool-card.note .ico { background: var(--violet-soft); color: var(--violet); }
.tool-card.event .ico { background: #E6F6EE; color: var(--green); }
.tool-card .body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-card .title { font-size: 14px; font-weight: 650; color: var(--text-primary); }
.tool-card .line { font-size: 13px; color: var(--text-secondary); }
.tool-card .line i { font-style: italic; }
/* suggested prompts */
.suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 8px; flex-shrink: 0; }
.suggest[hidden] { display: none; }
.suggest button { font: inherit; font-size: 13px; font-weight: 500; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--bg-surface); color: var(--text-primary); cursor: pointer; transition: background .15s ease; }
.suggest button:hover { background: var(--tile-2); }
.dock-bar { display: flex; align-items: flex-end; gap: 6px; margin: 6px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: var(--radius-md); padding: 4px 4px 4px 14px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle); flex-shrink: 0; transition: box-shadow .2s ease, border-color .2s ease; }
.dock-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(65,105,246,.12); }
html.kb .dock-bar { margin-bottom: 10px; }
#input { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: none; font-size: 15px; line-height: 1.45; color: var(--ink); padding: 11px 0; max-height: 120px; }
#input::placeholder { color: var(--text-muted); }
.hint { display: none; }
.mic { width: 40px; height: 40px; border-radius: 999px; border: 0; cursor: pointer; flex-shrink: 0; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease; }
.mic:hover { background: var(--primary-hover); }
.mic:active { transform: scale(.95); }
.icon-send, .icon-stop { display: none; }
.dock-bar.typing:not(.listening) .icon-mic { display: none; }
.dock-bar.typing:not(.listening) .icon-send { display: block; }
.dock-bar.listening .icon-mic { display: none; }
.dock-bar.listening .icon-stop { display: block; }
.mic.rec { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(65,105,246,.16); } }
.dock-bar.listening { border-color: var(--primary); }
.voice-strip { display: flex; align-items: center; gap: 10px; margin: 0 16px -2px; padding: 6px 10px 6px 6px; flex-shrink: 0; border-radius: 999px;
  background: var(--primary-soft); color: var(--ink); animation: stripIn .2s cubic-bezier(.2,.8,.2,1); }
@keyframes stripIn { from { opacity: 0; transform: translateY(8px); } }
.voice-cancel { width: 28px; height: 28px; border-radius: 999px; border: 0; background: #fff; color: var(--ink-2); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
#wave { flex: 1; height: 26px; min-width: 0; }
#timer { font-size: 13px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.voice-hint { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 380px) { .voice-hint { display: none; } }
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom) + var(--kb, 0px)); transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 14px; padding: 11px 16px 11px 18px; border-radius: 999px; color: #fff; font-size: 13.5px;
  background: rgba(23,28,40,.82); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); animation: toastIn .3s cubic-bezier(.3,1.3,.4,1);
  box-shadow: 0 12px 32px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12); pointer-events: none; max-width: calc(100% - 32px); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } }
.toast button { pointer-events: auto; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; color: var(--ink); border: 0; padding: 6px 14px; border-radius: 999px; }

/* --------------------------------------------------------- command palette */
.palette { position: fixed; left: 0; right: 0; top: 0; bottom: var(--kb, 0px); z-index: 70; background: rgba(20,24,32,.42);
  display: flex; align-items: flex-start; justify-content: center; padding: calc(10vh + env(safe-area-inset-top)) 16px 16px; }
.palette-box { width: 100%; background: #fff; border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.25); overflow: hidden; }
.palette-box input { width: 100%; border: 0; outline: none; padding: 18px 20px; font-size: 17px; border-bottom: 1px solid var(--line); color: var(--ink); background: none; }
#palette-results { max-height: 52vh; overflow-y: auto; }
.pal-group { font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 20px 6px; }
.pal-item { display: block; width: 100%; text-align: left; font: inherit; font-size: 16px; padding: 12px 20px; border: 0; background: none; cursor: pointer; color: var(--ink); }
.pal-item.sel, .pal-item:active { background: var(--tint-2); }
.pal-item .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pal-none { padding: 20px; color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------------ tour */
.tour { position: fixed; left: 0; right: 0; top: 0; bottom: var(--kb, 0px); z-index: 95; background: #fff;
  display: flex; flex-direction: column; align-items: center; padding: 20px; overflow: hidden; }
.tour-card { width: 100%; max-width: 380px; min-width: 0; margin: auto 0; display: flex; flex-direction: column; overflow: hidden; }
.tour-slides { display: flex; width: 100%; min-width: 0; transition: transform .38s cubic-bezier(.22,1,.36,1); }
.tour-slide { flex: 0 0 100%; padding: 28px 12px 8px; text-align: center; }
.tour-slide h2 { margin: 22px 0 10px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.tour-slide p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--muted-2); }
.tour-art { position: relative; width: 190px; height: 190px; margin: 0 auto; border-radius: 48px; overflow: hidden; background: var(--tint-2);
  display: flex; align-items: center; justify-content: center; }
.tour-orb { display: none; }
.tour-art .dodoo { width: 140px; height: 140px; }
.tour-art svg:not(.dodoo) { position: relative; color: var(--accent); }
.tour-dots { display: flex; justify-content: center; gap: 6px; padding: 18px 0 6px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line-2); transition: all .2s ease; }
.tour-dots i.on { width: 20px; background: var(--accent); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 6px 10px; }
.tour-actions .gate-btn { flex: 1; }
.tour-actions .gate-link[hidden] { display: none; }

/* ------------------------------------------------------------------ gate */
.gate { position: fixed; left: 0; right: 0; top: 0; bottom: var(--kb, 0px); z-index: 90; background: #fff;
  display: flex; flex-direction: column; align-items: center; padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; transition: bottom .25s cubic-bezier(.2,.8,.2,1); }
.gate > * { margin: auto 0; flex: none; }
.gate-card { width: 100%; max-width: 360px; padding: 8px 4px; display: flex; flex-direction: column; gap: 12px; }
.gate-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.gate-brand .dodoo { width: 56px; height: 56px; }
.gate-logo.wordmark { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.gate-logo.wordmark b { color: var(--accent); }
.gate-lede { margin: 0 0 12px; font-size: 16px; color: var(--muted-2); line-height: 1.5; }
.gate-step { display: flex; flex-direction: column; gap: 10px; }
.gate-card input, .ob-field input, .ob-field textarea { border: 0; border-radius: 16px; font: inherit; resize: none; padding: 15px 16px; font-size: 16px; outline: none; color: var(--ink); background: var(--tile); }
.gate-card input:focus, .ob-field input:focus, .ob-field textarea:focus { box-shadow: 0 0 0 2px var(--accent); background: #fff; }
.gate-err, .ob-err { font-size: 13px; color: var(--danger); min-height: 16px; }
.gate-btn { font: inherit; font-size: 17px; font-weight: 700; padding: 16px; border-radius: 999px; border: 0; cursor: pointer; background: var(--accent); color: #fff; }
.gate-btn:active { transform: scale(.98); }
.gate-btn:disabled { opacity: .6; }
.gate-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gate-link { font: inherit; font-size: 15px; font-weight: 600; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 4px 0; }
.gate-fine { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
#gate-code { letter-spacing: .3em; font-variant-numeric: tabular-nums; font-size: 22px; text-align: center; }

/* ------------------------------------------------------------- onboarding */
.onboard { position: fixed; left: 0; right: 0; top: 0; bottom: var(--kb, 0px); z-index: 85; background: #fff;
  display: flex; flex-direction: column; align-items: center; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; transition: bottom .25s cubic-bezier(.2,.8,.2,1); }
.onboard-card { width: 100%; max-width: 380px; margin: auto 0; flex: none; padding: 10px 4px; display: flex; flex-direction: column; gap: 12px; }
.ob-progress { display: flex; gap: 6px; }
.ob-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.ob-progress i.on { background: var(--accent); }
.ob-body { display: flex; flex-direction: column; gap: 10px; }
.ob-body h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.ob-body p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted-2); }
.ob-fine { font-size: 13px !important; color: var(--muted) !important; }
.ob-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ob-opt { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); background: var(--tile-2, #F2F3F5); padding: 2px 7px; border-radius: 999px; vertical-align: 1px; }
.ob-req { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--tint); padding: 2px 7px; border-radius: 999px; vertical-align: 1px; }
.ob-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.ob-actions .gate-btn { flex: 1; }

/* --------------------------------------------------------------- account
 * The Settings sheet: grey icon tiles, section titles, values on the right,
 * hairlines between rows. The person's card sits on top.
 */
.settings { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.set-card { background: none; border-radius: 0; padding: 4px 0 8px; }
.set-card h2 { font-size: 22px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.tag-opt { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--tint); padding: 2px 8px; border-radius: 999px; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; margin-top: 10px; }
.set-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 600; min-width: 0; }
.set-grid label.wide, .set-grid label:has(select) { grid-column: 1 / -1; }
.set-grid input, .set-grid select, .set-grid textarea { border: 0; border-radius: 14px; padding: 13px 14px; font-size: 16px; font-weight: 400; color: var(--ink); background: var(--tile); outline: none; width: 100%; font-family: inherit; }
.set-grid input:focus, .set-grid select:focus, .set-grid textarea:focus { box-shadow: 0 0 0 2px var(--accent); background: #fff; }
.set-grid input.short { max-width: 90px; text-transform: uppercase; }
.set-grid textarea { resize: vertical; min-height: 68px; }
.set-help { font-size: 14px; color: var(--muted); line-height: 1.5; display: block; margin-top: 4px; }
.set-grid .set-help { margin-top: 2px; font-weight: 400; }
.set-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.set-save { width: auto; padding: 11px 18px; font-size: 15px; }
.set-status { font-size: 13px; color: var(--muted); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; line-height: 1.45; margin-top: 8px; }
.set-row > span:first-child { flex: 1 1 200px; }
.set-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; cursor: pointer; }
.set-switch > span { display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.set-switch small { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.set-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.set-switch i { flex: none; width: 51px; height: 31px; border-radius: 999px; background: #E9E9EB; position: relative; transition: background .2s ease; }
.set-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.set-switch input:checked + i { background: var(--ok); }
.set-switch input:checked + i::after { transform: translateX(20px); }
.set-empty { padding: 26px; text-align: center; color: var(--muted); }
.btn-danger-solid { font: inherit; font-size: 15px; font-weight: 700; padding: 11px 16px; border-radius: 999px; border: 0; background: var(--danger); color: #fff; cursor: pointer; }
.btn-danger-solid:disabled { opacity: .4; cursor: not-allowed; }
.set-version { text-align: center; font-size: 13px; color: var(--muted); margin: 14px 0 0; }

.set-me { padding: 6px 0 18px; }
.me-row { display: flex; align-items: center; gap: 16px; }
.me-photo { width: 72px; height: 72px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; position: relative; overflow: visible;
  background: var(--accent); color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 3px; }
.me-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px; display: block; }
.me-photo-edit { position: absolute; right: -3px; bottom: -3px; width: 28px; height: 28px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233B66E6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; pointer-events: none; }
.me-photo:active { transform: scale(.97); }
.set-me .set-status:empty { display: none; }
.set-me .set-status { display: block; margin-top: 10px; }
.me-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.me-mail { font-size: 14px; color: var(--muted); margin-top: 2px; word-break: break-all; }

.trash-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.trash-list li { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "kind title btn" "kind when btn"; gap: 2px 10px; align-items: center;
  background: var(--tile-2); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.trash-list li.gmuted { display: block; background: none; padding: 6px 2px; }
.trash-kind { grid-area: kind; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--tint); padding: 3px 8px; border-radius: 999px; align-self: start; }
.trash-title { grid-area: title; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-when { grid-area: when; font-size: 12px; color: var(--muted); }
.trash-list .ghost-btn { grid-area: btn; }
.legal h2 { font-size: 16px; font-weight: 700; margin: 18px 0 6px; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--muted-2); }
.legal p b { color: var(--ink); }
.legal-main .view-head h1 { font-size: 28px; }
.legal-foot { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 40px; }
.page .main { padding-bottom: 40px; }
.admin-diag { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------- settings list */
.set-settings { padding: 0; }
.set-settings > h2 { padding: 6px 0 4px; margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); }
.set-section { font-size: 17px; font-weight: 600; color: var(--ink); margin: 22px 0 6px; }
.set-list { display: flex; flex-direction: column; }
.set-item { border-radius: 0; }
.set-item summary { list-style: none; display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 14px;
  padding: 10px 0; cursor: pointer; font-size: 17px; font-weight: 400; color: var(--ink); -webkit-tap-highlight-color: transparent; min-height: 60px; }
.set-item summary::-webkit-details-marker { display: none; }
.set-item summary:active { background: var(--tile-2); }
.set-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--tile); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.set-ico svg { width: 22px; height: 22px; }
.set-item-title { white-space: nowrap; }
.set-item-sub { font-size: 17px; font-weight: 400; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.set-item .chev { font-size: 20px; line-height: 1; color: #C1C5CE; transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.set-item[open] .chev { transform: rotate(90deg); color: var(--accent); }
.set-item-body { padding: 4px 0 18px 58px; animation: itemIn .22s cubic-bezier(.2,.8,.2,1); }
@media (max-width: 400px) { .set-item-body { padding-left: 0; } }
@keyframes itemIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.set-item-danger summary { color: var(--danger); }
.set-item-danger .set-ico { color: var(--danger); background: #FBEBEB; }
.set-item .set-help { display: block; margin-bottom: 8px; }
.set-item .legal { margin-top: 4px; }

/* ------------------------------------------------------------------ paywall */
.pw-card { gap: 10px; }
.pw-title { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.pw-status { margin: 0; font-size: 15px; color: var(--muted-2); }
.pw-features { margin: 6px 0 4px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.pw-features li { display: flex; gap: 10px; align-items: flex-start; }
.pw-features li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 999px; margin-top: 1px;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%233B66E6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat; }
.pw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.plan { font: inherit; text-align: left; cursor: pointer; border: 0; border-radius: 18px; padding: 14px 14px 12px; position: relative; background: var(--tile); display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.plan.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--tint-2); }
.plan:disabled { opacity: .5; cursor: default; }
.plan-name { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.plan-price { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.plan-price small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.plan-note { position: absolute; top: -9px; right: 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 3px 8px; border-radius: 999px; }
.pw-web { margin: 0; font-size: 15px; color: var(--muted-2); background: var(--tile); border-radius: 14px; padding: 12px 14px; }
.pw-buy { width: 100%; margin-top: 4px; }
.pw-err { color: var(--danger); min-height: 0; }
.pw-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.pw-fine { margin: 2px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.set-plan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-plan .set-help { flex: 1 1 200px; }

/* ------------------------------------------------------------ sheet motion */
.ev-editor:not([hidden]) { animation: scrimIn .22s ease-out; }
.ev-editor:not([hidden]) .ev-card { animation: sheetIn .42s cubic-bezier(.22,1.1,.36,1); }
@keyframes scrimIn { from { background: rgba(20,24,32,0); } }
@keyframes sheetIn { from { transform: translateY(60px) scale(.98); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
/* the board no longer slides between views or pops out of a bubble */
/* page turns: the board slides out one way and in from the other */
.main.slide-out-left { animation: slideOutL .16s ease-in forwards; }
.main.slide-out-right { animation: slideOutR .16s ease-in forwards; }
.main.slide-in-left { animation: slideInL .26s cubic-bezier(.2,.8,.2,1); }
.main.slide-in-right { animation: slideInR .26s cubic-bezier(.2,.8,.2,1); }
.main.nudge-left { animation: nudgeL .3s ease; }
.main.nudge-right { animation: nudgeR .3s ease; }
@keyframes slideOutL { to { opacity: 0; transform: translateX(-40px); } }
@keyframes slideOutR { to { opacity: 0; transform: translateX(40px); } }
@keyframes slideInL { from { opacity: 0; transform: translateX(40px); } }
@keyframes slideInR { from { opacity: 0; transform: translateX(-40px); } }
@keyframes nudgeL { 40% { transform: translateX(-10px); } }
@keyframes nudgeR { 40% { transform: translateX(10px); } }
.main.liquid-in { animation: none; }
/* small press feedback everywhere */
.chip-toggle, .ghost-btn, .side-item, .client-btn, .side-row, .side-add, .side-me, .upnext-row, .menu button, .add-menu button, .set-item summary, .note-row, .detail-card, .cal-mode, .cal-nav, .gate-btn, .upgrade-btn, .upgrade-pill { transition: transform .15s ease, background .15s ease, color .15s ease; }
.chip-toggle:active, .ghost-btn:active, .side-item:active, .client-btn:active, .side-row:active, .side-add:active, .side-me:active, .upnext-row:active, .menu button:active, .add-menu button:active, .note-row:active, .detail-card:active, .cal-mode:active, .cal-nav:active, .upgrade-btn:active, .upgrade-pill:active { transform: scale(.97); }
.main.turning .rows li.task { animation: rowIn .26s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }
.main.turning .card, .main.turning .rows, .main.turning .set-list, .notes-list, .detail-cards { animation: cardIn .3s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }

/* ================================================================ 16b polish
 * Calendar, task detail, settings profile, sign-out. Appended so the calendar
 * grid rules above stay untouched; these only restyle.
 */
/* calendar header: Today · ‹ › · title, segmented modes underneath */
.cal-bar { gap: 8px; margin: 4px 0 12px; }
.cal-nav { width: 36px; height: 36px; border-radius: 10px; background: var(--tile); color: var(--text-secondary); font-size: 18px; transition: background .15s ease; }
.cal-nav:hover { background: #E9ECF1; color: var(--text-primary); }
#cal-today.ghost-btn { padding: 8px 14px; border-radius: 10px; background: var(--tile); border: 0; font-size: 13px; }
.cal-title { font-size: 15px; font-weight: 600; margin-left: 2px; color: var(--text-primary); }
.cal-modes { margin-left: 0; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: var(--radius-md); background: var(--tile); order: 9; }
.cal-mode { min-height: 38px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary); }
.cal-mode.on { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(65,105,246,.25); }
.cal-time, .cal-month { box-shadow: none; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.tg-dow .dn { font-size: 15px; }
.tg-dow.today .dn { box-shadow: none; }
.tg-col.today { background: rgba(65,105,246,.04); }
.tg-ev { border-radius: 8px; border-left-width: 4px; background: color-mix(in srgb, var(--pc) 12%, #fff); color: var(--text-primary);
  box-shadow: none; font-size: 11.5px; padding: 4px 6px 4px 8px; }
.tg-ev .ev-t { font-weight: 600; }
.tg-ev .ev-s, .tg-ev .ev-c { opacity: 1; color: var(--text-secondary); }
.tg-ev.task { --pc: #98A2B3; }
.tg-ev.done { opacity: .5; }
.cal-foot { margin-top: 10px; }
.cal-legend { font-size: 12px; color: var(--text-muted); }
.ag-day.today { background: var(--tint-2); }

/* sheets (event editor, note sheet) */
.ev-card { border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: 0 -8px 32px rgba(16,24,40,.12); }
@media (min-width: 900px) { .ev-editor { align-items: center; } .ev-card { border-radius: var(--radius-xl); max-width: 460px; width: 100%; box-shadow: var(--shadow-float); } }
.ev-head { font-size: 12px; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
.ev-title { font-size: 20px; font-weight: 650; }
.ev-row { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.ev-row input, .ev-row select, .ev-row textarea, .ev-when input[type="date"], .ev-when input[type="time"] { border-radius: 12px; font-weight: 400; font-size: 15px; color: var(--text-primary); }
.ghost-btn.danger { border-color: transparent; background: var(--red-soft); }

/* ------------------------------------------------------------ task detail
 * A screen of its own: Back · ⋯, the big checkbox and title, the project,
 * then compact setting cards and the note.
 */
.detail { position: fixed; left: 0; right: 0; top: 0; bottom: var(--kb, 0px); z-index: 50; background: var(--bg-surface); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); animation: detailIn .2s cubic-bezier(.2,.8,.2,1); }
@keyframes detailIn { from { opacity: 0; transform: translateX(24px); } }
@media (min-width: 900px) { .detail { left: auto; right: 0; width: 460px; box-shadow: -8px 0 32px rgba(16,24,40,.08); border-left: 1px solid var(--border-subtle); animation-name: detailInDesk; } @keyframes detailInDesk { from { transform: translateX(40px); opacity: 0; } } }
.detail-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 0 8px; height: 52px; flex: none; }
.detail-bar .view-back { margin: 0; padding: 6px 8px; }
.detail-body { flex: 1; overflow-y: auto; padding: 8px 20px 40px; }
.detail-top { display: flex; align-items: flex-start; gap: 14px; }
.detail-top .check { width: 28px; height: 28px; margin-top: 4px; }
.detail-top .check svg { width: 14px; height: 14px; }
.detail-title { flex: 1; min-width: 0; font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; border: 0; outline: none; background: none; resize: none; padding: 2px 0; color: var(--text-primary); font-family: inherit; width: 100%; }
.detail-title:focus { box-shadow: none; }
.detail-proj { margin: 6px 0 0 42px; display: flex; align-items: center; gap: 10px; }
.detail-proj .chip { font-size: 13px; }
.detail-proj select { font: inherit; font-size: 13px; border: 0; background: var(--tile); border-radius: 999px; padding: 6px 10px; color: var(--text-secondary); }
.detail-cards { margin-top: 22px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.detail-card { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; min-height: 54px; padding: 8px 12px 8px 12px; background: var(--bg-surface); }
.detail-card + .detail-card { border-top: 1px solid var(--border-subtle); }
.detail-card .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--tile); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }
.detail-card .ico svg { width: 18px; height: 18px; }
.detail-card .lbl { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.detail-card .val { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--primary); justify-self: end; }
.detail-card .val input { border: 0; background: none; font: inherit; color: var(--primary); font-weight: 600; text-align: right; outline: none; padding: 0; max-width: 190px; }
.detail-card .val.muted, .detail-card .val.muted input { color: var(--text-muted); font-weight: 500; }
.detail-card .chev { color: var(--text-muted); }
.detail-card .val.late { color: var(--red); }
.detail-sec { margin-top: 26px; }
.detail-sec h3 { font-size: 15px; font-weight: 650; margin: 0 0 10px; }
.detail-note { width: 100%; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); padding: 12px 14px; font: inherit; font-size: 14px; line-height: 1.5; min-height: 88px; resize: vertical; color: var(--text-primary); outline: none; }
.detail-note:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(65,105,246,.12); }
.detail-note::placeholder { color: var(--text-muted); }
.detail-meta { margin-top: 26px; font-size: 12.5px; color: var(--text-muted); text-align: center; }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; }
.detail-actions .ghost-btn { flex: 1; padding: 12px; border-radius: 12px; }

/* ------------------------------------------------------------ settings */
.settings { gap: 8px; }
.set-me { padding: 0 0 8px; }
.me-row { padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg-surface); }
.me-photo { width: 56px; height: 56px; font-size: 18px; }
.me-photo-edit { width: 24px; height: 24px; background-size: 11px; }
.me-name { font-size: 17px; font-weight: 650; }
.me-mail { font-size: 13px; }
.me-edit { margin-left: auto; align-self: center; }
.set-settings > h2 { display: none; }
.set-section { font-size: 15px; font-weight: 650; margin: 18px 0 6px; color: var(--text-primary); }
.set-section:first-child { margin-top: 4px; }
.set-list { border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg-surface); overflow: hidden; }
.set-item + .set-item { border-top: 1px solid var(--border-subtle); }
.set-item summary { grid-template-columns: 36px 1fr auto auto; gap: 12px; padding: 8px 12px; min-height: 56px; font-size: 14px; font-weight: 500; }
.set-item summary:hover { background: var(--tile-2); }
.set-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--tile); color: var(--text-secondary); }
.set-ico svg { width: 18px; height: 18px; }
.set-item-sub { font-size: 13px; max-width: 40vw; }
.set-item .chev { font-size: 18px; color: var(--text-muted); }
.set-item[open] .chev { color: var(--primary); }
.set-item[open] summary { border-bottom: 1px solid var(--border-subtle); }
.set-item-body { padding: 14px 14px 18px; background: var(--tile-2); }
.set-item-danger .set-ico { color: var(--red); background: var(--red-soft); }
.set-item-danger summary { color: var(--red); }
.set-signout { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 18px; border: 0; border-radius: var(--radius-md); background: var(--red-soft); color: var(--red); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.set-signout:hover { background: #FBDCDC; }
.set-signout svg { width: 18px; height: 18px; }
.set-grid label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.set-grid input, .set-grid select, .set-grid textarea { border-radius: 12px; padding: 12px 14px; font-size: 15px; background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.set-grid input:focus, .set-grid select:focus, .set-grid textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(65,105,246,.12); }
.set-save { border-radius: 12px; padding: 10px 18px; font-size: 14px; }
.set-switch input:checked + i { background: var(--primary); }
.set-help { font-size: 13px; }
.set-version { font-size: 12px; margin-top: 10px; }

/* gate / tour / onboarding buttons follow the same radius */
.gate-btn { border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 600; }
.gate-card input, .ob-field input, .ob-field textarea { border-radius: 12px; padding: 13px 14px; font-size: 15px; background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.gate-card input:focus, .ob-field input:focus, .ob-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(65,105,246,.12); }

/* palette */
.palette-box { border-radius: var(--radius-xl); box-shadow: var(--shadow-float); }
.palette-box input { font-size: 15px; padding: 16px 18px; }
.pal-item { font-size: 14px; }
.pal-item.sel, .pal-item:active { background: var(--primary-soft); }

/* ------------------------------------------------------------ the hello
 * DoDoo waves from the top of the screen and says good morning, two seconds,
 * once per launch.
 */
.hello { position: fixed; left: 16px; right: 16px; top: calc(10px + env(safe-area-inset-top)); z-index: 96; display: flex; align-items: flex-end; gap: 10px; pointer-events: auto;
  animation: helloIn .5s cubic-bezier(.3,1.3,.4,1); }
.hello.out { animation: helloOut .32s ease-in forwards; }
@keyframes helloIn { from { opacity: 0; transform: translateY(-28px) scale(.96); } }
@keyframes helloOut { to { opacity: 0; transform: translateY(-16px) scale(.98); } }
.hello-bird { flex: none; margin-bottom: -6px; filter: drop-shadow(0 6px 12px rgba(16,24,40,.15)); }
.hello-bubble { position: relative; flex: 1; padding: 12px 16px; border-radius: 18px 18px 18px 6px; display: flex; flex-direction: column; gap: 2px;
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 12px 32px rgba(16,24,40,.14), inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 1px rgba(16,24,40,.06); }
.hello-bubble b { font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: -.01em; }
.hello-bubble span { font-size: 13px; color: var(--text-secondary); }
.dodoo .dd-wing { transform-box: fill-box; transform-origin: 55% 12%; }
.dodoo.dd-wave .dd-wing { animation: ddWaveWing 1.1s ease-in-out 2; }
@keyframes ddWaveWing { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-95deg) translateX(2px); } 50% { transform: rotate(-70deg); } 75% { transform: rotate(-100deg) translateX(2px); } }
.dodoo.dd-wave { animation: ddHop .5s cubic-bezier(.34,1.56,.64,1) 2; }
@media (min-width: 900px) { .hello { left: 288px; right: auto; width: 380px; } }

/* ------------------------------------------------------------ notes pane */
.notes-search { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; border-radius: var(--radius-md); padding: 4px 8px 4px 14px; color: var(--text-muted);
  background: rgba(255,255,255,.86); border: 1px solid rgba(232,236,242,.9); }
.notes-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(65,105,246,.12); }
.notes-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 10px 0; font: inherit; font-size: 15px; color: var(--ink); }
.notes-search input::placeholder { color: var(--text-muted); }
.notes-search input::-webkit-search-cancel-button { display: none; }
.notes-clear { width: 30px; height: 30px; border-radius: 999px; border: 0; background: var(--tile); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.notes-filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 0; padding: 2px 16px; }
.notes-filter::-webkit-scrollbar { display: none; }
.notes-filter .chip-toggle { flex: none; }
.notes-filter .pdot { width: 8px; height: 8px; }
.notes-list { display: flex; flex-direction: column; background: rgba(255,255,255,.86); border: 1px solid rgba(232,236,242,.9); border-radius: var(--radius-lg); overflow: hidden; }
.notes-none { color: var(--text-secondary); font-size: 14px; padding: 30px 16px; text-align: center; line-height: 1.5; }
.note-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px 12px 12px; width: 100%; text-align: left; border: 0; background: none; font: inherit; color: var(--text-primary); cursor: pointer; position: relative; transition: background .15s ease; }
.note-row + .note-row { border-top: 1px solid var(--border-subtle); }
.note-row:hover { background: var(--tile-2); }
.n-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--violet-soft); color: var(--violet); display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.n-ico svg { width: 18px; height: 18px; }
.n-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.note-row .n-title { font-size: 15px; font-weight: 600; line-height: 1.35; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-prev { font-size: 13px; line-height: 1.45; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.n-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); margin-top: 2px; flex-wrap: wrap; }
.n-tags { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.note-row .p-x { width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex: none; }
.note-row .p-x svg { stroke: currentColor; }
.note-row .p-x:hover { background: var(--tile); color: var(--red); }
@media (pointer: coarse) { .note-row .p-x { opacity: .6; } }
.note-row.lift { animation: noteLift .3s ease; }
@keyframes noteLift { 50% { background: var(--primary-soft); } }
#note-form textarea { min-height: 120px; }
#note-editor.is-new #ne-delete { visibility: hidden; }
.gcal-on { margin-bottom: 6px; }
/* settings and the calendar frame on the waves */
.me-row, .set-list, .cal-time, .cal-month, .detail-cards, .upnext-list { background: rgba(255,255,255,.86); }

/* month on a phone: dots in the cells, the tapped day listed underneath */
.cal-month.compact { height: auto; grid-template-rows: repeat(6, 54px); }
.cal-month.compact .cal-day { padding: 6px 4px 4px; align-items: center; gap: 4px; }
.cal-month.compact .cal-num { margin: 0; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.cal-month.compact .cal-day.other .cal-num { color: var(--text-muted); opacity: .6; }
.cal-month.compact .cal-day.today .cal-num { background: var(--primary); color: #fff; box-shadow: none; }
.cal-month.compact .cal-day.sel:not(.today) .cal-num { background: var(--primary-soft); color: var(--primary); }
.cal-dots { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 8px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--pc, var(--primary)); display: block; }
.cal-dots i.task { background: var(--pc, #98A2B3); }
.cal-dots i.reminder { background: var(--red); }
.cal-dots i.note { background: var(--violet); }
.cal-dots i.n { width: auto; height: auto; background: none; font-style: normal; font-size: 9px; font-weight: 600; color: var(--text-muted); line-height: 1; }
.cal-month-list { margin-top: 12px; padding: 4px 0; }
.cal-month-list[hidden] { display: none; }
.cml-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 6px; font-size: 14px; font-weight: 650; color: var(--text-primary); }
.cml-empty { padding: 14px 14px 12px; font-size: 13.5px; color: var(--text-secondary); }
.cal-month-list .ag-list { display: flex; flex-direction: column; }
.cal-month-list .ag-row { border-top: 1px solid var(--border-subtle); border-radius: 0; padding: 12px 14px; }

/* Account → How you use ProDo */
.purpose-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.admin-notes { margin-top: 8px; display: grid; gap: 6px; }
.admin-note { font-size: 12.5px; line-height: 1.4; padding: 8px 10px; border-radius: 10px; background: var(--tile-2, #F2F3F5); color: var(--text-secondary); }
.admin-note b { color: var(--text-primary); font-weight: 600; }
/* First-run: the purpose picker */
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.ob-chips .chip-toggle { font-size: 14px; padding: 9px 14px; }
