/* Team screens, shared by the Life app's team tabs and the Team app. Classes start with tm-. */
.tm{flex:1;overflow:auto;padding:16px 18px 100px;max-width:760px;width:100%;margin:0 auto}
.tm-loading{color:var(--muted,#646b75);font-size:13px}
.tm-h{display:flex;flex-direction:column;gap:2px;margin:4px 0 14px}
.tm-h h2{margin:0;font-size:18px}
.tm-h span{color:var(--muted,#646b75);font-size:13px}
.tm-empty{background:#fff;border:1px dashed var(--line-2,#cdd1d7);border-radius:12px;padding:22px 18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.tm-empty b{font-size:15px}
.tm-empty p{margin:0;color:var(--muted,#646b75);font-size:13.5px;max-width:420px;line-height:1.45}
.tm-btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 16px;border-radius:8px;border:1px solid var(--line-2,#cdd1d7);background:#fff;color:var(--ink,#1d2129);font:inherit;font-size:14px;font-weight:600;cursor:pointer;text-decoration:none}
.tm-btn.pri{background:var(--base,#1466c8);border-color:var(--base,#1466c8);color:#fff}
.tm-people{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:12px;overflow:hidden}
.tm-person{display:flex;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid var(--line,#e2e4e8);min-height:56px}
.tm-person:first-child{border-top:0}
.tm-person.off{opacity:.55}
.tm-dot{width:14px;height:14px;border-radius:50%;flex:none}
.tm-col{width:30px;height:30px;padding:0;border:0;background:none;cursor:pointer;flex:none}
.tm-pm{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.tm-pm em{font-style:normal;font-size:12px;color:var(--muted,#646b75);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-name{font:inherit;font-size:15px;font-weight:600;border:1px solid transparent;border-radius:6px;padding:3px 6px;margin-left:-7px;background:transparent;color:inherit;width:100%;max-width:280px}
.tm-name:hover{border-color:var(--line,#e2e4e8)}
.tm-name:focus{border-color:var(--accent,#2d7ff9);outline:0;background:#fff}
.tm-sw{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted,#646b75);flex:none}
.tm-note{font-size:12.5px;color:var(--muted,#646b75);margin:12px 2px}
.tm-sw2{display:inline-flex;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;overflow:hidden;margin-bottom:14px;background:#fff}
.tm-sw2 button{border:0;background:none;font:inherit;font-size:13px;padding:6px 14px;cursor:pointer;color:var(--ink,#1d2129)}
.tm-sw2 button.on{background:var(--accent-soft,#e7f0ff);color:#0e52a6;font-weight:600}
.tm-back{border:0;background:none;color:var(--base-2,#0e52a6);font:inherit;font-size:15px;font-weight:600;padding:6px 0 10px;cursor:pointer}
.tm-exp{margin-top:18px;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:12px;padding:12px 14px;font-size:13.5px}
.tm-exp p{margin:4px 0 0;color:var(--muted,#646b75);line-height:1.45}
.tm-exp.bad{border-color:#e8b4a8;background:#fff6f3}
.tm-exp.bad p{color:#8a2d16}

/* Threads (Stage 3, team-threads.js). Classes start with th-. Calm and plain on purpose. */
.th-root{flex:1;min-height:0;display:flex;background:#fff;color:var(--ink,#1d2129);font-size:14px;line-height:1.45}
.th-root button{font:inherit;color:inherit}
.th-left{width:230px;flex:none;border-right:1px solid var(--line,#e2e4e8);overflow:auto;padding:10px 8px 14px;background:#fafbfc;display:flex;flex-direction:column;gap:1px}
.th-left h4,.th-pane h4{margin:14px 8px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#646b75);font-weight:600}
.th-mid{width:380px;flex:none;border-right:1px solid var(--line,#e2e4e8);display:flex;flex-direction:column;min-height:0}
.th-right{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}
.th-ch{display:flex;align-items:center;gap:8px;width:100%;border:0;background:none;text-align:left;padding:6px 8px;border-radius:6px;cursor:pointer;min-height:32px}
.th-ch:hover{background:var(--hover,#f2f4f7)}
.th-ch.on{background:var(--accent-soft,#e7f0ff);color:#0e52a6;font-weight:600}
.th-hash{width:16px;flex:none;display:inline-grid;place-items:center;color:var(--muted,#646b75);font-size:13px}
.th-ch.on .th-hash{color:inherit}
.th-cn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-n{background:var(--base,#1466c8);color:#fff;border-radius:999px;font-size:11px;min-width:20px;height:20px;padding:0 6px;display:inline-grid;place-items:center;font-weight:700}
.th-add{color:var(--muted,#646b75)}
.th-hint{margin:2px 8px 6px;font-size:12px;color:var(--muted,#646b75)}
.th-nc{display:flex;flex-direction:column;gap:6px;padding:6px 8px;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:8px;margin:4px 0}
.th-nc span{display:flex;gap:6px}
.th-nc input,.th-nc select,.th-search input,.th-ren input,.th-cf select,.th-cf input,.th-cf textarea,.th-reply textarea,.th-edit textarea{font:inherit;border:1px solid var(--line-2,#cdd1d7);border-radius:7px;padding:7px 9px;background:#fff;color:inherit;min-width:0}
.th-root input:focus,.th-root textarea:focus,.th-root select:focus{outline:0;border-color:var(--accent,#2d7ff9);box-shadow:0 0 0 3px rgba(45,127,249,.15)}
.th-arch summary{cursor:pointer;color:var(--muted,#646b75);font-size:12.5px;padding:8px}
.th-foot{margin-top:auto;padding-top:12px;border-top:1px solid var(--line,#e2e4e8)}
.th-search{padding:2px 0 6px}
.th-search input{width:100%}
.th-mh{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line,#e2e4e8);min-height:52px;flex-wrap:wrap}
.th-mh h3{margin:0;font-size:16px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-mh .th-ren{flex-basis:100%}
.th-list{flex:1;min-height:0;overflow:auto}
.th-row{display:flex;flex-direction:column;gap:2px;width:100%;border:0;border-bottom:1px solid var(--line,#e2e4e8);background:#fff;text-align:left;padding:10px 14px;cursor:pointer}
.th-row:hover{background:#fafbfc}
.th-row.on{background:var(--accent-soft,#e7f0ff)}
.th-rt{display:flex;gap:10px;align-items:baseline}
.th-rt b{flex:1;min-width:0;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-row.unread .th-rt b{font-weight:700}
.th-row.unread .th-rt b::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--base,#1466c8);margin-right:6px;vertical-align:middle}
.th-rt time{font-size:12px;color:var(--muted,#646b75);flex:none}
.th-rl{color:#3d434c;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-rm{color:var(--muted,#646b75);font-size:12px}
.th-empty,.th-blank{padding:28px 20px;text-align:center;color:var(--muted,#646b75);display:flex;flex-direction:column;align-items:center;gap:8px}
.th-empty b,.th-blank b{color:var(--ink,#1d2129);font-size:15px}
.th-empty p,.th-blank p{margin:0;max-width:360px}
.th-blank{margin:auto}
.th-wait{color:var(--muted,#646b75);padding:16px}
.th-off{margin:8px;padding:7px 10px;border-radius:7px;background:#fff7e0;color:#6b4e00;font-size:12.5px}
.th-th{display:flex;align-items:flex-start;gap:10px;padding:12px 18px;border-bottom:1px solid var(--line,#e2e4e8);flex-wrap:wrap}
.th-tt{flex:1;min-width:220px}
.th-tt h2{margin:0;font-size:18px;line-height:1.3}
.th-tt p{margin:3px 0 0;color:var(--muted,#646b75);font-size:13px}
.th-lnk{border:0;background:none;padding:0;color:var(--base-2,#0e52a6) !important;cursor:pointer;font-weight:600}
.th-ta{display:flex;gap:6px;align-items:center}
.th-done{gap:6px}
.th-ib{border:1px solid var(--line-2,#cdd1d7);background:#fff;border-radius:8px;min-width:36px;height:36px;display:inline-grid;place-items:center;cursor:pointer;padding:0 8px;font-size:13px;font-weight:600}
.th-ib.pri{background:var(--base,#1466c8);border-color:var(--base,#1466c8);color:#fff !important}
.th-ib.warn,.th-own .warn{color:#b3261e !important;border-color:#e8b4a8}
.th-ren{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.th-ren input{flex:1;min-width:160px;font-size:15px}
.th-msgs{flex:1;min-height:0;overflow:auto;padding:6px 18px 12px}
.th-c{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid #f0f1f3}
.th-c:last-child{border-bottom:0}
.th-av{width:30px;height:30px;border-radius:50%;flex:none;color:#fff;font-style:normal;font-weight:700;font-size:13px;display:inline-grid;place-items:center}
.th-cb{flex:1;min-width:0}
.th-ch2{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.th-ch2 time,.th-ch2 em{font-size:12px;color:var(--muted,#646b75);font-style:normal}
.th-own{margin-left:auto;display:flex;gap:2px}
.th-own button{border:0;background:none;color:var(--muted,#646b75);font-size:12px;padding:2px 6px;cursor:pointer;border-radius:5px}
.th-own button:hover{background:var(--hover,#f2f4f7);color:var(--ink,#1d2129)}
.th-tx{margin-top:3px;white-space:normal;overflow-wrap:anywhere}
.th-tx a{color:var(--base-2,#0e52a6)}
.th-at{color:var(--base-2,#0e52a6);font-weight:600}
.th-sys{color:var(--muted,#646b75);font-size:12.5px;margin:8px 0 8px 40px}
.th-imgs{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.th-img{display:block;width:120px;height:120px;border-radius:8px;overflow:hidden;background:#eef0f3;border:1px solid var(--line,#e2e4e8)}
.th-img img{width:100%;height:100%;object-fit:cover;display:block}
.th-file{display:inline-flex;align-items:center;gap:6px;margin:6px 6px 0 0;padding:6px 10px;border:1px solid var(--line,#e2e4e8);border-radius:8px;color:inherit;text-decoration:none;max-width:100%}
.th-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-file em{font-style:normal;color:var(--muted,#646b75);font-size:12px;flex:none}
.th-edit{display:flex;flex-direction:column;gap:6px}
.th-edit span{display:flex;gap:6px}
.th-reply{flex:none;border-top:1px solid var(--line,#e2e4e8);padding:10px 18px 12px;display:flex;flex-direction:column;gap:8px;background:#fafbfc}
.th-reply textarea,.th-cf textarea{resize:none;width:100%;line-height:1.45}
.th-rb{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.th-tool{display:inline-flex;align-items:center;gap:5px;border:1px solid transparent;background:none;border-radius:7px;padding:6px 8px;cursor:pointer;color:var(--muted,#646b75) !important;font-size:13px;min-height:36px;max-width:100%}
.th-tool span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-tool:hover{background:var(--hover,#f2f4f7)}
.th-send{margin-left:auto}
.th-sp{flex:1}
.th-warn{margin:0;padding:7px 10px;border-radius:7px;background:#fff6f3;color:#8a2d16;font-size:13px}
.th-pend{display:flex;flex-wrap:wrap;gap:6px}
.th-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line,#e2e4e8);background:#fff;border-radius:8px;padding:4px 4px 4px 8px;font-size:12.5px;max-width:100%}
.th-chip img{width:28px;height:28px;object-fit:cover;border-radius:4px}
.th-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}
.th-chip em{font-style:normal;color:var(--muted,#646b75)}
.th-chip.err{border-color:#e8b4a8}
.th-chip.err em{color:#b3261e}
.th-chip button{border:0;background:none;cursor:pointer;width:24px;height:24px;border-radius:5px;font-size:16px;line-height:1;color:var(--muted,#646b75)}
.th-pick{display:flex;flex-wrap:wrap;gap:4px 14px;background:#fff;border:1px solid var(--line,#e2e4e8);border-radius:8px;padding:8px 10px}
.th-pick label{display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:32px}
.th-pick label.in{color:var(--muted,#646b75)}
.th-pick em{font-style:normal;font-size:12px}
.th-pick .th-av{width:22px;height:22px;font-size:11px}
.th-compose{flex:1;min-height:0;display:flex;flex-direction:column}
.th-compose > h2{margin:0;padding:14px 18px 4px;font-size:18px}
.th-cf{flex:1;min-height:0;overflow:auto;padding:10px 18px 18px;display:flex;flex-direction:column;gap:10px;max-width:760px}
.th-fl{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.th-fl > span{width:64px;color:var(--muted,#646b75);font-size:13px}
.th-fl select{flex:1;max-width:340px}
.th-title{font-size:16px !important;font-weight:600}
.th-seg{display:inline-flex;gap:14px;flex-wrap:wrap}
.th-seg label{display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:32px}
.th-lb{position:fixed;inset:0;z-index:1000;background:rgba(15,18,24,.92);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:calc(env(safe-area-inset-top) + 12px) 12px calc(env(safe-area-inset-bottom) + 12px)}
.th-lb img{max-width:100%;max-height:calc(100% - 64px);object-fit:contain;border-radius:4px}
.th-lbb{display:flex;gap:8px}
/* phone: one column, 44 px controls, 16 px text in boxes (stops iPhone zooming in) */
.th-narrow{flex-direction:column}
.th-one{flex:1;min-height:0;display:flex;flex-direction:column}
.th-pane{flex:1;min-height:0;overflow:auto;padding:8px 10px 24px}
.th-narrow .th-list.th-pane{padding:0 0 24px}
.th-bar{flex:none;display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid var(--line,#e2e4e8);min-height:52px;background:#fff}
.th-bar b{flex:1;min-width:0;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-back{border:0;background:none;font-size:24px !important;line-height:1;min-width:44px;min-height:44px;color:var(--base-2,#0e52a6) !important;cursor:pointer;padding:0 6px;text-align:left;font-weight:600}
.th-narrow .th-ib{min-width:44px;height:44px}
.th-narrow .th-ch{min-height:46px;padding:8px 10px;font-size:15px}
.th-narrow .th-gt{color:var(--muted,#646b75);font-size:18px}
.th-narrow .th-row{padding:12px 14px;min-height:64px}
.th-narrow .th-search{padding:0 0 6px}
.th-narrow > .th-one > .th-search{padding:8px 10px 6px}
.th-narrow input,.th-narrow textarea,.th-narrow select{font-size:16px}
.th-narrow .tm-btn{min-height:44px}
.th-narrow .th-tool{min-height:44px}
.th-narrow .th-th{padding:4px 10px 10px 4px;gap:4px 8px}
.th-narrow .th-th .th-back{flex:none}
.th-narrow .th-tt{min-width:0;flex:1 1 200px;padding-top:9px}
.th-narrow .th-tt h2{font-size:17px}
.th-narrow .th-ta{flex-basis:100%;padding-left:48px}
.th-narrow .th-done{flex:1;white-space:nowrap;padding:0 12px}
.th-narrow .th-msgs{padding:4px 12px 10px}
.th-narrow .th-reply{padding:8px 10px calc(8px + env(safe-area-inset-bottom, 0px))}
.th-narrow .th-reply .th-tool span{max-width:150px}
.th-narrow .th-cf{padding:12px 12px 24px}
.th-narrow .th-fl > span{width:auto}
.th-narrow .th-img{width:96px;height:96px}
.th-narrow .th-own button{min-height:32px;padding:4px 8px}
/* unread counts in the Life app's tab strip and phone bar */
.tcount{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;margin-left:6px;border-radius:999px;background:#fff;color:var(--base-2,#0e52a6);font-size:11px;font-weight:700;vertical-align:1px}
.bn{position:relative}
.bn-n{position:absolute;top:4px;left:calc(50% + 6px);min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#d93025;color:#fff;font-size:10.5px;font-weight:700;display:grid;place-items:center;line-height:1}
.tb button{position:relative}
