/* Kedu R7E, safe scoped viewer and compact active conversation header. */
.kedu-r7e-viewer{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;padding:0;margin:0;border:0;background:#07130ff3;color:white;z-index:99999;overscroll-behavior:contain}
.kedu-r7e-viewer::backdrop{background:#020e0bdc;backdrop-filter:blur(14px)}
.kedu-r7e-v-container{height:100%;width:100%;display:flex;flex-direction:column;min-height:0;box-sizing:border-box;padding:env(safe-area-inset-top) 14px env(safe-area-inset-bottom)}
.kedu-r7e-v-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 2px;flex:none;min-width:0}
.kedu-r7e-v-heading{min-width:0;display:flex;flex-direction:column;gap:3px}.kedu-r7e-v-heading strong{font-size:14px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:38vw}.kedu-r7e-v-counter{font-size:12px;color:#b9d6c8}
.kedu-r7e-v-tools{display:flex;align-items:center;gap:8px;flex:none}.kedu-r7e-v-tools button,.kedu-r7e-v-arrow{font:700 13px/1.2 system-ui,sans-serif;cursor:pointer;color:#fff;background:#ffffff18;border:1px solid #ffffff35;border-radius:12px;padding:10px 13px;min-height:42px}.kedu-r7e-v-tools button:hover,.kedu-r7e-v-arrow:hover{background:#ffffff30}.kedu-r7e-v-tools button:disabled{opacity:.45;cursor:wait}.kedu-r7e-v-tools .kedu-r7e-v-close{font-size:24px;line-height:1;padding:7px 14px}
.kedu-r7e-v-stage{display:flex;align-items:center;justify-content:space-between;min-height:0;flex:1;gap:9px}.kedu-r7e-v-arrow{font-size:36px;padding:6px 13px;flex:none}.kedu-r7e-v-arrow[hidden]{visibility:hidden;display:inline-flex!important}.kedu-r7e-v-content{min-width:0;min-height:0;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;overflow:hidden}.kedu-r7e-v-media{max-width:100%;max-height:100%;min-width:0;object-fit:contain;border-radius:8px}.kedu-r7e-v-content video{width:auto;max-width:min(100%,1150px);background:#000}.kedu-r7e-v-content audio{width:min(100%,500px);max-width:100%}.kedu-r7e-v-audio-label{font-size:16px;margin-bottom:20px}.kedu-r7e-v-loading,.kedu-r7e-v-error{font:600 16px/1.5 system-ui;max-width:450px;text-align:center}.kedu-r7e-v-error{color:#ffb7bc}.kedu-r7e-v-help{text-align:center;color:#c6d7cc;font-size:12px;min-height:30px;padding:7px 0}
.kedu-secure-preview[role="button"]{cursor:zoom-in}.kedu-secure-preview[role="button"]:focus-visible{outline:3px solid #14a777;outline-offset:4px}
.kedu-r7e-chat-active header.topbar{display:none!important}.kedu-r7e-chat-active.kedu-r7e-private-verified #k7k-encryption-state{display:none!important}
.kedu-r7e-header-actions{display:flex;align-items:center;gap:7px;flex:none;margin-left:auto;position:relative}.kedu-r7e-header-actions>button{font-size:19px;min-width:39px;height:39px;border:1px solid #d8e7e0;border-radius:13px;background:#f3faf6;color:#07553b;cursor:pointer}.kedu-r7e-header-actions>button:disabled{opacity:.55;cursor:not-allowed}.kedu-r7e-header-actions>button:focus-visible{outline:2px solid #0c9464}
.kedu-r7e-header-menu{position:absolute;right:0;top:calc(100% + 9px);width:min(300px,calc(100vw - 24px));max-height:65dvh;overflow-y:auto;box-sizing:border-box;padding:13px;background:#fff;border:1px solid #d0e7dc;border-radius:18px;box-shadow:0 22px 55px #0a291d43;z-index:6000;color:#154c37}.kedu-r7e-header-menu[hidden]{display:none!important}.kedu-r7e-settings-title{font-size:11px;font-weight:850;letter-spacing:.09em;text-transform:uppercase;color:#597767;margin:6px 4px 9px}
.kedu-r7e-header-menu>.thread-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px!important;width:100%!important;margin:0 0 14px!important;padding:0!important;position:static!important;transform:none!important;min-width:0!important}.kedu-r7e-header-menu>.thread-actions button{width:100%;min-width:0!important;white-space:nowrap!important;padding:9px!important;font-size:13px!important;border-radius:10px!important;display:block!important}.kedu-r7e-header-menu>.top-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important;position:static!important;width:100%!important;transform:none!important;margin:0!important;padding:0!important;min-width:0!important}.kedu-r7e-header-menu>.top-actions>*{margin:0!important;max-width:100%!important;min-width:0!important;width:100%!important;justify-content:center!important}
.kedu-r7e-security-pill{display:inline-block;font-size:11px;line-height:1.35;color:#20765a;white-space:nowrap}.kedu-r7e-security-pill[hidden]{display:none!important}
.kedu-r7e-chat-active .thread-header{min-height:62px!important;padding-top:8px!important;padding-bottom:8px!important;gap:8px!important}.kedu-r7e-chat-active .thread-person{min-width:0!important;flex:1!important}.kedu-r7e-chat-active #peerName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kedu-r7e-chat-active .thread-header>.thread-actions{display:none!important}
html.kedu-dark .kedu-r7e-header-menu,body.kedu-dark .kedu-r7e-header-menu{background:#163b2e;color:#f3fff8;border-color:#426556}html.kedu-dark .kedu-r7e-header-actions>button,body.kedu-dark .kedu-r7e-header-actions>button{background:#23503b;color:#e6fff2;border-color:#466853}
@media(max-width:650px){.kedu-r7e-v-heading strong{max-width:28vw}.kedu-r7e-v-tools{gap:4px}.kedu-r7e-v-tools button{padding:8px;font-size:12px}.kedu-r7e-v-arrow{padding:6px;font-size:30px}.kedu-r7e-v-container{padding-inline:5px}.kedu-r7e-v-help{font-size:10px}.kedu-r7e-header-actions{gap:4px}.kedu-r7e-header-actions>button{min-width:34px;height:36px}.kedu-r7e-chat-active .thread-header{gap:5px!important}.kedu-r7e-chat-active .thread-person p{display:none!important}}
@media(prefers-reduced-motion:reduce){.kedu-r7e-viewer *{transition:none!important;animation:none!important}}

/* R7F: compact attachment cards — no large inline preview resizing chat rows. */
.kedu-r7f-media-card{max-width:min(100%,350px);padding:0!important;overflow:hidden;background:transparent!important}
.kedu-r7f-attachment-card{display:flex;align-items:center;gap:11px;text-align:left;width:100%;min-width:0;min-height:76px;padding:12px;border:0;border-radius:13px;background:linear-gradient(125deg,#e7f9f0,#f5fcf9);color:#174b37;cursor:pointer;font-family:inherit}
.kedu-r7f-attachment-card:hover,.kedu-r7f-attachment-card:focus-visible{background:linear-gradient(125deg,#d0f5e2,#edfff5);outline:2px solid #27a97a;outline-offset:-2px}
.kedu-r7f-attachment-icon{display:grid;place-items:center;flex:none;width:50px;height:50px;border-radius:14px;background:#c9f2df;font-size:24px}
.kedu-r7f-attachment-text{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
.kedu-r7f-attachment-text strong{font-size:14px}.kedu-r7f-attachment-text small{font-size:12px;line-height:1.35;overflow-wrap:anywhere;max-height:3.6em;overflow:hidden}
.kedu-r7f-attachment-action{font-size:12px;white-space:nowrap;font-weight:800;color:#087d5b}
.kedu-r7f-photo-card{flex-wrap:wrap;justify-content:space-between}
.kedu-r7f-photo-thumb:not([hidden]){display:block;width:100%;height:160px;object-fit:cover;border-radius:9px;flex:none;margin-bottom:2px}
.kedu-r7f-photo-card:has(.kedu-r7f-photo-thumb:not([hidden])) .kedu-r7f-attachment-text{flex:1}
.kedu-r7f-attachment-card:disabled{cursor:progress;opacity:.75}
html.kedu-dark .kedu-r7f-attachment-card,body.kedu-dark .kedu-r7f-attachment-card{background:#184a38;color:#e5fff2}
html.kedu-dark .kedu-r7f-attachment-action,body.kedu-dark .kedu-r7f-attachment-action{color:#86f9c6}
@media(max-width:540px){.kedu-r7f-attachment-card{gap:7px;padding:9px;min-height:64px}.kedu-r7f-attachment-icon{width:39px;height:39px;font-size:21px}.kedu-r7f-attachment-text strong{font-size:13px}.kedu-r7f-attachment-action{font-size:11px}}
