/* Calendar: the look.
   Dark navy by default (what HEY taught your eye), warm paper for light mode.
   One accent colour, orange, means exactly one thing: NOW (today, the now-line).
   Calendar colours are pastel so dark text on them stays readable in both modes.
   Below 900px wide the layout becomes the iPhone layout: tab bar at the bottom,
   each week as a vertical list of days. */

:root {
  --bg: #141b26;
  --bg-2: #1a2230;
  --bg-3: #232d3d;
  --bg-4: #2c3749;
  --line: #2b3546;
  --line-2: #3a4659;
  --text: #e7eaf0;
  --muted: #8b96a9;
  --faint: #5d687b;
  --accent: #ffb35c;
  --accent-ink: #2a1a05;
  --chip-ink: #1a2130;
  --focus: #7aa7ff;
  --danger: #ff7a7a;
  --ok: #7fdca6;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --pill: linear-gradient(100deg, #4f86ff, #7a6cff);
  --bar: #000;

  --ui: 'Schibsted Grotesk', ui-sans-serif, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --r: 10px;
  --top: 56px;
  --tabbar: 0px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-2: #fffdf8;
  --bg-3: #efebe2;
  --bg-4: #e6e1d6;
  --line: #e3ddd0;
  --line-2: #d3ccbc;
  --text: #1c2130;
  --muted: #6f7584;
  --faint: #a2a6af;
  --accent: #e8892b;
  --accent-ink: #fff;
  --focus: #3d6fe0;
  --danger: #c93c3c;
  --ok: #2f9a5c;
  --shadow: 0 18px 50px rgba(40, 30, 10, .18), 0 2px 8px rgba(40, 30, 10, .08);
  --bar: #e6e1d6;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f1ea; --bg-2: #fffdf8; --bg-3: #efebe2; --bg-4: #e6e1d6;
    --line: #e3ddd0; --line-2: #d3ccbc; --text: #1c2130; --muted: #6f7584;
    --faint: #a2a6af; --accent: #e8892b; --accent-ink: #fff; --focus: #3d6fe0;
    --danger: #c93c3c; --ok: #2f9a5c;
    --shadow: 0 18px 50px rgba(40, 30, 10, .18), 0 2px 8px rgba(40, 30, 10, .08);
    --bar: #e6e1d6;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.4 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
svg { display: block; }
/* Equal-width digits only where numbers stand in columns. Not on the whole
   page: in this font the same setting also widens , : . and spaces them out. */
.dnum, .ev small, .tl-hour span, .tl-ev small, .mm-day, .result .rd, .countdown, .icon-btn .count { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.error { color: var(--danger); margin: 0; font-size: 13px; }
.link { color: var(--focus); text-decoration: underline; text-underline-offset: 2px; }

/* ───────────────────────────── boot + login */
.boot {
  position: fixed; inset: 0; display: grid; place-items: center;
  font: 44px var(--serif); color: var(--muted);
}
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; }
.login-box {
  width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px;
}
.login-box h1 { font: 56px/1 var(--serif); margin: 0; letter-spacing: -.01em; }
.login-box p { margin: 0 0 6px; }
.login-box label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

/* ───────────────────────────── inputs + buttons */
.field, .login-box input, .sheet input:not([type=checkbox]), .sheet select, .sheet textarea,
.panel input:not([type=checkbox]), .panel select {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; width: 100%; outline: none; min-height: 42px;
}
.sheet textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
input[type=date], input[type=time] { min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; font-weight: 600;
  background: var(--bg-3); border: 1px solid var(--line);
}
.btn.primary { background: var(--pill); color: #fff; border: 0; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--danger); background: none; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ───────────────────────────── app frame */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.demo-bar {
  background: var(--accent); color: var(--accent-ink); text-align: center;
  font-size: 12px; font-weight: 600; padding: calc(4px + var(--safe-t)) 10px 4px;
}
.demo-bar .link { color: inherit; }

.topbar {
  height: var(--top); flex: none; display: grid;
  grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 14px; position: relative; z-index: 5;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 8px; }
.tb-right { justify-content: flex-end; }
.tb-center { display: flex; align-items: center; gap: 4px; }

.pill {
  display: flex; align-items: center; background: var(--pill); border-radius: 999px;
  padding: 3px; color: #fff;
}
.pill .icon-btn { color: #fff; width: 38px; height: 34px; border-right: 1px solid rgba(255,255,255,.25); border-radius: 999px 0 0 999px; }
.seg { display: flex; gap: 2px; padding-left: 4px; }
.seg button { padding: 6px 13px; border-radius: 999px; font-weight: 500; font-size: 14px; }
.seg button.on { background: rgba(10, 16, 30, .85); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  color: var(--text); position: relative;
}
.icon-btn:hover { background: var(--bg-3); }
.pill .icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn svg, .round-btn svg { width: 20px; height: 20px; }
.icon-btn .count {
  position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--bg-4); color: var(--text); font-size: 10.5px;
  font-weight: 700; display: grid; place-items: center;
}
.round-btn {
  width: 38px; height: 38px; border-radius: 999px; border: 1.5px solid var(--line-2);
  display: grid; place-items: center;
}
.round-btn:hover { background: var(--bg-3); }
.chip-btn {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 600;
}
.chip-btn:hover { background: var(--bg-3); }

.tb-title { font: 26px/1 var(--serif); padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
.tb-title:hover { background: var(--bg-3); }
.cals-btn { display: flex; gap: 3px; align-items: center; padding: 8px; border-radius: 8px; }
.cals-btn:hover { background: var(--bg-3); }
.cals-btn i { width: 9px; height: 9px; border-radius: 3px; }
.cals-btn svg { width: 14px; height: 14px; color: var(--muted); margin-left: 2px; }

.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); opacity: .8; transition: background .3s; }
.sync-dot.pending { background: var(--accent); }
.sync-dot.offline { background: var(--faint); }
.sync-dot.error { background: var(--danger); }
.sync-dot.syncing { animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }

#main { flex: 1; min-height: 0; overflow: auto; position: relative; }
.mobile { display: none !important; }

/* ───────────────────────────── week view (stacked weeks) */
.weeks { padding: 8px 20px 120px; }
.week {
  display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr));
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 22px; overflow: hidden;
}
.week.current { border: 2px solid var(--muted); }
.mlabel {
  writing-mode: vertical-rl; transform: rotate(180deg); text-align: right;
  font-weight: 800; font-size: 13px; letter-spacing: .06em; color: var(--faint);
  padding: 10px 0 0; grid-row: 1;
}
.week.current .mlabel { color: var(--text); }
.mlabel .range { display: none; }
.day {
  border-left: 1px solid var(--line); min-height: 170px; padding: 6px 6px 8px;
  display: flex; flex-direction: column; gap: 3px; position: relative; min-width: 0;
}
.day.past { background: color-mix(in srgb, var(--bg) 35%, transparent); }
.day.weekend .dnum { color: var(--muted); }
.day-head {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 6px;
  font-size: 12.5px; color: var(--muted); padding: 2px 2px 4px; cursor: pointer;
}
.day-head .dname-add {
  margin-right: auto; opacity: 0; font-size: 11px; color: var(--faint);
  padding: 1px 5px; border-radius: 4px;
}
.day:hover .dname-add { opacity: 1; }
.day-head .dname-add:hover { background: var(--bg-3); color: var(--text); }
.dnum { font-weight: 800; font-size: 17px; color: var(--text); }
.today-badge {
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  padding: 1px 9px 2px; font-weight: 600;
}
.today-badge .dnum { color: inherit; }
.mtag { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--text); margin-right: auto; }
.dname {
  font: italic 15px/1.1 var(--serif); color: var(--text); padding: 0 2px 4px;
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dname-input { font: italic 15px var(--serif); padding: 3px 6px; min-height: 0; }

.ev {
  --c: #f2d68a;
  background: var(--c); color: var(--chip-ink); border-radius: 4px;
  padding: 3px 6px; font-size: 12.5px; line-height: 1.25; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; text-align: left; width: 100%; flex: none;
}
.ev small { font-weight: 500; font-size: 11px; opacity: .75; margin-right: 4px; }
.ev.timed { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--text); border-left: 3px solid var(--c); }
.ev.cont { border-top-left-radius: 0; border-bottom-left-radius: 0; opacity: .85; }
.ev:hover { filter: brightness(1.05); }
.countdown {
  font-size: 11px; color: var(--muted); display: flex; gap: 5px; align-items: center;
  padding: 1px 2px;
}
.countdown b { color: var(--text); font-weight: 600; }
.countdown i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); flex: none; }

.todo {
  display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px;
  padding: 3px 4px; border-radius: 5px; cursor: pointer; text-align: left;
  min-width: 0; line-height: 1.3;
}
.todo:hover { background: var(--bg-3); }
.todo .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.todo .from { color: var(--accent); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.ck {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-2);
  flex: none; margin-top: 1px; display: grid; place-items: center; background: var(--bg);
}
.ck:hover { border-color: var(--text); }
.ck svg { width: 10px; height: 10px; opacity: 0; }
.todo.done .ck { background: var(--ok); border-color: var(--ok); }
.todo.done .ck svg { opacity: 1; color: var(--bg); }
.todo.done .t { text-decoration: line-through; color: var(--faint); }
.todo .cdot { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: none; }

.add-inline {
  font-size: 12px; color: var(--faint); text-align: left; padding: 3px 4px;
  border-radius: 5px; opacity: 0; margin-top: auto;
}
.day:hover .add-inline, .strip:hover .add-inline, .add-inline:focus { opacity: 1; }
.add-inline:hover { color: var(--text); background: var(--bg-3); }
.inline-input { font-size: 12.5px; padding: 4px 6px; min-height: 0; border-radius: 5px; }
.day-fill { flex: 1; min-height: 10px; cursor: copy; }

.strip {
  grid-column: 1 / -1; border-top: 1px solid var(--line); background: var(--bg-3);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px;
  min-height: 44px;
}
.week.current .strip { background: color-mix(in srgb, var(--bg-3) 80%, var(--bg-4)); }
.strip-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; color: var(--muted); margin-right: 6px; }
.strip .todo { background: var(--bg-2); border-radius: 999px; padding: 5px 12px 5px 6px; align-items: center; }
.strip .todo .ck { margin: 0; }
.strip .add-inline { margin: 0; opacity: .6; }
.strip .inline-input { width: 240px; }

.drop-ok { outline: 2px dashed var(--focus); outline-offset: -3px; }
[draggable=true] { -webkit-user-drag: element; }
.dragging { opacity: .4; }
.load-more { display: block; margin: 0 auto 22px; }

/* ───────────────────────────── day view */
.dayview { display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: 100%; }
.dv-main { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.dv-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.dv-head h2 { font: 30px/1.05 var(--serif); margin: 0; }
.dv-head .dname { font-size: 17px; padding: 0; }
.dv-head .spacer { flex: 1; }
.dv-allday { display: flex; flex-direction: column; gap: 3px; padding: 8px 20px 8px 76px; border-bottom: 1px solid var(--line); }
.dv-allday:empty { display: none; }
.timeline { flex: 1; overflow: auto; position: relative; }
.tl-grid { position: relative; margin: 0 16px 0 0; }
.tl-hour {
  height: 52px; border-top: 1px solid var(--line); position: relative; margin-left: 60px;
  cursor: copy;
}
.tl-hour span {
  position: absolute; left: -54px; top: -8px; font-size: 11px; color: var(--muted);
  width: 46px; text-align: right;
}
.tl-hour.night { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.tl-ev {
  position: absolute; border-radius: 6px; padding: 4px 7px; overflow: hidden;
  font-size: 12.5px; line-height: 1.25; cursor: pointer; text-align: left;
  background: color-mix(in srgb, var(--c) 30%, var(--bg-2));
  border-left: 3px solid var(--c); color: var(--text);
}
.tl-ev b { display: block; font-weight: 600; }
.tl-ev small { color: var(--muted); }
.now-line { position: absolute; left: 56px; right: 0; height: 0; border-top: 2px solid var(--accent); z-index: 2; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.dv-side { overflow: auto; padding: 16px 18px 120px; display: flex; flex-direction: column; gap: 22px; }
.section-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  text-transform: uppercase; margin: 0 0 6px; display: flex; justify-content: space-between; align-items: center;
}
.list { display: flex; flex-direction: column; gap: 1px; }
.list .todo { font-size: 14px; padding: 7px 6px; }
.list .todo .ck { width: 18px; height: 18px; }
.list .todo .ck svg { width: 12px; height: 12px; }
.list .inline-input { font-size: 14px; padding: 8px; }
.list .add-inline { opacity: 1; font-size: 13.5px; padding: 7px 6px; margin: 0; }
.empty { color: var(--faint); font-size: 13px; padding: 6px; }
/* Move buttons: float over the row's right edge on hover (Mac), so they never
   take width away from the title. On touch screens they sit on their own line. */
.todo { position: relative; }
.tray-actions {
  display: none; gap: 4px; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: var(--bg-3); padding-left: 8px; box-shadow: -10px 0 10px var(--bg-3);
}
.todo:hover .tray-actions { display: flex; }
.tray-actions button {
  font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2);
  color: var(--muted); white-space: nowrap;
}
.tray-actions button:hover { color: var(--text); border-color: var(--text); }

/* ───────────────────────────── year view */
.yearview { padding: 10px 24px 120px; }
.yv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.yv-head h2 { font: 36px/1 var(--serif); margin: 0; }
.yv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 30px; }
.mm h3 { font: 20px var(--serif); margin: 0 0 6px; }
.mm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mm-grid .wd { font-size: 10px; color: var(--faint); text-align: center; font-weight: 600; padding-bottom: 2px; }
.mm-day {
  aspect-ratio: 1; border-radius: 6px; font-size: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; position: relative;
}
.mm-day:hover { background: var(--bg-3); }
.mm-day.today { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.mm-day.past { color: var(--faint); }
.mm-day .dots { display: flex; gap: 2px; height: 4px; }
.mm-day .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--c); }
.mm-day.named::after { content: ''; position: absolute; top: 3px; right: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--text); opacity: .6; }

/* ───────────────────────────── panels */
.panel { position: fixed; z-index: 20; background: var(--bg-2); display: flex; flex-direction: column; }
#p-inbox {
  top: var(--top); right: 0; bottom: 0; width: 400px; border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
}
#p-search, #p-settings {
  top: 8vh; left: 50%; transform: translateX(-50%); width: min(680px, calc(100vw - 32px));
  max-height: 84vh; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.scrim { position: fixed; inset: 0; z-index: 19; background: rgba(5, 8, 14, .45); }
.panel-head {
  display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; flex: none;
}
.panel-head h2 { font: 30px/1 var(--serif); margin: 0; flex: 1; }
.panel-body { overflow: auto; padding: 0 18px 24px; flex: 1; }
.quick-add { display: flex; gap: 8px; margin-bottom: 14px; }

.search-box { position: relative; flex: 1; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.search-box input { padding-left: 38px !important; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; align-items: center; }
.fchip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px;
  font-weight: 500; color: var(--muted);
}
.fchip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.filters select { width: auto !important; min-height: 32px !important; padding: 4px 10px !important; font-size: 13px; border-radius: 999px !important; }
.result {
  display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 8px; border-radius: 8px; text-align: left; width: 100%;
}
.result:hover { background: var(--bg-3); }
.result i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.result i.todo-mark { border-radius: 50%; background: none; border: 1.5px solid var(--muted); }
.result .rt { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result .rs { font-size: 12px; color: var(--muted); }
.result .rd { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.result mark { background: color-mix(in srgb, var(--accent) 40%, transparent); color: inherit; border-radius: 2px; }
.rgroup { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin: 14px 8px 4px; text-transform: uppercase; }

.set-section { padding: 14px 0; border-top: 1px solid var(--line); }
.set-section:first-child { border-top: 0; padding-top: 0; }
.set-section h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; min-height: 44px; }
.set-row > span { flex: 1; }
.set-row small { display: block; color: var(--muted); font-size: 12px; }
.choice { display: flex; background: var(--bg-3); border-radius: 999px; padding: 3px; flex: none; }
.choice button { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); }
.choice button.on { background: var(--bg-2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.cal-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.cal-row input[type=text] { flex: 1; min-height: 36px !important; padding: 6px 10px !important; }
.swatch { width: 22px; height: 22px; border-radius: 6px; background: var(--c); flex: none; border: 2px solid transparent; }
.swatch.on { border-color: var(--text); }
.toggle { position: relative; width: 42px; height: 25px; flex: none; }
.toggle input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--bg-4); transition: .2s; }
.toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle input:checked + span { background: var(--c, #4f86ff); }
.toggle input:checked + span::after { transform: translateX(17px); }
.help { font-size: 13.5px; line-height: 1.55; }
.help p { margin: 0 0 10px; }
.help kbd { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; font: 12px var(--ui); }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.help dt { white-space: nowrap; }
.help dd { margin: 0; color: var(--muted); }

/* ───────────────────────────── popovers + sheets */
.pop {
  position: fixed; z-index: 40; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 10px; min-width: 220px;
  animation: popin .14s ease-out;
}
@keyframes popin { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; padding: 4px 6px 8px; }
.pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 8px;
  text-align: left; font-size: 14px;
}
.pop-item:hover { background: var(--bg-3); }
.pop-item i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.pop-item .toggle { margin-left: auto; }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.mini { width: 250px; }
.mini-nav { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; }
.mini-nav b { font: 19px var(--serif); font-weight: 400; }

.sheet-scrim { position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 14, .5); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin-ang { to { --ang: 360deg; } }
.sheet {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); width: min(480px, 100%); max-height: calc(100dvh - 32px);
  overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px;
  animation: popin .16s ease-out;
}
.sheet-top { display: flex; align-items: center; gap: 8px; }
.sheet-top .spacer { flex: 1; }
.sheet .title-input { font-size: 20px; font-weight: 600; background: none !important; border: 0 !important; padding: 4px 0 !important; }
.sheet .title-input::placeholder { color: var(--faint); }
.cal-select { display: flex; align-items: center; gap: 6px; }
.cal-select i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.cal-select select { width: auto !important; min-height: 32px !important; padding: 4px 8px !important; border-radius: 999px !important; font-size: 13px; font-weight: 600; }
.when-box { background: var(--bg-3); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.when-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.when-row .arrow { color: var(--muted); }
.when-col { display: flex; flex-direction: column; gap: 6px; }
.when-col input { background: var(--bg-2) !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row label { flex: 1; font-size: 13px; color: var(--muted); }
.row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.extras { display: flex; flex-wrap: wrap; gap: 6px; }
.extras button {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2);
  color: var(--muted); display: flex; align-items: center; gap: 5px;
}
.extras button.on { color: var(--text); border-color: var(--text); }
.extras svg { width: 13px; height: 13px; }
.sheet-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.sheet-actions .spacer { flex: 1; }
.open-link { font-size: 13px; color: var(--focus); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.trays button {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 6px; font-size: 13px;
  font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted);
}
.trays button svg { width: 18px; height: 18px; }
.trays button.on { border-color: var(--text); color: var(--text); background: var(--bg-3); }
.quick-days { display: flex; gap: 6px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--tabbar) + var(--safe-b)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; z-index: 60; box-shadow: var(--shadow);
  display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px);
}
.toast button { font-weight: 700; text-decoration: underline; color: inherit; }

/* ═════════════════════════════ iPhone layout */
@media (max-width: 899px) {
  :root { --top: 52px; --tabbar: 58px; }
  .desktop { display: none !important; }
  .mobile { display: flex !important; }

  .topbar {
    grid-template-columns: auto 1fr auto; padding: var(--safe-t) 12px 0;
    height: calc(var(--top) + var(--safe-t)); gap: 6px;
  }
  .demo-bar:not([hidden]) + .topbar { padding-top: 0; height: var(--top); }
  .mobile[hidden] { display: none !important; }
  .tb-center { order: -1; justify-content: flex-start; }
  .tb-left { justify-content: flex-end; }
  .tb-title { font-size: 24px; padding-left: 2px; }
  .pill .icon-btn { display: none; }
  .seg { padding-left: 0; }
  .seg button { padding: 5px 10px; font-size: 13px; }
  .chip-btn { height: 30px; padding: 0 10px; }
  .sync-dot { display: none; }
  #main { padding-bottom: calc(var(--tabbar) + var(--safe-b)); }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: var(--bar); border-top: 0; justify-content: space-around;
  }
  .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); position: relative;
  }
  .tabbar button i svg { width: 23px; height: 23px; }
  .tabbar button.on { color: var(--text); }
  .tabbar .badge {
    position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px;
    border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px;
    display: grid; place-items: center; padding: 0 4px;
  }
  /* Top bar: MONTH ˅ on the left; search and the today square on the right */
  .tb-left { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .tb-title {
    font: 800 19px/1 var(--ui); letter-spacing: .01em; display: flex; align-items: center; gap: 8px;
  }
  .tb-title svg { width: 17px; height: 17px; color: var(--muted); }
  .tb-right { gap: 8px; }
  #btn-search svg { width: 24px; height: 24px; }
  #btn-today {
    width: 34px; height: 32px; padding: 0; border-radius: 7px; border: 2px solid var(--accent);
    border-top-width: 5px; color: var(--text); font-size: 14px; font-weight: 700;
    display: grid; place-items: center; margin-left: 4px;
  }
  #btn-today .mobile { display: block !important; }

  /* Bottom bar: Inbox · + · Settings */
  .tabbar { justify-content: space-between; padding-left: 14px; padding-right: 14px; }
  .tabbar button[data-tab] { flex: 0 0 76px; }
  .tabbar .tab-add { flex: 0 0 64px; width: 64px; height: 46px; border-radius: 999px; display: grid; place-items: center; color: #8f86ff; align-self: center; }
  .tab-add svg { width: 32px; height: 32px; }
  .tab-add:active { background: var(--bg-3); }

  /* Week grid like HEY: 7 narrow days side by side, weeks stacked */
  .weeks { padding: 4px 6px calc(var(--drawer, 0px) + 40px); }
  .week { grid-template-columns: 16px repeat(7, minmax(0, 1fr)); margin-bottom: 14px; border-radius: 12px; background: none; overflow: visible; }
  .week.current { border-width: 2px; border-color: var(--text); }
  .mlabel { font-size: 10px; padding-top: 6px; letter-spacing: .04em; overflow: hidden; white-space: nowrap; }
  .day { min-height: 104px; padding: 3px 1px 4px; gap: 2px; }
  .day.past { background: none; }
  .day-head { padding: 2px 3px 3px; font-size: 10px; gap: 2px; white-space: nowrap; letter-spacing: -.01em; cursor: default; }
  .dnum { font-size: 12.5px; }
  .today-badge { padding: 1px 5px 2px; }
  .day .dname { font-size: 11px; padding: 0 2px; }
  .ev { font-size: 11px; padding: 1px 3px; border-radius: 3px; font-weight: 500; text-overflow: clip; }
  .ev small { display: none; }
  .ev.timed { background: var(--c); color: var(--chip-ink); border-left: 0; }
  .day-fill { min-height: 0; cursor: default; }
  .day { height: 104px; overflow: hidden; }
  .day .more { font-size: 10px; color: var(--muted); padding: 0 3px; font-weight: 600; }
  /* The selected day: a frame whose colours slowly travel around it, like HEY's.
     A rotating conic gradient, masked so only a 2.5px ring shows. */
  .day.sel { overflow: visible; z-index: 1; }
  .day.sel::after {
    content: ''; position: absolute; inset: -1px; border-radius: 10px; padding: 2.5px; pointer-events: none;
    background: conic-gradient(from var(--ang), #8f86ff, #f39ab8, #ffb35c, #8f86ff);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: spin-ang 3s linear infinite;
  }
  .ck { width: 20px; height: 20px; }
  .ck svg { width: 12px; height: 12px; }

  .dayview { display: flex; flex-direction: column; height: auto; }
  /* display:contents lets the date heading, to-dos and timeline be ordered
     freely: heading first, then the day's to-dos, then the hours. */
  .dv-main { display: contents; }
  .dv-head { order: -2; }
  .dv-head { padding: 8px 14px 10px; }
  .dv-head h2 { font-size: 24px; }
  .dv-allday { padding: 8px 14px 8px 64px; }
  .timeline { overflow: visible; }
  .dv-side { order: -1; padding: 12px 14px 4px; gap: 14px; overflow: visible; border-bottom: 1px solid var(--line); }

  .yearview { padding: 6px 14px 100px; }
  .yv-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 18px; }
  .yv-head h2 { font-size: 30px; }

  .panel, #p-search, #p-settings, #p-inbox {
    top: 0; left: 0; right: 0; bottom: calc(var(--tabbar) + var(--safe-b)); width: auto;
    transform: none; max-height: none; border-radius: 0; border: 0; box-shadow: none;
    padding-top: var(--safe-t); background: var(--bg);
  }
  .panel-head h2 { font-size: 34px; }
  .scrim { display: none; }

  .sheet-scrim { place-items: end stretch; padding: 0; }
  .sheet {
    width: 100%; border-radius: 18px 18px 0 0; border-bottom: 0; max-height: 94dvh;
    padding: 16px 16px calc(16px + var(--safe-b)); animation: slideup .22s cubic-bezier(.2, .8, .2, 1);
  }
  @keyframes slideup { from { transform: translateY(100%); } }
  .sheet .title-input { font-size: 22px; }
  .sheet-scrim.full { background: rgba(0, 0, 0, .6); }
  .sheet.full { height: calc(100dvh - var(--safe-t) - 14px); max-height: none; border-radius: 16px 16px 0 0; }
  .pop { left: 10px !important; right: 10px; }
  .mini { width: auto; }
}

/* ───────────────────────────── iPhone drawer (app.js 3b) */
.drawer {
  position: fixed; left: 0; right: 0; z-index: 15; background: var(--bg-2);
  border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1); will-change: transform;
}
.dr-grab { flex: none; touch-action: none; padding: 8px 10px 6px; cursor: grab; user-select: none; -webkit-user-select: none; }
.dr-handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 6px; }
.dr-head { display: grid; grid-template-columns: 36px 36px 1fr 62px 40px; align-items: center; gap: 2px; }
.dr-head h2 { grid-column: 3; margin: 0; text-align: center; font: 700 19px/1.2 var(--ui); white-space: nowrap; }
.dr-head .today-badge { padding: 0 7px 1px; }
.dr-nav { color: #8f86ff; }
.dr-nav svg { width: 22px; height: 22px; }
.dr-more { grid-column: 5; color: var(--muted); }
.dr-more svg { width: 26px; height: 26px; }
.dr-name { text-align: center; font: italic 17px/1.2 var(--serif); color: var(--muted); padding: 2px 0 2px; }
.dr-body { flex: 1; overflow: auto; padding: 6px 12px calc(var(--off, 0px) + 24px); display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.drawer[data-state="low"] .dr-body { visibility: hidden; }
.dr-ev {
  background: linear-gradient(110deg, var(--c) 60%, color-mix(in srgb, var(--c) 82%, #000));
  color: var(--chip-ink); border-radius: 9px; padding: 7px 12px; text-align: left;
  display: flex; flex-direction: column; gap: 1px; flex: none;
}
.dr-ev b { font-size: 15px; font-weight: 500; line-height: 1.2; }
.dr-ev small { font-size: 12px; opacity: .7; }
.dr-ev.allday { border-radius: 999px; padding: 6px 14px; }
.dr-allday { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.dr-countdowns { padding: 0 4px 4px; }
.dr-countdowns .countdown { font-size: 13px; }
.dr-empty { color: var(--faint); font: italic 22px var(--serif); text-align: center; margin: 22px 0; }
.dr-body .timeline { overflow: visible; flex: none; }
.dr-body .tl-grid { margin-right: 0; }
.dr-todos {
  grid-column: 4; justify-self: end; display: flex; align-items: center; gap: 5px;
  background: var(--bg-3); border-radius: 10px; padding: 5px 9px; color: var(--text); font-size: 14px; font-weight: 600;
}
.dr-todos svg { width: 18px; height: 18px; }

/* Full windows (new event / new to-do), like HEY's: × · title · Add */
.sheet-head { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; margin: -4px -4px 0; }
.sheet-head b { text-align: center; font-size: 16px; }
.sheet-head .btn.small { min-height: 36px; padding: 0 18px; font-size: 15px; }
.sheet .hint { font-size: 12.5px; margin: 0; }
.sheet-foot { margin-top: auto; padding-top: 16px; display: flex; justify-content: center; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-dots button {
  display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.cal-dots button i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.cal-dots button.on { color: var(--chip-ink); background: var(--c); border-color: var(--c); }
.cal-dots button.on i { background: var(--chip-ink); opacity: .35; }
.sheet .notes-input { min-height: 110px; background: none !important; border: 0 !important; padding: 2px 0 !important; font-size: 15px; resize: none; }
.sheet .notes-input:focus { box-shadow: none; }
.when-mini { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.seg3 { display: grid; grid-template-columns: 1fr 1.4fr 1fr; background: var(--bg-3); border-radius: 10px; padding: 3px; }
.seg3 button { padding: 7px 4px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg3 button.on { background: var(--bg-2); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.when-sum { margin: 0; font-size: 13px; color: var(--muted); }
.wk-nav { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.wk-nav .icon-btn { width: 32px; height: 32px; }
.wk-nav .icon-btn svg { width: 17px; height: 17px; }
.day-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-pick button { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--bg-3); }
.day-pick small { font-size: 10px; color: var(--muted); font-weight: 600; }
.day-pick b { font-size: 16px; }
.day-pick button.past { opacity: .5; }
.day-pick button.today b { color: var(--accent); }
.day-pick button.on { background: #8f86ff; color: #fff; opacity: 1; }
.day-pick button.on small, .day-pick button.on.today b { color: #fff; }
.week-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.week-pick button { text-align: left; padding: 8px 10px; border-radius: 10px; background: var(--bg-3); font-size: 13.5px; font-weight: 600; display: flex; flex-direction: column; }
.week-pick small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.week-pick button.on { background: #8f86ff; color: #fff; }
.week-pick button.on small { color: rgba(255, 255, 255, .8); }
.done-row { border-top: 1px solid var(--line); padding-top: 10px; }

/* Press-and-hold drag from the to-do list */
.sheet-scrim.dragging-out { background: transparent; pointer-events: none; transition: background .2s; }
.sheet-scrim.dragging-out .sheet { transform: translateY(85%); transition: transform .25s ease; }
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; max-width: 220px;
  background: var(--bg-3); color: var(--text); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.todo-list .todo { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.day.drop-ok { outline: 2.5px dashed #8f86ff; outline-offset: -2px; border-radius: 10px; }
.inbox-add { width: 100%; margin-bottom: 14px; }

/* To-do list: grip, drop targets, done */
.todo-list .grip { margin-left: 6px; color: var(--faint); width: 30px; height: 30px; display: grid; place-items: center; flex: none; touch-action: none; cursor: grab; }
.todo-list .grip svg { width: 18px; height: 18px; }
.todo-list .list .todo { padding-right: 6px; }
.todo-list .list .todo .t { padding-right: 2px; }
.todo-list .ck { position: relative; }
.todo-list .ck::before { content: ''; position: absolute; inset: -9px; }      /* bigger thumb target */
.todo-list .todo.done .ck { animation: pop .25s ease-out; }
@keyframes pop { 50% { transform: scale(1.25); } }
.todo-list .todo.dragging { opacity: .35; }
.drop-bar { position: sticky; top: -18px; z-index: 2; background: var(--bg-2); padding: 8px 0 10px; margin: 0 -2px; border-bottom: 1px solid var(--line); }
.drop-bar p { margin: 0 0 8px; font-size: 12px; color: var(--muted); text-align: center; }
.drop-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.drop-days button { display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 10px; background: var(--bg-3); border: 2px dashed transparent; }
.drop-days small { font-size: 10px; color: var(--muted); font-weight: 600; }
.drop-days b { font-size: 16px; }
.drop-more { display: grid; grid-template-columns: 1.5fr 1fr; gap: 6px; margin-top: 6px; }
.drop-more button { padding: 10px; border-radius: 10px; background: var(--bg-3); font-weight: 600; font-size: 13px; border: 2px dashed transparent; }
.drop-bar .over { border-color: #8f86ff; background: color-mix(in srgb, #8f86ff 30%, var(--bg-3)); }
.show-done { align-self: center; font-size: 13px; margin-top: 4px; }

/* Event: calendar dropdown with colour dots */
.cal-pick { position: relative; align-self: flex-start; }
.cal-cur { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; padding: 4px 2px; border-bottom: 1.5px solid var(--line-2); }
.cal-cur i, .cal-menu i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: none; }
.cal-cur svg { width: 15px; height: 15px; color: var(--muted); }
.cal-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; min-width: 200px; max-height: 300px; overflow: auto;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 5px; box-shadow: var(--shadow);
  animation: popin .14s ease-out;
}
.cal-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 8px; font-size: 15px; text-align: left; }
.cal-menu button.on { background: var(--bg-4); font-weight: 700; }

/* To-do window: the little month calendar */
.mc-nav { display: flex; align-items: center; justify-content: space-between; }
.mc-nav b { font-size: 15px; }
.mc-nav .icon-btn { color: #8f86ff; }
.mc { display: flex; flex-direction: column; gap: 2px; touch-action: pan-y; }
.mc-row { display: grid; grid-template-columns: repeat(7, 1fr); border-radius: 10px; }
.mc .wd { text-align: center; font-size: 11px; color: var(--faint); font-weight: 700; padding: 2px 0 4px; }
.mc button { height: 38px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.mc button.other { color: var(--faint); }
.mc button.past { opacity: .55; }
.mc button.today { color: var(--accent); }
.mc button.on { background: #8f86ff; color: #fff; opacity: 1; }
.mc.weeks .mc-row:not(.wds):active { background: var(--bg-3); }
.mc-row.on { background: #8f86ff; }
.mc-row.on button { color: #fff; opacity: 1; }

/* The + menu: grows out of the + button */
.add-menu {
  position: fixed; z-index: 40; left: 50%; bottom: calc(var(--tabbar) + var(--safe-b) + 6px);
  width: 250px; margin-left: -125px; background: #000; border: 1px solid var(--line-2); border-radius: 22px;
  padding: 6px; box-shadow: var(--shadow); transform-origin: 50% 100%;
  animation: grow .2s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes grow { from { opacity: 0; transform: scale(.4) translateY(30px); } }
.add-menu p { margin: 6px 12px 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.add-menu button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 12px; border-radius: 14px;
  color: #a59dff; font-size: 17px; font-weight: 500;
}
.add-menu button + button { border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.add-menu button:active { background: var(--bg-3); }
.add-menu svg { width: 24px; height: 24px; }
:root[data-theme="light"] .add-menu { background: var(--bg-2); }

/* The month picker: a year of month tiles */
.pop.months { padding: 0; overflow: hidden; }
.mp-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.mp-head b { font: 700 22px var(--ui); }
.mp-head .icon-btn { color: #8f86ff; }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.mp-grid button {
  aspect-ratio: 1.15; text-align: left; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font: 700 19px var(--ui); display: flex; align-items: flex-start;
}
.mp-grid button:nth-child(3n) { border-right: 0; }
.mp-grid button.on { outline: 2.5px solid #8f86ff; outline-offset: -3px; border-radius: 12px; }
.mp-grid .today-badge { padding: 0 8px; }

/* The to-do list sheet (the ☑ button) */
.sheet.todo-list { min-height: 55dvh; }
.tl-section { display: flex; flex-direction: column; gap: 6px; }
.tl-section + .tl-section { margin-top: 10px; }
.tl-sec-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.tl-sec-head h3 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tl-sec-head small { color: var(--muted); font-size: 14px; }
.tl-sec-head .icon-btn svg { width: 24px; height: 24px; }
.todo-list .list { gap: 8px; }
.todo-list .list .todo { background: var(--bg-3); border-radius: 999px; padding: 9px 16px 9px 8px; font-size: 16px; align-items: center; align-self: flex-start; max-width: 100%; }
.todo-list .list .todo .ck { width: 26px; height: 26px; margin: 0; background: var(--bg); }
.todo-list .list .todo .ck svg { width: 14px; height: 14px; }
.todo .has-notes { color: var(--faint); flex: none; }
.todo .has-notes svg { width: 14px; height: 14px; }

/* To-do form: "when" sits under the title and notes */
.when-label { margin: 6px 0 -4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sheet .notes-input { min-height: 70px; }

@media (hover: none) {
  .day:hover .add-inline, .add-inline { opacity: 1; }
  .list .todo { flex-wrap: wrap; }
  .list .tray-actions, .list .todo:hover .tray-actions {
    display: flex; position: static; transform: none; background: none; box-shadow: none;
    flex-basis: 100%; padding: 4px 0 0 26px;
  }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
