:root{--bg:#f6f3ea;--ink:#111;--g:#0b3d2e;--g2:#14664b;--card:#fff;--line:#222;--warn:#8a1c1c}
*{box-sizing:border-box}
html{font-size:20px}
body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,"Noto Naskh Arabic","Segoe UI",Tahoma,sans-serif;line-height:1.7;padding-bottom:84px}
body.big{font-size:1.2em}
.sr,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.skip:focus{position:fixed;top:4px;right:4px;background:#fff;padding:8px;z-index:9}
header{background:var(--g);color:#fff;padding:14px 16px;position:sticky;top:0;z-index:5}
h1{margin:0;font-size:1.5rem}
h2{font-size:1.3rem;margin:.6em 0 .3em}
main{padding:14px;max-width:760px;margin:0 auto;outline:none}
button,.btn,input,select,textarea{font:inherit}
button,.btn{display:block;width:100%;min-height:60px;padding:12px 16px;margin:10px 0;border:3px solid var(--g);border-radius:14px;background:var(--g);color:#fff;font-weight:700;font-size:1.1rem;text-align:center;text-decoration:none;cursor:pointer}
button.alt,.btn.alt{background:#fff;color:var(--g)}
button.red{background:var(--warn);border-color:var(--warn)}
button.sm{display:inline-block;width:auto;min-width:88px;min-height:52px;margin:6px 4px;padding:8px 14px}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:5px solid #e6a800;outline-offset:2px}
label{display:block;font-weight:700;margin-top:14px}
input,select,textarea{width:100%;min-height:56px;padding:10px 12px;border:3px solid var(--line);border-radius:12px;background:#fff;color:#000}
textarea{min-height:92px}
.row{display:flex;gap:8px}.row>*{flex:1}
.card{background:var(--card);border:2px solid #bbb;border-radius:14px;padding:12px;margin:10px 0}
.msg{background:#fff;border:2px solid #bbb;border-radius:14px;padding:10px 12px;margin:12px 0}
.msg.mine{background:#e5f3ec;border-color:var(--g2)}
.msg.system{background:#fff4cc;border-color:#c9a400;text-align:center;font-weight:700}
.msg .who{font-weight:800;color:var(--g)}
.msg .time{font-size:.8rem;color:#444}
.msg .txt{white-space:pre-wrap;word-break:break-word;font-size:1.1rem;margin:4px 0}
.quote{border-right:6px solid var(--g2);background:#eef2ee;padding:4px 10px;margin:4px 0;font-size:.9rem}
.err{background:#fde8e8;border:3px solid var(--warn);color:#600;padding:10px;border-radius:12px;font-weight:700}
.ok{background:#e6f4ea;border:3px solid var(--g2);padding:10px;border-radius:12px;font-weight:700}
.badge{display:inline-block;background:var(--g);color:#fff;border-radius:10px;padding:0 10px;font-size:.85rem}
nav#tabs{position:fixed;bottom:0;right:0;left:0;background:#fff;border-top:4px solid var(--g);display:flex;z-index:6}
nav#tabs button{margin:0;border-radius:0;border:0;border-left:2px solid #ccc;background:#fff;color:var(--g);min-height:70px;font-size:.95rem;flex:1;padding:4px}
nav#tabs button[aria-current=page]{background:var(--g);color:#fff}
#composer{position:sticky;bottom:78px;background:var(--bg);padding:8px 0;border-top:3px solid var(--g)}
#composer .row button{margin:6px 0}
.replybar{background:#eef2ee;border:2px solid var(--g2);border-radius:10px;padding:6px 10px}
.today{background:#fff4cc;border:3px solid #c9a400;border-radius:14px;padding:12px;font-weight:800;font-size:1.2rem}
.hide{display:none}
@media (prefers-contrast:more){.msg,.card{border-color:#000}}
