/* 团队 by level + 网站通知 (2026-11-17): team.js and notify.js, on the console (style.css tokens), /me/ (me.css tokens) and the
 * 工作台. Every colour comes from the page's own tokens, so light and dark follow the page. */
.tm, .tm-sheet, .nx-pops, .nx-switch {
  --tm-bg: var(--card, var(--surface, #fff));
  --tm-bg2: var(--card-2, var(--surface-2, #f6f7f9));
  --tm-line: var(--line-2, var(--border, #dde1e8));
  --tm-text: var(--text, #171a21);
  --tm-muted: var(--muted, var(--text-3, #626a7a));
  --tm-accent: var(--cyan, var(--accent, #2f4bd0));
  --tm-amber: var(--amber-ink, var(--warn, #935400));
  --tm-amber-bg: var(--amber-bg, var(--warn-soft, #fbefd9));
  --tm-red: var(--red-ink, var(--bad, #b42a2a));
  --tm-red-bg: var(--red-bg, var(--bad-soft, #fbe6e6));
  --tm-green: var(--green-ink, var(--ok, #17784a));
  --tm-green-bg: var(--green-bg, var(--ok-soft, #e2f4ea));
  --tm-r: 14px;
  color: var(--tm-text);
}

/* ------------------------------------------------------------------ the tree */
.tm { display: grid; gap: 12px; }
.tm-pad { padding: 8px 2px; }
.tm-quiet { color: var(--tm-muted); margin: 0; }
.tm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tm-me { display: inline-flex; align-items: center; gap: 8px; color: var(--tm-muted); }
.tm-me b { color: var(--tm-text); }
.tm-day { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.tm-day b { min-width: 3.5em; text-align: center; }
.tm-nav { border: 1px solid var(--tm-line); background: var(--tm-bg); color: var(--tm-text); border-radius: 999px; width: 30px; height: 30px; font-size: 18px; line-height: 1; cursor: pointer; }
.tm-nav:disabled { opacity: .35; cursor: default; }
.tm-tools { display: inline-flex; gap: 6px; }
.tm-link { border: 0; background: none; color: var(--tm-accent); cursor: pointer; padding: 4px 6px; font: inherit; }
.tm-line { margin: 0; color: var(--tm-muted); }
.red-t { color: var(--tm-red); }
.amber-t { color: var(--tm-amber); }

.tm-group { display: grid; gap: 8px; }
.tm-glabel { margin: 4px 0 0; color: var(--tm-muted); font-size: 13px; }
.tm-kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-left: 22px; padding-left: 16px; border-left: 2px solid var(--tm-line); }
.tm-kids.flat { margin-left: 0; padding-left: 0; border-left: 0; }
.tm-kids > .tm-card { position: relative; }
.tm-kids:not(.flat) > .tm-card::before { content: ""; position: absolute; left: -18px; top: 26px; width: 16px; border-top: 2px solid var(--tm-line); }

.tm-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "av who now" "av did did" "av bs bs"; gap: 2px 10px;
  align-items: center; text-align: left; width: 100%; padding: 10px 12px; border: 1px solid var(--tm-line); border-radius: var(--tm-r);
  background: var(--tm-bg); color: var(--tm-text); font: inherit; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.tm-card:hover { border-color: var(--tm-accent); }
.tm-card:active { transform: scale(.985); }
.tm-card:focus-visible { outline: 2px solid var(--tm-accent); outline-offset: 2px; }
.tm-card.big { grid-template-columns: 48px minmax(0, 1fr) auto; }
.tm-card.hot { border-color: var(--tm-red); box-shadow: inset 3px 0 0 var(--tm-red); }
.tm-card.warm { border-color: var(--tm-amber); box-shadow: inset 3px 0 0 var(--tm-amber); }
.tm-card .tm-av { grid-area: av; align-self: start; }
.tm-who { display: grid; min-width: 0; }
.tm-card .tm-who { grid-area: who; }
.tm-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-who small { color: var(--tm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tm-now { grid-area: now; font-size: 12px; color: var(--tm-muted); white-space: nowrap; }
.tm-now.on { color: var(--tm-green); }
.tm-did { grid-area: did; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; color: var(--tm-muted); }
.tm-did b { color: var(--tm-text); font-variant-numeric: tabular-nums; }
.tm-bs { grid-area: bs; display: flex; flex-wrap: wrap; gap: 4px; }
.tm-bs:empty { display: none; }
.tm-b { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--tm-bg2); color: var(--tm-muted); }
.tm-b.red { background: var(--tm-red-bg); color: var(--tm-red); }
.tm-b.amber { background: var(--tm-amber-bg); color: var(--tm-amber); }

.tm-av { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 600;
  background: var(--tm-bg2); color: var(--tm-text); border: 2px solid var(--tm-line); flex: none; }
.tm-av.sm { width: 26px; height: 26px; font-size: 13px; }
.tm-av.big { width: 52px; height: 52px; font-size: 22px; }
.tm-card.big .tm-av { width: 44px; height: 44px; font-size: 18px; }
.tm-av.boss { border-color: var(--tm-amber); }
.tm-av.lead { border-color: var(--tm-accent); }
.tm-av.on::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--tm-green); border: 2px solid var(--tm-bg); }

/* ------------------------------------------------------------------ one person's day */
.tm-sheet { width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--tm-line); border-radius: 18px;
  background: var(--tm-bg); color: var(--tm-text); box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.tm-sheet::backdrop { background: rgb(10 12 16 / .55); }
.tm-sheet-in { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: calc(100vh - 34px); }
.tm-sheet-top { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--tm-line); }
.tm-sheet-top h2 { margin: 0; font-size: 17px; flex: 1; }
.tm-x { border: 0; background: var(--tm-bg2); color: var(--tm-text); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.tm-sheet-body { overflow: auto; padding: 14px 16px 18px; display: grid; gap: 16px; }
.tm-p { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.tm-pname { font-size: 19px; }
.tm-p small { color: var(--tm-muted); }
.tm-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
.tm-chip { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--tm-bg2); color: var(--tm-muted); }
.tm-chip.boss { color: var(--tm-amber); background: var(--tm-amber-bg); }
.tm-chip.lead { color: var(--tm-accent); }
.tm-warn { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--tm-amber-bg); color: var(--tm-amber); }
.tm-sec { display: grid; gap: 8px; }
.tm-sec h3 { margin: 0; font-size: 15px; }
.tm-sec h3 small { font-weight: 400; color: var(--tm-muted); margin-left: 6px; }
.tm-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tm-nums span { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--tm-bg2); }
.tm-nums b { font-size: 24px; font-variant-numeric: tabular-nums; }
.tm-nums small { color: var(--tm-muted); }
.tm-list, .tm-says, .tm-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tm-task, .tm-rem { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--tm-bg2); }
.tm-task a { color: var(--tm-text); text-decoration: none; font-weight: 500; }
.tm-task a:hover { text-decoration: underline; }
.tm-task small, .tm-rem small { display: block; color: var(--tm-muted); }
.tm-rem p { margin: 0; }
.tm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tm-line); }
.red > .tm-dot { background: var(--tm-red); }
.amber > .tm-dot { background: var(--tm-amber); }
.green > .tm-dot { background: var(--tm-green); }
.tm-acts { display: inline-flex; gap: 6px; }
.tm-say { padding: 8px 12px; border-radius: 12px; background: var(--tm-bg2); max-width: 88%; }
.tm-say.mine { justify-self: end; background: var(--tm-amber-bg); }
.tm-say b { font-size: 13px; }
.tm-say p { margin: 2px 0; white-space: pre-wrap; }
.tm-say small { color: var(--tm-muted); font-size: 12px; }

.tm-form { display: grid; gap: 8px; }
.tm-form.say { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.tm-form input:not([type=radio]), .tm-form select, .tm-form textarea { width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--tm-line); background: var(--tm-bg); color: var(--tm-text); font: inherit; }
.tm-form textarea { resize: vertical; }
.tm-row { display: flex; gap: 8px; align-items: center; }
.tm-row select, .tm-row input { flex: 1; }
.tm-picks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tm-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tm-pick span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--tm-line); cursor: pointer; font-size: 13px; }
.tm-pick input:checked + span { border-color: var(--tm-accent); color: var(--tm-accent); font-weight: 600; }
.tm-pick input:focus-visible + span { outline: 2px solid var(--tm-accent); }
.tm-custom { width: auto !important; flex: 1 1 190px; }
.tm-btn { border: 1px solid var(--tm-line); background: var(--tm-bg); color: var(--tm-text); border-radius: 10px; padding: 9px 16px; font: inherit; cursor: pointer; white-space: nowrap; }
.tm-btn.primary { background: var(--tm-accent); border-color: var(--tm-accent); color: var(--on-accent, #fff); font-weight: 600; }
.tm-btn.small { padding: 4px 10px; font-size: 13px; }
.tm-btn:disabled { opacity: .5; cursor: default; }
.tm-err { margin: 0; color: var(--tm-red); font-size: 13px; }
.tm-foot { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--tm-line); padding-top: 12px; }

.tm-levels li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(120px, 170px) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--tm-bg2); }
.tm-levels select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--tm-line); background: var(--tm-bg); color: var(--tm-text); font: inherit; }
.tm-seg { display: inline-flex; flex: none; border: 1px solid var(--tm-line); border-radius: 999px; overflow: hidden; }
.tm-seg button { border: 0; background: none; color: var(--tm-muted); padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.tm-seg button.on { background: var(--tm-accent); color: var(--on-accent, #fff); }

@media (max-width: 560px) {
  .tm-kids { margin-left: 8px; padding-left: 10px; grid-template-columns: 1fr; }
  .tm-kids:not(.flat) > .tm-card::before { left: -12px; width: 10px; }
  .tm-p { grid-template-columns: auto minmax(0, 1fr); }
  .tm-p .tm-day { grid-column: 1 / -1; margin-left: 0; }
  .tm-levels li { grid-template-columns: auto minmax(0, 1fr); }
  .tm-levels .tm-seg, .tm-levels select, .tm-levels .tm-btn { grid-column: 1 / -1; }
  .tm-sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
}

/* ------------------------------------------------------------------ 网站通知 */
.nx-pops { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.nx-pop { pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 12px 12px 14px;
  border-radius: 14px; background: var(--tm-bg); color: var(--tm-text); border: 1px solid var(--tm-line); box-shadow: 0 12px 34px rgb(0 0 0 / .28);
  animation: nx-in .22s ease-out; }
.nx-pop.k-remind { border-color: var(--tm-amber); box-shadow: 0 12px 34px rgb(0 0 0 / .28), inset 4px 0 0 var(--tm-amber); }
.nx-pop.out { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.nx-pop p { margin: 0; line-height: 1.35; }
.nx-ic { font-size: 18px; }
.nx-go { color: var(--tm-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.nx-x { border: 0; background: none; color: var(--tm-muted); font-size: 18px; cursor: pointer; padding: 0 2px; }
@keyframes nx-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nx-pop { animation: none; } .tm-card { transition: none; } }

.nx-switch { display: inline-grid; gap: 1px; text-align: left; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-bg);
  color: var(--tm-text); font: inherit; cursor: pointer; max-width: 100%; }
.nx-switch b { font-size: 14px; }
.nx-switch span { font-size: 12px; color: var(--tm-muted); }
.nx-switch[data-state="on"] { border-color: var(--tm-green); }
.nx-switch[data-state="on"] b { color: var(--tm-green); }
.nx-switch[data-state="off"] { border-color: var(--tm-accent); }
.nx-switch[data-state="denied"] b, .nx-switch[data-state="iphone"] b { color: var(--tm-amber); }
.nx-switch:disabled { opacity: .6; }

/* the console: the switch under the 大厅's greeting, the line that says why a room opened after signing in */
.lb-notify { margin-top: 10px; }
.ws-land { margin: 0 0 12px; }
/* /me/: the foot of 我的 */
.me-notify { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
