/* ==========================================================================
   Whiteboard — a full-screen canvas over the app
   The board itself stays light in both themes: a whiteboard that goes dark is
   a blackboard, and everything drawn on it was chosen against white.
   ========================================================================== */
#wb {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column;
  background: #f4f4f6; color: #1d1d20;
}
body.wb-open { overflow: hidden; }

.wb-top {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #fff; border-bottom: 1px solid #e5e5e7; z-index: 3;
}
.wb-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.wb-sub { color: #8a8a92; font-size: 12.5px; }
.wb-top .spacer { flex: 1; }
.wb-btn {
  border: 1px solid #e0e0e4; background: #fff; color: #45454c; border-radius: 9px;
  padding: 7px 11px; cursor: pointer; font: inherit; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
}
.wb-btn:hover { background: #f4f4f6; color: #1d1d20; }
.wb-btn.primary { background: #10a37f; border-color: #10a37f; color: #fff; font-weight: 600; }
.wb-btn.primary:hover { background: #0e8f70; color: #fff; }
.wb-who { display: flex; padding-left: 7px; }
.wb-avatar {
  width: 27px; height: 27px; border-radius: 50%; color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; border: 2px solid #fff; margin-left: -7px; text-transform: uppercase;
}

/* ---- stage --------------------------------------------------------------- */
.wb-stage {
  position: relative; flex: 1; overflow: hidden; touch-action: none;
  background-color: #f4f4f6;
  background-image: radial-gradient(circle, #d6d6dc 1px, transparent 1px);
  cursor: default;
}
.wb-stage[data-tool="hand"], .wb-stage.grabbing { cursor: grab; }
.wb-stage.grabbing * { cursor: grab !important; }
.wb-stage[data-tool="draw"], .wb-stage[data-tool="line"] { cursor: crosshair; }
.wb-stage[data-tool="sticky"], .wb-stage[data-tool="text"],
.wb-stage[data-tool="shape"], .wb-stage[data-tool="table"],
.wb-stage[data-tool="frame"] { cursor: copy; }
.wb-stage.over::after {
  content: ""; position: absolute; inset: 10px; border: 3px dashed #10a37f;
  border-radius: 18px; background: rgba(16,163,127,.07); pointer-events: none; z-index: 20;
}
.wb-canvas { position: absolute; inset: 0; transform-origin: 0 0; }
/* The ink layer draws in the same world coordinates as the elements. It is a
   1px box with overflow visible, so negative coordinates still paint. */
#wbInk { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
#wbInk > path, #wbInk > text { pointer-events: auto; }
.wb-line, .wb-ink { cursor: pointer; }
.wb-line.sel, .wb-ink.sel { filter: drop-shadow(0 0 3px #10a37f); }

/* ---- elements ------------------------------------------------------------ */
.wb-el { position: absolute; box-sizing: border-box; user-select: none; }
.wb-el.sel { outline: 2px solid #10a37f; outline-offset: 2px; }
.wb-text {
  width: 100%; height: 100%; padding: 12px 14px; box-sizing: border-box; overflow: hidden;
  white-space: pre-wrap; word-break: break-word; line-height: 1.32; outline: none;
}
.wb-text[contenteditable="plaintext-only"] { user-select: text; cursor: text; overflow: auto; }

.wb-sticky {
  border-radius: 3px; box-shadow: 0 3px 10px rgba(0,0,0,.13);
}
.wb-textel .wb-text { padding: 4px 6px; font-weight: 500; }
.wb-shape { border: 2px solid; display: grid; place-items: center; }
.wb-shape .wb-text { display: grid; place-items: center; text-align: center; }
.wb-frame {
  border: 2px dashed; border-radius: 12px; background: rgba(255,255,255,.35);
}
.wb-frame-label { position: absolute; top: -24px; left: 2px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.wb-image { border: 1px solid #e0e0e4; border-radius: 6px; overflow: hidden; background: #fff; }
.wb-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-file {
  border: 1px solid #e0e0e4; border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; padding: 10px; text-align: center;
  color: #45454c; box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.wb-file-ico { color: #8a8a92; }
.wb-file-name { font-size: 13px; font-weight: 600; color: #1d1d20; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-file-size { font-size: 11.5px; color: #9a9aa2; }
.wb-table { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.wb-table table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
.wb-table td {
  border: 1px solid #e0e0e4; padding: 6px 9px; color: var(--wb-ink, #1d1d20);
  overflow: hidden; text-overflow: ellipsis; outline: none;
}
.wb-table td.head { background: #f4f4f6; font-weight: 600; }
.wb-table td[contenteditable="plaintext-only"] { background: #eefaf6; user-select: text; }

.wb-note-badge {
  position: absolute; top: -10px; right: -10px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; border: 2px solid #fff; background: #2f80ed; color: #fff;
  font-size: 11px; font-weight: 700; cursor: pointer; z-index: 5;
}

/* ---- selection ----------------------------------------------------------- */
#wbHandles { position: absolute; inset: 0; pointer-events: none; }
.wb-selbox { position: absolute; outline: 1.5px solid #10a37f; pointer-events: none; }
.wb-h {
  position: absolute; width: 11px; height: 11px; background: #fff; border: 1.5px solid #10a37f;
  border-radius: 3px; pointer-events: auto; transform-origin: center;
}
.wb-h-nw { left: -6px; top: -6px; cursor: nwse-resize; }
.wb-h-n  { left: calc(50% - 6px); top: -6px; cursor: ns-resize; }
.wb-h-ne { right: -6px; top: -6px; cursor: nesw-resize; }
.wb-h-e  { right: -6px; top: calc(50% - 6px); cursor: ew-resize; }
.wb-h-se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.wb-h-s  { left: calc(50% - 6px); bottom: -6px; cursor: ns-resize; }
.wb-h-sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.wb-h-w  { left: -6px; top: calc(50% - 6px); cursor: ew-resize; }
.wb-marquee { position: absolute; border: 1.5px solid #10a37f; background: rgba(16,163,127,.09); pointer-events: none; }

/* ---- peers --------------------------------------------------------------- */
#wbPeers { position: absolute; inset: 0; pointer-events: none; }
.wb-cursor { position: absolute; transform-origin: 0 0; display: flex; align-items: flex-start; gap: 2px; }
.wb-cursor-name {
  color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 9px;
  white-space: nowrap; margin-top: 8px;
}

/* ---- tool rail ----------------------------------------------------------- */
.wb-tools {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 10;
  background: #fff; border: 1px solid #e5e5e7; border-radius: 14px; padding: 7px;
  display: flex; flex-direction: column; gap: 3px; box-shadow: 0 6px 24px rgba(0,0,0,.10);
}
.wb-tools button {
  width: 38px; height: 38px; border: 0; background: none; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; color: #45454c;
}
.wb-tools button:hover { background: #f0f0f1; color: #1d1d20; }
.wb-tools button.on { background: #10a37f; color: #fff; }
.wb-tool-sep { height: 1px; background: #e5e5e7; margin: 4px 2px; }

/* ---- style bar ----------------------------------------------------------- */
.wb-style {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 12;
  background: #fff; border: 1px solid #e5e5e7; border-radius: 14px; padding: 8px 10px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.12);
  max-width: calc(100% - 220px); overflow-x: auto;
}
.wb-swatches { display: flex; gap: 4px; }
.wb-sw {
  width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.14); cursor: pointer; padding: 0;
}
.wb-sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #10a37f; }
.wb-seg { display: flex; border: 1px solid #e5e5e7; border-radius: 9px; overflow: hidden; flex: none; }
.wb-seg button {
  border: 0; border-right: 1px solid #e5e5e7; background: #fff; color: #45454c; cursor: pointer;
  font: inherit; font-size: 12.5px; padding: 6px 9px; min-width: 30px;
  display: inline-flex; align-items: center; justify-content: center;
}
.wb-seg button:last-child { border-right: 0; }
.wb-seg button:hover { background: #f4f4f6; }
.wb-seg button.on { background: #10a37f; color: #fff; }
.wb-seg button.danger:hover { background: #fdeaea; color: #d64545; }

/* ---- zoom ---------------------------------------------------------------- */
.wb-zoom {
  position: absolute; right: 16px; bottom: 18px; z-index: 11; display: flex; align-items: center; gap: 2px;
  background: #fff; border: 1px solid #e5e5e7; border-radius: 12px; padding: 5px;
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
}
.wb-zoom button {
  border: 0; background: none; width: 32px; height: 30px; border-radius: 8px; cursor: pointer;
  color: #45454c; font-size: 15px; display: grid; place-items: center;
}
.wb-zoom button:hover { background: #f0f0f1; }
#wbZoomLabel { font-size: 12.5px; color: #6b6b73; min-width: 44px; text-align: center; }

/* ---- comments ------------------------------------------------------------ */
#wbNotes {
  position: absolute; z-index: 30; width: 300px; background: #fff; border: 1px solid #e5e5e7;
  border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.16); overflow: hidden;
}
.wb-notes-head {
  display: flex; align-items: center; justify-content: space-between; padding: 11px 14px;
  border-bottom: 1px solid #efeff1; font-weight: 700; font-size: 13.5px;
}
.wb-note-close, .wb-note-x { border: 0; background: none; cursor: pointer; color: #9a9aa2; font-size: 13px; }
.wb-notes-body { max-height: 220px; overflow-y: auto; padding: 6px 14px; }
.wb-note { padding: 8px 0; border-bottom: 1px solid #f4f4f6; font-size: 13.5px; line-height: 1.45; }
.wb-note:last-child { border-bottom: 0; }
.wb-note-head { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #9a9aa2; margin-bottom: 2px; }
.wb-note-head b { color: #1d1d20; font-size: 12.5px; }
.wb-note-head .wb-note-x { margin-left: auto; }
.wb-note-empty { color: #9a9aa2; font-size: 13px; padding: 10px 0; margin: 0; }
.wb-notes-foot { display: flex; gap: 7px; padding: 10px 12px; border-top: 1px solid #efeff1; }
.wb-notes-foot input {
  flex: 1; min-width: 0; border: 1px solid #e0e0e4; border-radius: 9px; padding: 8px 11px;
  font: inherit; font-size: 13.5px; outline: none; background: #fff; color: #1d1d20;
}
.wb-notes-foot input:focus { border-color: #10a37f; }
.wb-notes-foot .btn-primary { padding: 8px 13px; font-size: 13px; }

/* ---- the preview card inside the task ------------------------------------ */
.wb-card { margin: 4px 0 6px; }
.wb-card-shot {
  display: block; width: 100%; border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; background: var(--bg-soft); overflow: hidden; padding: 0;
}
.wb-card-shot img { display: block; width: 100%; height: auto; }
.wb-card-shot:hover { border-color: var(--accent); }
.wb-card-empty {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 1px dashed var(--border-strong); border-radius: 12px; padding: 16px;
  background: var(--bg-soft); color: var(--text-soft); font: inherit; font-size: 13.5px;
}
.wb-card-empty:hover { border-color: var(--accent); color: var(--accent); }
.wb-card-foot {
  display: flex; align-items: center; gap: 10px; margin-top: 7px;
  font-size: 12.5px; color: var(--text-faint);
}
.wb-card-foot .spacer { flex: 1; }
.wb-card-foot button {
  border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px;
  color: var(--text-faint); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.wb-card-foot button:hover { color: var(--text-danger, #d64545); }
.wb-chip { display: inline-flex; align-items: center; color: var(--text-faint); }

@media (max-width: 820px) {
  .wb-tools {
    left: 50%; top: auto; bottom: 78px; transform: translateX(-50%);
    flex-direction: row; max-width: calc(100% - 24px); overflow-x: auto;
  }
  .wb-style { bottom: 132px; max-width: calc(100% - 24px); }
  .wb-zoom { bottom: 18px; right: 12px; }
  .wb-sub { display: none; }
}

/* ---- the header hint, one tip at a time ---------------------------------- */
.wb-sub { opacity: 0; transition: opacity .45s ease; }
.wb-sub.in { opacity: 1; }

/* ---- a PDF previews itself; everything else gets the card ---------------- */
.wb-file.has-page { padding: 0; justify-content: flex-start; overflow: hidden; }
.wb-file-page { position: relative; flex: 1; width: 100%; min-height: 0; background: #fbfbfc; pointer-events: none; }
.wb-file-ghost {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; color: #b9b9c0; font-size: 12px; font-weight: 700; letter-spacing: .08em;
}
.wb-file-page embed { position: relative; }
.wb-file-page embed { width: 100%; height: 100%; border: 0; display: block; }
.wb-file-bar {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 9px;
  border-top: 1px solid #ededf0; background: #fff; box-sizing: border-box;
}
.wb-file:not(.has-page) .wb-file-bar { border-top: 0; justify-content: center; flex-wrap: wrap; }
.wb-file-bar .wb-file-name { flex: 1; min-width: 0; text-align: left; }
.wb-file-btn {
  flex: none; border: 0; background: none; color: #8a8a92; cursor: pointer; padding: 3px;
  border-radius: 6px; display: grid; place-items: center;
}
.wb-file-btn:hover { background: #f0f0f1; color: #1d1d20; }

/* ---- first-run walk-through ---------------------------------------------- */
#wbTour { position: fixed; inset: 0; z-index: 200; }
#wbTour::before { content: ""; position: absolute; inset: 0; background: rgba(15,15,18,.55); }
.wb-tour-hole {
  position: absolute; display: none; border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(15,15,18,.55); outline: 2px solid #10a37f; z-index: 1;
}
#wbTour:has(.wb-tour-hole[style*="display: block"])::before { display: none; }
.wb-tour-card {
  position: absolute; z-index: 2; width: 320px; background: #fff; color: #1d1d20;
  border-radius: 16px; padding: 18px 20px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.wb-tour-step { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #9a9aa2; }
.wb-tour-card h3 { margin: 6px 0 6px; font-size: 17px; }
.wb-tour-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #6b6b73; }
.wb-tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.wb-tour-actions .spacer { flex: 1; }

/* ---- reaction stickers ---------------------------------------------------- */
.wb-sticker {
  display: grid; place-items: center; line-height: 1; user-select: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.16));
}
.wb-sticker span { display: block; }
#wbStickers {
  position: absolute; z-index: 30; width: 268px; background: #fff; border: 1px solid #e5e5e7;
  border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.18); padding: 10px 12px 12px;
}
.wb-sk-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 13px; margin-bottom: 8px;
}
#wbSkSearch {
  width: 100%; box-sizing: border-box; border: 1px solid #e0e0e4; border-radius: 9px;
  padding: 7px 10px; font: inherit; font-size: 13px; outline: none; margin-bottom: 8px;
}
#wbSkSearch:focus { border-color: #10a37f; }
.wb-sk-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
  max-height: 200px; overflow-y: auto;
}
.wb-sk-grid button {
  border: 0; background: none; font-size: 21px; line-height: 1; padding: 6px 0;
  border-radius: 8px; cursor: pointer;
}
.wb-sk-grid button:hover { background: #f0f0f1; }
.wb-seg button[data-sk2] { font-size: 15px; }

/* ---- referenced tasks ------------------------------------------------------ */
.wb-task {
  border: 1px solid #e2e2e6; border-radius: 12px; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 5px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.07); position: relative;
}
/* while the card is being measured it may take the height it wants */
.wb-task[style*="height: auto"] { overflow: visible; }
.wb-task-head { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.wb-task-status {
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 999px; background: #eef0f2; color: #6b6b73;
}
.wb-task-status.s-in_progress { background: #e7f6f1; color: #0e8f70; }
.wb-task-status.s-done { background: #eaeaee; color: #9a9aa2; }
.wb-task-ws { color: #9a9aa2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-task-title {
  font-weight: 600; font-size: 15px; line-height: 1.3; color: #1d1d20;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wb-task-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; margin-top: auto; }
.wb-task-who { display: inline-flex; align-items: center; gap: 5px; color: #6b6b73; }
.wb-task-who img, .wb-task-who i {
  width: 18px; height: 18px; border-radius: 50%; object-fit: cover; font-style: normal;
  background: #10a37f; color: #fff; font-size: 9px; display: grid; place-items: center; font-weight: 700;
}
.wb-task-due { color: #6b6b73; }
.wb-task-due.over { color: #d64545; font-weight: 600; }
.wb-task-tag { background: #f0f0f1; color: #6b6b73; border-radius: 999px; padding: 1px 8px; }
.wb-task-open {
  position: absolute; top: 8px; right: 8px; border: 0; background: none; color: #b9b9c0;
  cursor: pointer; padding: 3px; border-radius: 6px;
}
.wb-task-open:hover { background: #f0f0f1; color: #1d1d20; }
.wb-task-load, .wb-task-gone { color: #9a9aa2; font-size: 13px; }

/* ---- pickers ---------------------------------------------------------------- */
#wbPick {
  position: absolute; z-index: 30; width: 320px; background: #fff; border: 1px solid #e5e5e7;
  border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.18); padding: 10px 12px 12px;
  /* The workspace side of this panel is taller than the task side, and it grew
     straight past the bottom of the window — with the "place it" button below
     the edge, where nobody could reach it. */
  max-height: calc(100% - 24px); overflow-y: auto; overscroll-behavior: contain;
}
.wb-pick-go { position: sticky; bottom: 0; }
#wbPickQ {
  width: 100%; box-sizing: border-box; border: 1px solid #e0e0e4; border-radius: 9px;
  padding: 7px 10px; font: inherit; font-size: 13px; outline: none; margin-bottom: 8px;
}
#wbPickQ:focus { border-color: #10a37f; }
.wb-pick-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.wb-pick-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  border: 0; background: none; padding: 7px 8px; border-radius: 8px; cursor: pointer; font: inherit;
}
.wb-pick-row:hover { background: #f4f4f6; }
.wb-pick-title { font-size: 13.5px; color: #1d1d20; }
.wb-pick-meta { font-size: 11.5px; color: #9a9aa2; }

.wb-at {
  position: fixed; z-index: 40; background: #fff; border: 1px solid #e5e5e7; border-radius: 11px;
  box-shadow: 0 8px 26px rgba(0,0,0,.16); padding: 4px; min-width: 180px;
}
.wb-at button {
  display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit;
  font-size: 13.5px; padding: 7px 10px; border-radius: 7px; cursor: pointer; color: #1d1d20;
}
.wb-at button:hover { background: #f0f0f1; }

/* ---- the shortcut sheet ------------------------------------------------------ */
#wbHelp { position: fixed; inset: 0; z-index: 150; background: rgba(15,15,18,.5); display: grid; place-items: center; }
.wb-help-card {
  width: min(560px, calc(100% - 32px)); max-height: 82vh; overflow-y: auto; background: #fff;
  border-radius: 18px; padding: 22px 24px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); color: #1d1d20;
}
.wb-help-head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 700; }
.wb-help-sub { margin: 4px 0 16px; color: #6b6b73; font-size: 13.5px; }
.wb-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 20px; }
.wb-key { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.wb-key kbd {
  flex: none; min-width: 62px; text-align: center; background: #f4f4f6; border: 1px solid #e5e5e7;
  border-bottom-width: 2px; border-radius: 7px; padding: 3px 7px; font: inherit; font-size: 12px; font-weight: 600;
}
.wb-key span { color: #6b6b73; }
.wb-help-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid #efeff1; color: #9a9aa2; font-size: 12.5px; }

/* the download menu */
.wb-menu-wrap { position: relative; }
.wb-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #e5e5e7;
  border-radius: 11px; box-shadow: 0 8px 26px rgba(0,0,0,.16); padding: 4px; min-width: 170px; z-index: 20;
}
.wb-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit;
  font-size: 13.5px; padding: 8px 11px; border-radius: 7px; cursor: pointer; color: #1d1d20;
}
.wb-menu button:hover { background: #f0f0f1; }

/* ---- templates -------------------------------------------------------------- */
#wbTpl { position: fixed; inset: 0; z-index: 150; background: rgba(15,15,18,.5); display: grid; place-items: center; }
.wb-tpl-card {
  width: min(940px, calc(100% - 32px)); max-height: 86vh; overflow-y: auto; background: #fff;
  border-radius: 18px; padding: 22px 24px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); color: #1d1d20;
}
.wb-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.wb-tpl {
  display: flex; flex-direction: column; text-align: left; border: 1px solid #e5e5e7;
  background: #fff; border-radius: 14px; padding: 0 0 12px; cursor: pointer; font: inherit;
  overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.wb-tpl:hover { border-color: #10a37f; box-shadow: 0 8px 22px rgba(0,0,0,.10); }
.wb-tpl-shot {
  display: block; width: 100%; aspect-ratio: 16 / 10; background: #fbfbfc;
  border-bottom: 1px solid #f0f0f1; overflow: hidden; display: grid; place-items: center;
}
.wb-tpl-shot canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.wb-tpl-name { font-weight: 700; font-size: 14.5px; margin: 11px 14px 0; }
.wb-tpl-desc { font-size: 12.5px; color: #6b6b73; line-height: 1.45; margin: 3px 14px 0; }

/* the invitation on an empty board */
#wbEmpty {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 8;
  text-align: center; max-width: 380px;
  /* the invitation sits exactly where the first element usually goes — it must
     not catch the click that places it. Only the button answers to the mouse. */
  pointer-events: none;
}
#wbEmpty button { pointer-events: auto; }
.wb-empty-h { font-size: 19px; font-weight: 700; color: #45454c; margin: 0; }
.wb-empty-p { font-size: 14px; color: #8a8a92; margin: 8px 0 16px; line-height: 1.5; }

/* ---- templates people saved themselves -------------------------------------- */
.wb-tpl-save { margin: 0 0 6px; }
.wb-tpl-sec {
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #9a9aa2; margin: 20px 0 10px;
}
.wb-tpl-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-tpl-noshot {
  display: grid; place-items: center; width: 100%; height: 100%;
  color: #b9b9c0; font-size: 13px; padding: 0 12px; text-align: center;
}
.wb-tpl-by {
  display: flex; align-items: center; gap: 7px; margin: 6px 14px 0;
  font-size: 12px; color: #8a8a92;
}
.wb-tpl-av {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex: none;
  background: #10a37f; color: #fff; display: grid; place-items: center;
  font-size: 9px; font-weight: 700;
}
.wb-tpl-av img { width: 100%; height: 100%; object-fit: cover; }
.wb-tpl-del {
  margin-left: auto; color: #b9b9c0; display: grid; place-items: center;
  padding: 3px; border-radius: 6px; cursor: pointer;
}
.wb-tpl-del:hover { background: #fdeaea; color: #d64545; }

/* ---- a whole workspace as a table ------------------------------------------ */
.wb-tl {
  border: 1px solid #e2e2e6; border-radius: 12px; padding: 11px 12px 10px;
  display: flex; flex-direction: column; gap: 6px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.wb-tl-head { display: flex; align-items: center; gap: 8px; }
.wb-tl-title {
  font-weight: 700; font-size: 15px; color: #1d1d20;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wb-tl-count { margin-left: auto; font-size: 11.5px; color: #9a9aa2; flex: none; }
.wb-tl-body { display: flex; flex-direction: column; }
.wb-tl-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 4px;
  border-top: 1px solid #f2f2f4; font-size: 13px; cursor: pointer;
}
.wb-tl-row:hover { background: #f7f7f8; }
.wb-tl-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9c9cf; flex: none; }
.wb-tl-dot.s-in_progress { background: #10a37f; }
.wb-tl-dot.s-done { background: #d8d8dd; }
.wb-tl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1d1d20; }
.wb-tl-who {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: #eef0f2; color: #6b6b73;
  display: grid; place-items: center; font-size: 9.5px; font-weight: 700;
}
.wb-tl-due { flex: none; font-size: 11.5px; color: #8a8a92; min-width: 44px; text-align: right; }
.wb-tl-due.over { color: #d64545; font-weight: 600; }
.wb-tl-more, .wb-tl-empty { font-size: 12px; color: #9a9aa2; padding: 6px 4px 0; }

/* picker: task or whole workspace */
.wb-pick-modes { margin-bottom: 9px; width: 100%; }
.wb-pick-modes button { flex: 1; }
.wb-pick-row.on { background: #eefaf6; }
.wb-pick-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 10px 0 4px; }
.wb-pick-lbl { font-size: 11.5px; color: #9a9aa2; width: 100%; }
.wb-tagchip {
  border: 1px solid #e5e5e7; background: #fff; color: #45454c; border-radius: 999px;
  padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.wb-tagchip:hover { background: #f4f4f6; }
.wb-tagchip.on { border-color: #10a37f; background: #eefaf6; color: #0e8f70; font-weight: 600; }
.wb-pick-only { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 13px; color: #45454c; }
.wb-pick-only input { width: 15px; height: 15px; accent-color: #10a37f; }
.wb-pick-go { width: 100%; margin-top: 8px; }

/* marked text on the board turns into a task */
.wb-sel-pop { position: fixed; z-index: 160; }
.wb-sel-pop button {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: #1d1d20; color: #fff;
  border-radius: 9px; padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
}
.wb-sel-pop button:hover { background: #000; }
