/* v1.0: icon, simpler participant navigation, home, meetings, chats, library cards */
.brand-icon{width:42px;height:42px;border-radius:12px;flex:0 0 auto;display:block}
.brand-icon.sm{width:30px;height:30px;border-radius:9px}
.brand-icon.lg{width:72px;height:72px;border-radius:20px;margin:0 auto 14px}
.m-actions{display:flex;gap:6px;align-items:center}
.nav-label{margin:14px 12px 4px;font-size:10px;text-transform:uppercase;letter-spacing:.12em;font-weight:800;color:var(--gold)}
.nav button{position:relative}
.badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--accent);color:#fff;font-size:11px;font-weight:800;line-height:1;margin-left:auto}
.nav button .badge{margin-left:auto}
.tabbar button .ico{position:relative}
.tabbar button .ico .badge{position:absolute;top:-6px;right:-12px;min-width:16px;height:16px;font-size:10px;padding:0 4px}
.addr-grid.two{grid-template-columns:1fr 1fr}

/* home */
.home-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;align-items:stretch}
.home-main .dash-focus{height:100%}
.home-side{display:grid;gap:16px;align-content:start}
.home-side .dash-card{min-height:0;text-align:left}
.home-between h3,.home-chat h3{font-size:17px}
.home-tools{margin-top:16px;border:1px solid var(--line);border-radius:22px;background:#fffdfa;padding:14px 18px}
.home-tools .row{margin-top:8px}
@media (max-width:980px){.home-grid{grid-template-columns:1fr}.home-main .dash-focus{height:auto}}
@media (max-width:680px){.home-side .dash-card{text-align:center}.home-tools{text-align:center}.home-tools .row{justify-content:center}}

/* meeting page */
.meet-when{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid var(--line);background:#fffdfa;border-radius:16px;padding:10px 14px;margin-bottom:14px;font-weight:650}
.between-card h3{margin:10px 0 6px}
.between-card .kb-det{margin-top:8px}
.meet-other summary,.meet-extra summary{font-weight:700}
.meet-other{margin:12px 0;border:1px dashed #e3d3cd;border-radius:16px;padding:8px 14px;background:#fffaf8}
.meet-extra{margin:12px 0}

/* chats */
.chat-tabs{margin-bottom:12px}
.chat-tabs .badge{margin-left:6px}
.chat-card{padding:0;overflow:hidden;display:flex;flex-direction:column}
.chat-head{padding:14px 18px;border-bottom:1px solid var(--line)}
.chat-rules{margin:0;padding:10px 18px;border-bottom:1px solid var(--line);background:#fffaf5;font-size:14px}
.chat-rules summary{cursor:pointer;font-weight:700;color:#7a5b2a}
.chat-log{display:flex;flex-direction:column;gap:10px;padding:16px 18px;max-height:56vh;min-height:220px;overflow-y:auto;background:linear-gradient(180deg,#fffdfa,#fbf6f2)}
.chat-msg{max-width:80%;align-self:flex-start;background:#fff;border:1px solid var(--line);border-radius:16px 16px 16px 4px;padding:8px 12px}
.chat-msg.mine{align-self:flex-end;background:#f6e9ee;border-color:#ead3dc;border-radius:16px 16px 4px 16px}
.chat-msg.from-teacher:not(.mine){background:#fbf4e6;border-color:#eddcb9}
.chat-msg p{margin:2px 0 0;line-height:1.5;white-space:pre-line}
.chat-meta{font-size:11px;color:var(--muted);display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.chat-del{border:0;background:none;color:var(--muted);font-size:11px;text-decoration:underline;cursor:pointer;padding:0}
.chat-share{border-left:3px solid var(--accent);padding-left:8px;margin-top:4px}
.chat-input{display:flex;gap:10px;align-items:flex-end;padding:12px 14px;border-top:1px solid var(--line);background:#fffdfa}
.chat-input .textarea{min-height:48px;flex:1;margin:0}
.chat-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:start}
.chat-list{padding:8px}
.chat-item{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:14px;padding:10px 12px;color:var(--ink)}
.chat-item.active{background:var(--soft)}
.chat-item:hover{background:#fbf2f4}
.chat-back{display:none;margin-bottom:10px}
.chat-empty{min-height:220px;display:grid;place-items:center}
@media (max-width:980px){
  .chat-layout{grid-template-columns:1fr}
  .chat-layout.open .chat-list{display:none}
  .chat-layout:not(.open) .chat-empty{display:none}
  .chat-back{display:inline-flex}
}
@media (max-width:680px){.chat-msg{max-width:90%}.chat-log{max-height:60vh;padding:12px}.chat-input{padding:10px}}

/* teacher: people */
.person-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-top:8px}
.person-card{border:1px solid var(--line);border-radius:18px;padding:14px;background:#fffdfa}

/* library: cards */
.topic-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.topic-card{display:grid;gap:6px;text-align:left;border:1px solid var(--line);background:#fffdfa;border-radius:18px;padding:16px;color:var(--ink);min-height:96px;align-content:start;box-shadow:var(--shadow-soft,none)}
.topic-card strong{font-size:15px;line-height:1.35}
.topic-card:hover{border-color:#dcc8cf}
.topic-card.special{background:linear-gradient(145deg,#fffdfa,#f7efe2);border-color:#e7d6b6}
.topic-secs{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
.topic-sec h3{margin:0}
.textarea.biblio{min-height:50vh;font-size:13px;font-family:inherit}
.kb-det.mcw p{margin:6px 0;line-height:1.55}
@media (max-width:680px){.topic-secs{grid-template-columns:1fr}.topic-grid{grid-template-columns:1fr 1fr}.topic-card{padding:12px;min-height:84px}.topic-card strong{font-size:14px}}
.home-side{grid-template-columns:minmax(0,1fr)}
.home-side .dash-card{grid-area:auto!important;order:0!important;width:100%}
.chat-top{margin:4px 2px 14px}.chat-top .page-title{margin:0 0 4px}.chat-top p{margin:0}
@media (max-width:680px){.chat-log{max-height:calc(100vh - 470px);min-height:180px}.chat-top .page-title{font-size:30px}}
.chat-item .kb-meta{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-list{min-width:0;overflow:hidden}
