:root{
    --deep:#075E54;
    --green:#128C7E;
    --bright:#25D366;
    --ink:#183e35;
    --muted:#81958c;
    --line:#e1eae4;
    --gold:#c4a469;
    font-family:Inter,'Segoe UI',Arial,sans-serif;
    color:var(--ink);
    font-size:14px;
}

*{box-sizing:border-box}

body{
    margin:0;
    background:#edf3ef;
    font-family:Inter,'Segoe UI',Arial,sans-serif;
}

button,input,textarea,select{font:inherit}
button,a{cursor:pointer}
button{border:0}
button:disabled{opacity:.5;cursor:wait}
a{color:inherit;text-decoration:none}

button:focus-visible,a:focus-visible{
    outline:3px solid var(--gold);
    outline-offset:3px;
}

input,textarea,select{
    width:100%;
    padding:12px;
    border:1px solid #d9e4dc;
    border-radius:8px;
    background:#fff;
    color:var(--ink);
    outline:none;
}

input:focus,textarea:focus,select:focus{
    border-color:var(--green);
    box-shadow:0 0 0 3px #128C7E15;
}

label{
    display:block;
    font-size:12px;
    font-weight:600;
    margin:17px 0;
}

label input,label textarea,label select{margin-top:8px}
h1,h2,h3,p{margin-top:0}
.hidden{display:none!important}

.primary{
    background:var(--deep);
    color:white;
    border-radius:8px;
    padding:13px 19px;
    font-size:12px;
    font-weight:600;
}

.primary:hover{background:var(--green)}
.full{width:100%}

.eyebrow{
    font-size:8px;
    letter-spacing:2px;
    font-weight:700;
    color:#8fada0;
}

.badge{
    display:inline-block;
    font-size:8px;
    letter-spacing:1.4px;
    font-weight:700;
    padding:8px 10px;
    border-radius:4px;
    background:#edf4e9;
    color:#5d7b54;
}

.privacy{
    font-size:10px;
    line-height:1.8;
    color:#8c9d90;
}

.staff-link{
    font-size:11px;
    color:#7b9585;
    display:inline-block;
    margin-top:18px;
}

.brand-logo{
    width:85px;
    height:95px;
    object-fit:contain;
}

/* Splash */

.splash{
    position:fixed;
    inset:0;
    z-index:30;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    padding:25px;
    text-align:center;
}

.splash img{
    width:110px;
    height:125px;
    object-fit:contain;
    animation:logo-zoom 1.6s ease-out;
}

.splash h1{
    font:30px Georgia,serif;
    margin:25px 0 10px;
    color:var(--deep);
}

.splash p{
    font:19px Georgia,serif;
    color:#8a9f8b;
}

.splash-loader{
    width:90px;
    height:3px;
    margin-top:28px;
    background:linear-gradient(
        90deg,var(--bright) 50%,#ebf2ea 50%
    );
    background-size:200% 100%;
    animation:loading 1s infinite;
}

@keyframes logo-zoom{
    from{opacity:0;transform:scale(.7)}
    to{opacity:1;transform:scale(1)}
}

@keyframes loading{
    to{background-position:-200% 0}
}

/* Student entry */

.entry{
    min-height:100dvh;
    display:grid;
    place-items:center;
    padding:40px 20px;
    background:radial-gradient(
        ellipse at 10% 10%,#dbe9dc,transparent 65%
    ),#eff4f0;
}

.welcome-card{
    width:100%;
    max-width:1010px;
    display:grid;
    grid-template-columns:1fr 1fr;
    background:#fff;
    border:1px solid #e0e9df;
    border-radius:19px;
    overflow:hidden;
    box-shadow:0 24px 80px #214d2b10;
}

.welcome-brand{
    background:radial-gradient(
        ellipse at 80% 80%,#197863,transparent 70%
    ),var(--deep);
    padding:45px;
    color:white;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}

.welcome-brand .brand-logo{
    margin:37px 0 25px;
    background:#fff;
    border-radius:12px;
    padding:7px;
}

.welcome-brand h1{
    font:33px/1.2 Georgia,serif;
    letter-spacing:-.4px;
    margin-bottom:12px;
}

.welcome-brand>p{
    font:19px Georgia,serif;
    color:#bfd2be;
}

.welcome-caption{
    margin-top:60px;
    color:#d4e4d0;
    font:25px/1.4 Georgia,serif;
}

.welcome-form{
    padding:65px 48px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.welcome-form h2{
    font:34px Georgia,serif;
    letter-spacing:-1px;
    margin:25px 0 12px;
}

.welcome-form>p{
    font-size:11px;
    color:#8d9d90;
    line-height:1.8;
}

.welcome-form .primary{
    display:flex;
    justify-content:space-between;
    margin-top:25px;
}

.welcome-form .privacy{margin-top:23px}

/* Chat */

.user-shell{
    height:94dvh;
    max-width:1000px;
    margin:3dvh auto;
    background:#fff;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 14px 60px #20482e15;
    border:1px solid #dbe6da;
}

.chat-panel{
    height:100%;
    display:flex;
    flex-direction:column;
    min-height:0;
    min-width:0;
}

.chat-header{
    background:var(--deep);
    color:white;
    min-height:72px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:13px 20px;
}

.avatar-logo{
    width:39px;
    height:43px;
    object-fit:contain;
    background:white;
    border-radius:8px;
    padding:3px;
}

.chat-contact{flex:1;min-width:0}

.chat-contact h2{
    font-size:14px;
    font-weight:600;
    margin:0 0 5px;
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow:hidden;
}

.chat-contact small{
    font-size:10px;
    color:#c6ded0;
}

.online-dot{
    width:6px;
    height:6px;
    display:inline-block;
    border-radius:50%;
    background:var(--bright);
    margin-right:5px;
}

.online-dot.offline{background:#9baba1}

.icon-button{
    background:transparent;
    color:inherit;
    min-width:28px;
    min-height:32px;
    padding:5px;
    font-size:22px;
    border-radius:6px;
}

.chat-header .icon-button{
    font-size:16px;
    color:#d3e5d6;
}

.icon-button.enabled{
    background:#25D36625;
    color:#25D366;
}

.header-action{
    background:#ffffff15;
    color:#e5efe4;
    border:1px solid #ffffff20;
    padding:8px 10px;
    border-radius:6px;
    font-size:9px;
}

.chat-notice{
    font-size:9px;
    text-align:center;
    background:#f8f8e9;
    color:#929976;
    padding:7px;
}

.connection-banner{
    padding:9px;
    text-align:center;
    font-size:10px;
    background:#fff2d2;
    color:#957532;
}

.blocked-banner{
    padding:10px;
    background:#ffebe7;
    color:#aa5045;
    text-align:center;
    font-size:11px;
}

.message-list{
    flex:1;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    display:flex;
    flex-direction:column;
    gap:13px;
    padding:24px;
    background-color:#E5DDD5;
    background-image:radial-gradient(
        #9da99725 .8px,transparent .8px
    );
    background-size:18px 18px;
}

.message-row{
    display:flex;
    justify-content:flex-start;
    flex-shrink:0;
}

.message-row.mine{justify-content:flex-end}

.bubble{
    position:relative;
    max-width:78%;
    min-width:95px;
    background:#fff;
    border-radius:0 10px 10px 10px;
    padding:10px 12px;
    box-shadow:0 1px 2px #2d412616;
    overflow-wrap:anywhere;
}

.bubble:before{
    content:'';
    position:absolute;
    top:0;
    left:-6px;
    border-top:8px solid white;
    border-left:7px solid transparent;
}

.mine .bubble{
    background:#DCF8C6;
    border-radius:10px 0 10px 10px;
}

.mine .bubble:before{
    left:auto;
    right:-6px;
    border-top-color:#DCF8C6;
    border-left:0;
    border-right:7px solid transparent;
}

.bubble-sender{
    font-size:9px;
    color:#588d66;
    font-weight:600;
}

.bubble-text{
    font-size:12px;
    line-height:1.65;
    white-space:pre-wrap;
    margin:4px 0 0;
}

.bubble-footer{
    display:flex;
    gap:7px;
    justify-content:flex-end;
    align-items:center;
    margin-top:5px;
    color:#8c9d8b;
    font-size:8px;
}

.ticks{
    font-size:12px;
    letter-spacing:-4px;
    padding-right:4px;
    color:#839288;
}

.ticks.seen{color:#34b7f1}

.attachment{
    padding:9px;
    background:#ffffff45;
    border:1px solid #d7e4cf;
    border-radius:7px;
    margin-top:7px;
}

.attachment-name{
    display:block;
    font-size:10px;
    line-height:1.5;
    overflow-wrap:anywhere;
    color:#557a48;
}

.attachment img,.attachment-preview img{
    display:block;
    max-width:100%;
    max-height:280px;
    object-fit:contain;
    border-radius:6px;
    margin-top:8px;
}

.attachment audio,.attachment-preview audio{
    width:260px;
    max-width:100%;
    height:38px;
    margin-top:8px;
}

.attachment video{
    width:300px;
    max-width:100%;
    max-height:280px;
}

.preview-media{
    font-size:10px;
    border-radius:5px;
    padding:6px 9px;
    margin-top:7px;
    background:#edf4e6;
    color:#5f8050;
    border:1px solid #dfe9d6;
}

.history-bar{
    padding:6px;
    text-align:center;
    background:#e9e4dc;
}

.history-bar button{
    font-size:10px;
    color:#547f61;
    background:#fdfdf8;
    padding:6px 12px;
    border-radius:15px;
}

.composer{
    display:flex;
    align-items:flex-end;
    gap:10px;
    padding:12px 15px;
    background:#f5f7f2;
    border-top:1px solid #e1e8db;
}

.composer>.icon-button{
    color:#7c9079;
    font-size:25px;
    margin-bottom:4px;
}

.composer textarea{
    resize:none;
    border:1px solid #e1e8dc;
    background:white;
    border-radius:22px;
    padding:12px 15px;
    font-size:12px;
    line-height:1.5;
    max-height:110px;
    min-height:44px;
    flex:1;
    min-width:0;
}

.send-button,.mic-button{
    width:42px;
    height:42px;
    border-radius:50%;
    display:grid;
    place-items:center;
    flex-shrink:0;
    color:white;
    background:var(--green);
    padding:0;
}

.mic-button{
    background:#e5efdf;
    color:#5f8150;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
}

.mic-button.recording{
    background:#b95848;
    color:white;
}

.typing-indicator{
    display:flex;
    gap:3px;
    align-items:center;
    padding:8px 22px;
    background:#ede8df;
    min-height:28px;
}

.typing-indicator>span{
    width:4px;
    height:4px;
    border-radius:50%;
    background:#7ea07b;
    animation:typing 1s infinite;
}

.typing-indicator>span:nth-child(2){animation-delay:.15s}
.typing-indicator>span:nth-child(3){animation-delay:.3s}

.typing-indicator small{
    font-size:9px;
    margin-left:5px;
    color:#849078;
}

@keyframes typing{
    50%{opacity:.25;transform:translateY(-2px)}
}

.record-bar{
    display:flex;
    align-items:center;
    gap:10px;
    background:#ffefea;
    color:#ab594b;
    padding:12px 18px;
    font-size:10px;
}

.record-dot{
    height:7px;
    width:7px;
    background:#cf5b48;
    border-radius:50%;
    animation:typing .8s infinite;
}

.record-bar.cancel{background:#efd7d1}

.attachment-preview{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
    padding:12px 18px;
    background:#f4f6e6;
    font-size:10px;
    color:#7c895c;
    max-height:300px;
    overflow:auto;
}

.attachment-preview>span{
    flex:1;
    min-width:100px;
    overflow-wrap:anywhere;
}

.attachment-preview button{
    font-size:10px;
    background:#e8edd8;
    padding:6px 9px;
    border-radius:5px;
    color:#667d48;
}

.upload-progress{
    display:flex;
    align-items:center;
    gap:10px;
    padding:9px 18px;
    background:#e6f1df;
    font-size:10px;
    color:#63834f;
}

.upload-progress progress{
    flex:1;
    max-width:200px;
    height:6px;
    accent-color:var(--green);
}

.upload-progress button{
    padding:5px 8px;
    border-radius:5px;
    background:#fff;
    color:#7b875a;
}

.emoji-fallback{
    padding:10px;
    background:white;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.emoji-fallback button{
    font-size:23px;
    background:#f5f8f1;
    border-radius:5px;
    padding:5px;
}

/* Admin */

.admin-body{
    padding:20px;
    background:#edf3ef;
}

.admin-shell,.rules-shell{
    max-width:1500px;
    margin:auto;
    background:#fff;
    border:1px solid #dfe8dc;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 12px 55px #244d2a08;
}

.admin-shell{
    height:calc(100dvh - 40px);
    display:flex;
    flex-direction:column;
}

.admin-nav{
    min-height:65px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    padding:12px 25px;
    border-bottom:1px solid var(--line);
    background:#fff;
}

.admin-brand{
    display:flex;
    align-items:center;
    gap:12px;
    font:20px Georgia,serif;
    color:var(--deep);
}

.admin-brand img{
    width:37px;
    height:42px;
    object-fit:contain;
}

.admin-brand b{
    font-weight:400;
    color:#90a18b;
    font-size:14px;
    margin-left:6px;
}

.admin-nav>div{
    display:flex;
    align-items:center;
    gap:8px;
}

.admin-nav>div>a,.admin-nav button{
    font-size:10px;
    padding:9px 12px;
    border-radius:6px;
    background:#f5f8f1;
    color:#75906a;
}

.admin-nav .active{
    background:var(--deep);
    color:white;
}

.overview{
    padding:24px 28px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    background:#fbfcf8;
    border-bottom:1px solid var(--line);
}

.overview h1{
    font:27px Georgia,serif;
    margin:10px 0;
}

.overview p{
    font-size:11px;
    color:#96a28d;
    margin:0;
}

.stats{display:flex;gap:10px}

.stats>div{
    min-width:100px;
    background:white;
    border:1px solid #e3eadd;
    border-radius:10px;
    padding:13px 17px;
}

.stats strong{
    display:block;
    font:25px Georgia,serif;
    color:#547a47;
}

.stats span{
    font-size:9px;
    color:#90a083;
    display:block;
    margin-top:6px;
}

.workspace{
    display:grid;
    grid-template-columns:30% 70%;
    flex:1;
    min-height:0;
}

.inbox{
    border-right:1px solid var(--line);
    display:flex;
    flex-direction:column;
    min-height:0;
    background:#fff;
}

.inbox-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:19px 20px 12px;
}

.inbox-heading h2{
    font-size:13px;
    margin:0;
}

.inbox-heading>span{
    font-size:9px;
    padding:4px 7px;
    background:#edf4e7;
    border-radius:5px;
    color:#72905e;
}

.inbox>input,.inbox>select{
    width:calc(100% - 32px);
    margin:0 16px 10px;
    padding:10px;
    font-size:10px;
    background:#f8fbf5;
    border-color:#e4ebdd;
}

.user-list{flex:1;overflow:auto}

.user-item{
    width:100%;
    display:flex;
    gap:11px;
    align-items:center;
    text-align:left;
    padding:15px 16px;
    background:white;
    border-top:1px solid #f0f4eb;
    border-left:3px solid transparent;
}

.user-item.active{
    background:#edf6e6;
    border-left-color:#128C7E;
}

.user-item:hover{background:#f3f8ee}

.initial-avatar{
    width:36px;
    height:36px;
    flex-shrink:0;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:#e8f0e0;
    color:#6d8c59;
    font-size:12px;
    font-weight:600;
}

.user-details{flex:1;min-width:0}

.user-details b{
    display:block;
    font-size:11px;
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow:hidden;
}

.user-details small,.user-details p{
    display:block;
    font-size:9px;
    color:#93a089;
    margin:5px 0 0;
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow:hidden;
}

.unread-badge{
    min-width:19px;
    height:19px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#25D366;
    color:#075E54;
    font-size:9px;
    font-weight:bold;
}

.user-online{
    width:6px;
    height:6px;
    border-radius:50%;
    display:inline-block;
    background:#25D366;
    margin-left:6px;
}

.chat-area{min-width:0;min-height:0}

.admin-shell .chat-header{
    background:#fff;
    color:var(--ink);
    border-bottom:1px solid var(--line);
    min-height:66px;
}

.admin-shell .chat-header small{color:#91a087}

.admin-shell .chat-header .icon-button{
    color:#789267;
    font-size:12px;
}

.admin-shell .header-action{
    color:#7a905f;
    background:#f2f6e9;
    border-color:#e0e8d5;
}

.admin-shell .message-list{background-color:#e9eee3}

.empty-chat{
    height:100%;
    display:grid;
    place-content:center;
    text-align:center;
    padding:25px;
    background:#f8fbf4;
    color:#839677;
}

.empty-chat h2{
    font:27px Georgia,serif;
    color:#577d49;
}

.empty-chat p{font-size:11px}

.empty-icon{
    font-size:38px;
    margin-bottom:20px;
    color:#acbea0;
}

.mobile-only{display:none}

/* Admin login / settings */

.staff-entry{
    min-height:100dvh;
    display:grid;
    place-items:center;
    background:radial-gradient(
        ellipse at 10% 10%,#d9e9d9,transparent 70%
    ),#eff4ed;
    padding:25px;
}

.staff-card{
    max-width:430px;
    width:100%;
    padding:40px;
    background:#fff;
    border:1px solid #e0e9d9;
    border-radius:16px;
    box-shadow:0 20px 60px #2b522b09;
}

.staff-card .brand-logo{
    display:block;
    width:55px;
    height:65px;
    margin-bottom:25px;
}

.staff-card h1{
    font:30px Georgia,serif;
    margin:25px 0 12px;
}

.staff-card>p{
    font-size:11px;
    color:#92a18a;
    line-height:1.8;
}

.staff-card form{margin-top:25px}

.form-error{
    background:#fff0ec;
    color:#b05c4a!important;
    padding:10px;
    border-radius:6px;
}

/* Auto replies */

.rules-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:35px 30px;
    gap:20px;
    background:#fbfcf8;
}

.rules-heading h1{
    font:29px Georgia,serif;
    margin:12px 0;
}

.rules-heading p{
    font-size:11px;
    color:#94a18b;
    line-height:1.8;
    max-width:650px;
    margin:0;
}

.rules-list{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(270px,1fr));
    gap:18px;
    padding:25px 30px 35px;
}

.rule-card{
    border:1px solid #e1e9d9;
    border-radius:12px;
    padding:22px;
    background:#fff;
}

.rule-card h3{
    font-size:14px;
    margin:12px 0;
    color:#5d7d4f;
    overflow-wrap:anywhere;
}

.rule-card p{
    font-size:11px;
    line-height:1.8;
    color:#93a087;
    white-space:pre-wrap;
}

.rule-card small{
    font-size:9px;
    color:#99a68d;
}

.rule-actions{
    display:flex;
    justify-content:space-between;
    padding-top:13px;
    border-top:1px solid #edf2e6;
    margin-top:15px;
}

.rule-actions button{
    padding:7px 10px;
    border-radius:5px;
    font-size:10px;
    background:#f1f6e9;
    color:#82976d;
}

.rule-actions .danger{color:#b47a67}

/* Dialogs / toast */

dialog{
    border:1px solid #e3eadd;
    border-radius:13px;
    padding:26px;
    width:510px;
    max-width:94vw;
    max-height:92dvh;
    color:var(--ink);
}

dialog::backdrop{
    background:#0f302270;
    backdrop-filter:blur(3px);
}

.dialog-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:17px;
}

.dialog-heading h2{
    font:24px Georgia,serif;
    margin:0;
}

.dialog-heading button{
    background:#eef4e7;
    color:#7d9367;
    border-radius:6px;
    padding:6px 9px;
}

.checkbox-label{
    display:flex;
    gap:8px;
    align-items:center;
}

.checkbox-label input{
    width:auto;
    margin:0;
    accent-color:var(--green);
}

#user-info-content p{
    font-size:12px;
    line-height:1.8;
    overflow-wrap:anywhere;
}

.toast{
    position:fixed;
    bottom:22px;
    left:50%;
    transform:translateX(-50%);
    max-width:92vw;
    padding:13px 20px;
    border-radius:8px;
    background:#075E54;
    color:#fff;
    box-shadow:0 8px 30px #193e2920;
    font-size:12px;
    z-index:100;
}

.toast.error{background:#a34c3d}

/* Responsive */

@media(max-width:1000px){
    .admin-body{padding:0}
    .admin-shell{height:100dvh;border-radius:0}
    .admin-brand b{display:none}
    .overview{padding:18px}
    .overview h1{font-size:24px}
    .stats>div{min-width:85px;padding:12px}
    .workspace{grid-template-columns:34% 66%}
    .admin-nav{padding:12px 18px}
    .welcome-form{padding:40px 35px}
    .welcome-brand{padding:35px}
    .welcome-brand h1{font-size:29px}
    .welcome-caption{font-size:22px}
}

@media(max-width:700px){
    .entry{padding:0;display:block}

    .welcome-card{
        border:0;
        border-radius:0;
        min-height:100dvh;
        grid-template-columns:1fr;
    }

    .welcome-brand{
        padding:25px 27px 24px;
        display:block;
    }

    .welcome-brand .brand-logo{
        width:57px;
        height:64px;
        margin:20px 0 14px;
        display:block;
    }

    .welcome-brand h1{font-size:27px;max-width:380px}
    .welcome-brand>p{font-size:17px;margin:0}
    .welcome-caption{display:none}

    .welcome-form{padding:28px 27px 35px}
    .welcome-form h2{font-size:30px;margin-top:20px}
    .welcome-form label{margin:15px 0}
    .welcome-form .privacy{margin-bottom:0}

    .user-shell{
        margin:0;
        height:100dvh;
        border:0;
        border-radius:0;
    }

    .chat-header{
        padding:11px 12px;
        gap:8px;
        min-height:66px;
    }

    .chat-contact h2{font-size:12px}
    .chat-contact small{font-size:9px}
    .avatar-logo{width:32px;height:37px}

    .chat-header .icon-button{
        font-size:15px;
        min-width:23px;
        padding:3px;
    }

    .header-action{font-size:9px;padding:7px}
    .message-list{padding:18px 13px}
    .bubble{max-width:87%}
    .bubble-text{font-size:12px}

    .composer{
        padding:10px;
        gap:6px;
        padding-bottom:max(10px,env(safe-area-inset-bottom));
    }

    .composer>.icon-button{
        font-size:23px;
        min-width:24px;
        padding:3px;
    }

    .composer textarea{
        font-size:12px;
        padding:11px 12px;
        min-height:41px;
    }

    .send-button,.mic-button{width:35px;height:39px}
    .send-button svg,.mic-button svg{width:17px}
    .attachment audio{width:235px;max-width:100%}
    .chat-notice{font-size:8px}

    .admin-nav{
        padding:10px 12px;
        gap:8px;
        min-height:58px;
    }

    .admin-brand{font-size:17px;gap:7px}
    .admin-brand img{width:26px;height:31px}
    .admin-nav>div{gap:4px}

    .admin-nav>div>a,.admin-nav button{
        padding:8px;
        font-size:8px;
    }

    .admin-nav a[href='settings.php']{display:none}

    .overview{padding:12px}
    .overview>div:first-child{display:none}
    .stats{width:100%;gap:8px}

    .stats>div{
        flex:1;
        padding:10px 12px;
        min-width:0;
        border-radius:8px;
    }

    .stats strong{font-size:23px}
    .stats span{font-size:8px}

    .workspace{grid-template-columns:1fr}
    .chat-area{display:none}
    .workspace.selected .chat-area{display:block}
    .workspace.selected .inbox{display:none}
    .admin-shell.chat-open .overview{display:none}

    .mobile-only{display:block}
    .inbox-heading{padding-top:16px}
    .user-item{padding:16px}
    .user-details b{font-size:12px}
    .user-details small,.user-details p{font-size:10px}

    .admin-shell .chat-header .icon-button{font-size:10px}
    .admin-shell .header-action{font-size:8px;padding:6px}

    .rules-shell{
        border-radius:0;
        border:0;
        min-height:100dvh;
    }

    .rules-heading{
        padding:25px 18px;
        align-items:flex-start;
        gap:12px;
    }

    .rules-heading h1{font-size:24px}
    .rules-heading p{font-size:10px}

    .rules-heading .primary{
        font-size:9px;
        white-space:nowrap;
        padding:10px;
    }

    .rules-list{
        padding:15px 18px 25px;
        grid-template-columns:1fr;
    }

    .staff-card{padding:30px}
    .record-bar{font-size:9px;padding:10px}
    .attachment-preview{padding:10px 12px}
    .upload-progress{font-size:9px;padding:8px 12px}
    .splash h1{font-size:26px}
}

@media(prefers-reduced-motion:reduce){
    *{
        animation:none!important;
        scroll-behavior:auto!important;
    }
}