/* Teacher Community only. Original v349 resources remain available for rollback. */
.tc-nav{display:flex;gap:.5rem;flex-wrap:wrap;padding-block:1.2rem .7rem}
.tc-nav[hidden],[data-teacher-community][hidden],[data-teacher-community] [hidden]{display:none!important}
.tc-nav .btn,.tc-tabs .btn{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:44px;border-radius:999px;padding:.65rem 1.15rem;line-height:1.35}
.tc-nav [aria-pressed=true],.tc-tabs [aria-pressed=true]{background:#e7efea;border-color:#8aa99b;color:#284c40;box-shadow:0 2px 6px #284c4008}
.tc-nav :focus-visible,[data-teacher-community] :focus-visible{outline:3px solid #4a7c6f;outline-offset:3px}
.tc-nav .tc-count,[data-teacher-community] .tc-count{display:inline-grid;place-items:center;min-width:25px;height:25px;flex:0 0 auto;border:2px solid #fff;border-radius:999px;background:#ae342b;color:#fff;padding:0 .35rem;font:700 .78rem/1 sans-serif;box-shadow:0 2px 5px #ae342b25}
[data-teacher-community]{--tc-line:#dfe5dc;--tc-accent:#426d5e;--tc-ink:#283d33;--tc-alert:#ae342b;min-width:0;padding-block:.7rem 2rem;color:var(--tc-ink)}
[data-teacher-community] *{box-sizing:border-box;min-width:0}
[data-teacher-community] button{font:inherit;cursor:pointer;white-space:normal;max-width:100%;min-height:44px}
[data-teacher-community] button:disabled{opacity:.55;cursor:wait}
[data-teacher-community] [data-refresh]:active{transform:translateY(1px);background:#e4eee7}
[data-teacher-community] [data-refresh][aria-busy=true]{opacity:.85;background:#e7efea;color:#284c40}
[data-teacher-community] .btn{border-radius:14px;line-height:1.35}
[data-teacher-community] .btn--primary{background:#426d5e;border-color:#426d5e;color:#fff}
[data-teacher-community] .btn--primary:hover{background:#33594b}
.tc-head{display:flex;justify-content:space-between;align-items:center;gap:1rem}
.tc-head h1{font-size:clamp(2rem,5vw,3.25rem);line-height:1.1;margin:.5rem 0}
.tc-head p{color:#697467;margin:.6rem 0;line-height:1.5}
.tc-head .eyebrow{font-size:.75rem;letter-spacing:.09em}
.tc-head .tc-notice{display:flex;align-items:center;gap:.6rem;border:1px solid var(--tc-line);border-radius:999px;padding:.65rem .9rem;background:#f5f7f1;font-size:.85rem;flex-shrink:0}
.tc-head .tc-notice.has-unread{background:#fff0eb;border-color:#e7b8ad;color:#903027;font-weight:600}
.tc-notice.has-unread::before{content:'';width:9px;height:9px;border-radius:50%;background:var(--tc-alert);flex-shrink:0}
.tc-tabs{display:flex;gap:.5rem;margin:1rem 0 .4rem;flex-wrap:wrap}
.tc-tabs .btn{position:relative}
.tc-unread-dot{display:inline-block;width:10px;height:10px;flex:0 0 10px;border-radius:50%;background:var(--tc-alert);box-shadow:0 0 0 3px #ae342b12}
.tc-tabs .has-unread{border-color:#d8a79e}
.tc-status{min-height:1.3rem;margin:.3rem .3rem .6rem;color:#536b60;font-size:.88rem;line-height:1.5;overflow-wrap:anywhere}
.tc-layout{display:grid;grid-template-columns:minmax(245px,33%) minmax(0,1fr);border:1px solid var(--tc-line);border-radius:24px;overflow:hidden;background:#fffefa;min-height:0;height:clamp(440px,72dvh,820px);box-shadow:0 12px 40px #263e300b}
.tc-sidebar{border-right:1px solid var(--tc-line);display:flex;flex-direction:column;background:#f4f5ee;overflow:auto;min-height:0}
.tc-list-actions{display:flex;gap:.5rem;padding:1rem;flex-wrap:wrap;align-items:center}
.tc-list-actions .btn{padding:.65rem .8rem}
.tc-list-actions>p{font-size:.9rem;margin:.25rem 0;line-height:1.5;overflow-wrap:anywhere}
.tc-list{overflow:auto;overscroll-behavior:contain;flex:1;padding:.25rem .6rem .7rem;min-height:0}
.tc-thread{position:relative;display:flex;align-items:center;gap:.7rem;width:100%;border:1px solid transparent;border-radius:16px;background:transparent;padding:.9rem .75rem;text-align:left;color:#283d33;margin-bottom:.35rem;transition:background .15s,border-color .15s}
.tc-thread:hover{background:#eaf0e7}
.tc-thread.is-active{background:#e4eee7;border-color:#a9c3b4}
.tc-thread.has-unread{background:#fffaf4;border-color:#e5d8c8;box-shadow:0 2px 6px #3d342009}
.tc-thread.has-unread::before{content:'';position:absolute;left:0;top:22%;bottom:22%;width:3px;border-radius:5px;background:var(--tc-alert)}
.tc-thread.has-unread.tc-private{background:#fff4ee;border-color:#e7c3b8}
.tc-thread.has-unread.is-active{border-color:#bd897b;background:#f9eee7}
.tc-thread.has-unread .tc-thread-copy strong{font-weight:700}
.tc-avatar{width:40px;height:40px;display:grid;place-items:center;flex:0 0 40px;border-radius:15px;background:#e2eadd;color:#456552;font-weight:600}
.tc-private .tc-avatar{border-radius:50%;background:#ece6db;color:#775c46}
.tc-thread-copy{display:grid;gap:.35rem;flex:1;overflow-wrap:anywhere;line-height:1.4}
.tc-thread-copy strong{font-size:.94rem;font-weight:500}
.tc-thread-copy small{font-size:.74rem;color:#717969;line-height:1.4}
.tc-chat{display:flex;flex-direction:column;min-height:0;overflow:hidden;background:#fffefa}
.tc-chat-empty{margin:auto;padding:2rem;text-align:center;max-width:25rem;color:#78816f;line-height:1.6}
.tc-chat-head{padding:1rem 1.2rem;border-bottom:1px solid #e8eae1;display:flex;gap:.7rem;align-items:center;flex-shrink:0;background:#fffffc}
.tc-chat-head h2{font-size:1.25rem;line-height:1.3;margin:0;overflow-wrap:anywhere}
.tc-chat-head p{font-size:.78rem;line-height:1.4;color:#6d7769;margin:.35rem 0 0;max-width:38rem}
.tc-back{border:1px solid #dce5d9;border-radius:50%;background:#f2f6ee;color:#315d4e;padding:0;display:none;flex:0 0 44px;width:44px;height:44px;font-size:1.4rem!important}
.tc-messages{flex:1;overflow:auto;padding:1.2rem;overscroll-behavior:contain;min-height:0;scroll-padding-block:1rem}
.tc-message{border:1px solid #e8e5da;background:#f3f1e9;border-radius:18px 18px 18px 5px;padding:.8rem 1rem;max-width:88%;width:fit-content;margin:0 auto 1rem 0;overflow-wrap:anywhere;box-shadow:0 2px 4px #35321b05}
.tc-message.tc-mine{margin-left:auto;margin-right:0;background:#e6efe6;border-color:#d4e3d2;border-radius:18px 18px 5px 18px}
.tc-message header{display:flex;gap:.35rem .8rem;flex-wrap:wrap;align-items:baseline}
.tc-message strong{font-size:.8rem;color:#3f6150;font-weight:600}
.tc-message time{font-size:.68rem;color:#737b6c}
.tc-message p{margin:.4rem 0 0;white-space:pre-wrap;line-height:1.6;font-size:.96rem}
.tc-compose{border-top:1px solid #e4e7dc;padding:.8rem 1rem max(.8rem,env(safe-area-inset-bottom));flex-shrink:0;background:#fbfcf6}
.tc-input-label{display:grid;font-size:.78rem;color:#63715e;gap:.35rem}
.tc-compose textarea,.tc-topic-form textarea,.tc-topic-form input,.tc-archive textarea{display:block;width:100%;max-width:100%;border:1px solid #cdd8c7;background:#fffefa;border-radius:14px;padding:.7rem .85rem;font:inherit;font-size:16px;line-height:1.45;resize:vertical;color:#283d33}
.tc-compose textarea{max-height:130px;min-height:64px}
.tc-compose textarea:focus{border-color:#6d9381;box-shadow:0 0 0 3px #426d5e0e;outline:none}
.tc-compose-actions{display:flex;align-items:center;gap:.6rem;justify-content:space-between;margin-top:.5rem}
.tc-compose-actions>span{font-size:.72rem;color:#737d69}
.tc-compose-actions .btn{padding:.65rem 1.2rem;border-radius:999px}
.tc-emoji{position:relative}
.tc-emoji summary{cursor:pointer;border:1px solid #dbe3d4;background:#f4f7ed;border-radius:50%;font-size:1.4rem;line-height:1;list-style:none;display:grid;place-items:center;width:44px;height:44px}
.tc-emoji summary::-webkit-details-marker{display:none}
.tc-emoji summary::marker{content:''}
.tc-emoji>div{position:absolute;bottom:115%;left:0;display:flex;background:#fffffc;box-shadow:0 6px 24px #25391a20;padding:.3rem;border:1px solid var(--tc-line);border-radius:16px;z-index:2}
.tc-emoji .btn{padding:.3rem;border:0;min-width:44px;background:transparent}
.tc-topic-form{padding:.6rem 1rem 1rem;border-bottom:1px solid var(--tc-line)}
.tc-topic-form label{display:grid;gap:.4rem;font-size:.85rem;margin-bottom:.8rem}
.tc-topic-form>div{display:flex;gap:.4rem;flex-wrap:wrap}
.tc-topic-form .btn{padding:.65rem .8rem}
.tc-empty,.tc-gate{padding:1.5rem;color:#6c7864;line-height:1.6}
.tc-footnote{font-size:.75rem;color:#7b8472;padding-top:.7rem;line-height:1.5}
.tc-in-chat .tc-head{display:none}
.tc-in-chat .tc-tabs{margin:.3rem 0}
.tc-in-chat .tc-layout{height:clamp(380px,calc(100dvh - 285px),820px)}
.tc-archive{padding:1rem;border-top:1px solid var(--tc-line);background:#f8f6ee;overflow:auto;flex-shrink:0;max-height:55%}
.tc-archive p{font-size:.85rem;line-height:1.5;margin:0 0 .7rem}
.tc-archive label{display:grid;gap:.4rem;font-size:.8rem}
.tc-archive textarea{margin-bottom:.7rem}
.tc-archive .btn{padding:.65rem 1rem}
@media(max-width:680px){
 .tc-nav{padding-block:.75rem .4rem;gap:.4rem}.tc-nav .btn,.tc-tabs .btn{padding:.65rem .85rem;font-size:.9rem}
 [data-teacher-community]{padding-block:.4rem 1rem}.tc-head{display:block}.tc-head h1{font-size:2.2rem}.tc-head .eyebrow{font-size:.65rem}.tc-head p{font-size:.88rem}.tc-head .tc-notice{display:inline-flex;margin:.5rem 0 .15rem;font-size:.8rem}
 .tc-tabs{margin:.7rem 0 .25rem;gap:.4rem}.tc-status{font-size:.8rem;min-height:1.2rem;margin:.2rem .2rem .4rem}
 .tc-layout{grid-template-columns:minmax(0,1fr);height:clamp(300px,65dvh,700px);border-radius:20px}
 .tc-sidebar{border-right:0}.tc-layout:not(.tc-show-chat){height:auto;max-height:65dvh}.tc-layout:not(.tc-show-chat) .tc-chat{display:none}.tc-show-chat .tc-sidebar{display:none}
 .tc-back{display:grid;place-items:center}.tc-chat-head{padding:.65rem .7rem}.tc-chat-head h2{font-size:1.1rem}.tc-chat-head p{font-size:.7rem;margin-top:.2rem}
 .tc-messages{padding:.75rem}.tc-message{max-width:94%;padding:.7rem .8rem;margin-bottom:.8rem}.tc-message p{font-size:.94rem}.tc-message time{font-size:.65rem}
 .tc-compose{padding:.6rem .7rem max(.6rem,env(safe-area-inset-bottom))}.tc-compose-actions>span{display:none}.tc-compose textarea{min-height:60px;max-height:100px}
 .tc-list-actions{padding:.75rem;gap:.4rem}.tc-thread{padding:.8rem .7rem}.tc-list{padding-inline:.4rem}
 .tc-in-chat .tc-layout{height:var(--tc-chat-height,calc(100dvh - 245px));min-height:340px;max-height:820px}
 .tc-in-chat .tc-status:empty{min-height:0;margin-block:.2rem}.tc-footnote{margin-top:.5rem}
}
@media(max-width:680px) and (max-height:600px){.tc-in-chat .tc-layout{height:var(--tc-chat-height,calc(100dvh - 120px))}.tc-compose textarea{height:54px;min-height:54px}.tc-chat-head p{max-height:2.8em;overflow:auto}}
@media(prefers-reduced-motion:reduce){.tc-thread{transition:none}}
