/* Kedu R4: responsive privacy controls, full emoji/flag picker and dark theme. */
.kedu-encryption-banner{display:flex;gap:14px;align-items:center;justify-content:space-between;border:1px solid #bde8d4;border-radius:14px;background:#eaf9f1;color:#155b44;padding:9px 15px;margin:10px 20px;font-size:.82rem}
.kedu-encryption-banner[hidden]{display:none!important}
.kedu-encryption-banner strong{font-weight:800;white-space:nowrap}
.kedu-encryption-banner span{font-size:.78rem}
.thread-actions{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
#destroyChat{border:1px solid #f2aba5;border-radius:9px;padding:7px 9px;color:#ac272d;font-weight:750;white-space:nowrap}
.kedu-destroy-dialog{width:min(95vw,520px);max-height:88dvh;overflow:auto;padding:24px;border:1px solid #d9e6df;border-radius:21px;box-shadow:0 20px 75px #0a382240;background:#fff;color:#15362f}
.kedu-destroy-dialog::backdrop{background:#091e1ca8;backdrop-filter:blur(4px)}
.kedu-destroy-dialog h2{font-size:1.3rem;margin:0 0 12px}
.kedu-destroy-dialog p{font-size:.91rem;line-height:1.5;color:#48635c}
.kedu-destroy-choices{border:0;padding:0;margin:16px 0;display:grid;gap:11px;min-width:0}
.kedu-destroy-choices label{display:flex;gap:13px;align-items:flex-start;cursor:pointer;border:1px solid #dce8e2;border-radius:14px;padding:13px;background:#f7fbf9}
.kedu-destroy-choices label:has(input:checked){border-color:#db756e;background:#fff7f5}
.kedu-destroy-choices input{margin-top:5px;accent-color:#ad3434;width:19px;height:19px;flex-shrink:0}
.kedu-destroy-choices strong,.kedu-destroy-choices small{display:block}
.kedu-destroy-choices strong{font-size:.98rem;color:#273e35}
.kedu-destroy-choices small{font-size:.8rem;line-height:1.45;color:#657b75;margin-top:4px}
.kedu-destroy-caveat{background:#fff5ea;border-radius:12px;padding:12px;font-size:.78rem!important}
.kedu-destroy-buttons{display:flex;justify-content:flex-end;gap:9px;margin-top:16px}
.kedu-destroy-buttons button{border-radius:12px;padding:12px 15px;font-weight:750;cursor:pointer}
.danger-primary{background:#bc3939!important;color:white!important;border:0}
.danger-primary:disabled{opacity:.6;cursor:wait}
.kedu-rich-emoji-picker{position:absolute!important;z-index:90;bottom:calc(100% + 8px);left:8px;width:min(96%,438px);max-height:min(70dvh,450px);display:flex;flex-direction:column;padding:12px;gap:10px;border-radius:19px;border:1px solid #dae6e0;box-shadow:0 16px 60px #122e2350;background:#fff;color:#263f36}
.kedu-rich-emoji-picker[hidden]{display:none!important}
.kedu-emoji-search{width:100%;min-height:42px;border-radius:12px;border:1px solid #cbded6;padding:9px 12px;background:#f6fbf8;color:#203b31}
.kedu-emoji-tabs{display:flex;gap:4px;overflow-x:auto;flex-shrink:0;scrollbar-width:thin;padding-bottom:4px}
.kedu-emoji-tab{border:0;border-radius:8px;padding:8px 9px;white-space:nowrap;cursor:pointer;background:#f1f8f4;color:#244b39;font-size:.77rem}
.kedu-emoji-tab[aria-selected="true"]{background:#0a9f6a;color:white;font-weight:750}
.kedu-emoji-grid{overflow-y:auto;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;align-content:start;min-height:140px;max-height:300px}
.kedu-emoji-cell{min-width:0;min-height:43px;padding:4px;background:transparent;border:0;border-radius:9px;font-size:1.7rem;cursor:pointer;display:grid;place-items:center}
.kedu-emoji-cell:hover,.kedu-emoji-cell:focus-visible{background:#e7f7ef;outline:2px solid #9fd7be;outline-offset:1px}
.kedu-emoji-cell img{max-width:100%;height:auto;aspect-ratio:7/4;object-fit:contain;border-radius:2px;box-shadow:0 1px 4px #0004}
.kedu-inline-biafra{display:inline-block;width:32px;height:19px;vertical-align:middle;margin:0 3px;border-radius:2px;box-shadow:0 0 1px #0009;object-fit:cover}
@media(max-width:700px){.kedu-encryption-banner{margin:6px 8px;gap:6px;flex-direction:column;align-items:flex-start}.kedu-encryption-banner span{display:none}.kedu-destroy-dialog{width:100vw;max-width:none;max-height:82dvh;margin:auto 0 0;border-radius:20px 20px 0 0;padding:22px 16px calc(16px + env(safe-area-inset-bottom))}.kedu-rich-emoji-picker{width:calc(100vw - 14px);left:0;max-height:55dvh}.kedu-emoji-grid{grid-template-columns:repeat(7,minmax(0,1fr))}.thread-actions{gap:2px}.thread-actions .quiet-action{font-size:.78rem;padding:6px}}
/* Intentional hard overrides: current premium/legacy CSS does not use a single design-token system. */
html.kedu-dark{color-scheme:dark;background:#071b19}
html.kedu-dark body,html.kedu-dark .shell,html.kedu-dark .workbench,html.kedu-dark .messenger{background:#081f1c!important;color:#e6f4ef!important}
html.kedu-dark .topbar,html.kedu-dark .inbox,html.kedu-dark .thread,html.kedu-dark .active-thread,html.kedu-dark .thread-header,html.kedu-dark .composer,html.kedu-dark .footer-hint,html.kedu-dark .inbox-heading,html.kedu-dark .inbox-switch{background:#102a25!important;color:#e6f4ef!important;border-color:#294940!important}
html.kedu-dark .rail,html.kedu-dark .rail-foot{background:linear-gradient(170deg,#061c19,#092c26)!important;color:#e5f4ed!important}
html.kedu-dark .railnav a:not(.current),html.kedu-dark .railnav a span{color:#e7f4ed!important}
html.kedu-dark .search-bar,html.kedu-dark .search-bar input,html.kedu-dark .composer textarea,html.kedu-dark .kedu-rich-emoji-picker,html.kedu-dark .kedu-emoji-search,html.kedu-dark .conversation,html.kedu-dark #messageList,html.kedu-dark .timeline,html.kedu-dark .empty-state,html.kedu-dark .notice,html.kedu-dark .icon-button,html.kedu-dark .pill,html.kedu-dark .quiet-action{background:#18382f!important;color:#eaf8f2!important;border-color:#335a4e!important}
html.kedu-dark .conversation.active,html.kedu-dark .conversation:hover,html.kedu-dark .pill.active{background:#235444!important;color:#ffffff!important}
html.kedu-dark .thread-person h2,html.kedu-dark .thread-person p,html.kedu-dark .inbox h2,html.kedu-dark .eyebrow,html.kedu-dark .conversation strong,html.kedu-dark .conversation small,html.kedu-dark .inbox-switch button,html.kedu-dark .timeline p,html.kedu-dark .topbar h1{color:#eaf6f1!important}
html.kedu-dark .message-line.mine .bubble{background:#1a7954!important;color:#f8fffb!important;border:1px solid #359777!important}
html.kedu-dark .message-line:not(.mine) .bubble{background:#27423c!important;color:#f7fbf9!important;border:1px solid #3e645b!important}
html.kedu-dark .bubble-crypt,html.kedu-dark .bubble-meta{color:#d2e9df!important}
html.kedu-dark .kedu-encryption-banner{background:#123c30!important;color:#c7fce5!important;border-color:#28654f!important}
html.kedu-dark .kedu-destroy-dialog,html.kedu-dark .kedu-emoji-picker,html.kedu-dark #startDialog,html.kedu-dark #messageMenu,html.kedu-dark #forwardDialog{background:#142d27!important;color:#e7f3ee!important;border-color:#385a4e!important}
html.kedu-dark .kedu-destroy-dialog p,html.kedu-dark .kedu-destroy-choices strong,html.kedu-dark .kedu-destroy-choices small{color:#e4f2eb!important}
html.kedu-dark .kedu-destroy-choices label{background:#1e3b33!important;border-color:#3d6254!important}
html.kedu-dark .kedu-destroy-choices label:has(input:checked){background:#4b302b!important;border-color:#ce7770!important}
html.kedu-dark .kedu-destroy-caveat{background:#4c3822!important}
html.kedu-dark .kedu-emoji-tab{background:#284c40!important;color:#e7f6ed!important}
html.kedu-dark .kedu-emoji-tab[aria-selected="true"]{background:#067b53!important}
html.kedu-dark .kedu-emoji-cell:hover{background:#31624a!important}
html.kedu-dark #destroyChat{color:#ffaaa3!important}
html.kedu-dark input,html.kedu-dark textarea,html.kedu-dark select{color-scheme:dark}
