:root {
  --bg: #111115;
  --panel: #18181d;
  --card: #1f1f25;
  --card-hover: #26262d;
  --line: #2a2a32;
  --text: #ececf1;
  --muted: #8b8b98;
  --faint: #55555f;
  --accent: #8b7cff;
  --accent-soft: rgba(139, 124, 255, 0.14);
  --danger: #ff6b6b;
  --ok: #3ddc97;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f8;
    --panel: #ffffff;
    --card: #ffffff;
    --card-hover: #f1f1f5;
    --line: #e4e4ea;
    --text: #17171c;
    --muted: #6b6b78;
    --faint: #a5a5b0;
    --accent: #6b5cf0;
    --accent-soft: rgba(107, 92, 240, 0.1);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.hidden { display: none !important; }

/* ---------- login ---------- */
.login { height: 100%; display: grid; place-items: center; overflow: auto; padding: 24px 16px; }
.login form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
.login .logo { width: 56px; height: 56px; margin: 0 auto 4px; }
.login h1 { margin: 0; text-align: center; font-size: 20px; font-weight: 650; }
.login .sub { margin: 0 0 6px; text-align: center; color: var(--muted); }
.login label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input, textarea, select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
  min-width: 0;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.primary {
  background: var(--accent); color: #fff; border: 0; border-radius: 9px; padding: 10px; font-weight: 600; margin-top: 4px;
}
.primary:disabled { opacity: 0.6; }
.err { color: var(--danger); margin: 0; min-height: 1em; text-align: center; font-size: 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { background: none; border: 0; border-radius: 6px; padding: 6px; color: var(--muted); }
.seg button.on { background: var(--card-hover); color: var(--text); }

/* ---------- column ---------- */
.app { height: 100%; display: flex; flex-direction: column; position: relative; }
.bar {
  display: flex; align-items: center; gap: 8px;
  height: 44px; flex: none;
  padding: 0 8px 0 14px;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.ws { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; min-width: 0; flex: 1; }
#wsName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; transition: background 0.3s; }
.live.on { background: var(--ok); }
.devices { display: flex; gap: 3px; }
.devices span {
  font-size: 10px; color: var(--muted); background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 1px 7px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: none; border: 0; color: var(--muted); flex: none;
}
.icon-btn:hover { background: var(--card-hover); color: var(--text); }

/* desktop window chrome */
body.desktop .bar { -webkit-app-region: drag; }
body.desktop .bar button, body.desktop .bar .devices { -webkit-app-region: no-drag; }
body.platform-darwin .bar { padding-left: 76px; }

.panes { flex: 1; display: flex; min-height: 0; }
.pane { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.pane + .pane { border-left: 1px solid var(--line); }

.chips { display: flex; gap: 4px; padding: 7px 8px; overflow-x: auto; scrollbar-width: none; flex: none; border-bottom: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid transparent; background: none; color: var(--muted);
  border-radius: 20px; padding: 3px 10px; white-space: nowrap; font-size: 12px;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.list.bottom > :first-child { margin-top: auto; }
.empty {
  margin: auto; text-align: center; color: var(--faint); pointer-events: none; padding: 20px;
}
.empty b { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-bottom: 4px; opacity: 0.7; }
.empty small { font-size: 11px; }

.pane.dropping::after {
  content: "Drop to add"; position: absolute; inset: 6px; border: 2px dashed var(--accent); border-radius: var(--radius);
  background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); font-weight: 600; pointer-events: none;
}

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; align-items: center; gap: 10px; padding: 8px; position: relative; flex: none;
  animation: pop 0.22s ease-out;
}
.card:hover { background: var(--card-hover); }
.card.pinned { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
@keyframes pop { from { transform: translateY(4px) scale(0.98); opacity: 0; } }
.thumb {
  width: 44px; height: 44px; border-radius: 8px; flex: none; overflow: hidden;
  display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); cursor: pointer;
  font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; position: relative;
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-shadow: 0 1px 4px #000; font-size: 14px; }
.card.big { flex-direction: column; align-items: stretch; padding: 6px; gap: 6px; }
.card.big .thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; max-height: 220px; }
.card.big .meta { padding: 0 4px 2px; }
.meta { flex: 1; min-width: 0; }
.name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rename {
  display: block; width: 100%; font: inherit; font-weight: 550; color: var(--text);
  background: var(--bg); border: 1px solid var(--accent); border-radius: 5px; padding: 1px 5px; margin: -2px 0 1px; outline: none;
  user-select: text; -webkit-user-select: text;
}
.sub { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snippet {
  font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-word; max-height: 120px; overflow: hidden;
  user-select: text; -webkit-user-select: text; margin-bottom: 3px;
}
.card.text { align-items: flex-start; }

.actions {
  position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; padding: 2px;
  background: var(--card-hover); border: 1px solid var(--line); border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity 0.12s;
}
.card:hover .actions, .card:focus-within .actions, .msg:hover .actions { opacity: 1; pointer-events: auto; }
@media (hover: none) { .actions { opacity: 1; pointer-events: auto; position: static; background: none; border: 0; } }
.actions button {
  width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted); display: grid; place-items: center; padding: 0;
}
.actions button:hover { background: var(--card); color: var(--text); }
.actions button.on { color: var(--accent); }
.actions button.confirm { color: var(--danger); background: rgba(255, 107, 107, 0.12); }
.actions svg { width: 14px; height: 14px; }

.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.2s; }
.card.uploading { opacity: 0.85; }

/* chat */
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 88%; position: relative; flex: none; animation: pop 0.2s ease-out; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .who { font-size: 10.5px; color: var(--muted); margin: 0 6px 2px; }
.bubble {
  background: var(--card); border: 1px solid var(--line); padding: 7px 10px; border-radius: 14px;
  white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text;
}
.msg.mine .bubble { background: var(--accent); border-color: transparent; color: #fff; }
.msg.mine .bubble a { color: #fff; }
.msg .actions { top: -10px; right: auto; left: 0; }
.msg.mine .actions { left: auto; right: 0; }

.composer { display: flex; gap: 6px; align-items: flex-end; padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.composer textarea { flex: 1; resize: none; max-height: 120px; min-height: 34px; line-height: 1.35; padding: 7px 10px; border-radius: 17px; }
.composer .add {
  width: 34px; height: 34px; border-radius: 50%; flex: none; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  font-size: 19px; line-height: 1; display: grid; place-items: center;
}
.composer .add:hover { color: var(--text); }

/* settings */
.settings {
  position: absolute; inset: 44px 0 0 0; background: var(--bg); overflow-y: auto; z-index: 10;
  padding: 14px 14px 30px; animation: slide 0.18s ease-out;
}
@keyframes slide { from { transform: translateY(-6px); opacity: 0; } }
.settings h2 { font-size: 15px; margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; }
.settings section { margin-bottom: 20px; }
.settings h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.settings p { margin: 0 0 8px; color: var(--muted); line-height: 1.5; }
.settings code { font-family: var(--mono); font-size: 11.5px; color: var(--text); background: var(--panel); padding: 1px 5px; border-radius: 4px; user-select: all; -webkit-user-select: all; word-break: break-all; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.srow:last-child { border-bottom: 0; }
.srow span { min-width: 0; }
.srow small { display: block; color: var(--muted); font-size: 11px; }
.toggle { position: relative; width: 34px; height: 20px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle i { position: absolute; inset: 0; background: var(--line); border-radius: 20px; transition: background 0.15s; cursor: pointer; }
.toggle i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform 0.15s; }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(14px); }
.stack-row { display: flex; gap: 6px; margin-bottom: 6px; }
.stack-row input { flex: 1; padding: 6px 9px; }
.btn { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; white-space: nowrap; }
.btn:hover { background: var(--card-hover); }
.btn.danger { color: var(--danger); }
.btn.confirm { background: var(--danger); color: #fff; border-color: transparent; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* preview */
.preview {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.82); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 44px 12px 12px; gap: 10px; animation: fade 0.15s;
}
@keyframes fade { from { opacity: 0; } }
.preview img, .preview video { max-width: 100%; max-height: calc(100% - 50px); border-radius: 8px; }
.preview iframe { width: 100%; height: calc(100% - 50px); border: 0; border-radius: 8px; background: #fff; }
.preview audio { width: 100%; max-width: 420px; }
.preview .pv-bar { color: #fff; display: flex; gap: 8px; align-items: center; max-width: 100%; }
.preview .pv-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview .docx { background: var(--panel); color: var(--text); padding: 18px 22px; border-radius: 10px; width: 100%; max-width: 820px; max-height: calc(100% - 60px); box-sizing: border-box; overflow: auto; font-size: 14px; line-height: 1.55; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
.preview .docx > :first-child { margin-top: 0; }
.preview .docx p { margin: 0 0 0.5em; }
.preview .docx h1, .preview .docx h2 { font-size: 1.35em; margin: 0.8em 0 0.4em; }
.preview .docx h3, .preview .docx h4, .preview .docx h5, .preview .docx h6 { font-size: 1.1em; margin: 0.7em 0 0.3em; }
.preview .docx ul, .preview .docx ol { margin: 0 0 0.6em; padding-left: 1.6em; white-space: normal; }
.preview .docx table { border-collapse: collapse; margin: 0 0 0.8em; white-space: normal; }
.preview .docx td { border: 1px solid var(--line); padding: 5px 8px; vertical-align: top; }
.preview .docx td p { margin: 0; }
.preview .docx a { color: var(--accent); }
.preview .close { position: absolute; top: 10px; right: 10px; color: #fff; }
.preview .flist { background: var(--panel); border-radius: 10px; width: 100%; max-width: 480px; max-height: calc(100% - 60px); overflow: auto; padding: 6px; }
.preview .flist a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 6px; color: var(--text); text-decoration: none; }
.preview .flist a:hover { background: var(--card-hover); }
.preview .flist small { color: var(--muted); flex: none; }
.preview pre { background: var(--panel); color: var(--text); padding: 14px; border-radius: 10px; max-width: 100%; max-height: calc(100% - 60px); overflow: auto; white-space: pre-wrap; user-select: text; -webkit-user-select: text; font-family: var(--mono); font-size: 12px; }

/* menu + toasts */
.menu {
  position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px;
  min-width: 150px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 10px; border-radius: 6px; }
.menu button:hover { background: var(--card-hover); }
.menu button.on { color: var(--accent); }
.menu .mh { font-size: 10.5px; color: var(--muted); padding: 4px 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.toasts { position: fixed; bottom: 70px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 70; pointer-events: none; padding: 0 12px; }
.toast { background: var(--text); color: var(--bg); padding: 7px 12px; border-radius: 9px; font-size: 12px; animation: pop 0.2s; max-width: 100%; pointer-events: auto; }
.toast button { background: none; border: 0; color: var(--accent); font-weight: 600; margin-left: 8px; padding: 0; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- tabs ---------- */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; margin: 8px 8px 0; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; flex: none; }
.tabs button { background: none; border: 0; border-radius: 6px; padding: 5px; color: var(--muted); font-weight: 550; }
.tabs button.on { background: var(--card-hover); color: var(--text); }

/* ---------- day planner ---------- */
.day { flex: 1; min-height: 0; display: flex; flex-direction: column; --gut: 52px; }
.day-head { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 4px; flex: none; }
.day-head .icon-btn svg { width: 18px; height: 18px; }
.day-title-wrap { flex: 1; min-width: 0; position: relative; }
.day-title { text-align: center; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 5px 0; border-radius: 8px; }
.day-title b { font-weight: 650; }
.day-title span { color: var(--muted); }
.day-title-wrap:hover .day-title { background: var(--card-hover); }
.date-pick { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; padding: 0; border: 0; }
.date-pick::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.btn.small { padding: 3px 9px; font-size: 12px; }
.day-scroll { flex: 1; overflow-y: auto; padding: 0 0 12px; position: relative; }

.anytime { margin: 2px 8px 10px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.any-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; margin: 0 2px 4px; }
.any-row { display: flex; align-items: flex-start; gap: 8px; padding: 5px 2px; border-radius: 7px; cursor: pointer; }
.any-row:hover { background: var(--card-hover); }
.day-hint { margin: 2px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.timeline { position: relative; margin: 0 6px 0 0; cursor: copy; }
.hour { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.hour span { position: absolute; left: 0; width: calc(var(--gut) - 8px); text-align: right; top: -7px; font-size: 10.5px; color: var(--faint); background: var(--bg); padding-right: 2px; font-variant-numeric: tabular-nums; }
.hour::after { content: ""; position: absolute; left: var(--gut); right: 0; top: calc(var(--hour, 56px) / 2); border-top: 1px dashed color-mix(in srgb, var(--line) 55%, transparent); }

.block {
  position: absolute; border-radius: 8px; padding: 4px 8px; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--c) 17%, var(--bg)); border-left: 3px solid var(--c);
  animation: pop 0.2s ease-out;
}
.block:hover { background: color-mix(in srgb, var(--c) 25%, var(--bg)); }
.b-title { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.block.short { display: flex; align-items: center; gap: 6px; padding-top: 1px; padding-bottom: 1px; }
.block.short .b-title { flex: 1; min-width: 0; }
.block.done { opacity: 0.5; }
.block.done .b-title { text-decoration: line-through; }

.pin {
  position: absolute; left: calc(var(--gut) + 10px); right: 8px; height: 24px; z-index: 2;
  display: flex; align-items: center; gap: 6px; padding: 0 8px 0 3px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); animation: pop 0.2s ease-out;
}
.pin:hover { background: var(--card-hover); }
.pin::before { content: ""; position: absolute; left: -10px; top: 50%; width: 8px; border-top: 1.5px solid var(--accent); }
.p-time { font-size: 11px; color: var(--accent); font-weight: 600; flex: none; font-variant-numeric: tabular-nums; }
.p-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.any-row .p-text { white-space: normal; word-break: break-word; padding-top: 1px; }
.pin.done, .any-row.done { opacity: 0.55; }
.pin.done .p-text, .any-row.done .p-text { text-decoration: line-through; }

.check {
  width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--faint); background: none;
  display: grid; place-items: center; padding: 0; color: transparent;
}
.check svg { width: 11px; height: 11px; stroke-width: 3; }
.check:hover { border-color: var(--accent); color: var(--accent); }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.now { position: absolute; left: calc(var(--gut) - 4px); right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
.now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.day-composer { flex: none; border-top: 1px solid var(--line); }
.day-composer .composer { border-top: 0; }
.qp { padding: 7px 12px 0; font-size: 11.5px; color: var(--muted); }
.qp b { color: var(--accent); font-weight: 600; }
.qp span { color: var(--faint); }

.c-violet { --c: #8b7cff; } .c-blue { --c: #4ea1ff; } .c-green { --c: #3ddc97; } .c-amber { --c: #ffb547; } .c-rose { --c: #ff6b8b; }

/* add / edit sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.45); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.15s; }
.sheet {
  width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0;
  padding: 14px 14px max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; animation: rise 0.18s ease-out;
  max-height: 92%; overflow-y: auto;
}
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
.sheet h2 { margin: 0; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
.sheet label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; min-width: 0; }
.sheet textarea { resize: vertical; min-height: 64px; }
.sheet-tip { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); margin-top: -4px; }
.link { background: none; border: 0; color: var(--accent); padding: 0; font-size: 11.5px; flex: none; }
.swatches { display: flex; gap: 8px; }
.sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; background: var(--c); padding: 0; box-shadow: inset 0 0 0 2px var(--bg); }
.sw.on { border-color: var(--c); }
.primary-btn { background: var(--accent); color: #fff; border-color: transparent; font-weight: 600; padding: 6px 16px; }
.primary-btn:hover { background: var(--accent); filter: brightness(1.1); }
.sheet .err { text-align: left; min-height: 0; }

/* day sub-tabs + tasks */
.day-sub { margin: 6px 8px 0; flex: none; }
.day-sub button { padding: 4px; font-size: 12.5px; }
.tasks .any-h { display: flex; justify-content: space-between; align-items: center; }
.tasks .any-h .link { font-size: 10.5px; text-transform: none; letter-spacing: 0; }
.task-row { align-items: center; cursor: default; }
.task-row .p-text { cursor: text; padding-top: 0; }
.task-row .rename { flex: 1; margin: 0; }
.t-btn { flex: none; background: none; border: 0; padding: 4px; border-radius: 6px; color: var(--muted); display: grid; place-items: center; opacity: 0; }
.t-btn svg { width: 14px; height: 14px; }
.t-btn:hover { color: var(--text); background: var(--card); }
.t-btn.confirm { color: var(--danger); opacity: 1; }
.task-row:hover .t-btn, .task-row:focus-within .t-btn { opacity: 1; }
@media (hover: none) { .t-btn { opacity: 1; } }
.slot { flex: none; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); border: 0; border-radius: 999px; padding: 2px 8px; font-size: 11px; white-space: nowrap; }
.is-task { display: inline-grid; vertical-align: -2px; margin-right: 4px; opacity: 0.75; }
.is-task svg { width: 12px; height: 12px; }

/* chat: feeds sidebar */
.chat { flex: 1; min-height: 0; display: flex; position: relative; }
.ch-side { width: 210px; flex: none; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 6px 6px 16px; }
.ch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-head { display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 8px; border-bottom: 1px solid var(--line); flex: none; }
.ch-title { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.ch-title .hash { color: var(--muted); font-weight: 500; margin-right: 2px; }
.ch-menu { display: none; }
.ch-menu svg { width: 18px; height: 18px; }
.chat-pane { flex: 1; min-height: 0; }
.ch-scrim { display: none; }

.ch-side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 6px 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.ch-row, .ch-folder { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 8px; border-radius: 7px; cursor: pointer; color: var(--muted); min-height: 28px; }
.ch-row:hover, .ch-folder:hover { background: var(--card-hover); color: var(--text); }
.ch-row.on { background: var(--accent-soft); color: var(--accent); }
.ch-row.unread { color: var(--text); font-weight: 650; }
.ch-row.in, .ch-empty.in { margin-left: 14px; }
.ch-row .hash { opacity: 0.7; width: 10px; text-align: center; flex: none; }
.ch-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row .rename, .ch-folder .rename { flex: 1; min-width: 0; margin: 0; font-weight: 500; }
.ch-folder { margin-top: 8px; font-size: 12px; font-weight: 600; }
.caret { display: grid; place-items: center; width: 12px; flex: none; transition: transform 0.15s; }
.caret svg { width: 12px; height: 12px; }
.ch-folder.shut .caret { transform: rotate(-90deg); }
.ch-empty { font-size: 11.5px; color: var(--faint); padding: 3px 8px; }
.badge { background: var(--accent); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; padding: 1px 6px; flex: none; }
.ch-more { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 5px; padding: 0; opacity: 0; }
.ch-more svg { width: 14px; height: 14px; }
.ch-more:hover { background: var(--card); color: var(--text); }
.ch-row:hover .ch-more, .ch-folder:hover .ch-more, .ch-side-head .ch-more { opacity: 1; }
@media (hover: none) { .ch-more { opacity: 1; } }
.menu button.danger { color: var(--danger); }
.menu button.confirm { background: rgba(255, 107, 107, 0.12); }

/* narrow window (the docked column): sidebar slides over */
@media (max-width: 559px) {
  .ch-menu { display: grid; }
  .ch-side { position: absolute; inset: 0 auto 0 0; z-index: 20; width: min(250px, 82%); transform: translateX(-100%); transition: transform 0.18s ease-out; box-shadow: 0 0 30px rgba(0, 0, 0, 0.35); }
  .chat.side-open .ch-side { transform: none; }
  .chat.side-open .ch-scrim { display: block; position: absolute; inset: 0; z-index: 19; background: rgba(0, 0, 0, 0.35); }
}
.tabs button.dot::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 5px; vertical-align: 2px; }
.chat { margin-top: 8px; border-top: 1px solid var(--line); }

/* chat links */
.links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 3px; max-width: 100%; }
.msg.mine .links { align-items: flex-end; }
.ln { max-width: 100%; }
.ln-img { display: block; max-width: min(260px, 100%); max-height: 220px; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; object-fit: cover; background: var(--panel); }
.ln-file { display: flex; align-items: center; gap: 8px; width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; cursor: grab; }
.ln-file:hover { background: var(--card-hover); }
.ln-file .thumb { width: 36px; height: 36px; }
.ln-file .meta { cursor: pointer; }
.ln-file .icon-btn svg { width: 15px; height: 15px; }
.ln-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 9px; color: var(--text); text-align: left; font: inherit; }
button.ln-chip:hover, .ln-task:hover { background: var(--card-hover); }
.ln-ic { display: grid; place-items: center; color: var(--accent); flex: none; }
.ln-ic svg { width: 14px; height: 14px; }
.ln-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.ln-task .ln-text { cursor: pointer; white-space: normal; word-break: break-word; }
.ln-task.done .ln-text { text-decoration: line-through; color: var(--muted); }
.ln-task .check { flex: none; }
.ln-sub { color: var(--muted); font-size: 11px; white-space: nowrap; flex: none; }
.ln-gone { font-size: 11.5px; color: var(--faint); border: 1px dashed var(--line); border-radius: 10px; padding: 5px 9px; }

.composer-wrap { position: relative; flex: none; border-top: 1px solid var(--line); }
.composer-wrap .composer { border-top: 0; }
.link-btn svg { width: 16px; height: 16px; }
.tray { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 8px 0; }
.tray-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; background: var(--accent-soft); border-radius: 8px; padding: 3px 4px 3px 8px; font-size: 12px; }
.tray-chip button { border: 0; background: none; color: var(--muted); width: 18px; height: 18px; padding: 0; display: grid; place-items: center; border-radius: 4px; }
.tray-chip button:hover { color: var(--text); background: var(--card-hover); }
.tray-chip button svg { width: 12px; height: 12px; }

.picker { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 4px); z-index: 30; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; max-height: min(360px, 60vh); animation: pop 0.15s ease-out; }
.pk-q { margin: 6px; border-radius: 8px; padding: 7px 10px; }
.pk-list { overflow-y: auto; padding: 0 4px 4px; }
.pk-list .mh { font-size: 10.5px; color: var(--muted); padding: 6px 8px 3px; text-transform: uppercase; letter-spacing: 0.05em; }
.pk-row { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; border-radius: 7px; padding: 5px 8px; text-align: left; color: var(--text); }
.pk-row:hover, .pk-row.on { background: var(--card-hover); }
.pk-ic { width: 24px; height: 24px; border-radius: 5px; flex: none; display: grid; place-items: center; color: var(--accent); object-fit: cover; }
.pk-ic svg { width: 15px; height: 15px; }
.pk-ext { background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 8.5px; font-weight: 700; text-transform: uppercase; }
.pk-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-sub { color: var(--muted); font-size: 11px; flex: none; }
.pk-none { color: var(--muted); font-size: 12px; padding: 10px; text-align: center; }

/* people */
.login .hint { margin: -2px 0 0; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.45; }
.person .live { display: inline-block; vertical-align: 1px; margin-right: 7px; }
.person .icon-btn svg { width: 16px; height: 16px; }
.settings .warn { color: var(--text); background: var(--accent-soft); border-radius: 8px; padding: 7px 10px; }

/* reactions + message editing */
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 2px 0; }
.msg.mine .reacts { justify-content: flex-end; }
.react { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; font-size: 12px; line-height: 18px; color: var(--text); }
.react span { font-size: 11px; color: var(--muted); }
.react:hover { background: var(--card-hover); }
.react.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
.react.on span { color: var(--accent); }
.menu .emoji-row { display: flex; gap: 2px; }
.menu .emoji-row button { width: 32px; height: 32px; padding: 0; text-align: center; font-size: 18px; }
.msg .edited { opacity: 0.8; }
.msg.editing { max-width: 100%; width: 100%; }
.msg.editing .actions { display: none; }
.edit-box { width: 100%; }
.msg-edit { width: 100%; resize: none; min-height: 34px; max-height: 240px; line-height: 1.35; padding: 7px 10px; border-radius: 12px; border: 1px solid var(--accent); }
.edit-hint { font-size: 10.5px; color: var(--muted); margin: 2px 6px 0; }
.msg.mine .edit-hint { text-align: right; }

/* threads */
.thread-link { background: none; border: 0; padding: 2px 6px; margin-top: 2px; font-size: 11.5px; color: var(--muted); border-radius: 6px; text-align: left; }
.thread-link b { color: var(--accent); font-weight: 600; }
.thread-link:hover { background: var(--card-hover); }
.ch-thread { width: 340px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg); min-width: 0; }
.ch-thread .ch-head { justify-content: space-between; }
.th-in { color: var(--muted); font-weight: 500; }
.th-close svg { width: 16px; height: 16px; }
.ch-thread .list > .msg:first-child { padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); max-width: 100%; align-self: stretch; }
@media (max-width: 899px) {
  .ch-thread { position: absolute; inset: 0; z-index: 25; width: auto; border-left: 0; }
}

/* mentions */
.mention { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 4px; padding: 0 2px; font-weight: 600; }
.mention.me { color: #f5b942; background: rgba(245, 185, 66, 0.16); }
.msg.mine .mention { color: #fff; background: rgba(255, 255, 255, 0.2); }
.msg.at-me .bubble { box-shadow: inset 3px 0 0 #f5b942; }
.badge.at { background: #f5b942; color: #1a1a1a; }
.mention-pop { max-height: min(280px, 50vh); overflow-y: auto; padding: 4px; }
.mention-pop .mh { font-size: 10.5px; color: var(--muted); padding: 4px 8px 3px; text-transform: uppercase; letter-spacing: 0.05em; }
.at-ic { background: var(--accent-soft); font-size: 11px; font-weight: 700; border-radius: 50%; }

/* ⌘K palette */
.palette { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 12px 12px; }
.pal-box { width: min(560px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); animation: pop 0.15s ease-out; overflow: hidden; }
.pal-box .pk-q { font-size: 14px; padding: 9px 12px; }
.pal-box .pk-list { flex: 1; min-height: 0; }
.pal-foot { font-size: 10.5px; color: var(--muted); padding: 6px 12px; border-top: 1px solid var(--line); }
.pk-row.two { align-items: flex-start; }
.pk-two { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pk-two .pk-label { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pk-label mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 2px; }
.pk-hash { color: var(--muted); font-weight: 600; }
.ch-head .ch-search { margin-left: auto; }
.ch-search svg { width: 16px; height: 16px; }
.msg.flash .bubble { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px #f5b942; } 100% { box-shadow: 0 0 0 3px transparent; } }

/* task due dates + priority */
.due, .prio { flex: none; border: 0; border-radius: 999px; font-size: 11px; padding: 2px 8px; white-space: nowrap; background: var(--card); color: var(--muted); }
.due.today { color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.due.late { color: var(--danger); background: rgba(255, 107, 107, 0.13); }
.prio { padding: 1px 5px; font-weight: 800; letter-spacing: -0.5px; background: none; }
.pr-1 { --pc: #5aa9ff; }
.pr-2 { --pc: #f5b942; }
.pr-3 { --pc: var(--danger); }
.prio[class*="pr-"] { color: var(--pc); }
.check[class*="pr-"]:not(.on) { border-color: var(--pc); }
.date-pop { position: fixed; z-index: 61; width: 1px; height: 1px; opacity: 0; padding: 0; border: 0; }
.due .rep { display: inline-grid; vertical-align: -2px; margin-right: 3px; }
.due .rep svg { width: 11px; height: 11px; }

/* dragging on the timeline */
.block { cursor: grab; }
.b-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.block.dragging, .pin.dragging { z-index: 6; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); animation: none; opacity: 0.95; }
body.is-dragging, body.is-dragging * { user-select: none; -webkit-user-select: none; cursor: grabbing !important; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-line { position: absolute; left: var(--gut); right: 0; height: 0; border-top: 2px solid var(--accent); z-index: 7; pointer-events: none; }
.drop-line span { position: absolute; right: 4px; top: -18px; font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--bg); padding: 0 4px; border-radius: 4px; }
.task-row:not(.done), .anytime:not(.tasks) .any-row { cursor: grab; }
.sub .shared { color: var(--accent); }

/* campaigns */
.tabs button { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camps { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 8px 24px; }
.camp-h { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 10px; font-size: 14px; }
.camp-empty { margin: 4px 4px 12px; }
.camp-card { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: var(--radius); padding: 10px 11px; margin-bottom: 8px; color: var(--text); font: inherit; }
.camp-card:hover { background: var(--card-hover); }
.camp-card.paused { opacity: 0.65; }
.cc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.cc-top b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.cc-lock svg, .pill .is-task svg { width: 12px; height: 12px; }
.cc-lock { color: var(--muted); display: inline-grid; }
.cc-pct { font-size: 12px; font-weight: 700; color: var(--c); font-variant-numeric: tabular-nums; }
.cc-sub { font-size: 11px; color: var(--muted); margin-top: 6px; }
.camp-done summary { cursor: pointer; color: var(--muted); font-size: 12px; margin: 10px 4px 8px; }
.pbar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--c) 16%, var(--line)); overflow: hidden; flex: 1; }
.pbar i { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width 0.3s ease-out; }

.camp-top { display: flex; align-items: center; gap: 4px; margin: -2px -2px 4px; }
.camp-top .icon-btn svg { width: 18px; height: 18px; }
.camp-name { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camp-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); margin: 0 4px 8px; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.camp-total { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.camp-total .pbar { height: 9px; }
.camp-brief { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.45; cursor: text; margin-bottom: 8px; user-select: text; -webkit-user-select: text; }
.camp-brief.empty { color: var(--muted); font-style: italic; }
.camp-brief-edit { width: 100%; box-sizing: border-box; margin-bottom: 8px; resize: vertical; min-height: 100px; line-height: 1.45; }
.camp-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.camp-goals-h { margin: 0 4px 6px; }
.goal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 9px 7px; margin-bottom: 8px; }
.goal-top { display: flex; align-items: center; gap: 7px; }
.goal-top .t-btn { opacity: 1; }
.goal-ic { color: var(--accent); display: inline-grid; flex: none; }
.goal-ic svg { width: 15px; height: 15px; }
.goal-title { flex: 1; min-width: 0; font-size: 13px; word-break: break-word; }
.goal-prog { display: flex; align-items: center; gap: 8px; margin: 7px 0 4px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.goal-prog span { flex: none; }
.goal-tasks { margin: 4px -2px 0; }
.goal-add { width: 100%; box-sizing: border-box; margin-top: 5px; background: none; border: 1px dashed var(--line); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; }
.goal-add:focus { border-style: solid; }
.add-goal { width: 100%; background: none; border: 1px dashed var(--line); border-radius: var(--radius); padding: 9px; color: var(--muted); }
.add-goal:hover { color: var(--text); background: var(--card-hover); }

.logbox { margin: 6px 0 2px; }
.logbox.open { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px; display: flex; flex-direction: column; gap: 6px; }
.log-row { display: flex; gap: 4px; align-items: center; }
.log-row .t-btn { opacity: 1; }
.log-contact, .log-note { flex: 1; min-width: 0; font-size: 12.5px; padding: 6px 9px; }
.log-outcomes { display: flex; flex-wrap: wrap; gap: 5px; }
.oc { border: 0; border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--oc) 18%, transparent); color: var(--oc); --oc: var(--muted); white-space: nowrap; }
button.oc:hover { background: color-mix(in srgb, var(--oc) 30%, transparent); }
.oc-0 { --oc: #9a9aa6; } .oc-1 { --oc: #ff6b6b; } .oc-2 { --oc: #5aa9ff; } .oc-3 { --oc: #3ecf8e; } .oc-4 { --oc: #f5b942; } .oc-5 { --oc: #c77dff; }
.attempts { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.attempt { display: flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 2px 0; }
.attempt .oc { font-size: 10.5px; padding: 1px 7px; flex: none; }
.att-who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-who small { color: var(--muted); }
.att-by { color: var(--muted); font-size: 10.5px; flex: none; }
.attempt .t-btn { padding: 2px; }
.attempt:hover .t-btn { opacity: 1; }

.camp-chip { flex: none; max-width: 90px; border: 0; border-radius: 99px; padding: 2px 7px; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.av { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; background: hsl(var(--h) 55% 50%); }
.mine-seg { margin: 2px 8px 8px; }
.mine-seg button { padding: 4px; font-size: 12px; }
.pick { flex-direction: row !important; align-items: center; gap: 7px !important; color: var(--text) !important; font-size: 13px !important; }
.picks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.picks-h { font-size: 12px; color: var(--muted); margin: 8px 0 5px; }
.count-opts > label { max-width: 50%; }
.report-stats { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.log-methods button { padding: 3px; font-size: 12px; }
.logbox:not(.open) { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.log-from { flex-wrap: wrap; }
.log-from button { flex: 1 1 auto; padding: 3px 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.log-book-btn { align-self: flex-start; font-size: 12px; }
.log-book { display: flex; flex-direction: column; gap: 4px; }
.log-book-row { display: flex; align-items: center; gap: 6px; }
.log-book-row input, .log-book-row select { min-width: 0; flex: 1; font-size: 12.5px; padding: 5px 7px; }
.log-book .day-hint { margin: 0; }
.logbox.open { margin-bottom: 12px; }
.tabs button { padding: 5px 2px; }
.attempts .link { align-self: flex-start; margin-top: 2px; }
@media (max-width: 380px) { .tabs button { font-size: 12px; letter-spacing: -0.15px; } }
.ln-camp { min-width: 200px; }
.ln-camp .pbar { min-width: 50px; height: 5px; }
.ln-camp .ln-text { flex: none; max-width: 150px; }
.plan-preview { gap: 2px; }
.plan-row { display: flex; gap: 8px; color: var(--muted); }
.plan-row span { width: 70px; flex: none; color: var(--accent); }
.ch-lock { display: inline-grid; color: var(--muted); } .ch-lock svg { width: 11px; height: 11px; }

/* Saved campaigns */
.tpl-row { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 9px 10px; margin-bottom: 8px; }
.tpl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tpl-main small { font-size: 11px; color: var(--muted); }
.tpl-slots { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tpl-slot { display: flex; align-items: center; gap: 8px; width: 100%; }
.tpl-days { flex: 1; } .tpl-days button { padding: 5px 0; }
.tpl-slot input[type="time"] { width: auto; }
.pill-btn { font: inherit; color: inherit; cursor: pointer; } .pill-btn:hover { background: var(--card-hover); }
.pill-btn .av { width: 15px; height: 15px; font-size: 9px; }

/* Connected calendars */
.cal-conn { border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 10px 8px; margin-bottom: 10px; }
.cal-conn .picks { margin-bottom: 4px; }
.cal-btns { display: flex; gap: 6px; flex: none; }
.cal-sec small.err { color: var(--danger, #e5484d); }
.cal-add { display: flex; flex-wrap: wrap; gap: 8px; }

/* AI */
.ai-key { display: flex; gap: 6px; min-width: 0; } .ai-key input { width: 180px; min-width: 0; } .ai-key select { max-width: 180px; }
.ai-btn:disabled { opacity: 0.6; cursor: progress; }
.goal-btns { display: flex; gap: 6px; }
.goal-btns .add-goal { flex: 1; }
.report-findings-h { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.plan-goal { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.plan-goal > small { margin-left: 22px; }
.plan-task { margin-left: 22px; font-size: 12.5px !important; }
.plan-task small { color: var(--muted); }

/* brand & culture */
.ws-logo { height: 20px; max-width: 90px; object-fit: contain; border-radius: 4px; flex: none; }
.brand-sum { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.brand-txt { min-width: 0; flex: 1; }
.settings .brand-mission { color: var(--text); margin-bottom: 6px; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); flex: none; }
.brand-logo.big { width: 64px; height: 64px; }
.brand-logo-row { display: flex; align-items: center; gap: 12px; }
.brand-sw { display: flex; gap: 6px; flex-wrap: wrap; }
.brand-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); }
.brand-dot.on { outline: 2px solid var(--text); outline-offset: 2px; }
.brand-colors { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.brand-color { display: flex; align-items: center; gap: 8px; width: 100%; }
.brand-color input[type="color"] { width: 34px; height: 30px; padding: 2px; border-radius: 7px; flex: none; cursor: pointer; }
.brand-color input:not([type]) { flex: 1; min-width: 0; padding: 6px 9px; }
.brand-color code { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.brand-color .t-btn { opacity: 1; }
.ag-notes { display: flex; flex-direction: column; gap: 8px; }
.ag-note { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: start; }
.ag-note textarea { min-height: 40px; }
.ag-note small { grid-column: 1; font-size: 10.5px; color: var(--muted); }
.ag-note .t-btn { opacity: 1; margin-top: 6px; }
.ag-add-note { align-self: flex-start; }

/* call lists and files on a campaign */
.camps.dropping { outline: 2px dashed var(--accent); outline-offset: -4px; background: var(--accent-soft); }
.clist-name { background: none; border: 0; padding: 0; text-align: left; color: inherit; font-weight: 700; cursor: pointer; }
.clist .link { margin-top: 2px; }
.clist > .goal-top { cursor: grab; }
.clist > .goal-top:active { cursor: grabbing; }
.list-drag .goal:not(.clist) { outline: 1px dashed var(--accent); outline-offset: -1px; }
.goal.list-over { outline: 2px solid var(--accent); background: var(--accent-soft); }
.list-chip { flex: none; display: inline-flex; align-items: center; gap: 3px; border: 0; border-radius: 99px; padding: 2px 7px; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.list-chip span { display: inline-grid; }
.list-chip svg { width: 11px; height: 11px; }
.list-chip.full { background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--muted); }
.task-list { margin: 2px 2px 8px 26px; padding-left: 8px; border-left: 2px solid var(--line); }
.clist-seg { margin: 4px 0 6px; }
.clist-seg button { padding: 3px; font-size: 12px; }
.clist-q { margin: 0 0 6px; }
.clist-rows { display: flex; flex-direction: column; margin: 0 -2px; }
.crow { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-top: 1px solid var(--line); font-size: 12.5px; }
.crow:first-child { border-top: 0; }
.crow .oc { font-size: 10.5px; padding: 1px 7px; flex: none; }
.crow .btn { flex: none; }
.crow-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crow-who b, .crow-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow-who small { color: var(--muted); display: flex; gap: 8px; }
.crow-who a { color: var(--accent); text-decoration: none; }
.log-who { position: relative; }
.log-picked { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 12.5px; }
.log-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 3px); z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); padding: 4px; display: flex; flex-direction: column; }
.log-sugg-h { color: var(--muted); font-size: 10.5px; padding: 2px 6px; }
.log-sugg button { display: flex; align-items: center; gap: 8px; background: none; border: 0; border-radius: 6px; padding: 5px 6px; text-align: left; font-size: 12.5px; color: inherit; }
.log-sugg button:hover { background: var(--card-hover); }
.log-sugg button small { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-sugg .oc { font-size: 10.5px; padding: 1px 7px; }
.mfile { display: flex; align-items: center; gap: 8px; max-width: 280px; }
.mfile-ext { flex: none; min-width: 34px; text-align: center; font-size: 9.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 3px 4px; }
.mfile-when { flex: none; margin-left: auto; color: var(--muted); font-size: 11px; }
.note-win { position: fixed; z-index: 55; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4); display: flex; flex-direction: column; animation: pop 0.15s; }
.note-top { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.note-camp { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-status { flex: none; color: var(--muted); font-size: 11px; }
.note-ta { min-height: 180px; height: 220px; resize: vertical; border: 0; background: none; padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.45; color: inherit; outline: none; }
.mfile-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview .pv-edit { width: 100%; max-width: 900px; flex: 1; min-height: 0; box-sizing: border-box; background: var(--panel); color: var(--text); padding: 14px; border-radius: 10px; font-family: var(--mono); font-size: 12px; resize: none; }

/* a file popped out into its own window */
body.viewer .preview { background: var(--bg); padding: 12px; animation: none; }
body.viewer .preview .pv-bar { color: var(--text); }
body.viewer .preview pre, body.viewer .preview .pv-edit, body.viewer .preview .docx { flex: 1; width: 100%; max-width: 900px; max-height: none; font-size: 14px; line-height: 1.55; }
.camp-links .btn.on { border-color: var(--accent); color: var(--accent); }

/* ---------- lists & docs ---------- */
.clist .goal-top { min-height: 24px; }
.clist .pbar { height: 3px; margin: 6px 0 1px; flex: none; }
.clist-meta { flex: none; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.clist-meta.late { color: var(--danger); }
.clist.k-reference .goal-ic, .clist.k-form .goal-ic { color: var(--muted); }
.clist-body { margin-top: 6px; }
.tchips { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 6px; }
.tchips button { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 99px; padding: 2px 9px; font-size: 11.5px; }
.tchips button small { opacity: 0.7; font-variant-numeric: tabular-nums; }
.tchips button.on { background: var(--card-hover); color: var(--text); border-color: transparent; }
.tchips button.late { color: var(--danger); }
.stage { flex: none; border: 0; border-radius: 99px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: color-mix(in srgb, var(--sc) 16%, transparent); color: var(--sc); --sc: var(--muted); }
.stage.s-1 { --sc: #7aa2ff; } .stage.s-2 { --sc: #c18cff; } .stage.s-3 { --sc: #ffb86b; } .stage.s-4 { --sc: #5fd4e0; } .stage.s-5 { --sc: #ff8fb1; }
.stage.last { --sc: var(--ok); }
.trow .crow-who small { display: block; }
.trow-note { color: var(--text) !important; opacity: 0.75; font-style: italic; }
.trow-wrap .goal-add { margin: 0 0 6px; }

.run { border-top: 1px solid var(--line); }
.run:first-child { border-top: 0; }
.run-top { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 7px 2px; color: inherit; text-align: left; font-size: 12.5px; }
.run-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-top small { color: var(--muted); font-size: 11px; flex: none; }
.run.finished .run-name { color: var(--muted); font-weight: 500; }
.run-view { padding: 0 0 6px; }
.run-sec { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 8px 0 2px; }
.step { display: flex; align-items: flex-start; gap: 8px; padding: 4px 2px; border-radius: 7px; }
.step .check { margin-top: 1px; }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.step-text { font-size: 12.5px; line-height: 1.4; cursor: pointer; word-break: break-word; }
.step.done .step-text { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.step-body small { color: var(--muted); font-size: 11px; }
.step-note { color: var(--text) !important; opacity: 0.75; white-space: pre-wrap; }
.step-note-in { width: 100%; box-sizing: border-box; margin-top: 4px; font-size: 12.5px; resize: vertical; }
.step-mins { flex: none; color: var(--muted); font-size: 11px; margin-top: 2px; }
.step.cur { background: var(--accent-soft); }
.agenda-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 2px 8px; }
.agenda-bar small { color: var(--muted); }
.agenda-timer { font-variant-numeric: tabular-nums; font-size: 15px; }
.agenda-timer.over { color: var(--danger); }
.run-foot { display: flex; align-items: center; gap: 6px; padding-top: 6px; }
.run-foot > small { flex: 1; color: var(--muted); font-size: 11px; }

.use-opts { display: flex; flex-direction: column; gap: 2px; }
.sheet .use-opt { flex-direction: row; align-items: flex-start; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--text); }
.use-opt:hover { background: var(--card-hover); }
.use-opt input { margin-top: 3px; }
.use-opt span { display: flex; flex-direction: column; gap: 2px; }
.use-opt b { font-size: 13px; }
.use-opt b small { color: var(--accent); font-weight: 500; }
.use-opt span > small { color: var(--muted); font-size: 11.5px; }
.sched-prev { display: flex; flex-direction: column; gap: 3px; font-size: 12px; margin-bottom: 4px; }

.log-ask { display: flex; flex-direction: column; gap: 6px; }
.log-ask-btn { align-self: flex-start; font-size: 12px; }
.log-q { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.log-ans { font-size: 12.5px; resize: vertical; min-height: 30px; }
.att-ans-btn { font-size: 11px; padding: 0; }
.att-ans { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px 8px; padding-left: 8px; border-left: 2px solid var(--line); font-size: 12px; }
.att-ans small { display: block; color: var(--muted); font-size: 11px; }

/* kept beside: a panel next to the campaign (below it on narrow windows) */
.camps-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.camps-wrap > .camps { flex: 1 1 0; min-width: 0; }
.dock { flex: 0 0 45%; min-height: 0; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--panel); border-top: 1px solid var(--line); }
.dock.min { flex: none !important; }
.dock.min .dock-body, .dock.min .dock-chips { display: none; }
.dock-grip { position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: row-resize; z-index: 2; touch-action: none; }
.dock-head { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-bottom: 1px solid var(--line); flex: none; }
.dock-head .t-btn { opacity: 1; }
.dock-ic { display: inline-grid; color: var(--accent); }
.dock-ic svg { width: 14px; height: 14px; }
.dock-title { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-chips { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 8px 0; flex: none; }
.dock-chips:empty { display: none; }
.dock-chips button { flex: none; border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 99px; padding: 2px 9px; font-size: 11.5px; white-space: nowrap; }
.dock-chips button:hover { color: var(--text); }
.dock-body { flex: 1; min-height: 0; overflow: auto; padding: 8px; }
.dock-body iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; }
.dock-body img { max-width: 100%; border-radius: 6px; }
.dock-body pre { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; margin: 0; }
.dock-doc { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; user-select: text; -webkit-user-select: text; padding: 4px 6px; }
.dock-doc > :first-child { margin-top: 0; }
.dock-doc p { margin: 0 0 0.5em; }
.dock-doc h1, .dock-doc h2 { font-size: 1.2em; margin: 0.9em 0 0.35em; scroll-margin-top: 6px; }
.dock-doc h3, .dock-doc h4, .dock-doc h5, .dock-doc h6 { font-size: 1.05em; margin: 0.8em 0 0.3em; scroll-margin-top: 6px; }
.dock-doc ul, .dock-doc ol { margin: 0 0 0.6em; padding-left: 1.4em; white-space: normal; }
.dock-doc table { border-collapse: collapse; margin: 0 0 0.8em; white-space: normal; }
.dock-doc td { border: 1px solid var(--line); padding: 4px 7px; vertical-align: top; }
.dock-doc a { color: var(--accent); }
.tap-add { cursor: pointer; border-radius: 5px; transition: background 0.15s; }
.tap-add:hover { background: var(--accent-soft); }
.dock-q { margin: 0 0 6px; }
.ref-rows { display: flex; flex-direction: column; }
.ref-row { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-bottom: 1px solid var(--line); }
.ref-cells { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.ref-cell { background: none; border: 0; padding: 1px 3px; margin: 0 -3px; border-radius: 5px; color: var(--text); font-size: 12px; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ref-cell:hover { background: var(--card-hover); }
.ref-cell.first { flex-basis: 100%; font-weight: 650; font-size: 12.5px; }
.ref-cell small { color: var(--muted); font-size: 10.5px; margin-right: 4px; }
.stepper { flex: none; display: flex; align-items: center; gap: 2px; }
.stepper button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--text); }
.stepper b { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; font-size: 12.5px; }
@media (min-width: 760px) {
  .camps-wrap { flex-direction: row; }
  .dock { border-top: 0; border-left: 1px solid var(--line); }
  .dock-grip { top: 0; bottom: 0; left: -4px; right: auto; width: 8px; height: auto; cursor: col-resize; }
  .dock.min { flex-basis: 34px !important; }
  .dock.min .dock-title, .dock.min .dock-head > :not(.t-btn) { display: none; }
  .dock.min .dock-head { flex-direction: column; padding: 6px 2px; border: 0; }
}

/* PSS admin: contacts and live lists */
.pss-form { display: flex; flex-direction: column; gap: 6px; } .pss-form input[type=url] { width: 100%; }
.clist-live { flex: none; font-size: 10px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; line-height: 16px; }
.lead-stage { flex: none; font-size: 11px; color: var(--muted); }
.live-field { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; }
.live-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 10px; }
.contacts-bar { display: flex; gap: 6px; } .contacts-bar input { flex: 1; min-width: 0; } .contacts-bar select { max-width: 45%; }
.contacts { display: flex; flex-direction: column; max-height: 55vh; overflow: auto; margin: 0 -4px; }
.contact { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; border-top: 1px solid var(--line); min-width: 0; }
.contact-top { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.contact small { color: var(--muted); overflow-wrap: anywhere; }
.contact-reach { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* campaign email */
.mail-fresh { align-self: end; padding-bottom: 8px; }
.mail-who { margin: -2px 0 0; }
.mail-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mail-preview { white-space: pre-wrap; font: 12px/1.5 inherit; font-family: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0; max-height: 240px; overflow: auto; }
.sends { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.send { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.send.paused { border-color: var(--warn, #c9a227); }
.send-top { display: flex; align-items: center; gap: 8px; }
.send-what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.send-what small { color: var(--muted); }
.send-bad { font-size: 12px; }
.send .t-btn { opacity: 1; }

/* tools: bills */
.tool-item { display: flex; align-items: baseline; gap: 8px; } .tool-item small { color: var(--muted); }
.bill-day .bill-amt { color: var(--muted); }
.bill-tag { margin-left: 6px; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; }
.bill-tag.late, .bill-day.late .bill-amt { color: var(--danger, #e5484d); border-color: currentColor; }
.bill-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 18px; }
.bill-sum > div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.bill-sum small { color: var(--muted); font-size: 11.5px; } .bill-sum b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tool .seg { margin-bottom: 14px; }
.tool h3.late { color: var(--danger, #e5484d); }
.bill { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.bill:hover { background: var(--card-hover); }
.bill-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.bill-name small, .bill-right small { color: var(--muted); font-size: 11.5px; }
.bill-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-variant-numeric: tabular-nums; }
.bill-right small.late { color: var(--danger, #e5484d); }
.bill-paid { margin-top: 18px; } .bill-paid summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.bill-hist { display: flex; justify-content: space-between; gap: 10px; padding: 6px 4px; font-size: 12.5px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bill-hist small { color: var(--muted); }

/* meeting notes */
.b-rec { position: absolute; right: 6px; bottom: 4px; border: 0; border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(229, 72, 77, 0.9); cursor: pointer; }
.block.short .b-rec { position: static; flex: none; }
.rec { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 6px 6px 6px 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); font-size: 12.5px; }
.rec b { font-variant-numeric: tabular-nums; }
.rec-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rec-what small { color: var(--muted); }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; flex: none; animation: recpulse 1.4s ease-in-out infinite; }
@keyframes recpulse { 50% { opacity: 0.35; } }
.rec-spin { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: recspin 0.8s linear infinite; }
@keyframes recspin { to { transform: rotate(360deg); } }
.rec:not(.on):not(:has(button)) { padding-right: 14px; }
.meet-acts { display: flex; flex-direction: column; gap: 6px; }
.meet-act { display: flex; align-items: center; gap: 8px; } .meet-act .pick { flex: 1; min-width: 0; } .meet-act .pick small { color: var(--muted); }
.meet-act select { max-width: 40%; }
.meet-log { display: flex; flex-direction: column; gap: 6px; }
.meet-tx summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.meet-tx pre { white-space: pre-wrap; font-family: inherit; font-size: 12.5px; line-height: 1.5; max-height: 260px; overflow: auto; margin: 6px 0 0; color: var(--text); }

/* tools: contacts and email */
.contacts.contacts-tool { max-height: none; overflow: visible; margin: 0; }
.contact-row { flex-direction: row; align-items: flex-start; gap: 10px; }
.contact-row > input { margin-top: 3px; flex: none; }
.contact-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contacts-act { position: sticky; bottom: -30px; display: flex; align-items: center; gap: 10px; margin: 10px -14px -30px; padding: 10px 14px 14px; background: var(--bg); border-top: 1px solid var(--line); }
.contacts-act span { flex: 1; font-size: 12.5px; }
.contact-pick { padding: 4px 0; } .contact-pick small { color: var(--muted); }
.tool section.mail-to, .tool section.mail-form { display: flex; flex-direction: column; gap: 8px; }
.tool .mail-form label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; }
.mail-add { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-person { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-top: 1px solid var(--line); font-size: 12.5px; }
.mail-person span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-person small { color: var(--muted); }
.mail-person.out { opacity: 0.5; text-decoration: line-through; }
.mail-person .t-btn { opacity: 1; }
.mail-clear { align-self: flex-start; font-size: 12px; }
.mail-send { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.mail-warn { flex: 1; }
.tool .sends { margin: 0 0 14px; }
.mail-to .link { align-self: flex-start; font-size: 12px; }
