/* Sheridan Work — big, friendly, dark. Built for non-techy folks. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d1117; --panel: #161b22; --panel2: #1c2129; --line: #30363d;
  --text: #e6edf3; --dim: #9198a1; --blue: #4493f8; --green: #3fb950;
  --red: #f85149; --yellow: #d29922; --purple: #a371f7;
}
html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: var(--blue); cursor: pointer; text-decoration: none; }
input, textarea, select {
  width: 100%; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 15px; outline: none; font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }

/* ── Login ── */
.login-screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 44px 40px; width: 400px; text-align: center; }
.login-logo { font-size: 52px; margin-bottom: 8px; }
.login-card h1 { font-size: 26px; margin-bottom: 4px; }
.login-card h2 { font-size: 20px; margin-bottom: 8px; }
.login-sub { color: var(--dim); font-size: 14px; margin-bottom: 26px; line-height: 1.5; }
.login-card input { margin-bottom: 12px; }
.form-error { color: var(--red); font-size: 13px; min-height: 20px; margin-bottom: 6px; }
.btn-big { width: 100%; padding: 14px; background: var(--green); color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 700; }
.btn-big:hover { filter: brightness(1.12); }
.login-switch { margin-top: 18px; font-size: 14px; color: var(--dim); }
.pending-icon { font-size: 52px; margin-bottom: 10px; }

/* ── Shell ── */
#app { display: flex; height: 100vh; height: 100dvh; }
.sidebar { width: 210px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; flex-shrink: 0; }
.side-logo { font-size: 16px; font-weight: 800; padding: 8px 12px 18px; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 10px;
  color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 4px; position: relative;
}
.side-link:hover { background: var(--panel2); }
.side-link.active { background: #1f6feb33; color: #79b8ff; }
.side-badge { position: absolute; right: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: none; align-items: center; justify-content: center; padding: 0 6px; }
.side-badge.show { display: inline-flex; }
.side-spacer { flex: 1; }
.side-me { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; cursor: pointer; border: 1px solid var(--line); }
.side-me:hover { border-color: var(--red); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 14px; flex-shrink: 0; }
main { flex: 1; display: flex; overflow: hidden; }

/* ── Generic layout in views ── */
.view { flex: 1; display: flex; overflow: hidden; }
.subbar { width: 240px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 10px; flex-shrink: 0; }
.subbar h3 { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; padding: 8px 10px 6px; display:flex; justify-content:space-between; align-items:center; }
.sub-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 14px; cursor: pointer; margin-bottom: 2px; }
.sub-item:hover { background: var(--panel2); }
.sub-item.active { background: #1f6feb33; color: #79b8ff; font-weight: 700; }
.content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.content-head { padding: 16px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.content-head h2 { font-size: 19px; }
.content-head .sub { color: var(--dim); font-size: 13px; }
.content-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #555; display: inline-block; flex-shrink: 0; }
.dot.on { background: var(--green); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 9px; padding: 10px 16px; font-size: 14px; font-weight: 700; }
.btn-green { background: var(--green); color: #fff; }
.btn-blue  { background: #1f6feb; color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn:hover { filter: brightness(1.1); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.x-btn { background: none; border: none; color: var(--dim); font-size: 18px; }
.x-btn:hover { color: var(--red); }

/* ── Chat ── */
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 2px; }
.msg { display: flex; gap: 12px; padding: 7px 10px; border-radius: 10px; }
.msg:hover { background: var(--panel2); }
.msg-body { min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-name { font-weight: 700; font-size: 14px; }
.msg-time { color: var(--dim); font-size: 11px; }
.msg-text { font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg-file { margin-top: 6px; }
.msg-file img { max-width: 380px; max-height: 260px; border-radius: 10px; display: block; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: var(--text); font-size: 14px; }
.file-chip:hover { border-color: var(--blue); }
.composer { padding: 14px 24px 18px; border-top: 1px solid var(--line); }
.composer-row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { resize: none; min-height: 48px; max-height: 140px; }
.attach-btn { background: var(--panel); border: 1px solid var(--line); color: var(--dim); border-radius: 10px; width: 48px; height: 48px; font-size: 20px; flex-shrink: 0; }
.attach-btn:hover { border-color: var(--blue); color: var(--blue); }
.send-btn { background: var(--green); border: none; color: #fff; border-radius: 10px; width: 68px; height: 48px; font-size: 19px; flex-shrink: 0; }
.attach-preview { margin-bottom: 8px; display: none; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.day-divider { text-align: center; color: var(--dim); font-size: 12px; font-weight: 700; margin: 14px 0 6px; }

/* ── Tasks board ── */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.col-head { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 4px 6px 10px; display: flex; justify-content: space-between; color: var(--dim); }
.tcard { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; cursor: pointer; }
.tcard:hover { border-color: var(--blue); }
.tcard-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; line-height: 1.35; }
.tcard-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11px; color: var(--dim); }
.pill { padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; }
.prio-urgent { color: var(--red); font-weight: 800; }
.prio-high { color: var(--yellow); font-weight: 700; }
.due-late { color: var(--red); font-weight: 700; }
.wl-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); }
.wl-bar { flex: 1; height: 10px; background: var(--panel2); border-radius: 5px; overflow: hidden; }
.wl-fill { height: 100%; background: var(--blue); border-radius: 5px; }

/* ── Calendar ── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; color: var(--dim); font-size: 12px; font-weight: 800; padding: 4px 0; }
.cal-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-height: 96px; padding: 7px; cursor: pointer; overflow: hidden; }
.cal-cell:hover { border-color: var(--blue); }
.cal-cell.other { opacity: .38; }
.cal-cell.today { border-color: var(--green); }
.cal-daynum { font-size: 12px; font-weight: 800; color: var(--dim); margin-bottom: 4px; }
.cal-cell.today .cal-daynum { color: var(--green); }
.cal-ev { font-size: 11px; font-weight: 700; color: #fff; border-radius: 5px; padding: 2px 6px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-nav { display: flex; gap: 8px; align-items: center; }

/* ── Files ── */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.folder-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px 16px; text-align: center; cursor: pointer; }
.folder-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.folder-icon { font-size: 42px; margin-bottom: 8px; }
.folder-name { font-weight: 800; font-size: 15px; }
.folder-count { color: var(--dim); font-size: 12px; margin-top: 3px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.fcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fcard:hover { border-color: var(--blue); }
.fcard-thumb { height: 130px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--line); overflow: hidden; }
.fcard-thumb img { width: 100%; height: 100%; object-fit: contain; }
.fcard-body { padding: 10px 12px; }
.fcard-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard-meta { font-size: 11px; color: var(--dim); margin: 3px 0 8px; }

/* ── People ── */
.person-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.person-name { font-weight: 700; }
.person-user { color: var(--dim); font-size: 13px; }
.role-tag { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.pending-box { background: #d2992215; border: 1px solid #d2992250; border-radius: 12px; padding: 6px 14px; margin-bottom: 18px; }

/* ── Drawers, modals, toasts ── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300; display: none; }
.drawer-overlay.open { display: block; }
.drawer { position: absolute; right: 0; top: 0; bottom: 0; width: min(400px, 92vw); background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.drawer-head { padding: 18px 20px; font-size: 17px; font-weight: 800; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px; }
.notif-item { padding: 13px 14px; border-radius: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; margin-bottom: 4px; }
.notif-item:hover { background: var(--panel2); }
.notif-item.unread { background: #1f6feb1c; }
.notif-time { color: var(--dim); font-size: 11px; margin-top: 3px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 400; display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: min(620px, 96vw); padding: 26px; }
.modal h2 { font-size: 19px; margin-bottom: 18px; }
.modal label { display: block; font-size: 13px; font-weight: 700; color: var(--dim); margin: 14px 0 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

#toast-holder { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2d333b; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px 22px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: pop .18s ease; }
.toast.ok { border-color: var(--green); }
.toast.err { border-color: var(--red); }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } }

.empty { text-align: center; color: var(--dim); padding: 50px 20px; font-size: 15px; }
.empty .big { font-size: 44px; margin-bottom: 10px; }

/* ── Announcement banner ── */
.announce {
  display: flex; align-items: center; gap: 12px; padding: 14px 22px;
  font-size: 16px; font-weight: 700; line-height: 1.35; flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.announce span { flex: 1; }
.announce .x-btn { color: inherit; opacity: .7; }
.ann-info   { background: #1f6feb26; color: #9ecbff; border-bottom-color: #1f6feb55; }
.ann-good   { background: #3fb95026; color: #7ee787; border-bottom-color: #3fb95055; }
.ann-warn   { background: #d2992226; color: #f2cc60; border-bottom-color: #d2992255; }
.ann-urgent { background: #f8514926; color: #ff9492; border-bottom-color: #f8514955; }

/* ── Admin cards ── */
.admin-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; max-width: 720px; }
.admin-card h3 { font-size: 16px; margin-bottom: 4px; }
.admin-help { color: var(--dim); font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.admin-card label { display: block; font-size: 13px; font-weight: 700; color: var(--dim); margin: 12px 0 6px; }

/* ── Channel privacy picker ── */
.priv-toggle { display: flex; flex-direction: column; gap: 8px; }
.priv-opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--text);
}
.priv-opt:hover { border-color: var(--blue); }
.priv-opt input { width: auto; margin-top: 3px; flex-shrink: 0; }
.priv-opt small { color: var(--dim); font-size: 12px; }
.priv-opt:has(input:checked) { border-color: var(--blue); background: #1f6feb18; }

.member-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.member-row:hover { background: var(--panel2); }
.member-row input { width: auto; flex-shrink: 0; }
.member-row:has(input:checked) { background: #1f6feb1f; }

/* ── Tabs ── */
.tabbar { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; flex-shrink: 0; -webkit-overflow-scrolling: touch; }
.tab {
  background: none; border: none; color: var(--dim); font-size: 14px; font-weight: 700;
  padding: 12px 14px; border-bottom: 3px solid transparent; white-space: nowrap; border-radius: 0;
}
.tab:hover { color: var(--text); }
.tab.active { color: #79b8ff; border-bottom-color: var(--blue); }

.person-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.col-empty { color: var(--dim); font-size: 12px; text-align: center; padding: 14px 0; }

.due-group { margin-bottom: 22px; }
.due-head { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.due-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px;
}
.due-row:hover { border-color: var(--blue); }
.due-date { font-size: 13px; font-weight: 800; color: var(--dim); width: 56px; flex-shrink: 0; text-align: center; }
.due-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.wl-name { width: 150px; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-nums { font-size: 12px; color: var(--dim); width: 180px; text-align: right; flex-shrink: 0; }

.cat-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cat-row input[type="color"] { width: 46px; height: 42px; padding: 3px; flex-shrink: 0; cursor: pointer; }

.cal-legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 24px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.legend-label { font-weight: 700; text-transform: uppercase; letter-spacing: .6px; margin-right: 2px; }
.legend-item {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 6px 12px; color: var(--text); cursor: pointer; user-select: none;
}
.legend-item:hover { border-color: var(--blue); }
.legend-item i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; box-sizing: border-box; flex-shrink: 0; }
.legend-item.off { opacity: .55; color: var(--dim); text-decoration: line-through; }

/* ══════════ MOBILE / TABLET ══════════
   Phones get: bottom tab bar instead of a side rail, stacked columns,
   full-width modals, and 16px inputs (stops iOS auto-zoom). */
@media (max-width: 1100px) {
  .board { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 68px; }
  .side-logo span, .side-link span { display: none; }
  .side-logo { text-align: center; font-size: 22px; padding: 6px 0 14px; }
  .side-link { justify-content: center; font-size: 20px; padding: 14px 0; }
  .side-badge { right: 8px; top: 6px; }
  .side-me { justify-content: center; }
  .side-me div { display: none; }
  .subbar { width: 180px; }
  .content-head, .content-body, .tabbar, .cal-legend { padding-left: 14px; padding-right: 14px; }
  .wl-nums { width: auto; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  input, textarea, select { font-size: 16px; }     /* prevents iOS zoom-on-focus */

  /* Sidebar becomes a bottom tab bar */
  #app { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; flex-direction: row; order: 2; padding: 0;
    border-right: none; border-top: 1px solid var(--line);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .side-logo, .side-spacer { display: none; }
  .side-link { flex: 1; flex-direction: column; gap: 2px; font-size: 21px; padding: 9px 0 7px; margin: 0; border-radius: 0; }
  .side-link span { display: block !important; font-size: 10px; font-weight: 700; }
  .side-link.active { background: transparent; border-top: 3px solid var(--blue); padding-top: 6px; }
  .side-badge { right: 50%; margin-right: -22px; top: 3px; min-width: 17px; height: 17px; font-size: 10px; }
  .side-me { flex: 0 0 54px; border: none; padding: 8px 0; }
  main { order: 1; flex: 1; padding-bottom: 62px; overflow: hidden; }

  /* Sub-lists (channels / DMs) become a horizontal strip */
  .view { flex-direction: column; }
  .subbar {
    width: 100%; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
    border-right: none; border-bottom: 1px solid var(--line); flex-shrink: 0; -webkit-overflow-scrolling: touch;
  }
  .subbar h3 { display: none; }
  .sub-item { white-space: nowrap; margin: 0; padding: 8px 14px; background: var(--panel2); border-radius: 20px; font-size: 14px; }

  /* One column everywhere */
  .board, .person-cols, .folder-grid, .file-grid { grid-template-columns: 1fr; }
  .content-head { padding: 12px 14px; gap: 8px; }
  .content-head h2 { font-size: 17px; width: 100%; }
  .content-head .sub { font-size: 12px; }
  .content-body { padding: 14px; }

  /* Chat sizing */
  .chat-msgs { padding: 12px; }
  .msg-file img { max-width: 100%; }
  .composer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .attach-btn, .send-btn { width: 46px; height: 46px; }
  .send-btn { width: 56px; }

  /* Calendar: compact cells, still tappable */
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 62px; padding: 4px; border-radius: 7px; }
  .cal-daynum { font-size: 11px; }
  .cal-ev { font-size: 9px; padding: 1px 4px; }
  .cal-legend { gap: 10px; font-size: 11px; padding: 8px 14px; }

  /* Modals go near-fullscreen */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .modal-actions { position: sticky; bottom: 0; background: var(--panel); padding-top: 12px; }
  .modal-actions .btn { flex: 1; justify-content: center; padding: 13px; }

  .drawer { width: 100%; }
  .login-card { padding: 32px 22px; width: 100%; }

  /* People rows stack cleanly */
  .person-row { gap: 8px; padding: 12px 4px; }
  .person-row .btn { padding: 8px 12px; }
  .wl-name { width: 110px; }
  .wl-nums { font-size: 11px; }
  .due-row { padding: 12px; gap: 10px; }
  .tabbar { padding: 0 8px; }
  .tab { padding: 12px 11px; font-size: 13px; }
}

/* Anything tappable gets a comfortable target on touch devices */
@media (hover: none) {
  .btn, .tab, .sub-item, .side-link, .tcard, .due-row, .folder-card { min-height: 42px; }
  .rec-card:hover, .tcard:hover, .due-row:hover { transform: none; }
}

/* Role checkboxes + folder edit affordance */
.role-picks { display: flex; flex-wrap: wrap; gap: 6px; max-width: 340px; }
.role-pick { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 5px 11px; cursor: pointer; }
.role-pick input { width: auto; }
.role-pick:has(input:checked) { border-color: var(--blue); background: #1f6feb22; }
.folder-card { position: relative; }
.folder-edit { position: absolute; top: 6px; right: 8px; font-size: 14px; }
.role-tag + .role-tag { margin-left: 3px; }

/* ── Notes (Google-Keep style, private per person) ── */
.notes-head { font-size: 12px; font-weight: 800; color: var(--dim); text-transform: uppercase;
  letter-spacing: 1px; margin: 4px 0 10px; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px; align-items: start; margin-bottom: 26px; }
.note-card { position: relative; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .15s; overflow: hidden; }
.note-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.note-title { font-size: 15px; font-weight: 800; margin-bottom: 3px; padding-right: 26px; word-break: break-word; }
.note-date { font-size: 11px; color: var(--dim); margin-bottom: 8px; }
.note-body { font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
  max-height: 220px; overflow: hidden; }
.note-pin { position: absolute; top: 8px; right: 8px; background: none; border: none;
  font-size: 15px; opacity: .3; filter: grayscale(1); }
.note-pin:hover { opacity: .8; }
.note-pin.on { opacity: 1; filter: none; }
.note-datestamp { font-size: 12px; color: var(--dim); font-weight: 700; margin-bottom: 8px; }
.note-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.note-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.note-swatch:hover { border-color: var(--dim); }
.note-swatch.sel { border-color: var(--blue); box-shadow: 0 0 0 2px #4493f855; }
@media (max-width: 700px) { .notes-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* ── Message edit/delete, My Board, history ── */
.msg { position: relative; }
.msg-actions { position: absolute; top: 4px; right: 8px; display: none; gap: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 2px 4px; }
.msg:hover .msg-actions { display: flex; }
.msg-actions .x-btn { font-size: 14px; padding: 2px 5px; }
.msg-edited { font-size: 10px; color: var(--dim); font-style: italic; }
.msg-deleted { font-size: 13px; color: var(--dim); font-style: italic; }
.msg-edit-box { width: 100%; resize: vertical; font-size: 14px; }
.msg-edit-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }

.my-section { margin-bottom: 26px; }
.my-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.my-row:hover { border-color: var(--blue); }

.hist-row { display: flex; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.hist-detail { font-size: 12px; color: var(--dim); font-family: ui-monospace, monospace;
  word-break: break-word; margin-top: 2px; }
@media (max-width: 700px) {
  .msg-actions { display: flex; position: static; margin-top: 4px; }
  .my-row { flex-wrap: wrap; }
}

/* ── At-a-glance tiles ── */
.glance-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 10px; margin-bottom: 24px; }
.glance { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center; }
.glance-n { font-size: 26px; font-weight: 800; line-height: 1; }
.glance-l { font-size: 11px; color: var(--dim); margin-top: 5px; text-transform: uppercase; letter-spacing: .5px; }
.glance.zero { opacity: .45; }
.glance.g-blue   { border-color: #1f6feb66; } .glance.g-blue .glance-n   { color: var(--blue); }
.glance.g-yellow { border-color: #d2992266; } .glance.g-yellow .glance-n { color: var(--yellow); }
.glance.g-red    { border-color: #f8514966; } .glance.g-red .glance-n    { color: var(--red); }
.glance.g-red.zero, .glance.g-yellow.zero { border-color: var(--line); }
.glance.g-red.zero .glance-n, .glance.g-yellow.zero .glance-n { color: var(--text); }

/* ── My stack (drag to reorder) ── */
#my-stack { display: flex; flex-direction: column; gap: 8px; }
.stack-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; transition: border-color .12s, opacity .12s; }
.stack-row:hover { border-color: var(--blue); }
.stack-row.dragging { opacity: .45; border-style: dashed; }
.stack-row.in_progress { border-left: 4px solid var(--blue); }
.stack-row.review { border-left: 4px solid var(--purple); }
.stack-grip { cursor: grab; color: var(--dim); font-size: 17px; user-select: none; }
.stack-grip:active { cursor: grabbing; }
.stack-num { width: 24px; height: 24px; border-radius: 50%; background: var(--panel2); color: var(--dim);
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stack-main { flex: 1; min-width: 0; cursor: pointer; }
.stack-arrows { display: flex; flex-direction: column; gap: 1px; }
.stack-arrows .x-btn { font-size: 10px; padding: 1px 5px; line-height: 1.1; }
.stack-arrows .x-btn[disabled] { opacity: .2; cursor: default; }
.stack-hint { font-size: 12px; color: var(--dim); margin-top: 8px; }
.due-today { color: var(--yellow); font-weight: 800; }

/* ── Workload cards ── */
.wl-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--dim); margin-bottom: 14px; }
.wl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.wl-card { background: var(--panel); border: 1px solid var(--line); border-left-width: 5px; border-radius: 12px; padding: 14px 16px; }
.wl-card.load-ok   { border-left-color: var(--green); }
.wl-card.load-mid  { border-left-color: var(--blue); }
.wl-card.load-high { border-left-color: var(--yellow); }
.wl-card.load-over { border-left-color: var(--red); }
.wl-top { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.wl-cname { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-now { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-big { font-size: 30px; font-weight: 800; line-height: 1; }
.wl-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.wl-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--panel2); color: var(--dim); }
.wl-chip.c-blue { background: #1f6feb26; color: #79b8ff; }
.wl-chip.c-red { background: #f8514926; color: #ff9492; }
.wl-chip.c-yellow { background: #d2992226; color: #f2cc60; }
.wl-chip.c-green { background: #3fb95026; color: #7ee787; }
.wl-chip.c-purple { background: #a371f726; color: #d2a8ff; }
.wl-next { font-size: 12px; color: var(--dim); margin-top: 8px; }

.pref-row { display: flex; align-items: flex-start; gap: 11px; padding: 14px; margin-bottom: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--text); }
.pref-row input { width: auto; margin-top: 3px; flex-shrink: 0; }
.pref-row small { color: var(--dim); font-size: 12.5px; line-height: 1.45; }
.pref-row:has(input:checked) { border-color: var(--blue); background: #1f6feb14; }

@media (max-width: 700px) {
  .glance-row { grid-template-columns: repeat(3, 1fr); }
  .stack-row { flex-wrap: wrap; }
  .stack-main { flex-basis: 100%; order: -1; }
  .wl-cards { grid-template-columns: 1fr; }
}

/* ── Voice rooms ── */
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.voice-room { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.voice-room.in { border-color: var(--green); box-shadow: 0 0 0 1px #3fb95055; }
.voice-room-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.voice-name { font-size: 16px; font-weight: 800; }
.voice-count { font-size: 12px; color: var(--dim); }
.voice-people { display: flex; flex-wrap: wrap; gap: 12px; min-height: 74px; margin-bottom: 12px; align-content: flex-start; }
.voice-person { width: 62px; text-align: center; position: relative; }
.voice-person .avatar { border: 3px solid transparent; transition: border-color .12s, box-shadow .12s; }
.voice-person.talking .avatar { border-color: var(--green); box-shadow: 0 0 12px #3fb95088; }
.voice-person.muted .avatar { opacity: .55; }
.voice-pname { font-size: 11px; color: var(--dim); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-mic { position: absolute; top: 26px; right: 6px; font-size: 12px; }
.voice-empty { color: var(--dim); font-size: 13px; align-self: center; }

.talk-panel { margin-top: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.talk-modes { display: inline-flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.talk-btn { width: 100%; max-width: 460px; padding: 24px; font-size: 19px; font-weight: 800; letter-spacing: .5px;
  border: 3px solid var(--line); border-radius: 16px; background: var(--panel2); color: var(--text);
  user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.talk-btn:hover { border-color: var(--blue); }
.talk-btn.live { background: #f8514922; border-color: var(--red); color: #ff9492; animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 #f8514966; } 50% { box-shadow: 0 0 0 12px #f8514900; } }
.talk-hint { font-size: 13px; color: var(--dim); margin-top: 12px; line-height: 1.5; }
.side-badge.voice-badge { background: var(--green); }
@media (max-width: 700px) { .voice-grid { grid-template-columns: 1fr; } .talk-btn { padding: 30px 20px; font-size: 20px; } }

/* ── Voice: in-room view ── */
.live-strip { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; font-size: 15px; margin-bottom: 18px; text-align: center; color: var(--dim); }
.live-strip.on { background: #3fb95018; border-color: #3fb95066; color: #7ee787; font-weight: 700; }
.voice-roster { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; margin-bottom: 18px; }
.voice-roster .voice-person { width: 88px; }
.voice-status { font-size: 11px; color: var(--dim); margin-top: 2px; }
.voice-person.talking .voice-status { color: var(--green); font-weight: 700; }
.talk-btn.talking { box-shadow: 0 0 0 6px #3fb95044; }

/* Room chat */
.vchat { margin-top: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.vchat-head { padding: 12px 16px; font-size: 14px; font-weight: 800; border-bottom: 1px solid var(--line); }
.vchat-head small { font-weight: 400; color: var(--dim); }
.vchat-msgs { max-height: 260px; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.vchat-msg { font-size: 14px; line-height: 1.4; word-break: break-word; }
.vchat-time { font-size: 10px; color: var(--dim); margin-left: 6px; }
.vchat-sys { font-size: 12px; color: var(--dim); font-style: italic; text-align: center; }
.vchat-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }

/* Sticky "you are in voice" bar — visible on every page */
#voice-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #1c2129; border-top: 2px solid var(--green); font-size: 14px; }
#voice-bar.live { border-top-color: var(--red); background: #2a1b1c; }
.vb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0;
  animation: vbpulse 1.6s infinite; }
#voice-bar.live .vb-dot { background: var(--red); }
@keyframes vbpulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.vb-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-state { color: var(--dim); margin-left: 6px; }
.vb-btn { background: transparent; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 13px; font-size: 13px; font-weight: 700; }
.vb-btn:hover { border-color: var(--blue); color: var(--blue); }
.vb-leave:hover { border-color: var(--red); color: var(--red); }
body.has-voice-bar .composer { padding-bottom: 60px; }
@media (max-width: 700px) {
  #voice-bar { bottom: 62px; }              /* sit above the mobile tab bar */
  .voice-roster { gap: 12px; padding: 16px 10px; }
  .voice-roster .voice-person { width: 74px; }
  .vb-text { font-size: 13px; }
  .vb-btn { padding: 8px 11px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE INPUT FIX (2026-07-29)
   The composer / room-chat box was ending up under the bottom tab bar (and
   under the on-screen keyboard). Fixes: dynamic viewport height so browser
   chrome is accounted for, and explicit clearance for the tab bar + voice bar.
   ══════════════════════════════════════════════════════════════════════════ */
:root { --tabbar-h: 60px; --voicebar-h: 0px; }
body.has-voice-bar { --voicebar-h: 52px; }

@media (max-width: 700px) {
  html, body { height: 100%; overflow: hidden; }
  #app { height: 100dvh; max-height: 100dvh; }

  /* main no longer uses padding (which squeezed the flex children);
     instead it is sized to leave room for the bars. */
  main {
    padding-bottom: 0;
    height: calc(100dvh - var(--tabbar-h) - var(--voicebar-h));
    max-height: calc(100dvh - var(--tabbar-h) - var(--voicebar-h));
    min-height: 0;
  }
  .view, .content { min-height: 0; }

  /* The message box sits directly above the tab bar, always reachable. */
  .composer {
    flex-shrink: 0;
    padding: 8px 10px 10px;
    background: var(--panel);
    position: sticky; bottom: 0; z-index: 5;
  }
  .chat-msgs { min-height: 0; }
  body.has-voice-bar .composer { padding-bottom: 10px; }   /* bar is outside main now */

  /* Voice room chat box gets the same treatment */
  .vchat-msgs { max-height: 30vh; }
  .vchat-row { position: sticky; bottom: 0; background: var(--panel); }

  /* Keyboard open: keep the focused field in view */
  .composer textarea:focus, .vchat-row input:focus { scroll-margin-bottom: 120px; }
}

/* Very short screens (landscape phone) — give the message list room */
@media (max-width: 900px) and (max-height: 480px) {
  .chat-msgs { padding: 8px 12px; }
  .composer { padding: 6px 10px; }
  .composer textarea { min-height: 40px; }
}

/* ── Status colours on task cards ── */
.st-pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px;
  font-weight: 700; border: 1px solid transparent; }

/* ── Personal to-do list ── */
.mytask { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel);
  border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; margin-bottom: 8px; }
.mytask.st-open        { border-left-color: #8b949e; }
.mytask.st-in_progress { border-left-color: #4493f8; }
.mytask.st-review      { border-left-color: #d29922; }
.mytask.st-done        { border-left-color: #3fb950; opacity: .7; }
.mytask.dragging { opacity: .45; border-style: dashed; }
.mytask-main { flex: 1; min-width: 0; cursor: pointer; }
.mytask-title { font-size: 15px; font-weight: 600; }
.mytask-title.done { text-decoration: line-through; color: var(--dim); }
.mycheck { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line);
  background: transparent; color: #fff; font-size: 14px; font-weight: 800; flex-shrink: 0; }
.mycheck:hover { border-color: var(--green); }
.mycheck.on { background: var(--green); border-color: var(--green); }
.mystatus { width: auto; font-size: 12px; padding: 6px 8px; flex-shrink: 0; }
@media (max-width: 700px) {
  .mytask { flex-wrap: wrap; }
  .mytask-main { flex-basis: calc(100% - 90px); }
  .mystatus { width: 100%; margin-top: 6px; }
}
.mytask.st-paused { border-left-color: #f85149; }

/* ── Push / settings ── */
.push-status { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); }
.push-status.ok   { background: #3fb95018; border-color: #3fb95055; }
.push-status.warn { background: #d2992218; border-color: #d2992255; }
.push-status.bad  { background: #f8514918; border-color: #f8514955; }
.ps-title { font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.ps-sub { font-size: 13px; color: var(--dim); line-height: 1.45; }
.ps-note { margin-top: 12px; font-size: 13px; color: var(--yellow); }
.help-steps { margin-top: 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; font-size: 13.5px; line-height: 1.6; }
.help-steps b { display: block; margin-top: 10px; color: var(--text); }
.help-steps b:first-child { margin-top: 0; }
.help-steps ol { margin: 6px 0 0 20px; color: var(--dim); }
.help-steps li { margin-bottom: 4px; }
.dev-row { display: flex; gap: 8px; align-items: center; padding: 9px 12px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; font-size: 14px; }

/* Task due-date chips inside calendar cells + day-detail rows */
.cal-ev.cal-due { color: #fff; font-weight: 800; }
.due-modal-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; }
.due-modal-row:hover { border-color: var(--blue); }

/* Handoff record — shown inline in the request's comment thread */
.handoff-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  margin: 6px 0; background: #a371f712; border: 1px solid #a371f755; border-radius: 10px; }
.handoff-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.handoff-line { font-size: 13px; color: var(--text); }
.handoff-note { font-size: 13px; color: var(--dim); margin-top: 3px; white-space: pre-wrap; }

/* ══════════════════════════════════════════════════════════════════════════
   MODAL RELIABILITY (2026-07-29)
   People reported not being able to click "Add to Calendar" — on a tall form
   (e.g. the event modal with a long people list) the action buttons fell below
   the fold and the inner scroll box hid the fact you had to scroll.
   Fix: the modal is a fixed-height scroll container and the action bar is
   PINNED to its bottom on every screen size, so Save is always reachable.
   ══════════════════════════════════════════════════════════════════════════ */
.modal {
  position: relative;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  padding-bottom: 0;          /* the sticky action bar supplies the bottom space */
  overscroll-behavior: contain;
}
.modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: var(--panel);
  border-top: 1px solid var(--line);
  margin: 20px -26px 0;       /* span the modal's horizontal padding */
  padding: 14px 26px calc(14px + env(safe-area-inset-bottom));
  gap: 10px;
  flex-wrap: wrap;
}
.modal-actions .btn { min-height: 46px; font-size: 15px; }
/* The primary (green) action is the biggest target and never wraps small */
.modal-actions .btn-green { flex: 1 1 auto; min-width: 150px; justify-content: center; }

/* Inner scroll boxes must not swallow the page scroll */
.member-list, .notes-grid, .vchat-msgs { overscroll-behavior: contain; }

/* Always-there close ✕ in the corner */
.modal-x {
  position: absolute; top: 10px; right: 12px; z-index: 4;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--panel2); border: 1px solid var(--line);
  color: var(--dim); font-size: 17px; line-height: 1; cursor: pointer;
}
.modal-x:hover { border-color: var(--red); color: var(--red); }
.modal h2 { padding-right: 46px; }   /* keep the title clear of the ✕ */

/* Wiggle when someone clicks outside a form with unsaved typing */
@keyframes modalshake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}
#modal-box.shake { animation: modalshake .3s ease; }

@media (max-width: 700px) {
  .modal { max-height: 92dvh; padding: 20px 16px 0; }
  .modal-actions { margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .modal-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 50px; }
  .member-list { max-height: 34vh; }
}

/* Inline problem banner inside a popup + the field that needs attention */
.modal-warn { background: #f8514926; border: 1px solid #f85149; color: #ff9492;
  border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; font-weight: 700; }
.field-bad { border-color: #f85149 !important; box-shadow: 0 0 0 3px #f8514933 !important; }

/* Flash the button bar when someone clicks outside the popup */
@keyframes barflash {
  0%,100% { background: var(--panel); }
  35% { background: #1f6feb44; }
}
.modal-actions.flash { animation: barflash .7s ease 2; }
/* The popup's button bar must sit above the floating voice bar */
.modal-overlay { z-index: 500; }
#voice-bar { z-index: 380; }

/* Collapsible section header inside popups (keeps forms short) */
.collapse-btn { width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 600; text-align: left; }
.collapse-btn:hover { border-color: var(--blue); }

/* ══════════════════════════════════════════════════════════════════════════
   REQUESTS — refined visual system (2026-07-30)
   Principles: colour is earned, not sprayed. Typography does the work.
   Priority   → thin left rail + a small tag (only Urgent/High get a tag)
   Status     → dot + word, quiet
   Due date   → plain sentence, coloured only when late or due today
   ══════════════════════════════════════════════════════════════════════════ */

/* ---- Cards ---- */
.tcard {
  display: flex; gap: 0; align-items: stretch; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 10px; cursor: pointer;
  transition: border-color .13s ease, background .13s ease;
}
.tcard:hover { border-color: #4b5563; background: #171d26; }
.tcard-body { flex: 1; min-width: 0; padding: 13px 15px; }
.tcard-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.tcard-title, .due-title {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 650;
  line-height: 1.35; color: var(--text); letter-spacing: -.1px;
}
.tcard-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.tcard-foot { display: flex; align-items: center; gap: 7px; margin-top: 10px;
  padding-top: 9px; border-top: 1px solid #21262d; font-size: 12px; color: var(--dim); }
.meta-count { color: var(--dim); font-size: 12px; }
.unassigned { color: #6e7681; font-style: italic; font-size: 12px; }

/* ---- Priority rail: a 3px edge, nothing more ---- */
.prio-rail { width: 3px; flex-shrink: 0; align-self: stretch; }
.pr-critical { background: #e5534b; }
.pr-overdue  { background: #e5534b; }
.pr-urgent   { background: #e5534b; }
.pr-today    { background: #d18616; }
.pr-high     { background: #d18616; }
.pr-soon     { background: #4a7fb5; }

/* Only overdue/urgent get a whisper of background — everything else stays flat */
/* Card backgrounds are handled by the tone system below. */
.urg-done { opacity: .55; }

/* ---- Priority tag: small, uppercase, understated ---- */
.prio-tag {
  flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: .7px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 4px;
  border: 1px solid transparent; white-space: nowrap; line-height: 1.4;
}
.pt-urgent { color: #f0736c; background: #e5534b1a; border-color: #e5534b4d; }
.pt-high   { color: #d99a3f; background: #d186161a; border-color: #d186164d; }

/* ---- Status: dot + word ---- */
.st-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 550; color: #adbac7;
  padding: 0; background: none; border: none;
}
.st-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* ---- Category: outlined, not filled ---- */
.cat-tag {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 4px; white-space: nowrap;
  color: var(--cat, #768390); background: color-mix(in srgb, var(--cat, #768390) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat, #768390) 35%, transparent);
}

/* ---- Due date: words, not badges ---- */
.due-txt { font-size: 12px; font-weight: 550; }
.due-plain { color: #909dab; }
.due-muted { color: #636c76; }
.due-late  { color: #f0736c; font-weight: 650; }
.due-today { color: #d99a3f; font-weight: 650; }

/* ---- Open request: a restrained status strip ---- */
.urg-strip {
  display: flex; align-items: center; gap: 9px;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 14px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .2px;
  border: 1px solid transparent;
}
.urg-strip i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.us-critical, .us-overdue, .us-urgent { color: #f0736c; background: #e5534b14; border-color: #e5534b40; }
.us-critical i, .us-overdue i, .us-urgent i { background: #e5534b; }
.us-today, .us-high { color: #d99a3f; background: #d1861614; border-color: #d1861640; }
.us-today i, .us-high i { background: #d18616; }

/* ---- Board columns ---- */
.col { background: #12171f; border: 1px solid var(--line); border-radius: 10px; padding: 12px 11px; }
.col-head { font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: #768390; padding: 2px 4px 12px; }
.col-empty { color: #4d545c; font-size: 12px; text-align: center; padding: 16px 0; font-style: italic; }

/* ---- Rows (stack / my board / due list) ---- */
.stack-row, .my-row, .due-row {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .13s ease, background .13s ease;
}
.stack-row:hover, .my-row:hover, .due-row:hover { border-color: #4b5563; background: #171d26; }
.stack-row { border-left: none; }
.stack-row.in_progress { box-shadow: inset 3px 0 0 #4493f8; }
.stack-row.review      { box-shadow: inset 3px 0 0 #d29922; }
.stack-row.paused      { box-shadow: inset 3px 0 0 #db6d28; }
.due-head { font-size: 13px; font-weight: 700; letter-spacing: .3px; color: #adbac7;
  margin-bottom: 10px; text-transform: none; }

/* ---- Tabs: quieter ---- */
.tab { font-weight: 600; letter-spacing: .1px; }

@media (max-width: 700px) {
  .tcard-body { padding: 12px 13px; }
  .tcard-title, .due-title { font-size: 14px; }
}
.day-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ══════════════════════════════════════════════════════════════════════════
   DATE PICKER — replaces the native date input, whose picker hid behind a
   tiny icon people kept missing. Whole field is the button; calendar is big.
   ══════════════════════════════════════════════════════════════════════════ */
.datefield { width: 100%; }
.date-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; color: var(--dim); font-size: 15px; text-align: left;
  min-height: 48px;
}
.date-btn:hover { border-color: var(--blue); }
.date-btn.has-date { color: var(--text); font-weight: 600; }
.date-cal-icon { font-size: 17px; flex-shrink: 0; }
.date-btn span:nth-child(2) { flex: 1; }
.date-caret { color: var(--dim); font-size: 12px; }

.dp-overlay {
  position: fixed; inset: 0; z-index: 700; display: none;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(0,0,0,.55);
}
.dp-overlay.open { display: flex; }
.dp-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; width: min(360px, 96vw); box-shadow: 0 18px 50px rgba(0,0,0,.6);
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dp-head b { font-size: 16px; }
.dp-nav {
  width: 40px; height: 40px; border-radius: 10px; font-size: 22px; line-height: 1;
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
}
.dp-nav:hover { border-color: var(--blue); color: var(--blue); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp-dow { margin-bottom: 4px; }
.dp-dow span { text-align: center; font-size: 11px; font-weight: 800; color: var(--dim); padding: 4px 0; }
.dp-day {
  aspect-ratio: 1; border-radius: 9px; border: 1px solid transparent;
  background: var(--bg); color: var(--text); font-size: 15px; font-weight: 600;
  min-height: 40px;
}
.dp-day:hover { border-color: var(--blue); background: var(--panel2); }
.dp-day.other { opacity: .3; }
.dp-day.today { border-color: var(--green); color: var(--green); font-weight: 800; }
.dp-day.sel { background: #1f6feb; border-color: #1f6feb; color: #fff; font-weight: 800; }
.dp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.dp-quick button {
  flex: 1 1 auto; padding: 9px 12px; border-radius: 20px; font-size: 13px; font-weight: 700;
  background: var(--panel2); border: 1px solid var(--line); color: var(--text); white-space: nowrap;
}
.dp-quick button:hover { border-color: var(--blue); color: var(--blue); }
.dp-foot { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp-foot .btn { flex: 1; justify-content: center; min-height: 44px; }

@media (max-width: 700px) {
  .dp-box { width: 100%; padding: 14px; }
  .dp-day { min-height: 44px; font-size: 16px; }
  .dp-quick button { flex: 1 1 45%; }
}

/* ── Attachments on requests and comments ── */
.att-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att { position: relative; display: inline-flex; }
.att-x {
  position: absolute; top: -6px; right: -6px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; line-height: 1;
  background: #2d333b; border: 1px solid var(--line); color: var(--dim);
  font-size: 12px; cursor: pointer; padding: 0;
}
.att-x:hover { background: #cf222e; border-color: #cf222e; color: #fff; }
.att-img img {
  max-height: 120px; max-width: 190px; border-radius: 9px; display: block;
  border: 1px solid var(--line); object-fit: cover;
}
.att-img a:hover img { border-color: var(--blue); }
.att-file a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); font-size: 13px; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-file a:hover { border-color: var(--blue); }
.att-file small { color: var(--dim); font-size: 11px; }

/* Files picked but not yet posted on a comment */
.tc-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tc-pick {
  font-size: 12px; color: var(--dim); background: var(--bg);
  border: 1px solid var(--line); border-radius: 20px; padding: 4px 11px;
}
.tc-pick small { opacity: .7; margin-left: 3px; }
.tc-clear { font-size: 12px; color: var(--red); align-self: center; cursor: pointer; }

@media (max-width: 700px) {
  .att-img img { max-height: 100px; max-width: 46vw; }
  .att-file a { max-width: 70vw; }
}

/* ══════════════════════════════════════════════════════════════════════════
   CARD TONE — the background says what state a request is in, at a glance.
   One tone per card (see cardTone() in app.js); attention always wins so the
   things that are wrong are the things you notice first.
   ══════════════════════════════════════════════════════════════════════════ */
.tcard, .my-row, .stack-row, .due-row { border-left-width: 4px; border-left-style: solid; }

/* Needs attention — overdue, urgent, or due today */
.tone-attention { background: #2b1a1a !important; border-left-color: #e5534b !important; }
.tone-attention:hover { background: #351f1e !important; }

/* Being worked on right now */
.tone-active { background: #16202e !important; border-left-color: #4493f8 !important; }
.tone-active:hover { background: #1a2739 !important; }

/* Paused — deliberately stopped */
.tone-paused { background: #2a2015 !important; border-left-color: #db6d28 !important; }
.tone-paused:hover { background: #33271a !important; }

/* Nobody has picked it up */
.tone-waiting { background: #191c22 !important; border-left-color: #6e7681 !important; }
.tone-waiting:hover { background: #1e222a !important; }

/* Ordinary work, nothing pressing */
.tone-idle { background: var(--panel) !important; border-left-color: #30363d !important; }
.tone-idle:hover { background: #171d26 !important; }

/* Finished — fades back so it stops competing for attention */
.tone-done { background: #141c17 !important; border-left-color: #3fb950 !important; opacity: .6; }
.tone-done:hover { opacity: .8; }

/* Legend so nobody has to guess what the colours mean */
.tone-legend {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  padding: 9px 24px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--dim);
}
.tone-legend .tl { display: inline-flex; align-items: center; gap: 6px; }
.tone-legend i {
  width: 22px; height: 12px; border-radius: 3px; display: inline-block;
  border-left-width: 3px; border-left-style: solid; opacity: 1;
}
@media (max-width: 700px) {
  .tone-legend { padding: 8px 14px; gap: 10px; font-size: 11px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   "UP NEXT" — a compact three-day strip above the calendar, laid out like a
   weather forecast: Today / Tomorrow / the day after, with what's on.
   ══════════════════════════════════════════════════════════════════════════ */
.upnext { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.un-day {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; min-height: 104px;
}
.un-today { border-color: #4493f8; box-shadow: inset 0 2px 0 #4493f8; }
.un-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px;
  padding: 9px 12px; border-bottom: 1px solid var(--line); background: #12171f;
}
.un-name { font-size: 12.5px; font-weight: 800; letter-spacing: .3px; }
.un-today .un-name { color: #79b8ff; }
.un-date { font-size: 11px; color: var(--dim); white-space: nowrap; }
.un-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.un-item { display: flex; gap: 8px; align-items: flex-start; }
.un-item i { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.un-txt { min-width: 0; flex: 1; }
.un-title {
  font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.un-sub { font-size: 11px; color: var(--dim); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.un-empty { font-size: 11.5px; color: #4d545c; font-style: italic; margin: auto 0; }
.un-more { font-size: 11px; color: var(--dim); }

@media (max-width: 700px) {
  .upnext { gap: 6px; }
  .un-day { min-height: 88px; border-radius: 10px; }
  .un-head { padding: 7px 9px; flex-direction: column; align-items: flex-start; gap: 0; }
  .un-name { font-size: 11.5px; }
  .un-body { padding: 7px 8px; gap: 5px; }
  .un-title { font-size: 11.5px; -webkit-line-clamp: 3; }
  .un-sub { font-size: 10px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   THIS WEEK — compact synopsis under the Up Next strip. Day bars show where
   the load sits; chips break it down by category. Follows the same filters.
   ══════════════════════════════════════════════════════════════════════════ */
.wk {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 16px;
}
.wk-top { display: flex; align-items: baseline; gap: 9px; margin-bottom: 10px; flex-wrap: wrap; }
.wk-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.wk-range { font-size: 11.5px; color: var(--dim); }
.wk-total { margin-left: auto; font-size: 12px; font-weight: 700; color: #79b8ff; }

.wk-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 11px; }
.wk-bar { text-align: center; }
.wk-col {
  height: 34px; display: flex; align-items: flex-end; justify-content: center;
  background: var(--bg); border-radius: 5px; overflow: hidden; border: 1px solid #21262d;
}
.wk-fill { width: 100%; background: #2a6fc9; border-radius: 4px 4px 0 0; min-height: 0; transition: height .2s; }
.wk-now .wk-col { border-color: #4493f8; }
.wk-now .wk-fill { background: #4493f8; }
.wk-dow { font-size: 10px; font-weight: 800; color: var(--dim); margin-top: 3px; }
.wk-now .wk-dow { color: #79b8ff; }
.wk-n { font-size: 10.5px; color: var(--dim); min-height: 13px; }

.wk-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-cat {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dim);
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px;
}
.wk-cat i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wk-cat b { color: var(--text); }
.wk-note { font-size: 11.5px; color: var(--dim); margin-top: 9px; }
.wk-empty { font-size: 12.5px; color: #4d545c; font-style: italic; }

@media (max-width: 700px) {
  .wk { padding: 10px 11px; }
  .wk-col { height: 28px; }
  .wk-bars { gap: 4px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   REQUESTS ALERT BAR — overdue (red) / due soon (orange) for whatever the
   current tab is showing. Hidden when there's nothing to chase.
   ══════════════════════════════════════════════════════════════════════════ */
.alert-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 24px; border-bottom: 1px solid var(--line); background: #12171f;
}
.alert-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 20px; padding: 6px 14px; font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; color: #fff;
}
.alert-chip b { font-size: 14px; font-weight: 900; }
.ac-late { background: #cf222e; border-color: #e5534b; }
.ac-late:hover { background: #e5534b; }
.ac-soon { background: #b4620f; border-color: #db6d28; }
.ac-soon:hover { background: #db6d28; }
.ac-none { background: #30363d; border-color: #444c56; color: #c9d1d9; }
.ac-none:hover { background: #3d444d; }
.alert-tail { font-size: 12px; color: var(--dim); margin-left: auto; }
.alert-bar.ok { background: transparent; }
.alert-ok { font-size: 12px; color: #7ee787; }

/* Per-person flags on the By Person columns */
.col-flags { display: flex; gap: 5px; flex-wrap: wrap; margin: 0 0 10px; }
.flag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
  padding: 3px 9px; border-radius: 4px; white-space: nowrap;
}
.flag-late { background: #cf222e; color: #fff; }
.flag-soon { background: #b4620f; color: #fff; }

@media (max-width: 700px) {
  .alert-bar { padding: 9px 14px; gap: 6px; }
  .alert-chip { padding: 6px 11px; font-size: 12px; }
  .alert-tail { margin-left: 0; width: 100%; }
}
.sms-kind-head { font-size: 12px; font-weight: 800; color: var(--dim); text-transform: uppercase;
  letter-spacing: .6px; margin: 16px 0 8px; }
.sms-kind-head a { font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 12px; }


/* ── Emergency broadcast ────────────────────────────────────────────────────
   Deliberately the loudest thing in the app. It should never be mistaken for
   an ordinary button, and the confirm step should stop a reflex click. */
.emergency-card { border-color: #f8514966; background: linear-gradient(180deg, #f851490d, var(--panel)); }
.btn-emergency { background: #d92d20; color: #fff; border: 1px solid #b42318; font-weight: 800; }
.btn-emergency:hover:not(:disabled) { background: #b42318; }
.btn-emergency:disabled { opacity: .45; cursor: not-allowed; }
.btn-big { font-size: 17px; padding: 15px 22px; width: 100%; border-radius: 12px; }

.emerg-wrap { max-width: 640px; }
.emerg-blocked { background: #f8514915; border: 1px solid #f8514955; color: var(--text);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.emerg-box { display: flex; align-items: center; gap: 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.emerg-count { font-size: 40px; font-weight: 800; color: #d92d20; line-height: 1; min-width: 56px; text-align: center; }
.emerg-count-label { font-size: 15px; font-weight: 700; }
.emerg-names { font-size: 12.5px; color: var(--dim); margin-top: 3px; line-height: 1.5; }
.emerg-missing { background: #f7931815; border: 1px solid #f7931855; border-radius: 10px;
  padding: 11px 14px; margin-bottom: 14px; font-size: 13px; line-height: 1.5; }

.emerg-label { display: block; font-size: 15px; font-weight: 800; margin: 18px 0 8px; }
.emerg-text { width: 100%; font-size: 17px; line-height: 1.45; padding: 14px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--bg); color: var(--text); resize: vertical; }
.emerg-text:focus { outline: none; border-color: #d92d20; }
.emerg-hint { font-size: 12.5px; color: var(--dim); margin: 6px 2px 18px; }

.emerg-preview-wrap { margin-bottom: 20px; }
.emerg-preview-label { font-size: 12.5px; color: var(--dim); margin-bottom: 6px; }
.emerg-bubble { background: #2f7d32; color: #fff; border-radius: 18px 18px 18px 5px;
  padding: 12px 16px; font-size: 15.5px; line-height: 1.45; max-width: 400px; word-break: break-word; }

.emerg-confirm { border: 2px solid #d92d20; border-radius: 14px; padding: 18px; background: #d92d200d; }
.emerg-confirm-q { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.emerg-confirm-sub { font-size: 13.5px; color: var(--dim); margin-bottom: 16px; line-height: 1.5; }
.emerg-confirm-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.emerg-confirm-btns .btn { flex: 1; min-width: 150px; }

.emerg-done { border: 2px solid #2f7d32; border-radius: 14px; padding: 18px; background: #2f7d320d; }
.emerg-done-big { font-size: 19px; font-weight: 800; }
.emerg-done-fail { margin-top: 10px; font-size: 13.5px; color: #f85149; line-height: 1.5; }
.emerg-done-sub { margin-top: 6px; font-size: 13px; color: var(--dim); }

.emerg-log { margin-top: 32px; }
.emerg-log h3 { font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.emerg-log-row { border-left: 3px solid #d92d20; padding: 8px 0 8px 12px; margin-bottom: 10px; }
.emerg-log-msg { font-size: 14px; line-height: 1.45; }
.emerg-log-meta { font-size: 12px; color: var(--dim); margin-top: 3px; }

@media (max-width: 600px) {
  .emerg-count { font-size: 32px; min-width: 44px; }
  .emerg-confirm-btns .btn { min-width: 100%; }
}


/* Consent language under the texting toggle. This is what the carrier
   compliance paperwork promises the employee is shown — keep it visible. */
.sms-consent { font-size: 12px; line-height: 1.55; color: var(--dim);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; margin: 4px 0 14px; }
.sms-consent a { color: var(--dim); text-decoration: underline; }


/* ── Relay Bot messages ──────────────────────────────────────────────────────
   Automatic status updates. Made to look plainly different from a person's
   message so nobody thinks a coworker sent them a note. */
.msg-bot { align-items: flex-start; }
.msg-bot .msg-body { background: linear-gradient(180deg, #3fb95012, transparent 70%);
  border: 1px solid #3fb95040; border-left: 3px solid #3fb950;
  border-radius: 4px 10px 10px 4px; padding: 9px 13px; }
.bot-avatar { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
  background: #3fb95022; border: 1px solid #3fb95055;
  display: flex; align-items: center; justify-content: center; font-size: 17px; }
.msg-bot .msg-name { color: #3fb950; }
.bot-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .9px; color: #3fb950;
  background: #3fb95020; border: 1px solid #3fb95055; border-radius: 4px;
  padding: 1px 5px; margin-left: 6px; }
.bot-text { line-height: 1.55; }
.bot-text b { color: var(--text); }


/* ── Who asked / who's doing it ──────────────────────────────────────────────
   The two names people actually scan for. Labelled in words rather than left
   to be guessed from position, and kept on one line at a glance. */
.tcard-foot .who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.who-label { font-size: 10px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
  color: var(--dim); opacity: .8; }
.who-name { font-size: 13px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.who-arrow { color: var(--dim); opacity: .5; margin: 0 8px; font-size: 13px; }

/* Compact version for the denser list rows */
.who-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--dim); background: var(--bg); border: 1px solid var(--line);
  border-radius: 20px; padding: 2px 9px 2px 3px; white-space: nowrap; }

/* Phones: stack the pair instead of letting names get squeezed to nothing */
@media (max-width: 520px) {
  .tcard-foot { flex-wrap: wrap; row-gap: 6px; }
  .who-arrow { margin: 0 5px; }
  .who-name { max-width: 78px; }
}
