:root{--bg: #0b0b0d;--surface: #151518;--surface-2: #1d1d21;--line: rgba(255, 255, 255, .07);--text: #f3f3f5;--muted: #8d8d97;--accent: #ffcf99;--accent-2: #ff9f6b;--danger: #ff6b6b;--radius: 16px;--safe-top: var(--tg-content-safe-area-inset-top, 0px);--safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom));color-scheme:dark}*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}html,body{background:var(--bg);color:var(--text)}body{font:15px/1.4 -apple-system,BlinkMacSystemFont,SF Pro Text,Inter,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;overscroll-behavior-y:none}button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}input,textarea{font:inherit;color:inherit;background:none;border:0;outline:none}svg{flex:none}.screen{min-height:100vh;padding:calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 96px);max-width:760px;margin:0 auto}.top{position:sticky;top:0;z-index:5;margin:-12px -16px 8px;padding:calc(var(--safe-top) + 12px) 16px 10px;background:linear-gradient(var(--bg) 82%,transparent)}.title-row{display:flex;align-items:center;justify-content:space-between;gap:8px}h1{font-size:30px;font-weight:750;letter-spacing:-.02em}.top-actions{display:flex;gap:6px}.icon-btn{display:inline-grid;place-items:center;min-width:38px;height:38px;padding:0 10px;border-radius:12px;background:var(--surface);color:var(--text);transition:background .2s,transform .15s}.icon-btn:active{transform:scale(.94);background:var(--surface-2)}.icon-btn.muted{color:var(--muted)}.hint{color:var(--muted);font-size:13px;margin-top:6px}.search{width:100%;margin-top:12px;padding:11px 14px;border-radius:12px;background:var(--surface)}.search::placeholder{color:var(--muted)}.segments{display:flex;gap:4px;margin-top:14px;padding:4px;background:var(--surface);border-radius:13px;overflow-x:auto;scrollbar-width:none}.segments::-webkit-scrollbar{display:none}.seg{flex:1 0 auto;white-space:nowrap;padding:8px 12px;border-radius:10px;font-size:14px;font-weight:550;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:background .2s,color .2s}.seg.active{background:var(--surface-2);color:var(--text);box-shadow:0 1px #ffffff0d inset}.badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--accent);color:#000;font-size:11px;font-weight:700;display:inline-grid;place-items:center}.chips{display:flex;gap:6px;margin:12px -16px 0;padding:0 16px;overflow-x:auto;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}.chip{flex:none;display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:999px;background:var(--surface);color:var(--muted);font-size:13px;font-weight:550;white-space:nowrap}.chip.active{background:#ffcf9924;color:var(--accent)}.chip button{display:inline-grid;color:inherit}.chip button svg{width:14px;height:14px}.chip-count{color:var(--accent);font-weight:700}.list{list-style:none}.row{width:100%;display:flex;gap:12px;padding:12px 4px;text-align:left;border-bottom:1px solid var(--line);transition:background .15s;border-radius:12px}.row:active{background:var(--surface)}.avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;color:#111;font-weight:750;font-size:17px;flex:none}.avatar.big{width:48px;height:48px;font-size:19px}.row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.row-top{display:flex;justify-content:space-between;gap:8px}.row-from{font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.row-date{color:var(--muted);font-size:13px;flex:none}.row-subject{display:flex;align-items:center;gap:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--muted)}.row-snippet{color:var(--muted);font-size:14px;opacity:.75;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.row.unread .row-from,.row.unread .row-subject{color:var(--text);font-weight:650}.dot{width:8px;height:8px;border-radius:50%;background:var(--accent);flex:none;box-shadow:0 0 10px var(--accent-2)}.row-meta{display:flex;gap:8px;align-items:center;margin-top:4px}.tag{font-size:11.5px;padding:2px 8px;border-radius:6px;background:var(--surface);color:var(--accent);font-weight:600}.att{display:inline-flex;align-items:center;gap:3px;color:var(--muted);font-size:12px}.att svg{width:14px;height:14px}.more{width:100%;padding:14px;color:var(--accent);font-weight:600}.fab{position:fixed;right:18px;bottom:calc(var(--safe-bottom) + 20px);width:58px;height:58px;border-radius:20px;background:var(--accent);color:#000;display:grid;place-items:center;box-shadow:0 10px 30px #ff9f6b59;transition:transform .15s}.fab svg{width:24px;height:24px}.fab:active{transform:scale(.92)}.skeletons{display:grid;gap:10px;margin-top:8px}.skeleton{height:76px;border-radius:var(--radius);background:linear-gradient(90deg,var(--surface) 0%,var(--surface-2) 50%,var(--surface) 100%);background-size:200% 100%;animation:sh 1.4s infinite linear}.skeleton.tall{height:320px;margin-top:16px}@keyframes sh{to{background-position:-200% 0}}.empty{display:grid;justify-items:center;gap:22px;padding:80px 24px;text-align:center;color:var(--muted)}.empty-hole,.gate-hole{width:84px;height:84px;border-radius:50%;background:#000;box-shadow:0 0 0 2px #ffdcb4b3,0 0 28px 6px #ff9f6b59,0 0 80px 10px #ff783c26}.gate{min-height:100vh;display:grid;place-content:center;justify-items:center;gap:18px;text-align:center;padding:24px}.gate h1{font-size:26px}.gate p{color:var(--muted)}.banner{display:flex;align-items:center;gap:8px;padding:12px 14px;border-radius:12px;background:var(--surface);color:var(--muted);font-size:14px;margin:10px 0;width:100%;text-align:left}.banner.error{background:#ff6b6b1f;color:#ffb0b0}.action-banner{color:var(--accent)}.subject{font-size:22px;line-height:1.25;font-weight:720;letter-spacing:-.01em;margin:6px 0 16px;overflow-wrap:anywhere}.sender{display:flex;gap:12px;align-items:center}.sender-info{min-width:0}.sender-name{font-weight:650;overflow-wrap:anywhere}.sender-addr{color:var(--muted);font-size:13px;overflow-wrap:anywhere}.sender-addr b{color:var(--accent);font-weight:600}.sender-date{color:var(--muted);font-size:12px;margin-top:2px}.actions{display:flex;gap:8px;margin:16px -16px 14px;padding:0 16px;overflow-x:auto;scrollbar-width:none}.actions::-webkit-scrollbar{display:none}.action{flex:none;display:inline-flex;align-items:center;gap:7px;padding:10px 14px;border-radius:12px;background:var(--surface);font-weight:600;font-size:14px;transition:transform .15s,opacity .2s}.action svg{width:18px;height:18px}.action:active{transform:scale(.96)}.action:disabled{opacity:.45}.action.primary{background:var(--accent);color:#000}.action.danger{color:var(--danger)}.files{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin-bottom:14px}.file{display:grid;gap:6px;padding:8px;border-radius:14px;background:var(--surface);text-align:left}.file img{width:100%;height:86px;object-fit:cover;border-radius:9px}.file-icon{height:86px;display:grid;place-items:center;border-radius:9px;background:var(--surface-2);color:var(--accent)}.file-icon svg{width:30px;height:30px}.file-name{font-size:13px;font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-size{font-size:12px;color:var(--muted)}.html-frame{width:100%;border:0;border-radius:var(--radius);background:var(--surface);display:block}.plain{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;padding:16px;border-radius:var(--radius);background:var(--surface)}.lightbox{position:fixed;inset:0;z-index:20;background:#000000eb;display:grid;place-items:center;padding:16px}.lightbox img{max-width:100%;max-height:80vh;border-radius:12px}.lightbox-bar{position:absolute;left:16px;right:16px;bottom:calc(var(--safe-bottom) + 16px);display:flex;gap:8px;align-items:center}.lightbox-bar span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.compose-title{font-size:26px;font-weight:750;margin:6px 0 14px}.fields{border-radius:var(--radius);background:var(--surface);overflow:hidden}.field{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line)}.field:last-child{border-bottom:0}.field>span:first-child{width:58px;flex:none;color:var(--muted);font-size:14px}.field input{flex:1;min-width:0}.field input::placeholder{color:#55555c}.from-input{flex:1;display:flex;align-items:center;min-width:0}.from-input input{width:0;flex:1;text-align:right;color:var(--accent);font-weight:600}.suffix{color:var(--muted)}.link-btn{color:var(--accent);font-size:14px;font-weight:600}.body-input{display:block;width:100%;min-height:180px;margin-top:12px;padding:16px;border-radius:var(--radius);background:var(--surface);resize:none;line-height:1.55}.body-input::placeholder{color:#55555c}.quote{margin-top:10px;padding:12px 14px;border-left:2px solid var(--accent);color:var(--muted);font:13px/1.5 inherit;white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow:auto;border-radius:0 10px 10px 0;background:var(--surface)}.files-chips{margin:12px 0 0;padding:0;flex-wrap:wrap}.compose-bar{display:flex;justify-content:space-between;gap:8px;margin-top:14px}.alias-row{display:flex;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}.alias-main{flex:1;min-width:0;text-align:left;display:grid;gap:2px}.alias-name{font-weight:650;color:var(--accent);overflow-wrap:anywhere}.alias-meta{font-size:13px;color:var(--muted)}.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:8px;margin:16px 0 14px}.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:0;padding:12px 4px 10px;border-radius:14px;background:var(--surface);font-size:12px;font-weight:600;transition:transform .15s,opacity .2s,background .2s}.tile span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile svg{width:21px;height:21px}.tile:active{transform:scale(.95);background:var(--surface-2)}.tile:disabled{opacity:.45}.tile.primary{background:var(--accent);color:#000}.tile.danger{color:var(--danger)}
