/* Interface roles derived from Radix Colors v3, Blue and Slate. */
:root {
  --ink: #1C2024;
  --muted: #505861;
  --accent: #0D74CE;
  --accent-strong: #205D9E;
  --wash: #F9F9FB;
  --selection: #E6F4FE;
  --pressed: #C2E5FF;
  --line: #D9D9E0;
}
:root{font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--ink);background:var(--wash)}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer;border:0}button:disabled{opacity:.45;cursor:not-allowed}.hidden{display:none!important}.primary{color:white;background:var(--accent);border-radius:13px;padding:11px 17px;font-weight:700}.primary:hover{background:var(--accent-strong)}.soft{background:var(--selection);color:var(--accent-strong);padding:10px 15px;border-radius:12px;font-weight:650}.full{width:100%}.iconbtn{display:grid;place-items:center;min-width:38px;height:38px;border-radius:50%;background:transparent;font-size:22px;color:var(--muted)}.iconbtn:hover,.soft:hover{background:var(--selection)}.auth{min-height:100vh;min-height:100dvh;background:linear-gradient(130deg,var(--accent),var(--selection) 52%,var(--selection));display:grid;place-items:center;padding:22px}.auth-card{background:white;border-radius:26px;padding:35px;width:min(420px,100%);text-align:center;box-shadow:0 15px 60px #40367733}.logo{font-size:48px}.auth h1{margin:8px 0;font-size:31px}.auth p{color:var(--muted);margin:0 0 23px}.tabs{display:flex;background:var(--wash);border-radius:14px;margin-bottom:20px;padding:4px}.tabs button{flex:1;padding:11px;border-radius:11px;background:none;color:var(--muted)}.tabs .active{background:white;color:var(--accent);box-shadow:0 2px 7px #5552}.auth form{text-align:left;display:grid;gap:9px}.auth form label{font-size:13px;font-weight:700;margin-top:7px}.auth input,.modal input,.modal select{width:100%;padding:13px;border:1px solid var(--line);border-radius:12px;outline:0}.auth input:focus,.modal input:focus{border-color:var(--accent)}.auth form button{margin-top:13px}.auth small{display:block;margin-top:22px;color:var(--muted)}.error{color:#bf385b;margin-top:12px;min-height:18px}.app{height:100vh;height:100dvh;display:flex}.sidebar{width:324px;flex-shrink:0;background:white;border-right:1px solid var(--line);display:flex;flex-direction:column}.side-head{display:flex;justify-content:space-between;align-items:center;padding:23px 19px 15px}.side-head strong{font-size:19px}.side-head span{display:block;font-size:12px;color:var(--muted);margin-top:5px}.side-actions{display:flex;padding:8px 12px;gap:8px}.side-actions button{flex:1;border-radius:11px;padding:11px;background:var(--wash);color:var(--muted);font-weight:700}.side-actions button.active{background:var(--selection);color:var(--accent-strong)}.teacher-actions{padding:7px 12px 15px}.teacher-actions button{width:100%}.side-label{font-size:11px;letter-spacing:1px;font-weight:800;color:var(--muted);padding:11px 21px}.rooms{flex:1;overflow-y:auto}.room{display:flex;width:100%;align-items:center;text-align:left;gap:12px;background:transparent;padding:13px 19px;color:inherit}.room:hover{background:var(--wash)}.room.active{background:var(--selection)}.room-avatar{width:43px;height:43px;flex-shrink:0;border-radius:16px;background:linear-gradient(130deg,var(--pressed),var(--pressed));display:grid;place-items:center;font-size:22px}.room-data{min-width:0;flex:1}.room-data strong,.room-data small{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.room-data small{font-size:12px;color:var(--muted);margin-top:5px}.side-footer{text-align:center;color:var(--muted);font-size:11px;padding:16px}.main{display:flex;flex:1;min-width:0;min-height:0}.empty{margin:auto;text-align:center;font-size:70px;color:var(--muted)}.empty h2{font-size:22px;margin:10px}.empty p{font-size:14px}.chat{display:flex;flex:1;flex-direction:column;min-width:0}.chat-head{background:white;min-height:74px;padding:12px 24px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.chat-symbol{width:42px;height:42px;background:var(--selection);border-radius:50%;display:grid;place-items:center}.chat-titles{flex:1;min-width:0}.chat-titles strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-titles span{font-size:12px;color:var(--muted)}.messages{flex:1;overflow-y:auto;padding:22px max(24px,calc((100% - 880px)/2));background:radial-gradient(circle at top left,#e9e0ff70,transparent 50%),var(--wash);display:flex;flex-direction:column;gap:10px}.bubble-row{display:flex;gap:8px;align-items:flex-end;max-width:100%}.bubble-row.own{justify-content:flex-end}.bubble{max-width:min(75%,570px);min-width:120px;position:relative;background:white;padding:10px 13px;border-radius:16px 16px 16px 4px;box-shadow:0 1px 3px #362b6414;overflow-wrap:anywhere}.own .bubble{background:var(--selection);border-radius:16px 16px 4px 16px}.bubble-author{color:var(--accent-strong);font-size:12px;font-weight:750;margin-bottom:5px}.bubble-text{white-space:pre-wrap;line-height:1.46;font-size:14px}.bubble-meta{text-align:right;font-size:10px;color:var(--muted);margin-top:5px}.reply-mark{border-left:3px solid var(--accent);padding-left:8px;color:var(--muted);font-size:11px;margin-bottom:8px}.forward-mark{color:var(--muted);font-size:11px;margin-bottom:6px}.bubble img.media-photo{max-width:100%;max-height:380px;display:block;border-radius:12px}.bubble video.media-video{max-width:100%;max-height:380px;border-radius:12px;display:block}.bubble video.media-circle{width:230px;height:230px;max-width:60vw;max-height:60vw;object-fit:cover;border-radius:50%;display:block;background:var(--ink)}.bubble audio{max-width:100%;width:260px}.bubble .sticker{font-size:62px;line-height:1.2}.react-list{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.react-pill{border-radius:16px;background:var(--selection);border:1px solid var(--line);color:var(--accent-strong);font-size:12px;padding:3px 8px}.react-pill.mine{background:var(--pressed);color:var(--accent-strong)}.tiny-menu{font-size:16px;color:var(--muted);background:transparent;padding:4px;align-self:center}.composer-wrap{background:white;padding:10px max(18px,calc((100% - 890px)/2)) 14px;position:relative}.compose{display:flex;align-items:end;gap:4px}.compose textarea{flex:1;background:var(--wash);resize:none;outline:0;padding:12px;border:1px solid transparent;border-radius:15px;max-height:110px;min-height:44px}.compose textarea:focus{border-color:var(--pressed)}.compose .send{min-height:42px}.reply-banner{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;color:var(--accent-strong);background:var(--selection);border-radius:12px;margin-bottom:8px;font-size:12px}.picker{position:absolute;bottom:77px;left:35px;background:white;border-radius:18px;padding:14px;box-shadow:0 8px 40px #39235a40;max-width:340px;z-index:10}.picker-tabs{display:flex;gap:10px;margin-bottom:10px}.picker-tabs button{background:var(--wash);border-radius:10px;padding:8px 13px}.picker-tabs .active{background:var(--pressed)}.picker-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;max-height:230px;overflow:auto}.picker-grid button{font-size:25px;background:none;padding:5px}.picker-grid button:hover{background:var(--selection);border-radius:8px}.context-menu{position:fixed;background:white;border-radius:12px;z-index:50;padding:6px;box-shadow:0 8px 35px #2c214e40;min-width:170px;max-height:70vh;overflow:auto}.context-menu button{display:block;width:100%;text-align:left;background:none;border-radius:8px;padding:10px}.context-menu button:hover{background:var(--selection)}.modal{position:fixed;inset:0;background:#24203980;z-index:80;display:grid;place-items:center;padding:16px}.modal-box{width:min(430px,100%);background:white;border-radius:20px;padding:22px;box-shadow:0 14px 50px #1113}.modal-box h3{margin-top:0}.modal-box label{display:block;font-weight:700;font-size:13px;margin:14px 0 5px}.modal-box input,.modal-box select{margin-bottom:10px}.modal-box p{color:var(--muted);font-size:13px;line-height:1.5}.modal-box .code{background:var(--selection);font-weight:800;letter-spacing:2px;padding:13px;overflow-wrap:anywhere;text-align:center;border-radius:10px}.modal-box .full{margin-top:10px}.modal-box input[type=checkbox]{width:auto}.toast{position:fixed;z-index:100;bottom:25px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:12px 21px;border-radius:18px;box-shadow:0 10px 40px #0002}.recording{display:flex;align-items:center;gap:10px;padding:10px;margin-bottom:8px;border-radius:12px;background:var(--selection)}.recording strong{flex:1}.back{display:none}@media(max-width:720px), (max-width:960px) and (max-height:500px){.sidebar{width:100%}.app.mobile-chat .sidebar{display:none}.app:not(.mobile-chat) .main{display:none}.chat-head{padding:9px 12px}.chat-head .back{display:grid}.messages{padding:15px 10px}.bubble{max-width:85%}.compose .iconbtn{min-width:29px;font-size:19px}.composer-wrap{padding:8px 7px 14px}.compose{gap:1px}.compose textarea{min-width:0}.picker{left:8px}.recording{flex-wrap:wrap}}

.unread-filter{margin:4px 14px}.unread-filter{font-size:13px;color:var(--muted)}.room-badge{border-radius:99px;background:var(--accent);color:white;padding:2px 7px;font-size:12px}.pin{text-align:left;background:var(--selection);color:var(--accent-strong);padding:9px 16px;border:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-head{flex-wrap:wrap}.chat-titles{min-width:80px}.chat #history-bar{display:flex;justify-content:center;gap:8px}.chat #history-bar:has(.hidden+.hidden){display:none}.modal-box{max-height:85vh;max-height:85dvh;overflow:auto}.group-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}.search-hit{display:block;text-align:left;width:100%;margin:6px 0}.pending{display:flex;align-items:center;gap:6px;padding:4px 8px;font-size:13px}.doc-link{overflow-wrap:anywhere}.focused-msg{outline:3px solid var(--accent);border-radius:14px}.modal-box input[type=checkbox]{width:auto}#outbox{max-height:100px;overflow:auto}

dialog.modal{border:0;width:min(430px,calc(100% - 32px));max-width:none;height:fit-content;max-height:90vh;max-height:90dvh;padding:0;background:transparent;border-radius:20px;overflow:auto;color:inherit}
dialog.modal:not([open]){display:none}
dialog.modal[open]{display:block}
dialog.modal::backdrop{background:#24203980}
.modal-box{width:100%;overflow-wrap:anywhere}
:where(button,input,textarea,select,[tabindex]):focus-visible{outline:3px solid var(--accent-strong);outline-offset:2px}
.compose textarea:focus-visible,.modal input:focus-visible,.auth input:focus-visible{outline:3px solid var(--accent-strong);outline-offset:1px}
.tiny-menu,.react-pill{min-width:32px;min-height:32px}
.bubble-meta,.room-badge,.code{font-variant-numeric:tabular-nums}
.bubble-meta,.room-data small,.chat-titles span,.side-head span,.side-label,.side-footer,.auth small,.auth p,.tabs button,.modal-box p,.forward-mark{color:var(--muted)}
.bubble-meta{font-size:12px}
.bubble-text{line-height:1.5}
.room.active{box-shadow:inset 3px 0 var(--accent)}
.auth h1,.modal-box h3{text-wrap:balance}
.composer-wrap{padding-bottom:max(14px,env(safe-area-inset-bottom))}
.app{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-top:env(safe-area-inset-top)}
.sidebar{padding-bottom:env(safe-area-inset-bottom)}
@media(max-width:720px){
  .compose button,.chat-head button,.tiny-menu,.picker-grid button{min-height:44px;min-width:44px}
  .compose .iconbtn{min-width:44px}
  .compose .send{padding:8px}
  .picker{max-width:calc(100% - 16px)}
  .picker-grid{grid-template-columns:repeat(auto-fit,minmax(44px,1fr))}
  .group-row{flex-wrap:wrap}
}

#network-status{padding:6px 10px;color:#65411f;background:#fff2db;font-size:13px}
.bubble .media-photo,.bubble .media-video{width:min(56vw,360px);aspect-ratio:4/3;object-fit:contain;background:var(--wash)}
.tiny-menu,.reply-mark{color:var(--accent-strong)}
.unread-filter{display:flex;align-items:center;gap:6px;min-height:32px}
@media(max-width:720px){.unread-filter,.react-pill{min-height:44px}}

.compose { align-items: flex-end; }
.compose .iconbtn, .compose .send {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  padding: 0;
}
.compose .iconbtn { color: var(--muted); }
.compose .iconbtn:hover { background: var(--selection); color: var(--accent-strong); }
.compose .send { --send-bg: var(--accent); background: var(--send-bg); color: white; }
.compose button svg { pointer-events: none; }

.room-avatar {
  border-radius: 50%;
  background: var(--selection);
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 750;
}
.room-avatar[data-tone="1"] { background: #d5eeea; color: #1a5e54; }
.room-avatar[data-tone="2"] { background: #f8ddcd; color: #854323; }
.room-avatar[data-tone="3"] { background: #dae7fb; color: #315991; }
.room-details { display: grid; justify-items: end; gap: 6px; flex-shrink: 0; }
.room-details time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.draft-label { color: #9a364a; }
#group-tools { display: flex; flex-wrap: wrap; gap: 6px; }
#group-candidates { margin-top: 12px; }
#group-candidates summary { cursor: pointer; padding: 12px 0; color: var(--accent-strong); font-weight: 650; }
#group-candidates summary:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }
#pupil-results { max-height: 32vh; overflow: auto; }
.attachment-list { max-height:35vh; max-height:35dvh; overflow-y:auto; }
.attachment-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0; }
.attachment-row strong, .attachment-row small { display:block; overflow-wrap:anywhere; }
.attachment-row small { color:var(--muted); margin-top:3px; }
.attachment-row .attachment-error { color:#922c39; }
.attachment-row button { flex-shrink:0; min-height:44px; }
#file-size { margin: 4px 0 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
#file-preview img, #file-preview video { display: block; max-width: 100%; max-height: 32vh; max-height: 32dvh; margin: 0 auto 12px; border-radius: 10px; }
#file-caption { width: 100%; box-sizing: border-box; padding: 9px; font: inherit; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.photo-open { display: block; max-width: 100%; padding: 0; background: transparent; border-radius: 12px; cursor: zoom-in; }
dialog.photo-viewer { width: min(860px, calc(100% - 24px)); }
#full-photo { display: block; width: 100%; height: auto; max-height: 65vh; max-height: 65dvh; object-fit: contain; }
.audio-name, .bubble audio { display:block; margin:4px 0; overflow-wrap:anywhere; }
#file-preview audio { width:100%; }
#photo-original { display: inline-block; padding: 12px 0; }
.side-footer { padding: 6px 12px; border-top: 1px solid var(--line); }
.side-footer #notify { margin: 0; min-height: 44px; width: 100%; background: transparent; font-size: 13px; }
.side-footer #notify:hover { background: var(--wash); }

.chat-head { flex-wrap: nowrap; }
.chat-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  background: transparent;
  text-align: left;
  color: inherit;
  padding: 2px;
  border-radius: 12px;
}
.chat-group:disabled { opacity: 1; cursor: default; }
.chat-group:enabled:hover { background: var(--wash); }
.chat-group .chat-titles { position: relative; flex: 0 1 auto; min-width: 0; padding-right: 15px; }
.chat-group .group-chevron { position: absolute; top: -2px; right: 0; font-size: 18px; }
.chat-group:disabled .group-chevron { display: none; }
.timeline { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.timeline .messages { min-height: 0; }
.jump-latest {
  position: absolute;
  right: 14px;
  bottom: 10px;
  min-height: 44px;
  padding: 0 15px;
  color: var(--accent-strong);
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 2px 8px #34254d22;
  font-weight: 650;
}
.has-divider { flex-wrap: wrap; }
.has-divider .bubble { max-width: min(75%, 570px, calc(100% - 52px)); }
.unread-divider { flex: 0 0 100%; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--accent-strong); }
.unread-divider::before, .unread-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.day-divider { flex: 0 0 100%; text-align: center; padding: 4px 0; }
.day-divider time {
  display: inline-block;
  border-radius: 16px;
  padding: 4px 11px;
  background: var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.compose-media { display: contents; }
.compose #more-tools, .compose .media-label { display: none; }
.compose textarea { min-width: 0; field-sizing: content; min-height: 44px; font-size: 16px; line-height: 1.25; }
@media (min-width: 721px) and (max-width: 960px) {
  .sidebar { width: 29%; min-width: 274px; }
  .side-head { padding-left:12px; padding-right:12px; }
}
@media (max-width: 960px) {
  .chat-head { min-height: 60px; padding: 6px 10px; gap: 6px; }
  .chat-head #invite { display: none; }
  .chat-group { min-height: 44px; }
  .chat-group .room-avatar { width: 36px; height: 36px; }
  .compose #more-tools { display: inline-grid; }
  .compose-media { display: none; }
  .compose-media.expanded {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 8px;
    z-index: 12;
    display: grid;
    padding: 6px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 4px 18px #39235a2b;
  }
  .compose-media .iconbtn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 12px;
    border-radius: 9px;
  }
  .compose .media-label { display: inline; color: var(--ink); font-size: 15px; }
}
@media (max-width: 720px) {
  .has-divider .bubble { max-width: min(85%, calc(100% - 52px)); }
}
@media (max-height: 500px) {
  .sidebar { display: block; overflow-y: auto; }
  .rooms { overflow: visible; }
  .side-head { padding: 6px 14px; }
  .teacher-actions { padding: 4px 12px; }
}
@media (max-width: 960px) and (max-height: 500px) {
  .app .sidebar { width: 100%; }
}
@media (max-width: 960px) and (max-height: 200px) {
  .chat-head { min-height: 44px; padding: 0 6px; }
  .chat .messages { padding: 0 6px; }
  .composer-wrap { padding: 2px 6px max(2px,env(safe-area-inset-bottom)); }
  .chat:focus-within #history-bar, .chat:focus-within #pinned, .chat:focus-within .jump-latest { display: none; }
}

/* The grid adapts to its actual scrollport, including a classic scrollbar. */
.picker { box-sizing:border-box; width:min(352px,calc(100% - 16px)); max-width:none; left:8px; bottom:calc(100% + 4px); padding:10px; }
.picker-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(44px,1fr)); gap:2px; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; max-height:min(240px,calc(100dvh - 155px)); overscroll-behavior:contain; }
.picker-grid button { display:grid; place-items:center; min-width:0; min-height:44px; padding:0; font:24px "Segoe UI Emoji","Apple Color Emoji",sans-serif; }
.picker-grid[data-mode="sticker"] { grid-template-columns:repeat(auto-fit,minmax(74px,1fr)); }
.class-stamp { width:100%; max-width:112px; height:auto; display:block; }
.sticker:has(.class-stamp) { width:112px; }
.picker-tabs { gap:4px; }
.picker-tabs button { min-height:40px; }
.picker button:focus-visible { outline-offset:-3px; }

.settings-entry,.side-actions button { display:inline-flex;align-items:center;justify-content:center;gap:7px; }
.settings-entry { min-height:44px;background:transparent;color:var(--accent);font-size:13px;font-weight:650;padding:4px 6px; }
.settings-entry svg,.side-actions svg { flex:none; }
.side-head { gap:6px; }
.side-head > div { min-width:0; }
#account { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-footer { display:flex; gap:6px; flex-wrap:wrap; align-items:center; justify-content:center; }
.side-footer #notify { margin:0; }
.logo { display:grid;place-items:center;width:48px;height:48px;margin:auto;border-radius:14px;background:var(--accent);color:white; }
.logo svg { width:30px;height:30px; }
.empty > svg { width:46px;height:46px; }
.settings-form .wallpaper-option { display:flex;align-items:center;gap:9px;min-height:44px; }
.wallpaper-option input { margin:0; }
.app[data-text-size="large"] .bubble-text { font-size:18px; }

/* Classroom stationery tile, drawn for Little English. */
:root { --stationery:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20200%20152%22%20fill%3D%22none%22%20stroke%3D%22%23536E80%22%20stroke-opacity%3D%22.19%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cg%20transform%3D%22translate%2820%2022%29%20rotate%28-14%29%22%3E%3Cpath%20d%3D%22M0%200q6-2%2011%202%206-3%2012-1v15q-6-2-12%201-6-4-11-2zM11%202v15%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%28128%2016%29%20rotate%2820%29%22%3E%3Cpath%20d%3D%22M0%2014%2014%200l4%204L4%2018l-6%202zM10%204l4%204%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate%2885%2076%29%20rotate%2812%29%22%3E%3Cpath%20d%3D%22M-12-8h23v14H0l-6%205V6h-6z%22%2F%3E%3Cpath%20d%3D%22M-6-2h10M-6%201h6%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22m16%20110%202%205%205%202-5%202-2%205-2-5-5-2%205-2zM159%20106l6-4%206%204-6%204zM161%20109v4q4%203%208-1M62%2015l3%203%205-6%22%2F%3E%3Ccircle%20cx%3D%22116%22%20cy%3D%22127%22%20r%3D%221.3%22%2F%3E%3Ccircle%20cx%3D%22183%22%20cy%3D%2247%22%20r%3D%221.3%22%2F%3E%3C%2Fsvg%3E"); }
.app[data-wallpaper="plain"] .messages { background-image:none; }
.auth { background:var(--wash); }
.primary { border-radius:10px; }
.side-actions { border-bottom:1px solid var(--line);padding-bottom:0;gap:0; }
.side-actions button { border-radius:0; background:transparent; color:var(--muted); min-height:44px; }
.side-actions button.active { background:transparent; box-shadow:inset 0 -2px var(--accent);color:var(--accent-strong); }
.teacher-actions { padding:10px 13px 2px; }
.teacher-actions button { color:var(--accent-strong);background:var(--selection);min-height:40px; }
.teacher-actions button:hover { background:var(--pressed); }
.side-footer { justify-content:space-between; }
.side-footer #notify,.side-footer #logout { width:auto;min-height:44px;padding:6px;background:transparent;color:var(--muted);font-size:13px; }
.settings-entry:hover,.side-footer button:hover { background:var(--selection);border-radius:8px; }
.unread-filter { color:var(--muted); }
input[type=checkbox] { accent-color:var(--accent); }
.empty { font-size:16px;color:var(--muted); }
.empty > svg { color:var(--accent-strong); }

/* Little English navigation: a paper sidebar and a sea-glass conversation surface. */
:root {
  --ink:#1c292c; --muted:#4d6266; --accent:#147569; --accent-strong:#135f57;
  --selection:#dcf1eb; --pressed:#c7e6dd; --wash:#f4f7f6; --line:#d9e4e0;
  --paper:#fff; --canvas:#c2dfd5; --canvas-fade:#e4eee4; --incoming:#fff;
}
.room-tools,.room-filter,.drawer-top,.room-search,.drawer-links .nav-action {
  display:flex; align-items:center;
}
.room-tools { padding:8px 12px 8px 8px; gap:6px; border-bottom:1px solid var(--line); background:var(--paper); min-height:60px; }
.room-tools .iconbtn,.drawer-top .iconbtn { flex:0 0 44px; width:44px;height:44px; color:var(--accent-strong); }
.room-search { min-width:0; flex:1; height:38px; gap:8px; padding:0 12px; background:var(--wash); border-radius:10px; color:var(--muted); }
.room-search:focus-within { outline:2px solid var(--accent); }
.room-search svg { flex:none;width:16px; }
.room-search input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--ink);font-size:14px; }
.room-search input::placeholder { color:var(--muted); }
.room-filter { min-height:44px; gap:6px; justify-content:space-between; padding:0 13px 0 16px; border-bottom:1px solid var(--line); }
.room-filter strong { font-size:16px; }
.room-filter label { display:flex;align-items:center;gap:4px;min-height:44px;color:var(--muted);font-size:12px; }
.room-filter input { margin:0; }
.rooms { padding:4px 0; background:var(--paper); color:var(--muted); }
.room { min-height:59px; padding:7px 13px; gap:10px;color:var(--ink); }
.room.active { background:var(--selection);box-shadow:inset 3px 0 var(--accent); }
.room-data strong { font-size:14px; font-weight:650; }.room-data small { font-size:13px; }
.room-details time {font-size:11px;}
.chat-head { min-height:60px; padding-block:7px; }
.chat-head,.composer-wrap,.sidebar,.bubble,.picker,.context-menu,.modal-box,.compose-media.expanded { background-color:var(--paper); }
.messages,.main { background-color:var(--canvas); background-image:var(--stationery),linear-gradient(125deg,var(--canvas),var(--canvas-fade)); background-size:200px 152px,cover; }
.app[data-wallpaper="plain"] :is(.main,.messages) { background-image:none; }
.main > .empty { background:var(--paper);padding:18px 28px;border-radius:18px; box-shadow:0 4px 24px #183f3612; }
.main > .empty h2 {font-size:20px;color:var(--ink); margin:4px 0}.main > .empty p {margin:0;}
.own .bubble { background:var(--selection); }
.compose .send {--send-bg:var(--accent);}
#nav-drawer { position:fixed; inset:0 auto 0 0; margin:0; padding:0; border:0; color:var(--ink); background:var(--paper); width:min(294px,calc(100vw - 32px));height:100dvh;max-height:100dvh;max-width:none;overflow:auto;overscroll-behavior:contain;box-shadow:8px 0 48px #102f2929; }
#nav-drawer::backdrop {background:rgb(13 37 39 / 32%);}
.drawer-cover { padding:10px 20px 18px; color:white; background:radial-gradient(ellipse at 102% -18%,#39796c 0 45%,transparent 45.5%),linear-gradient(125deg,#124a48,#21645d); }
.drawer-top {justify-content:space-between;margin-bottom:10px;}
.drawer-top strong {font-size:16px;letter-spacing:.01em;}
.drawer-top .iconbtn {color:white;}.drawer-top .iconbtn:hover {background:#ffffff20;}
#drawer-avatar { display:grid;place-items:center;width:46px;height:46px;border-radius:16px;background:#ffdbad;color:#593718;font-weight:750;font-size:18px; }
#account,#account-role { display:block; } #account {margin-top:10px;font-size:17px;} #account-role {margin-top:2px;font-size:13px;color:#def0e8;}
.drawer-links { padding:8px 10px 18px; }
.drawer-links .nav-action { width:100%;min-height:46px;gap:16px;padding:7px 12px;text-align:left;color:var(--ink);border-radius:9px;background:transparent;font-size:14px;font-weight:550;cursor:pointer; }
.drawer-links .nav-action:hover {background:var(--wash);}
.drawer-links svg { color:var(--accent-strong);flex:none; }
.drawer-links hr {border:0;border-top:1px solid var(--line);margin:7px 2px;}
@media(max-height:500px) { .sidebar:has(.room-tools) {display:flex;overflow:hidden;} .rooms { min-height:0;overflow-y:auto; } }
@media(max-width:720px),(max-width:960px) and (max-height:500px) { .app.mobile-chat .sidebar:has(.room-tools) { display:none; } }

.messages > .day-divider:first-child { margin-top:auto; }
.group-actions { display:flex;flex-wrap:wrap;gap:6px; }
.password-form { margin-top:18px;padding-top:4px;border-top:1px solid var(--line); }
.password-form h4 { margin:14px 0 0; }
.password-form .error { margin:4px 0 0;min-height:0;color:#bf385b;font-weight:600; }
.password-form .error:empty { display:none; }
.group-row:has(.group-actions) { flex-wrap:wrap; }
.group-name { flex:1 1 140px;min-width:0;overflow-wrap:break-word; }
