:root {
  --bg: #f6f6f3; --panel: #ffffff; --line: #e5e4df; --line2: #efeeea;
  --text: #1c1c1a; --muted: #75736d; --accent: #2f6fed; --accent-text: #ffffff;
  --task: #fdf8ea; --task-line: #e2d4a6; --now: #e5484d; --danger: #c93838; --ok: #1a9a6c;
  --shade: rgba(30, 30, 10, .03); --lift: 0 1px 2px rgba(0, 0, 0, .07);
  --hour: 52px; --gut: 52px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161615; --panel: #1f1f1d; --line: #34342f; --line2: #292926;
    --text: #ececea; --muted: #9b9993; --accent: #6b9bff; --accent-text: #10141c;
    --task: #2b281f; --task-line: #62583a; --danger: #ef6a6a; --ok: #4cc38a;
    --shade: rgba(255, 255, 255, .025); --lift: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161615; --panel: #1f1f1d; --line: #34342f; --line2: #292926;
  --text: #ececea; --muted: #9b9993; --accent: #6b9bff; --accent-text: #10141c;
  --task: #2b281f; --task-line: #62583a; --danger: #ef6a6a; --ok: #4cc38a;
  --shade: rgba(255, 255, 255, .025); --lift: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  overscroll-behavior: none; -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h3, h4, p { margin: 0; }
a { color: var(--accent); }

#app { display: grid; grid-template-columns: var(--side, 304px) minmax(0, 1fr); height: 100dvh; }

/* ---------- sidebar */
#side { background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
#sideGrip { display: none; }
@media (min-width: 761px) {
  #side { position: relative; }
  #sideGrip { display: block; position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; cursor: col-resize; z-index: 5; touch-action: none; }
  #sideGrip::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: var(--accent); opacity: 0; transition: opacity .15s; }
  #sideGrip:hover::after, body.sizing #sideGrip::after { opacity: .7; }
  body.sizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
}
.brand { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; font-weight: 650; font-size: 16px; }
.brand #closeSide { margin-left: auto; }
#demoTag { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--task); border: 1px solid var(--task-line); }
/* ---------- add a task */
#quick { padding: 0 12px 8px; }
.qbox {
  display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 6px 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--lift);
  transition: border-color .18s, box-shadow .18s;
}
.qbox:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.qbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent), var(--lift); }
.qplus { flex: none; color: var(--muted); transition: color .18s, transform .3s cubic-bezier(.2, .8, .2, 1); }
.qbox:focus-within .qplus { color: var(--accent); transform: rotate(90deg); }
.qfield { position: relative; flex: 1; min-width: 0; height: 100%; }
#quickInput { width: 100%; height: 100%; border: 0; padding: 0; background: transparent; outline: none; color: var(--text); position: relative; z-index: 1; }
.qph {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); pointer-events: none;
  white-space: nowrap; overflow: hidden;
}
.qph i { font-style: normal; opacity: .62; overflow: hidden; text-overflow: ellipsis; transition: opacity .35s, transform .35s; }
.qph.swap i { opacity: 0; transform: translateY(4px); }
.qph[hidden] { display: none; }
#quickAi {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent) 5%, transparent));
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
#quickAi:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 25%, transparent); transform: translateY(-1px); }
#quickAi:active { transform: scale(.93); }
#quickAi.busy svg { animation: think 1.1s ease-in-out infinite; }
@keyframes think { 50% { transform: scale(1.2) rotate(20deg); opacity: .5; } }
#quickHint { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 7px 2px 0; font-size: 11.5px; }
#quickHint[hidden] { display: none; }
#quickHint kbd {
  min-width: 0; flex: none; white-space: nowrap; font: inherit; font-weight: 650; color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  padding: 0 5px; background: var(--panel); line-height: 17px;
}
.qchip {
  padding: 2px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap; animation: born .2s ease;
  background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent);
}
.qchip.plain { background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--muted); }
.qchip.hot { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.qchip.ai { margin-left: auto; background: transparent; color: var(--muted); font-weight: 550; padding-right: 2px; }
.qchip.busy { margin-left: 0; color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.aiplan { max-height: min(46vh, 340px); }
.aiplan .prow { padding: 7px 6px; }
.aiplan .pd { white-space: nowrap; }
#sideBody { flex: 1; overflow-y: auto; padding: 2px 12px 12px; min-height: 0; }
.sec { margin-top: 16px; }
.sec > h4 {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600;
  margin: 0 4px 6px; display: flex; justify-content: space-between; align-items: center;
}
.empty { color: var(--muted); font-size: 13px; padding: 4px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--lift); }
.card .ch { display: flex; justify-content: space-between; align-items: baseline; }
.card .ch b { font-size: 15px; }
.card .ch span { color: var(--muted); font-size: 12px; }
.prog { height: 6px; border-radius: 99px; background: var(--line2); margin: 9px 0 7px; overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 99px; background: var(--ok); transition: width .3s; }
.card .cm { color: var(--muted); font-size: 12.5px; }
.card .cm b { color: var(--text); font-weight: 600; }
.card .btn { width: 100%; margin-top: 10px; }
#upnext { margin-top: 8px; display: grid; gap: 6px; }
.un {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line);
}
.un.none { color: var(--muted); font-size: 13px; cursor: default; background: transparent; border-style: dashed; }
.un .ul {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); flex: none;
}
.un .ul.now { background: color-mix(in srgb, var(--now) 14%, transparent); color: var(--now); }
.un .ut { flex: 1; min-width: 0; }
.un .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.un .m { color: var(--muted); font-size: 12px; }
.mini.join { background: var(--accent); border-color: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; }
.mini.join:hover { color: var(--accent-text); filter: brightness(1.08); }

.item {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 9px; margin-bottom: 5px;
  background: var(--task); border: 1px solid var(--task-line); border-left: 3px solid var(--tc, var(--task-line)); border-radius: 9px;
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.item .it { flex: 1; min-width: 0; }
.item .t { font-weight: 550; overflow-wrap: anywhere; }
.item .m { color: var(--muted); font-size: 12px; }
.pri { color: var(--now); font-weight: 800; margin-right: 3px; }
.mini {
  border: 1px solid var(--line); background: var(--panel); border-radius: 7px;
  padding: 2px 7px; font-size: 12px; white-space: nowrap;
}
.mini:hover { border-color: var(--accent); color: var(--accent); }

.chk {
  flex: none; width: 16px; height: 16px; margin-top: 2px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--muted); background: transparent; position: relative; transition: background .15s, border-color .15s;
}
.chk:hover { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.done > .chk, .done .chk { background: var(--ok); border-color: var(--ok); }
.done > .chk::after, .done .chk::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* mini month */
.mnav { display: flex; gap: 4px; }
.mnav .mini { padding: 0 7px; font-size: 14px; line-height: 20px; }
.mc { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.mc .wd { text-align: center; font-size: 10px; color: var(--muted); padding: 2px 0 4px; font-weight: 600; }
.md {
  border: 0; background: transparent; height: 28px; border-radius: 8px; font-size: 12px; position: relative; padding: 0;
  font-variant-numeric: tabular-nums;
}
.md:hover { background: var(--line2); }
.md.other { color: var(--muted); opacity: .55; }
.md.sel { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.md.today { background: var(--accent); color: var(--accent-text); font-weight: 700; opacity: 1; }
.md.has::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--task-line); }
.md.today.has::after { background: var(--accent-text); }

.acct { display: flex; align-items: center; gap: 8px; padding: 5px 4px; }
.acct .dot { width: 12px; height: 12px; border-radius: 4px; flex: none; border: 0; padding: 0; }
.acct .em { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.acct .mini { visibility: hidden; }
.acct:hover .mini, .acct .mini.warn { visibility: visible; }
.mini.warn { border-color: var(--danger); color: var(--danger); }
.cal { display: flex; align-items: center; gap: 7px; padding: 2px 4px 2px 24px; color: var(--muted); font-size: 13px; cursor: pointer; }
.cal span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sideFoot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 6px; }
.footrow { display: flex; }
.footrow .btn { flex: 1; }

/* ---------- buttons */
.btn {
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px;
  padding: 6px 12px; font-weight: 550; white-space: nowrap; text-decoration: none; color: var(--text); display: inline-block; text-align: center;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .55; cursor: default; }
.icon {
  border: 0; background: transparent; border-radius: 8px; width: 32px; height: 32px; font-size: 18px; line-height: 1;
  display: inline-grid; place-items: center; padding: 0;
}
.icon:hover { background: var(--line2); }
.only-mobile { display: none; }

/* ---------- top bar */
main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; background: var(--panel); }
#bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line); background: var(--panel);
}
#title { font-size: 18px; font-weight: 650; margin: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; letter-spacing: -.01em; }
#status { color: var(--muted); font-size: 12px; white-space: nowrap; }
#status.err { color: var(--danger); }
#status.err { cursor: pointer; }
#status.err:hover { text-decoration: underline; }
.srow .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--bg); gap: 1px; }
.seg button { border: 0; background: transparent; padding: 4px 11px; font-weight: 550; border-radius: 7px; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: var(--lift); }

/* ---------- time grid */
#grid { flex: 1; overflow: auto; min-height: 0; position: relative; background: var(--panel); }
#gridHead {
  position: sticky; top: 0; z-index: 5; display: grid;
  grid-template-columns: var(--gut) repeat(var(--n), minmax(0, 1fr));
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.dh { border-left: 1px solid var(--line2); padding: 6px 4px 5px; min-width: 0; }
.dn { display: flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; font-weight: 600; }
.dn b { font-size: 17px; color: var(--text); font-weight: 600; letter-spacing: 0; min-width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 99px; }
.dn:hover b { background: var(--line2); }
.dh.today .dn { color: var(--accent); }
.dh.today .dn b { background: var(--accent); color: var(--accent-text); }
.allday { display: grid; gap: 2px; margin-top: 3px; }
.chip {
  display: flex; align-items: center; gap: 5px; padding: 2px 6px; border-radius: 6px; font-size: 12px;
  cursor: pointer; min-width: 0; flex: none;
  background: color-mix(in srgb, var(--c, #888) 18%, var(--panel)); border-left: 3px solid var(--c, #888);
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip i { font-style: normal; color: var(--muted); }
.chip.task { background: var(--task); border: 1px solid var(--task-line); }
.chip .chk { width: 13px; height: 13px; margin: 0; }
.chip.done span { text-decoration: line-through; color: var(--muted); }
.chip.done .chk::after { left: 3px; top: 0; width: 3px; height: 7px; }
.chip.declined { opacity: .5; }
.chip.declined span { text-decoration: line-through; }

#gridBody {
  display: grid; grid-template-columns: var(--gut) repeat(var(--n), minmax(0, 1fr));
  height: calc(var(--hour) * 24); position: relative;
}
.gutter { position: relative; }
.gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.gutter span i { display: block; font-style: normal; font-size: 9.5px; color: var(--accent); opacity: .85; text-align: right; line-height: 1.1; white-space: nowrap; }
.zcorner { display: grid; align-content: center; justify-items: end; padding-right: 8px; font-size: 9.5px; line-height: 1.25; letter-spacing: .02em; }
.zcorner b { font-weight: 650; color: var(--muted); }
.zcorner i { font-style: normal; font-weight: 650; color: var(--accent); }
#zoneBtn { width: auto; min-width: 32px; padding: 0 7px; gap: 5px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 650; }
#zoneBtn.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
#zoneBtn span:empty { display: none; }
@media (max-width: 760px) { #zoneBtn { display: none; } }
.zrow { justify-content: space-between; }
.zrow b em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.zrow .znow { flex: none; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.zrow.on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.zrow i { max-width: 330px; }
.col {
  position: relative; border-left: 1px solid var(--line2);
  background-image: linear-gradient(var(--line2) 1px, transparent 1px);
  background-size: 100% var(--hour);
  user-select: none; -webkit-user-select: none;
}
.col::before, .col::after { content: ""; position: absolute; left: 0; right: 0; background: var(--shade); pointer-events: none; }
.col::before { top: 0; height: var(--ws, 0); }
.col::after { top: var(--we, 100%); bottom: 0; }
.col.wk { background-color: var(--shade); }
.col.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--now); z-index: 4; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--now); }

.blk {
  position: absolute; border-radius: 7px; padding: 3px 6px; overflow: hidden; font-size: 12px;
  display: flex; gap: 6px; align-items: flex-start; cursor: pointer;
  user-select: none; -webkit-user-select: none;
}
.blk .bt { min-width: 0; flex: 1; }
.blk .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk .m { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk.sm { padding-top: 1px; padding-bottom: 0; }
.blk.sm .m { display: none; }
.blk.ev { background: color-mix(in srgb, var(--c) 17%, var(--panel)); border-left: 3px solid var(--c); z-index: 1; }
.blk.ev .t { color: color-mix(in srgb, var(--c) 55%, var(--text)); }
.blk.ev:hover { background: color-mix(in srgb, var(--c) 26%, var(--panel)); }
.blk.ev.pending { background: var(--panel); outline: 1.5px dashed var(--c); outline-offset: -1.5px; }
.blk.ev.declined { opacity: .45; }
.blk.ev.declined .t { text-decoration: line-through; }
.blk.task {
  background: var(--task); border: 1px solid var(--task-line); border-left: 3px solid var(--tc, var(--task-line));
  z-index: 2; cursor: grab; touch-action: pan-y; box-shadow: var(--lift);
}
.blk.task.done { opacity: .6; box-shadow: none; }
.blk.task.done .t { text-decoration: line-through; }
.blk.task .chk { width: 14px; height: 14px; margin-top: 1px; }
.blk.task.done .chk::after { left: 3px; top: 0; width: 4px; height: 8px; }
.blk.task.drag { z-index: 6; box-shadow: 0 6px 20px rgba(0,0,0,.22); cursor: grabbing; opacity: .95; }
.blk.task.drop { opacity: .75; border-style: dashed; pointer-events: none; z-index: 6; box-shadow: none; }
.blk .rs { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.dragghost {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; max-width: 220px;
  padding: 5px 9px; border-radius: 8px; background: var(--task); border: 1px solid var(--task-line);
  font-weight: 600; font-size: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.22);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- month */
#month { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--panel); }
.mhead { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.mhead span { padding: 7px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.mgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); }
.mcell {
  border-left: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 3px 4px; overflow: hidden; min-width: 0;
  display: flex; flex-direction: column; gap: 2px; cursor: pointer;
}
.mcell:nth-child(7n + 1) { border-left: 0; }
.mcell.other { background: var(--shade); }
.mcell.other .mnum { color: var(--muted); }
.mcell.dropover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mnum { font-size: 12px; font-weight: 600; min-width: 24px; height: 24px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; align-self: flex-start; flex: none; }
.mnum:hover { background: var(--line2); }
.mcell.today .mnum { background: var(--accent); color: var(--accent-text); }
.more { font-size: 11px; color: var(--muted); padding: 0 5px; font-weight: 550; }
.more:hover { color: var(--text); }

/* ---------- list */
#list { flex: 1; min-height: 0; overflow-y: auto; background: var(--panel); }
.lwrap { max-width: 740px; margin: 0 auto; padding: 4px 18px 90px; }
.lday { padding-top: 16px; }
.lh {
  display: flex; align-items: center; gap: 8px; padding: 5px 0 7px; border-bottom: 1px solid var(--line);
  cursor: pointer; position: sticky; top: 0; background: var(--panel); z-index: 2; font-size: 14px; font-weight: 650;
}
.pill { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-text); }
.lrow { display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.lrow:hover { background: var(--shade); }
.ltime { width: 124px; flex: none; color: var(--muted); font-size: 12.5px; padding-top: 1px; font-variant-numeric: tabular-nums; }
.lbar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); flex: none; margin: 0 6px; }
.lt { min-width: 0; flex: 1; }
.lt .t { font-weight: 550; overflow-wrap: anywhere; }
.lt .m { color: var(--muted); font-size: 12px; }
.lrow.done .t { text-decoration: line-through; color: var(--muted); }
.lrow.declined { opacity: .5; }
.lnone { color: var(--muted); padding: 9px 4px; font-size: 13px; }

/* ---------- dialog */
dialog {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--panel); color: var(--text);
  width: min(470px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(0,0,0,.4); }
.dbody { padding: 18px; display: grid; gap: 12px; }
.dbody h3 { font-size: 18px; overflow-wrap: anywhere; letter-spacing: -.01em; }
.dbody h4 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.dbody label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.dbody input:not([type=checkbox]), .dbody select, .dbody textarea {
  width: 100%; padding: 8px 9px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 14px; outline: none; min-width: 0;
}
.dbody input:focus, .dbody select:focus, .dbody textarea:focus { border-color: var(--accent); }
.dbody textarea { resize: vertical; }
.dbody label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -4px; }
.thead2 { display: flex; align-items: center; gap: 11px; }
.taskform .ttl {
  flex: 1; font-size: 19px !important; font-weight: 650; letter-spacing: -.01em; border: 0 !important; border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important; background: transparent !important; padding: 4px 0 7px !important;
}
.taskform .ttl:focus { border-bottom-color: var(--accent) !important; }
.taskform h4 { margin-top: 2px; }
.chips .mini { padding: 3px 9px; border-radius: 99px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.sp { flex: 1; }
.note { color: var(--muted); font-size: 13px; }
.note.warn { color: var(--danger); }
.meta { color: var(--muted); display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.meta .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; font-size: 13px; }
.people { display: grid; gap: 2px; font-size: 13px; max-height: 130px; overflow: auto; }
.people i { color: var(--muted); font-style: normal; }
.rowline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details summary { cursor: pointer; color: var(--accent); font-size: 13px; }
details ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; }
ol.steps li > * { margin-top: 6px; }
ol.steps a { color: var(--accent); }
code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; font-size: 12px; overflow-wrap: anywhere; }

.qr { justify-self: center; width: min(300px, 78vw); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.qr svg { width: 100%; height: auto; display: block; }

/* plan my day */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.stats b { display: block; font-size: 19px; letter-spacing: -.01em; }
.stats span { color: var(--muted); font-size: 12px; }
.plist { display: grid; gap: 2px; max-height: 190px; overflow: auto; }
.prow { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 13.5px; border-radius: 7px; min-width: 0; }
label.prow { display: flex; font-size: 13.5px; color: var(--text); cursor: pointer; }
label.prow:hover { background: var(--shade); }
.prow .ptime { color: var(--muted); width: 58px; flex: none; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.prow .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.prow .pt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .pd { color: var(--muted); font-size: 12px; flex: none; }

/* search */
dialog.palette { width: min(580px, calc(100vw - 24px)); margin-top: 12vh; }
.pal input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 15px 18px; font-size: 16px; outline: none; }
#palList { max-height: min(52vh, 420px); overflow: auto; padding: 6px; }
.pr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pr.on { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.pr .pk { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); width: 52px; flex: none; }
.pr .pl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.pr .ps { color: var(--muted); font-size: 12px; flex: none; }
.palfoot { border-top: 1px solid var(--line); padding: 7px 14px; color: var(--muted); font-size: 12px; }

/* shortcuts */
.keys { display: grid; gap: 7px; }
.keys div { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
kbd {
  font: inherit; font-size: 12px; font-weight: 600; min-width: 92px; padding: 2px 8px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; text-align: center; white-space: pre;
}
.keys.ex kbd { min-width: 0; text-align: left; font-weight: 500; flex: 1; white-space: normal; }

#toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--panel); padding: 9px 14px; border-radius: 10px; font-weight: 550;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.show button { pointer-events: auto; } /* the message itself never blocks the buttons underneath */
#toast.err { background: var(--danger); color: #fff; }
#toast button { border: 0; background: transparent; color: inherit; font-weight: 700; text-decoration: underline; padding: 0; }

#fab {
  position: absolute; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 15;
  width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text);
  font-size: 28px; line-height: 1; box-shadow: 0 6px 18px rgba(0,0,0,.28); place-items: center;
}

/* ---------- phone */
@media (max-width: 760px) {
  :root { --gut: 42px; }
  #app { grid-template-columns: minmax(0, 1fr); }
  #side {
    position: fixed; inset: 0 auto 0 0; width: min(336px, 90vw); z-index: 30;
    transform: translateX(-102%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
    padding-top: env(safe-area-inset-top);
  }
  body.side-open #side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.side-open main::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
  .only-mobile { display: inline-grid; }
  .no-mobile { display: none; }
  #status { display: none; }
  #bar {
    display: grid; align-items: center; gap: 8px 3px; padding-left: 8px; padding-right: 8px;
    grid-template-columns: auto auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "menu title title title search new" "today prev next seg seg seg";
  }
  #menu { grid-area: menu; }
  #title { grid-area: title; font-size: 16px; margin: 0 2px; }
  #searchBtn { grid-area: search; }
  #newEvent { grid-area: new; }
  #todayBtn { grid-area: today; }
  #prev { grid-area: prev; }
  #next { grid-area: next; }
  #viewSeg { grid-area: seg; justify-self: end; }
  .btn { padding: 6px 9px; }
  .seg button { padding: 4px 9px; }
  .acct .mini { visibility: visible; }
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mhead span { padding: 6px 2px; text-align: center; font-size: 10px; }
  .mcell { padding: 2px 1px; }
  .mcell .chip { font-size: 10px; padding: 1px 3px; border-left-width: 2px; gap: 2px; }
  .mcell .chip .chk, .mcell .chip i { display: none; }
  .mnum { align-self: center; }
  .more { font-size: 10px; padding: 0 2px; }
  .ltime { width: 88px; font-size: 12px; }
  .lwrap { padding: 0 12px 96px; }
  .stats b { font-size: 16px; }
  /* day names sit above the date so seven days fit side by side */
  .dh { padding: 5px 1px 4px; }
  .dn { flex-direction: column; gap: 1px; padding: 0; font-size: 10px; letter-spacing: .03em; }
  .dn b { font-size: 15px; min-width: 26px; height: 26px; }
}

/* ---------- motion and polish */
:root { --ease: cubic-bezier(.2, .8, .2, 1); }
.btn, .icon, .mini, .seg button, .md, .mnum, .un, .lrow, .item, .chip, .cal, .dn b, .prow, #fab {
  transition: background-color .14s var(--ease), border-color .14s var(--ease), color .14s var(--ease),
    box-shadow .14s var(--ease), transform .14s var(--ease), filter .14s var(--ease), opacity .14s var(--ease);
}
.btn:active, .icon:active, .mini:active, #fab:active { transform: scale(.96); }
.btn.primary { box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 40%, transparent); }
:is(button, a, summary):focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.item:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .08); transform: translateY(-1px); }
.un:not(.none):hover { border-color: var(--muted); }
.blk { transition: box-shadow .14s var(--ease), background-color .14s var(--ease), opacity .14s var(--ease), transform .14s var(--ease); }
.blk.task:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .12); }
.blk.task.drag { box-shadow: 0 10px 28px rgba(0, 0, 0, .25); transform: scale(1.015); }
#sideBody, #grid, #list, .plist, dialog { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }

/* what just changed settles into place instead of jumping */
@keyframes settle {
  0% { transform: scale(.97); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  60% { box-shadow: 0 0 0 7px transparent; }
  100% { transform: none; }
}
@keyframes born { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes tick { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.settle { animation: settle .45s var(--ease); }
.born { animation: born .3s var(--ease); }
.tick .chk { animation: tick .32s var(--ease); }

/* boxes ease in and out */
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
@keyframes unpop { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes unfade { to { opacity: 0; } }
dialog[open] { animation: pop .2s var(--ease); }
dialog[open]::backdrop { animation: fade .2s ease; }
dialog.closing { animation: unpop .13s ease-in forwards; }
dialog.closing::backdrop { animation: unfade .13s ease-in forwards; }
.dbody { animation: fade .16s ease; }

/* a thin moving bar while calendars are loading */
main { overflow: clip; }
main::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 30%; border-radius: 2px;
  background: var(--accent); opacity: 0; z-index: 9; pointer-events: none; transition: opacity .2s;
}
body.loading main::before { opacity: .9; animation: load 1.1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* moving between days, weeks and views: the calendar slides or cross-fades, the rest stays still */
#grid, #month, #list { view-transition-name: stage; }
#viewSeg button.on { view-transition-name: segpill; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(stage) { overflow: clip; }
::view-transition-group(segpill) { animation-duration: .22s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
@keyframes out-left { to { transform: translateX(-32px); opacity: 0; } }
@keyframes out-right { to { transform: translateX(32px); opacity: 0; } }
@keyframes in-left { from { transform: translateX(-32px); opacity: 0; } }
@keyframes in-right { from { transform: translateX(32px); opacity: 0; } }
@keyframes in-rise { from { transform: scale(.985); opacity: 0; } }
:root[data-dir="next"]::view-transition-old(stage) { animation: out-left .18s cubic-bezier(.4, 0, 1, 1) both; }
:root[data-dir="next"]::view-transition-new(stage) { animation: in-right .26s cubic-bezier(.2, .8, .2, 1) both; }
:root[data-dir="prev"]::view-transition-old(stage) { animation: out-right .18s cubic-bezier(.4, 0, 1, 1) both; }
:root[data-dir="prev"]::view-transition-new(stage) { animation: in-left .26s cubic-bezier(.2, .8, .2, 1) both; }
:root[data-dir="fade"]::view-transition-old(stage) { animation: unfade .14s ease both; }
:root[data-dir="fade"]::view-transition-new(stage) { animation: in-rise .24s cubic-bezier(.2, .8, .2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- settings */
dialog.settings { width: min(800px, calc(100vw - 24px)); overflow: hidden; }
.sets { display: grid; grid-template-columns: 200px minmax(0, 1fr); height: min(640px, calc(100dvh - 42px)); }
.snav { background: var(--bg); border-right: 1px solid var(--line); padding: 16px 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.snav h3 { font-size: 17px; padding: 2px 9px 12px; letter-spacing: -.01em; }
.snav button {
  display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--muted);
  padding: 8px 9px; border-radius: 8px; font-weight: 550; font-size: 14px; text-align: left; white-space: nowrap;
  transition: background .15s, color .15s;
}
.snav button svg { flex: none; }
.snav button:hover { color: var(--text); background: var(--shade); }
.snav button.on { background: var(--panel); color: var(--text); box-shadow: var(--lift); }
.snav button.on svg { color: var(--accent); }
.snav .sver { margin-top: auto; padding: 8px 9px 0; font-size: 11.5px; color: var(--muted); }
.smain { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.spanes { flex: 1; overflow: auto; padding: 20px 22px 22px; min-height: 0; display: grid; gap: 14px; align-content: start; scrollbar-width: thin; }
.spane { display: grid; gap: 14px; animation: in-rise .22s var(--ease); }
.spane[hidden] { display: none; }
.spane > h3 { font-size: 20px; letter-spacing: -.015em; }
.spane > .lead { color: var(--muted); font-size: 13px; margin-top: -8px; line-height: 1.45; }
.spane h4 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 3px -6px; display: flex; align-items: center; gap: 8px; }
.gintro { color: var(--muted); font-size: 13px; line-height: 1.45; margin: -2px 3px -4px; }
.sgroup { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.sgroup > * + * { border-top: 1px solid var(--line2); }
.srow { display: flex; align-items: center; gap: 14px; padding: 10px 13px; min-height: 50px; }
label.srow { cursor: pointer; }
.st { flex: 1; min-width: 0; display: grid; gap: 2px; }
.st b { font-weight: 550; font-size: 14px; overflow-wrap: anywhere; }
.st span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.sets select, .sets input:not([type=checkbox], [type=radio]) {
  padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 14px; outline: none; min-width: 0;
}
.sets select:focus, .sets input:not([type=checkbox], [type=radio]):focus { border-color: var(--accent); }
.srow select { flex: none; max-width: 52%; }
.srow .btn { flex: none; }
.sfield { display: grid; gap: 7px; padding: 12px 13px; }
.sfield[hidden] { display: none; }
.srow[hidden] { display: none; }
.sgroup > #searchPart > * + * { border-top: 1px solid var(--line2); }
.sfield details + details { margin-top: 2px; }
.sfield details input { margin-top: 8px; }
.sfield details .hint { display: block; margin-top: 6px; }
.sets optgroup { color: var(--muted); font-style: normal; }
.sets option { color: var(--text); }
.sfield label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sfield label b { font-weight: 550; }
.sfield input { width: 100%; }
.sfield .hint { color: var(--muted); font-size: 12.5px; margin-top: -4px; }
.sfoot { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); }
.stag {
  font-style: normal; font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 99px; flex: none; white-space: nowrap;
  letter-spacing: 0; text-transform: none; background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted);
}
.stag.rec { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.stag.rec::before { content: '★'; margin-right: 4px; font-size: 9px; vertical-align: 1px; }
.stag[hidden] { display: none; }
.stag.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.stag.warn { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.adot {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
input.switch {
  appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 99px; margin: 0; flex: none; cursor: pointer;
  position: relative; background: color-mix(in srgb, var(--muted) 40%, transparent); transition: background .18s;
}
input.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .18s var(--ease);
}
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(16px); }
input.switch:focus-visible, .segr input:focus-visible + span { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.segr { display: flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--panel); gap: 1px; flex: none; }
.segr label { position: relative; }
.segr input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segr span { display: block; padding: 4px 12px; border-radius: 7px; font-weight: 550; font-size: 13px; color: var(--muted); transition: background .15s, color .15s; }
.segr input:checked + span { background: var(--bg); color: var(--text); box-shadow: var(--lift); }
@media (max-width: 760px) {
  .sets { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 42px); }
  .snav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .snav::-webkit-scrollbar { display: none; }
  .snav h3, .snav .sver { display: none; }
  .snav button { flex: none; padding: 7px 11px; }
  .spanes { padding: 16px 14px 18px; }
  .sfoot { padding: 10px 14px; }
  .srow { flex-wrap: wrap; row-gap: 8px; }
  .srow .st { flex-basis: 55%; }
  .srow select { max-width: 100%; }
}

/* ---------- today, people, companies */
dialog.wide { width: min(640px, calc(100vw - 24px)); }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0 2px; }
.tools button {
  display: grid; justify-items: center; gap: 5px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--text); font-weight: 550; font-size: 12px; box-shadow: var(--lift); min-width: 0;
  transition: border-color .15s, transform .15s, background .15s;
}
.tools button svg { color: var(--accent); }
.tools button { font-size: 11px; letter-spacing: -.01em; padding: 10px 2px 8px; }
.tools button[data-act=record] svg { color: var(--now); }
.tools button span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools button:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.tools button:active { transform: scale(.96); }
.tcard { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 12px 13px; display: grid; gap: 8px; }
.tcard.now { border-color: color-mix(in srgb, var(--now) 55%, var(--line)); }
.tcard.done { opacity: .6; }
.thead { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tsoon { color: var(--accent); font-weight: 600; }
.tdone { font-weight: 600; }
.ttitle { border: 0; background: transparent; padding: 0; text-align: left; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.ttitle:hover { color: var(--accent); }
.twho { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.tperson, .prow2 { border: 0; background: transparent; padding: 3px 4px; border-radius: 9px; display: flex; align-items: center; gap: 9px; text-align: left; color: var(--text); min-width: 0; }
.tperson:hover, .prow2:hover { background: var(--shade); }
.tperson .avatar.sm, .prow2 .avatar.sm { margin-top: 0; }
.tperson span, .prow2 span { display: grid; min-width: 0; }
.tperson b, .prow2 b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tperson i, .prow2 i { font-style: normal; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
.tline { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.45; }
.tline > i { font-style: normal; color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding-top: 2px; }
.tline em, .todo2 em { font-style: normal; color: var(--muted); }
.tfoot { display: flex; gap: 8px; }
.tfill { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.plist3 { display: grid; gap: 1px; }
.plist3.tall { max-height: min(52vh, 460px); overflow: auto; align-content: start; min-height: 120px; }
.prow2 { width: 100%; padding: 6px 6px; }
.clogo { width: 58px; height: 58px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); font-weight: 700; font-size: 20px; color: var(--muted); }
.clogo img.logo { width: 34px; height: 34px; margin: 0; border-radius: 7px; }
.clogo.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
.clogo.sm img.logo { width: 20px; height: 20px; border-radius: 5px; }
.ppl h3 { margin-right: auto; }
.btn img.logo { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; }
@media (max-width: 760px) {
  .tline { grid-template-columns: 1fr; gap: 1px; }
  .tperson i, .prow2 i { max-width: 190px; }
}

/* ---------- the first-time tour and first-use tips */
#tour { position: fixed; inset: 0; z-index: 200; }
.tour-hole {
  position: fixed; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(8, 10, 16, .62), 0 0 0 2px var(--accent), 0 0 0 7px color-mix(in srgb, var(--accent) 28%, transparent);
  transition: left .38s var(--ease), top .38s var(--ease), width .38s var(--ease), height .38s var(--ease);
}
.tour-card {
  position: fixed; padding: 15px 16px 13px; border-radius: 15px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); box-shadow: 0 22px 60px rgba(0, 0, 0, .42); display: grid; gap: 7px;
  transition: left .38s var(--ease), top .38s var(--ease); animation: pop .25s var(--ease);
}
.tour-count { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-variant-numeric: tabular-nums; }
.tour-card h4 { font-size: 16px; letter-spacing: -.01em; }
.tour-card p { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.tour-actions .linkbtn { color: var(--muted); }
.ftip {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5;
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  animation: born .3s var(--ease);
}
.ftip > span:nth-child(2) { flex: 1; min-width: 0; }
.ftip-mark { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-text); margin-top: 1px; }
.ftip .linkbtn { flex: none; white-space: nowrap; }

/* ---------- the recorder */
#recBar {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 150;
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 99px; max-width: calc(100vw - 24px);
  background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); font-size: 13.5px;
}
#recBar .rdot { width: 10px; height: 10px; border-radius: 50%; background: var(--now); flex: none; animation: pulse 1.4s ease-in-out infinite; }
#recBar.paused .rdot { animation: none; opacity: .4; }
#recBar b { font-variant-numeric: tabular-nums; font-weight: 650; }
#recBar .rname { color: var(--muted); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#recBar button { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 99px; padding: 5px 13px; font-weight: 600; font-size: 13px; }
#recBar button.stop { background: var(--now); border-color: var(--now); color: #fff; }
#recBar button:disabled { opacity: .6; }
.rchoice { display: grid; gap: 7px; }
.rchoice label { display: flex !important; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; color: var(--text) !important; transition: border-color .15s, background .15s; }
.rchoice label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.rchoice input { width: auto !important; padding: 0 !important; border: 0 !important; flex: none; margin: 3px 0 0; accent-color: var(--accent); }
.rchoice span { display: grid; gap: 1px; }
.rchoice b { font-size: 14px; font-weight: 600; }
.rchoice i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.note.warn2 { color: var(--text); padding: 9px 11px; border-radius: 10px; background: color-mix(in srgb, var(--now) 9%, transparent); border: 1px solid color-mix(in srgb, var(--now) 28%, transparent); }
.rplay { width: 100%; border-radius: 10px; background: #000; }
audio.rplay { background: transparent; height: 42px; }
.rtext { max-height: 240px; }
.clogo.rk { color: var(--now); font-size: 14px; }
@media (max-width: 760px) { #recBar .rname { display: none; } }

/* ---------- meeting prep */
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.whos { display: grid; gap: 9px; font-size: 13.5px; }
.who i, .past i, .dbody label i { color: var(--muted); font-style: normal; font-weight: 400; }
.who .wm { color: var(--muted); font-size: 12px; display: flex; gap: 2px 12px; flex-wrap: wrap; margin-top: 1px; }
.who { display: flex; gap: 10px; align-items: flex-start; }
.who .wbody { flex: 1; min-width: 0; display: grid; gap: 3px; }
.who .look { display: flex; gap: 5px; flex-wrap: wrap; }
.who .look a {
  color: var(--accent); text-decoration: none; font-weight: 550; padding: 1px 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 10%, transparent); transition: background .15s;
}
.who .look a:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.dbody textarea[name="note"] { min-height: 88px; }
.airow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: -6px; min-height: 24px; }
.airow .mini { padding: 3px 9px; }
.airow .note { font-size: 12px; }
.saved { color: var(--muted); font-size: 12px; }
.dbody textarea[readonly] { opacity: .6; }
.past { display: grid; gap: 10px; margin-top: 8px; font-size: 13px; }
.past .desc { max-height: 110px; margin-top: 2px; color: var(--muted); }
.blk.ev.noted .t::after { content: " ✎"; font-weight: 400; opacity: .7; }
.last { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; margin-top: -4px; }
.last .lt2 { font-weight: 600; }
.last .desc { max-height: 90px; color: var(--text); }
.last .todo { display: grid; gap: 2px; color: var(--muted); }
.last .todo .done { text-decoration: line-through; opacity: .7; }
button.nm { border: 0; background: none; padding: 0; font-weight: 650; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent); text-underline-offset: 3px; }
button.nm:hover { color: var(--accent); }
.who .abt { font-size: 12.5px; margin: 1px 0; }
.plist2, .todo2 { display: grid; gap: 3px; font-size: 13px; }
.plist2 i { color: var(--muted); font-style: normal; display: inline-block; min-width: 92px; }

/* ---------- a person's profile */
.phead { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 16px; letter-spacing: .02em; color: #fff; background: var(--tc, var(--accent)); }
.pmain { min-width: 0; display: grid; gap: 1px; }
.prole { font-weight: 550; font-size: 14px; overflow-wrap: anywhere; }
.facts { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 13px 14px; display: grid; gap: 13px; font-size: 13.5px; }
.fsec { display: grid; gap: 4px; }
.fsec h5 { margin: 0; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.fsec p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.fsec.multi p { padding-left: 13px; position: relative; }
.fsec.multi p::before { content: ""; position: absolute; left: 2px; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.chips2 { display: flex; gap: 6px; flex-wrap: wrap; }
.chips2 a { font-size: 12px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); text-decoration: none; transition: color .14s, border-color .14s; }
.chips2 a:hover { color: var(--accent); border-color: var(--accent); }
.ffoot { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: 12px; flex: none; }
.fempty { display: grid; gap: 8px; justify-items: start; }
.fempty span { color: var(--muted); }
.sk { height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--line2) 25%, var(--line) 37%, var(--line2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.sk.w40 { width: 40%; } .sk.w60 { width: 60%; } .sk.w80 { width: 80%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.dbody textarea[name="about"] { min-height: 70px; }
.fgroup { display: grid; gap: 10px; }
.fgroup + .fgroup { border-top: 1px solid var(--line); padding-top: 12px; }
.fgroup > h4 { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 650; margin: 0; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tags span { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.flinks { display: flex; gap: 12px; flex: none; }
.hintrow { display: flex; gap: 8px; }
.hintrow input { flex: 1; }
.bwho { display: flex; gap: 10px; align-items: flex-start; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; margin-top: 2px; }
.bwho .tags { margin-top: 5px; }
.brief .fsec p i { font-style: normal; color: var(--muted); margin-right: 4px; }
.brief .fsec { font-size: 13.5px; }
.avatar.photo { overflow: hidden; background: var(--line); }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; animation: fade .25s ease; }
.phead .avatar { width: 58px; height: 58px; font-size: 19px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.pcell { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); padding: 0; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 550; transition: border-color .15s, transform .15s; }
.pcell img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.pcell:hover { border-color: var(--muted); }
.pcell.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
img.logo { width: 18px; height: 18px; border-radius: 4px; vertical-align: -3px; margin-right: 7px; background: #fff; object-fit: contain; }
h3 img.logo { width: 22px; height: 22px; vertical-align: -4px; margin-right: 9px; }

/* ---- the recorder: camera, floating controls, screenshots and the library */
#recBar { gap: 9px; }
#recBar .rface { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; transform: scaleX(-1); background: #000; flex: none; margin-left: -6px; box-shadow: 0 0 0 2px var(--now); }
#recBar.paused .rface { box-shadow: 0 0 0 2px var(--line); }
#recBar .rlevel { width: 34px; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; flex: none; }
#recBar .rlevel i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--ok); transition: width .08s linear; }
#recBar.paused .rlevel i { background: var(--muted); }
#recBar button.ricon { padding: 0; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); flex: none; }
#recBar button.ricon:hover { color: var(--text); }
#recBar button.ricon.off { opacity: .4; }
.rsetup .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.rsetup [hidden] { display: none !important; }
.rcamset { display: flex; align-items: center; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.rcam { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; transform: scaleX(-1); background: #000; flex: none; box-shadow: 0 0 0 3px var(--panel), 0 4px 14px rgba(0, 0, 0, .22); }
.rcamopts { display: grid; gap: 10px; }
.rcamopts > div { display: flex; align-items: center; gap: 10px; }
.rlbl { font-size: 12px; color: var(--muted); min-width: 46px; }
.rcorners { display: grid; grid-template-columns: 1fr 1fr; width: 58px; height: 38px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); flex: none; }
.rcorners label { position: relative; display: block !important; cursor: pointer; }
.rcorners input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100% !important; height: 100%; padding: 0 !important; border: 0 !important; }
.rcorners span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .15s, transform .15s var(--ease); }
.rcorners label:nth-child(1) span { top: 4px; left: 4px; }
.rcorners label:nth-child(2) span { top: 4px; right: 4px; }
.rcorners label:nth-child(3) span { bottom: 4px; left: 4px; }
.rcorners label:nth-child(4) span { bottom: 4px; right: 4px; }
.rcorners label:hover span { background: var(--muted); }
.rcorners input:checked + span { background: var(--accent); transform: scale(1.15); }
.rcorners input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.dbody input.rtitle { font-size: 18px; font-weight: 650; letter-spacing: -.01em; padding: 4px 8px; margin: -4px -8px; width: calc(100% + 16px); border-color: transparent; background: transparent; text-overflow: ellipsis; }
.dbody input.rtitle:hover { border-color: var(--line); }
.dbody input.rtitle:focus { border-color: var(--accent); background: var(--bg); }
.rstage { border-radius: 12px; overflow: hidden; background: #000; display: grid; place-items: center; }
.rstage .rplay { border-radius: 0; display: block; max-height: min(54vh, 500px); }
.rshot { display: block; max-width: 100%; max-height: min(58vh, 540px); object-fit: contain; }
.rspeed { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rspeed .rlbl { min-width: 0; }
.rspeed .note { font-size: 12px; }
.rkinds { justify-self: start; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px 12px; max-height: min(54vh, 500px); overflow: auto; padding: 2px; align-content: start; }
.rcard { border: 0; background: transparent; padding: 0; text-align: left; color: var(--text); display: grid; gap: 2px; min-width: 0; border-radius: 12px; }
.rcard b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 5px; }
.rcard i { font-style: normal; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rthumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); color: var(--muted); transition: border-color .15s; }
.rcard:hover .rthumb, .rcard:focus-visible .rthumb { border-color: var(--muted); }
.rthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rthumb svg { width: 30px; height: 30px; }
.rthumb em { position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .66); color: #fff; }
.rempty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 34px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.rempty svg { width: 28px; height: 28px; }
.rempty b { color: var(--text); font-size: 15px; }
.rempty span { max-width: 380px; font-size: 13px; }
@media (max-width: 760px) {
  #recBar .rlevel, #recBar [data-r=float] { display: none; }
  .rcamset { flex-direction: column; align-items: flex-start; }
  .rsetup .grid2 { grid-template-columns: 1fr; }
}
@media (min-width: 560px) { .rsetup .rchoice { grid-template-columns: 1fr 1fr; } }
.rsetup .rchoice label { padding: 9px 11px; }
.dbody label.check .rsub { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }
.dbody label.check:has(.rsub) { align-items: flex-start; }
.dbody label.check:has(.rsub) input { margin-top: 3px; }
.rask { display: flex; gap: 8px; }
.rask input { flex: 1; }
.ranswer { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 7%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); max-height: 200px; }
.dbody textarea[name="note"].pad { min-height: 230px; }
.rchaps { display: grid; gap: 2px; }
.rchaps button, .rline { display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; background: transparent; color: var(--text); padding: 5px 8px; border-radius: 8px; font-size: 13.5px; line-height: 1.45; width: 100%; }
.rchaps button:hover, .rline:hover { background: var(--shade); }
.rchaps em, .rline em { font-style: normal; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--accent); flex: none; min-width: 34px; }
.rlines { display: grid; gap: 1px; max-height: 300px; overflow: auto; margin-top: 6px; }
.rline b { font-weight: 600; }
.rline.now { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.rtrim { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.rtrimrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rkeep { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rkeep b { color: var(--text); font-weight: 600; }
.ranswer.tall { max-height: min(46vh, 420px); }
.rkind { justify-self: start; flex-wrap: wrap; }
.rkind span { padding: 6px 14px; font-size: 13.5px; }
#recWhy { color: var(--text); margin-top: -4px; }
.rnotes { display: grid; gap: 3px; font-size: 14px; line-height: 1.5; }
.rnotes h5 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; margin: 10px 0 1px; }
.rnotes h5:first-child { margin-top: 0; }
.rnotes p { margin: 0; }
.rnotes ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.rnotes .rnext { margin-top: 4px; padding: 7px 10px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.rnotes .rnext b { font-weight: 650; color: var(--accent); margin-right: 8px; font-size: 12px; letter-spacing: .03em; }
.rfold { border-top: 1px solid var(--line2); padding-top: 9px; }
.rfold > summary { color: var(--text); font-weight: 600; font-size: 13.5px; }
.rfold > :not(summary) { margin-top: 9px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -2px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 3px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--text); font-size: 13px; font-weight: 550; max-width: 100%; transition: border-color .15s; }
.pchip:hover { border-color: var(--muted); }
.pchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip .avatar.sm { width: 22px; height: 22px; font-size: 9.5px; margin: 0; }
.pmore { color: var(--muted); font-size: 12.5px; }
.evbox textarea[name="note"] { min-height: 150px; }
.rfold > summary i { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 12.5px; }
.rfold .last { margin-top: 9px; }
.rshare { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rshare input { flex: 1 1 260px; min-width: 180px; font-size: 13px; }
.dbody ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; }

/* ---- the notes editor (editor.js) */
.edsrc { display: none !important; }
.dbody .field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.dbody .field i { color: var(--muted); font-style: normal; font-weight: 400; }
.ed { position: relative; min-height: 150px; max-height: min(46vh, 440px); overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  color: var(--text); font-size: 14.5px; line-height: 1.55; outline: none; overflow-wrap: anywhere; white-space: pre-wrap; cursor: text; transition: border-color .15s; }
.ed:focus { border-color: var(--accent); }
.edsrc.pad + .ed { min-height: 230px; }
.ed.blank::before { content: attr(data-placeholder); position: absolute; left: 12px; right: 12px; top: 10px; color: var(--muted); pointer-events: none; }
.ed .b { min-height: 1.55em; }
.ed .b.h { font-weight: 650; font-size: 16px; letter-spacing: -.01em; margin-top: 8px; }
.ed .b.sec { font-weight: 650; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.ed .b.sec:first-child, .ed .b.h:first-child { margin-top: 0; }
.ed .b.mark { margin: 12px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.ed .b.next { margin: 2px 0; padding: 4px 10px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ed .b.li, .ed .b.todo { position: relative; padding-left: 22px; }
.ed .b.li::before { content: '•'; position: absolute; left: 7px; color: var(--muted); }
.ed .b.todo::before { content: ''; position: absolute; left: 2px; top: .3em; width: 14px; height: 14px; border-radius: 4px; border: 1.6px solid var(--muted); cursor: pointer; background: var(--panel); transition: background .12s, border-color .12s; }
.ed .b.todo[data-done]::before { background: var(--accent); border-color: var(--accent); }
.ed .b.todo[data-done]::after { content: ''; position: absolute; left: 6.500px; top: calc(.3em + 2.500px); width: 4px; height: 8px; border: solid var(--accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.ed .b.todo[data-done] { color: var(--muted); text-decoration: line-through; }

/* ---- the Notes page */
body.innotes #prev, body.innotes #next, body.innotes #todayBtn, body.innotes #zoneBtn { display: none; }
#notes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); background: var(--panel); }
.nlist { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.nhead { display: flex; gap: 8px; padding: 12px; }
.nhead input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14px; outline: none; }
.nhead input:focus { border-color: var(--accent); }
.nrows { flex: 1; overflow-y: auto; padding: 0 8px 14px; display: grid; gap: 2px; align-content: start; }
.nrows h4 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; padding: 12px 8px 4px; }
.nrow { display: grid; gap: 1px; text-align: left; border: 0; background: transparent; color: var(--text); padding: 9px 10px; border-radius: 10px; min-width: 0; }
.nrow:hover { background: var(--shade); }
.nrow.on { background: var(--panel); box-shadow: var(--lift), 0 0 0 1px var(--line); }
.nrow b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nrow i { font-style: normal; font-size: 12px; color: var(--muted); }
.nrow span { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.nnone { color: var(--muted); font-size: 13px; padding: 14px 10px; }
.ndoc { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 26px clamp(18px, 5vw, 64px) 14px; gap: 6px; }
.ndochead { display: flex; align-items: center; gap: 6px; }
.ntitle { flex: 1; min-width: 0; font: inherit; font-size: 26px; font-weight: 680; letter-spacing: -.02em; color: var(--text); border: 0; background: transparent; outline: none; padding: 0; text-overflow: ellipsis; }
.ntitle[readonly] { cursor: default; }
.ndoc .meta { margin-bottom: 8px; }
.ndoc .ed { flex: 1; min-height: 0; max-height: none; border: 0; border-radius: 0; background: transparent; padding: 4px 0 30px; font-size: 15.5px; line-height: 1.65; max-width: 760px; }
.ndoc .ed.blank::before { left: 0; top: 4px; }
.ndocfoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line2); padding-top: 10px; min-height: 46px; }
.ndocfoot .saved { font-size: 12px; color: var(--muted); }
.nempty { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); max-width: 340px; }
.nempty svg { width: 30px; height: 30px; }
.nempty b { color: var(--text); font-size: 16px; }
.nempty span { font-size: 13.5px; }
@media (max-width: 760px) {
  #notes { grid-template-columns: 1fr; }
  #notes.reading .nlist, #notes:not(.reading) .ndoc { display: none; }
  .ndoc { padding: 14px 16px 10px; }
  .ntitle { font-size: 21px; }
}

/* ================= the look, second pass =================
   One idea runs through it: a thing you look at in full (a meeting, a person, a task, a recording)
   opens as a panel down the right-hand side, with the calendar still in view. Short questions stay
   small boxes in the middle. The side panel on the left is one calm surface, not a stack of cards. */

/* ---- the panel on the right */
.pclose { display: none; }
@media (min-width: 761px) {
  dialog.panel { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(500px, calc(100vw - 60px)); border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: -24px 0 60px rgba(15, 20, 40, .16); }
  dialog.panel.wide { width: min(640px, calc(100vw - 60px)); }
  dialog.panel::backdrop { background: rgba(15, 20, 40, .14); }
  dialog.panel[open] { animation: slidein .24s var(--ease); }
  dialog.panel.closing { animation: slideout .16s ease-in forwards; }
  dialog.panel > .dbody { display: flex; flex-direction: column; min-height: 100%; padding: 26px 26px 0; gap: 13px; animation: none; }
  dialog.panel > .dbody > * { flex: none; }
  dialog.panel > .dbody > :first-child { padding-right: 40px; } /* room for the close button */
  dialog.panel > .dbody > h3 { font-size: 21px; letter-spacing: -.015em; line-height: 1.25; }
  dialog.panel .actions { margin-top: auto; position: sticky; bottom: 0; background: var(--panel); padding: 12px 0 16px; border-top: 1px solid var(--line2); z-index: 2; }
  dialog.panel .ed { max-height: none; min-height: 230px; }
  dialog.panel .rkinds, dialog.panel .rkind { align-self: flex-start; }
  .pclose { display: grid; place-items: center; position: absolute; top: 18px; right: 18px; z-index: 3; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; }
  .pclose:hover { background: var(--line2); color: var(--text); }
}
@keyframes slidein { from { transform: translateX(36px); opacity: 0; } }
@keyframes slideout { to { transform: translateX(28px); opacity: 0; } }

/* ---- the two places: Calendar and Notes */
#mainNav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 0 12px 10px; }
#mainNav button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 4px; min-width: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s; }
#mainNav button svg { width: 16px; height: 16px; flex: none; }
#mainNav button:hover { background: var(--shade); color: var(--text); }
#mainNav button.on { background: var(--panel); color: var(--text); box-shadow: var(--lift), 0 0 0 1px var(--line); }
#mainNav button.on svg { color: var(--accent); }
body.innotes #viewSeg, body.innotes #newEvent { display: none; }

/* ---- the left side as one calm surface: no boxes inside boxes */
.card { background: transparent; border: 0; box-shadow: none; padding: 2px 4px 0; }
.card .ch b { font-size: 13.5px; }
.prog { height: 4px; margin: 8px 0 6px; }
.card .btn { margin-top: 9px; height: 34px; }
.tools { gap: 4px; margin: 12px 0 4px; }
.tools button { border: 0; box-shadow: none; background: color-mix(in srgb, var(--text) 4%, transparent); border-radius: 11px; }
.tools button:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.un { background: transparent; border: 0; padding: 7px 6px; border-radius: 9px; }
.un:not(.none):hover { background: var(--shade); }
.un.none { border: 0; padding: 4px 6px; }
.item { background: transparent; border: 0; border-radius: 9px; padding: 7px 6px; margin-bottom: 1px; }
.item:hover { background: var(--shade); box-shadow: none; transform: none; }
.item .chk { border-color: var(--tc, var(--muted)); }
.item .mini { opacity: 0; transition: opacity .12s; }
.item:hover .mini, .item:focus-within .mini { opacity: 1; }
@media (hover: none) { .item .mini { opacity: 1; } }
.sec { margin-top: 18px; }
.sideFoot { gap: 4px; }
.sideFoot #connect { box-shadow: none; }

/* ---- Home: the place the app opens on */
body.inhome #prev, body.inhome #next, body.inhome #todayBtn, body.inhome #zoneBtn { display: none; }
body.inhome #title, body.innotes #title { margin-left: 4px; }
body.inhome #viewSeg { display: none; }
#home { flex: 1; min-height: 0; overflow-y: auto; background: var(--panel); }
.hwrap { max-width: 1060px; margin: 0 auto; padding: 38px clamp(18px, 4vw, 52px) 70px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr); gap: 30px 52px; align-items: start; }
.hhello { grid-column: 1 / -1; }
.hhello h2 { margin: 0; font-size: 31px; font-weight: 680; letter-spacing: -.028em; line-height: 1.15; }
.hhello p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.hmain, .hside { display: grid; gap: 34px; min-width: 0; }
.hnext { display: grid; gap: 12px; padding: 22px 24px; border-radius: 18px; background: color-mix(in srgb, var(--c, var(--accent)) 7%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 24%, var(--line)); }
.hnext.quiet { background: var(--bg); border-color: var(--line); }
.hchip { justify-self: start; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent); color: color-mix(in srgb, var(--c, var(--accent)) 72%, var(--text)); }
.hchip.now { background: var(--now); color: #fff; }
.hnext.quiet .hchip { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
.hopen { display: grid; gap: 3px; text-align: left; border: 0; background: transparent; padding: 0; color: var(--text); min-width: 0; }
button.hopen { cursor: pointer; }
.hopen b { font-size: 24px; font-weight: 660; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
button.hopen:hover b { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.hopen i { font-style: normal; color: var(--muted); font-size: 14.5px; }
.pchip.still { cursor: default; }
.hsec h4 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.hsec h4 span + span { letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 12px; }
.hsec h4 .linkbtn { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.hrow { display: grid; grid-template-columns: 58px 3px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 8px; border-radius: 10px; cursor: pointer; }
.hrow.task { grid-template-columns: 58px 16px minmax(0, 1fr); gap: 12px 9px; }
.hrow.task.slim { grid-template-columns: 16px minmax(0, 1fr); padding: 6px 8px; }
.hrow:hover { background: var(--shade); }
.hrow .ht { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.hrow .hbar { align-self: stretch; border-radius: 3px; min-height: 30px; }
.hrow .chk { margin: 0; }
.hrow .hb { display: grid; min-width: 0; }
.hrow .hb b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .hb em { font-style: normal; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow.past { opacity: .5; }
.hrow.live { background: color-mix(in srgb, var(--now) 7%, transparent); }
.hrow.done .hb b { text-decoration: line-through; color: var(--muted); }
.hnone, .hfoot { color: var(--muted); font-size: 13.5px; margin: 0; padding: 4px 8px; }
.hfoot { font-size: 12.5px; padding: 8px 8px 10px; }
.hside .btn { width: 100%; height: 36px; }
.hnote { display: grid; gap: 1px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 9px 8px; border-radius: 10px; }
.hnote:hover { background: var(--shade); }
.hnote b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hnote em { font-style: normal; font-size: 12px; color: var(--muted); }
.hnote span { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
@media (max-width: 860px) {
  .hwrap { grid-template-columns: 1fr; padding: 22px 16px 90px; gap: 26px; }
  .hhello h2 { font-size: 25px; }
  .hopen b { font-size: 21px; }
}
#brandHome { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 2px 6px 2px 2px; margin: -2px 0 -2px -2px; border-radius: 8px; font: inherit; font-weight: 650; font-size: 16px; color: var(--text); cursor: pointer; }
#brandHome:hover { background: var(--shade); }
.setcode { display: grid; justify-items: center; gap: 3px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.setcode span { font-size: 12px; color: var(--muted); }
.setcode b { font: 650 24px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.dbody input.codein { font: 600 20px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; text-align: center; text-transform: uppercase; padding: 10px; }

/* ---- the calendar grid, tidied: titles run on to a second line, and a narrow block gives its room to the title */
.blk { line-height: 16px; container-type: inline-size; }
.blk.ev { box-shadow: 0 0 0 1px var(--panel); }
.blk.ml .t { white-space: normal; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: calc(var(--l) - 1); line-clamp: calc(var(--l) - 1); }
@container (max-width: 104px) { /* squeezed beside another: the words matter more than the time or the tick-box */
  .blk .m, .blk.task .chk { display: none; }
  .blk.ml .t { -webkit-line-clamp: var(--l); line-clamp: var(--l); }
}


/* =====================================================================================================
   The Weftday look (third pass). A card file: a soft green box, white cards in it, and one colour for
   each kind of thing: blue for the calendar, green for notes, coral for recordings, violet for people,
   amber for tasks. Everything below replaces the earlier greys and blues.
   ===================================================================================================== */
@font-face { font-family: Figtree; src: url(fonts/figtree.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url(fonts/bricolage.woff2) format('woff2'); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
:root {
  --bg: #edf1ea; --panel: #ffffff; --line: #d8dfd4; --line2: #e8ece4;
  --text: #17201b; --muted: #5a675f; --accent: #16775a; --accent-text: #ffffff;
  --task: #fff8e4; --task-line: #ead9a6; --now: #e0503a; --danger: #c2362e; --ok: #16775a;
  --shade: rgba(23, 60, 40, .05); --lift: 0 1px 2px rgba(23, 40, 30, .08);
  --h-cal: #3566e0; --h-notes: #16775a; --h-rec: #e0503a; --h-people: #7a57e0; --h-task: #c98a0c; --h-home: #17201b;
  --ui: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: 'Bricolage Grotesque', Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613; --panel: #19201c; --line: #2c362f; --line2: #222a25;
    --text: #e7ece7; --muted: #94a199; --accent: #62cfa2; --accent-text: #0b1e15;
    --task: #29251a; --task-line: #5c5131; --now: #f0705c; --danger: #f07068; --ok: #62cfa2;
    --shade: rgba(220, 255, 235, .04); --lift: 0 1px 2px rgba(0, 0, 0, .45);
    --h-cal: #7d9cf5; --h-notes: #62cfa2; --h-rec: #f0705c; --h-people: #a58cf5; --h-task: #e6b84a; --h-home: #e7ece7;
  }
}
:root[data-theme="dark"] {
  --bg: #111613; --panel: #19201c; --line: #2c362f; --line2: #222a25;
  --text: #e7ece7; --muted: #94a199; --accent: #62cfa2; --accent-text: #0b1e15;
  --task: #29251a; --task-line: #5c5131; --now: #f0705c; --danger: #f07068; --ok: #62cfa2;
  --shade: rgba(220, 255, 235, .04); --lift: 0 1px 2px rgba(0, 0, 0, .45);
  --h-cal: #7d9cf5; --h-notes: #62cfa2; --h-rec: #f0705c; --h-people: #a58cf5; --h-task: #e6b84a; --h-home: #e7ece7;
}
body { font: 14px/1.45 var(--ui); font-feature-settings: 'ss01', 'cv11'; }
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, textarea, [contenteditable] { caret-color: var(--accent); }
a { text-underline-offset: 2px; }

/* ---- the box and the card in it */
#app { background: var(--bg); }
#side { border-right: 0; }
main { margin: 8px 8px 0 0; border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 30px rgba(23, 40, 30, .05); }
main::before { display: none; }
#bar { border-radius: 18px 18px 0 0; }
#home, #notes, #grid, #month, #list { background: var(--panel); }
@media (max-width: 760px) { main { margin: 0; border: 0; border-radius: 0; box-shadow: none; } #bar { border-radius: 0; } }

/* ---- the name, the Record button, the places */
.brand { padding: 16px 16px 12px; }
#brandHome { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
#demoTag { background: color-mix(in srgb, var(--h-task) 16%, var(--panel)); border: 0; color: color-mix(in srgb, var(--h-task) 60%, var(--text)); padding: 2px 9px; }
#recBtn { display: flex; align-items: center; gap: 10px; margin: 0 12px 10px; padding: 0 12px 0 14px; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--lift); font-weight: 650; font-size: 14.5px; color: var(--text); transition: border-color .16s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease); }
#recBtn i { width: 14px; height: 14px; border-radius: 50%; background: var(--h-rec); box-shadow: 0 0 0 4px color-mix(in srgb, var(--h-rec) 20%, transparent); flex: none; transition: box-shadow .2s var(--ease); }
#recBtn span { flex: 1; text-align: left; }
#recBtn kbd { font: 600 11px/1 var(--ui); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--bg); }
#recBtn:hover { border-color: color-mix(in srgb, var(--h-rec) 45%, var(--line)); background: color-mix(in srgb, var(--h-rec) 5%, var(--panel)); box-shadow: 0 4px 14px color-mix(in srgb, var(--h-rec) 16%, transparent); }
#recBtn:hover i { box-shadow: 0 0 0 6px color-mix(in srgb, var(--h-rec) 22%, transparent); }
#recBtn:active { transform: scale(.98); }
body.recording #recBtn i { animation: recpulse 1.4s ease-in-out infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--h-rec) 8%, transparent); } }
@media (pointer: coarse) { #recBtn kbd { display: none; } }

#mainNav { display: grid; grid-template-columns: 1fr; gap: 1px; padding: 0 10px 12px; }
#mainNav button { justify-content: flex-start; gap: 10px; padding: 6px 8px; height: 36px; border-radius: 10px; font-weight: 600; font-size: 14px; color: color-mix(in srgb, var(--text) 78%, var(--muted)); }
#mainNav button svg { width: 26px; height: 26px; padding: 5px; border-radius: 8px; color: var(--h); background: color-mix(in srgb, var(--h) 13%, transparent); transition: background-color .16s var(--ease), color .16s var(--ease); }
#mainNav button:hover { background: var(--shade); }
#mainNav button.on { background: var(--panel); color: var(--text); box-shadow: var(--lift), 0 0 0 1px var(--line); }
#mainNav button.on svg { background: var(--h); color: var(--panel); }
#mainNav [data-nav=home] { --h: var(--h-home); }
#mainNav [data-nav=calendar] { --h: var(--h-cal); }
#mainNav [data-nav=notes] { --h: var(--h-notes); }
#mainNav [data-nav=recordings] { --h: var(--h-rec); }
#mainNav [data-nav=people] { --h: var(--h-people); }

/* ---- the rest of the side: only what the place you are in needs */
#quick { padding: 0 12px 10px; }
.qbox { border-radius: 13px; height: 44px; }
.card .ch b { font-size: 14px; }
.prog i { background: var(--accent); }
.cardlinks { display: flex; gap: 14px; margin-top: 9px; }
.cardlinks button { border: 0; background: transparent; padding: 2px 0; font-size: 12.5px; font-weight: 550; color: var(--muted); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 40%, transparent); text-underline-offset: 3px; }
.cardlinks button:hover { color: var(--accent); text-decoration-color: currentColor; }
body.inhome #sideBody > .card, body.inhome #upnext, body.inhome #sideBody .minibox, body.innotes #sideBody .minibox { display: none; }
.sec > h4 { letter-spacing: .04em; font-size: 11px; }
.acctbox { border-radius: 10px; }
.acctbox + .acctbox { margin-top: 1px; }
.acctbox > summary { list-style: none; cursor: pointer; padding: 6px 6px; border-radius: 9px; }
.acctbox > summary::-webkit-details-marker { display: none; }
.acctbox > summary::after { content: ""; width: 7px; height: 7px; flex: none; margin: 0 4px 2px 2px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .16s var(--ease); opacity: .7; }
.acctbox[open] > summary::after { transform: rotate(225deg); margin-bottom: -3px; }
.acctbox > summary:hover { background: var(--shade); }
.acct .dot { width: 10px; height: 10px; border-radius: 50%; }
.acct .em { font-weight: 550; font-size: 13px; }
.acct .acount { font-size: 11.5px; color: var(--muted); flex: none; }
.acctbox .cal { padding: 3px 6px 3px 26px; }
.acctbox .acctrm { margin: 6px 0 8px 26px; visibility: visible; font-size: 12px; }
.sideFoot { border-top: 0; padding-top: 4px; }
.sideFoot #connect { border-radius: 11px; height: 38px; font-weight: 600; }
body.has-accts .sideFoot #connect, body.has-accts .sideFoot #teamsBtn { height: 30px; background: transparent; border-color: transparent; color: var(--muted); font-weight: 550; font-size: 13px; justify-content: flex-start; padding: 0 8px; }
body.has-accts .sideFoot #connect:hover, body.has-accts .sideFoot #teamsBtn:hover { color: var(--accent); }
.footrow { gap: 2px; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.footrow .btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 6px; font-size: 12.5px; font-weight: 550; border-radius: 9px; text-decoration: none; }
.footrow .btn svg { width: 15px; height: 15px; flex: none; }
.footrow .btn:hover { background: var(--shade); color: var(--text); }

/* ---- buttons and boxes, a little rounder and kinder */
.btn { border-radius: 10px; font-weight: 600; }
.btn.primary { box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent) 80%, #000) inset; }
.seg, .segr { border-radius: 11px; }
.seg button, .segr span { border-radius: 8px; }
dialog { border-radius: 18px; }
.dbody h3 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
#toast { border-radius: 13px; font-weight: 550; }
#title { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.dh.today .dn b { background: var(--h-cal); }
.dh.today .dn { color: var(--h-cal); }
.col.today { background-color: color-mix(in srgb, var(--h-cal) 4%, transparent); }

/* ---- small fixes to the side */
#recBtn kbd { flex: none; }
.acctbox > summary { color: var(--text); }
.sideFoot #connect, .sideFoot #teamsBtn { display: flex; align-items: center; }
.qph { color: var(--muted); }

/* ---- Record: plain choices, quiet options, one clear button */
.rpick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rpick.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rpick label { position: relative; display: block; }
.rpick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rpick span { display: grid; justify-items: start; gap: 2px; height: 100%; padding: 12px 12px 11px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); transition: border-color .16s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease); }
.rpick svg { color: var(--muted); margin-bottom: 6px; transition: color .16s var(--ease); }
.rpick b { font-weight: 650; font-size: 14px; color: var(--text); }
.rpick i { font-style: normal; font-size: 12px; line-height: 1.3; color: var(--muted); }
.rpick label:hover span { border-color: color-mix(in srgb, var(--h-rec) 40%, var(--line)); }
.rpick input:checked + span { border-color: var(--h-rec); background: color-mix(in srgb, var(--h-rec) 6%, var(--panel)); box-shadow: 0 0 0 1px var(--h-rec); }
.rpick input:checked + span svg { color: var(--h-rec); }
.rpick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) { .rpick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ropt { display: flex !important; align-items: center; gap: 12px; padding: 9px 2px; font-size: 14px !important; color: var(--text) !important; cursor: pointer; border-top: 1px solid var(--line2); }
.rpick + .note + .ropt, .rpick + .ropt { border-top: 0; }
.ropt > span { flex: 1; min-width: 0; font-weight: 550; }
.ropt > span i { display: block; font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 1px; }
.rsetup { gap: 8px; }
.rsetup h3 { margin-bottom: 4px; }
.rsetup .rnext { font-size: 12.5px; padding: 9px 11px; border-radius: 10px; background: var(--bg); }
.rsetup .actions { margin-top: 6px; }
.btn.recgo { background: var(--h-rec); border-color: var(--h-rec); color: #fff; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 1px 2px color-mix(in srgb, var(--h-rec) 40%, transparent); }
.btn.recgo i { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.rtell { text-align: right; font-size: 12px; color: var(--muted); margin-top: -4px; }
.rsetup .rmore > summary { font-size: 12.5px; color: var(--muted); }

/* ---- Shortcuts */
.keysbox .kgroups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 22px; }
.keysbox h4 { margin: 4px 0 6px; }
.krow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13.5px; border-top: 1px solid var(--line2); }
.krow:first-of-type { border-top: 0; }
.kcaps { display: flex; gap: 4px; }
.keysbox kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; font: 600 12px/1 var(--ui); color: var(--text); background: var(--bg); border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); }
.keysbox kbd.kin { display: inline-grid; height: 20px; min-width: 20px; vertical-align: -4px; }
.kex { display: grid; gap: 6px; }
.kex div { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.kex code { font: 550 13px/1.4 var(--ui); padding: 4px 9px; border-radius: 8px; background: color-mix(in srgb, var(--h-task) 12%, var(--panel)); color: var(--text); }
.kex span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 620px) { .keysbox .kgroups { grid-template-columns: 1fr; } }

/* ---- Settings */
dialog.settings { width: min(860px, calc(100vw - 24px)); }
.sets { grid-template-columns: 208px minmax(0, 1fr); height: min(680px, calc(100dvh - 42px)); }
.snav { padding: 18px 10px 12px; border-right: 0; }
.snav h3 { font-family: var(--display); font-size: 20px; letter-spacing: -.02em; padding: 0 10px 14px; }
.snav button { height: 36px; padding: 0 10px; border-radius: 10px; font-weight: 600; }
.snav button svg { color: var(--muted); }
.snav button.on { box-shadow: var(--lift), 0 0 0 1px var(--line); }
.smain { background: var(--panel); border-left: 1px solid var(--line); }
.spanes { padding: 24px 28px 26px; gap: 16px; }
.spane { gap: 16px; }
.spane > h3 { font-family: var(--display); font-size: 24px; letter-spacing: -.025em; }
.spane > .lead { font-size: 14px; margin-top: -10px; max-width: 56ch; }
.spane h4 { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 650; color: var(--text); margin: 8px 2px -8px; }
.sgroup { border-radius: 14px; background: var(--panel); border-color: var(--line); }
.srow { padding: 12px 14px; min-height: 54px; }
.st b { font-weight: 600; }
.sfoot { padding: 12px 28px; }
.aihero { border-radius: 16px; border: 1px solid color-mix(in srgb, var(--h-task) 45%, var(--line)); background: color-mix(in srgb, var(--h-task) 7%, var(--panel)); overflow: hidden; }
.aihero.ready { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.aihero > * + * { border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.aihead { display: flex; align-items: center; gap: 12px; padding: 14px; }
.aihead div { display: grid; gap: 2px; min-width: 0; }
.aihead b { font-size: 15px; font-weight: 650; }
.aihead div span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.aimark { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--h-task) 22%, var(--panel)); color: color-mix(in srgb, var(--h-task) 70%, var(--text)); }
.aihero.ready .aimark { background: var(--accent); color: var(--accent-text); }
.aimore > summary { font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; padding: 4px 2px; }
.aimore[open] > summary { margin-bottom: 10px; }
.aimore .sgroup > #searchPart > * + * { border-top: 1px solid var(--line2); }

#recBtn kbd { min-width: 0; width: auto; text-align: center; }
.rpick input:focus-visible + span { outline: 0; box-shadow: 0 0 0 1px var(--h-rec), 0 0 0 4px color-mix(in srgb, var(--h-rec) 22%, transparent); }
.snav button:focus-visible { outline: 0; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }

.keyrow { display: flex; gap: 8px; }
.keyrow input { flex: 1; }
.keyrow .btn { flex: none; }
.keymsg { margin-top: 0 !important; font-weight: 550; }
.keymsg.good { color: var(--ok); }
.keymsg.bad { color: var(--danger); }
.keyhelp > summary { font-weight: 600; font-size: 13px; cursor: pointer; color: var(--text); }
.keyhelp ol { margin: 10px 0 12px; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 9px; font-size: 13.5px; line-height: 1.45; }
.keyhelp ol li { counter-increment: step; display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.keyhelp ol li::before { content: counter(step); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); margin-top: -1px; }
.keyhelp .btn { display: inline-block; text-decoration: none; }
.keyhelp .btn[hidden] { display: none; }

.keyhelp ol li { display: block; position: relative; padding-left: 34px; }
.keyhelp ol li::before { position: absolute; left: 0; top: -1px; margin: 0; }
body.innotes #sideBody > .card, body.innotes #upnext { display: none; }

/* ---- Notes: a quiet list, a page to read and write on */
#notes .ntitle { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; }
#notes .nrow.on { box-shadow: var(--lift), 0 0 0 1px var(--line); }
/* ---- Home */
#home .hgreet h2, #home h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; }
.hnext { border-radius: 20px; }
