:root { --bg:#0b1220; --panel:#121b2e; --line:#223049; --text:#e8eef7; --muted:#8a9bb5; --accent:#2fb6c9; --warn:#ff8a8a; --ok:#6fd39a; }
* { box-sizing:border-box; margin:0; padding:0; }
html, body { height:100%; max-width:100%; overflow-x:hidden; }
body { background:var(--bg); color:var(--text); font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; padding-bottom:env(safe-area-inset-bottom); }
[hidden] { display:none !important; }
.muted { color:var(--muted); } .tiny { font-size:12px; } .err { color:var(--warn); min-height:20px; margin-top:10px; font-size:14px; }
.center { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; }
.center-text { text-align:center; padding:30px 16px; } .pad { padding:14px 16px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:28px 24px; max-width:380px; width:100%; text-align:center; }
.card h1 { font-size:26px; margin:10px 0 6px; } .logo { border-radius:16px; }
.btn { white-space:nowrap; display:inline-block; background:transparent; color:var(--accent); border:1.5px solid var(--accent); padding:10px 18px; border-radius:10px; font:600 14px inherit; cursor:pointer; text-decoration:none; }
.btn.primary { background:var(--accent); color:#04141a; width:100%; padding:13px; font-size:16px; margin-top:18px; }
.btn.small { padding:7px 12px; font-size:13px; } .btn:disabled { opacity:.6; }
.bar { position:sticky; top:0; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px; padding-top:max(10px,env(safe-area-inset-top)); background:var(--bg); border-bottom:1px solid var(--line); }
.title { display:flex; align-items:center; gap:9px; font-weight:700; font-size:17px; min-width:0; }
.title span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.count { background:var(--accent); color:#04141a; border-radius:999px; padding:1px 8px; font-size:12px; font-weight:800; }
.icon { background:none; border:none; color:var(--text); font-size:22px; padding:4px 8px; cursor:pointer; border-radius:8px; }
.icon:active { background:var(--panel); }
.tabs { display:flex; border-bottom:1px solid var(--line); background:var(--bg); position:sticky; top:49px; z-index:4; }
.tab { flex:1; background:none; border:none; color:var(--muted); padding:12px 4px; font:600 14px inherit; cursor:pointer; border-bottom:3px solid transparent; }
.tab.on { color:var(--text); border-bottom-color:var(--accent); }
.search { display:flex; gap:8px; padding:10px 14px 4px; }
.search input { flex:1; min-width:0; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:10px; padding:10px 12px; font:inherit; outline:none; }
.search input:focus { border-color:var(--accent); }
.chips { display:flex; gap:8px; overflow-x:auto; padding:8px 14px; scrollbar-width:none; }
.chips::-webkit-scrollbar { display:none; }
.chip { flex:none; display:flex; align-items:center; gap:6px; background:var(--panel); border:1px solid var(--line); color:var(--text); border-radius:999px; padding:6px 12px; font:600 13px inherit; cursor:pointer; white-space:nowrap; }
.chip.on { border-color:var(--accent); background:#0f2a33; }
.dot { width:10px; height:10px; border-radius:50%; flex:none; display:inline-block; }
.chip .n { background:#1d2b44; border-radius:999px; padding:0 7px; font-size:12px; }
.modeRow { display:flex; align-items:center; gap:8px; padding:4px 14px 10px; flex-wrap:wrap; }
.pill { background:none; border:1px solid var(--line); color:var(--muted); border-radius:999px; padding:5px 12px; font:600 13px inherit; cursor:pointer; }
.pill.on { color:var(--text); border-color:var(--accent); }
.list { list-style:none; }
.row { display:flex; gap:11px; padding:12px 14px; border-top:1px solid var(--line); cursor:pointer; }
.row:active { background:var(--panel); }
.row .dot { margin-top:6px; }
.row .main { min-width:0; flex:1; }
.row .top { display:flex; justify-content:space-between; gap:10px; }
.row .from { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row .when { color:var(--muted); font-size:12px; flex:none; }
.row .subj { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row .snip { color:var(--muted); font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row.unread .from, .row.unread .subj { font-weight:800; }
.row.bulk { opacity:.62; }
.tag { display:inline-block; font-size:11px; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:0 6px; margin-left:6px; vertical-align:1px; }
.overlay { position:fixed; inset:0; background:var(--bg); z-index:20; overflow-y:auto; }
.tbody { padding:6px 14px 40px; }
.msg { border:1px solid var(--line); background:var(--panel); border-radius:12px; padding:12px; margin:12px 0; }
.msg .meta { font-size:12px; color:var(--muted); margin-bottom:8px; word-break:break-word; }
.msg .meta b { color:var(--text); }
.msg pre { white-space:pre-wrap; word-wrap:break-word; font:14px/1.5 inherit; }
.acct { display:flex; align-items:center; gap:11px; padding:13px 14px; border-top:1px solid var(--line); }
.acct .main { flex:1; min-width:0; } .acct .em { color:var(--muted); font-size:12px; word-break:break-all; }
.ok { color:var(--ok); } .bad { color:var(--warn); }
@media (min-width: 800px) { #app, #thread .tbody, #thread .bar { max-width:760px; margin:0 auto; } }
