@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
src: url("fonts/manrope-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
src: url("fonts/manrope-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
src: url("fonts/jbmono-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
src: url("fonts/jbmono-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
color-scheme: light dark;
&:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
&:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
--font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
--mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
--night: #0b0d12; --night-900: #12151c; --night-800: #1a1e28; --night-700: #262b38; --night-600: #3a4052;
--paper: #f5f3ee; --paper-100: #eceae3; --paper-200: #e6e3da;
--blue: #4f6df2; --blue-deep: #3a55d6; --blue-light: #8ea2ff; --blue-mist: #e4e8fd;
--bg: light-dark(var(--paper), var(--night));
--surface: light-dark(#ffffff, var(--night-900));
--surface-2: light-dark(var(--paper-100), var(--night-800));
--hover: light-dark(#f1f3fb, #1c2130);
--selected: light-dark(var(--blue-mist), #1f2747);
--fg: light-dark(var(--night), #eceef4);
--fg-2: light-dark(#3b4052, #c3c8d6);
--muted: light-dark(#5d6378, #8c93ab);
--line: light-dark(var(--paper-200), #262b38);
--line-strong: light-dark(#d6d2c6, #3a4052);
--accent: light-dark(var(--blue-deep), var(--blue-light));
--accent-bg: light-dark(var(--blue-deep), var(--blue));
--accent-hover: var(--blue);
--on-accent: #ffffff;
--node: var(--blue);
--danger: light-dark(#c4302b, #ff8a80);
--danger-bg: light-dark(#fde8e6, #3a1c1c);
--ok: light-dark(#13865d, #5fd3a4);
--warn-bg: light-dark(#fff4df, #33290f);
--star: #f2b01e;
--rail-bg: var(--night);
--rail-fg: #b8bed3;
--rail-muted: #8c93ab;
--rail-hover: rgb(245 243 238 / .06);
--rail-active: rgb(79 109 242 / .2);
--radius-sm: 10px; --radius: 14px; --radius-lg: 18px;
--shadow: 0 1px 2px rgb(11 13 18 / .06);
--shadow-lg: 0 30px 70px -24px rgb(11 13 18 / .5);
--ease: cubic-bezier(.16, 1, .3, 1);
accent-color: var(--accent-bg);
font-family: var(--font);
font-size: 100%;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-size: .9375rem; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.125rem; }
h2 { font-size: 1.05rem; }
code, kbd { font-family: var(--mono); font-size: .85em; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; background: var(--surface); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.big { width: 2.5rem; height: 2.5rem; stroke-width: 1.4; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent-bg); outline-offset: 2px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: .82rem; }
.wordmark { font-weight: 800; letter-spacing: -.02em; }
.wordmark span { color: var(--blue); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.25rem; padding: 0 .9rem;
border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--fg);
font-weight: 600; font-size: .875rem; text-decoration: none; cursor: pointer; white-space: nowrap;
transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent-bg); border-color: transparent; color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.danger:hover, .btn.danger:focus-visible { background: var(--danger-bg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.small { min-height: 2rem; padding: 0 .7rem; font-size: .82rem; }
.btn.wide { width: 100%; min-height: 2.6rem; }
.btn:disabled { opacity: .55; cursor: progress; }
.icon-btn { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 0; border-radius: 9px;
background: transparent; color: var(--fg-2); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.icon-btn[aria-pressed="true"] { color: var(--star); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; font-size: .85rem; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.stack { display: grid; gap: 1rem; }
.field { display: grid; gap: .3rem; }
.field label { font-weight: 600; font-size: .85rem; }
.field small { color: var(--muted); font-size: .78rem; }
input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea {
width: 100%; min-height: 2.35rem; padding: .45rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
background: var(--surface); color: var(--fg); }
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-bg); outline-offset: 0; border-color: transparent; }
.check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }
.check input { width: 1.05rem; height: 1.05rem; margin: 0; }
.check.small { font-size: .8rem; color: var(--fg-2); }
.group { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem 1rem; margin: 0; display: grid; gap: .8rem; }
.group legend { font-weight: 700; font-size: .82rem; padding: 0 .35rem; color: var(--fg-2); }
.grid-2 { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.form-actions { display: flex; gap: .5rem; }
.form-error { margin: 0; padding: .55rem .75rem; border-radius: var(--radius-sm); background: var(--danger-bg); color: var(--danger); font-size: .85rem; }
.mini-select { width: auto !important; min-height: 2rem !important; padding: 0 1.8rem 0 .55rem !important; font-size: .82rem; border-color: var(--line) !important; }
.sel-box { width: 1.05rem; height: 1.05rem; margin: 0; flex: none; cursor: pointer; }
.avatar { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 10px; flex: none;
background: var(--selected); color: var(--accent); font-weight: 800; font-size: .9rem; }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .5rem .75rem; border-radius: var(--radius-sm);
background: var(--warn-bg); font-size: .84rem; }
.empty { margin: 0; padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-brand { background: var(--night); color: #eceef4; display: grid; place-content: center; justify-items: center; gap: .5rem;
background-image: radial-gradient(rgb(245 243 238 / .07) 1px, transparent 1px); background-size: 22px 22px; }
.login-logo { width: 4.5rem; height: 4.5rem; color: #eceef4; }
.login-brand .wordmark { font-size: 2rem; }
.login-product { color: var(--rail-muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.login-card { display: grid; align-content: center; padding: 2rem; width: min(100%, 26rem); justify-self: center; gap: 1.25rem; }
.login-card h1 { font-size: 1.5rem; }
@media (max-width: 760px) {
.login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.login-brand { padding: 2rem 1rem 1.5rem; grid-auto-flow: column; gap: .6rem; }
.login-logo { width: 2.4rem; height: 2.4rem; }
.login-brand .wordmark { font-size: 1.4rem; }
.login-card { align-content: start; padding: 1.5rem 16px; }
}
.is-app { overflow: hidden; }
.wm { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); height: 100dvh; }
.rail { background: var(--rail-bg); color: var(--rail-fg); display: flex; flex-direction: column; min-height: 0; padding: .9rem .7rem; gap: .9rem; }
.rail-top { display: flex; align-items: center; justify-content: space-between; padding: 0 .35rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: #eceef4; font-size: 1.15rem; }
.brand .logo { width: 1.9rem; height: 1.9rem; }
.brand-logo { display: inline-flex; align-items: center; max-inline-size: 100%; }
.brand-logo img { display: block; max-block-size: 2.4rem; max-inline-size: min(11rem, 100%); inline-size: auto; block-size: auto; object-fit: contain; }
.brand-logo.on-plate { background: #fff; border-radius: 10px; padding: .3rem .55rem; }
.rail-top .brand-custom { flex: 1; justify-content: center; }
.login-custom img { max-block-size: 5rem; max-inline-size: min(18rem, 80vw); }
.rail-close { display: none; color: var(--rail-fg); }
.rail .icon-btn { color: var(--rail-fg); }
.rail .icon-btn:hover { background: var(--rail-hover); color: #fff; }
.compose-btn { min-height: 2.6rem; justify-content: flex-start; padding: 0 1rem; }
.folders-nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -.2rem; padding: 0 .2rem; scrollbar-width: thin; scrollbar-color: var(--night-700) transparent; }
.folders { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.folder { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 9px; color: var(--rail-fg);
text-decoration: none; font-size: .88rem; font-weight: 600; }
.folder:hover { background: var(--rail-hover); color: #fff; }
.folder[aria-current="page"] { background: var(--rail-active); color: #fff; }
.folder[aria-current="page"] .icon { color: var(--blue-light); }
.folder.drop-target { outline: 2px dashed var(--blue-light); outline-offset: -2px; }
.folder .f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder .f-count { font-family: var(--mono); font-size: .72rem; color: #fff; background: var(--blue); border-radius: 6px; padding: 0 .35rem; }
.folder .f-count:empty { display: none; }
.folder.depth-1 { padding-left: 1.6rem; } .folder.depth-2 { padding-left: 2.6rem; } .folder.depth-3 { padding-left: 3.6rem; }
.rail > * { min-width: 0; }
.rail-bottom { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; border-top: 1px solid rgb(245 243 238 / .08); padding-top: .7rem; }
.quota { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; padding: 0 .4rem; font-size: .75rem; color: var(--rail-muted); }
.quota label { font-weight: 600; }
.quota meter { width: 100%; height: .4rem; }
.rail-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; }
.rail-nav button { display: grid; justify-items: center; gap: .15rem; padding: .4rem .2rem; border: 0; border-radius: 9px; background: none;
color: var(--rail-muted); font-size: .72rem; font-weight: 600; cursor: pointer; min-width: 0; }
.rail-nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-nav button:hover { background: var(--rail-hover); color: #fff; }
.rail-nav button[aria-current="page"] { background: var(--rail-active); color: #fff; }
.me { display: flex; align-items: center; gap: .3rem; padding: 0 .1rem; min-width: 0; }
.me .icon-btn { width: 1.9rem; height: 1.9rem; }
.me .avatar { background: var(--night-700); color: #fff; width: 1.9rem; height: 1.9rem; }
.me .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.main { min-width: 0; min-height: 0; display: grid; }
.view { min-height: 0; display: grid; }
.pane-head { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; min-height: 3.4rem; }
.pane-head h1 { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { position: relative; flex: 1; display: flex; align-items: center; gap: .5rem; min-width: 0; margin-left: auto; max-width: 30rem; }
.search .search-icon { position: absolute; left: .65rem; color: var(--muted); pointer-events: none; }
.search input[type="search"] { padding-left: 2.2rem; background: var(--surface-2); border-color: transparent; }
.toolbar { display: flex; align-items: center; gap: .35rem; padding: .3rem 1rem .4rem calc(1rem + 2px); border-bottom: 1px solid var(--line); min-height: 2.8rem; flex-wrap: wrap; }
.tb-group { display: flex; align-items: center; gap: .2rem; }
.sel-count { font-size: .8rem; font-weight: 700; padding: 0 .4rem; color: var(--accent); }
.pager { margin-left: auto; display: flex; align-items: center; gap: .1rem; }
.range { font-size: .78rem; color: var(--muted); font-family: var(--mono); padding: 0 .3rem; white-space: nowrap; }
.only-narrow { display: none; }
.view-mail { grid-template-columns: minmax(20rem, 27rem) minmax(0, 1fr); }
.wm[data-layout="bottom"] .view-mail { grid-template-columns: 1fr; grid-template-rows: minmax(12rem, 42%) minmax(0, 1fr); }
.wm[data-layout="list"] .view-mail { grid-template-columns: 1fr; }
.wm[data-layout="list"] .read-pane { display: none; }
.wm[data-layout="list"][data-msg-open] .list-pane { display: none; }
.wm[data-layout="list"][data-msg-open] .read-pane { display: flex; }
.list-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.wm[data-layout="bottom"] .list-pane { border-right: 0; border-bottom: 1px solid var(--line); }
.folder-note { display: flex; align-items: center; gap: .8rem; justify-content: space-between; padding: .45rem 1rem; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.list[aria-busy="true"] { opacity: .6; }
.row { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: .3rem .5rem;
padding: .55rem 1rem .55rem .9rem; border-bottom: 1px solid var(--line); }
.row:hover { background: var(--hover); }
.row.selected { background: var(--selected); }
.row.active { background: var(--selected); box-shadow: inset 3px 0 0 var(--accent-bg); }
.row.cursor:not(.active) { box-shadow: inset 2px 0 0 var(--line-strong); }
.row.dragging { opacity: .5; }
.star { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 0; padding: 0; background: none; border-radius: 7px; color: var(--line-strong); cursor: pointer; }
.star:hover { color: var(--star); }
.star[aria-pressed="true"] { color: var(--star); }
.star[aria-pressed="true"] .icon { fill: currentColor; }
.row-open { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "from meta" "subject subject"; gap: .05rem .6rem;
color: inherit; text-decoration: none; min-width: 0; }
.row-open:focus-visible { outline-offset: 4px; border-radius: 4px; }
.r-from { grid-area: from; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; color: var(--fg-2); }
.r-count { grid-area: from; justify-self: end; }
.r-line { grid-area: subject; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; min-width: 0; }
.r-subject { color: var(--fg-2); }
.r-snippet { color: var(--muted); font-weight: 400; }
.r-meta { grid-area: meta; display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); }
.r-meta .icon { width: .95rem; height: .95rem; }
.r-date { font-size: .75rem; font-family: var(--mono); white-space: nowrap; }
.row.unseen .r-from, .row.unseen .r-subject { color: var(--fg); font-weight: 750; }
.r-actions { position: absolute; right: .6rem; top: 50%; translate: 0 -50%; display: none; gap: .1rem; padding-left: .5rem;
background: linear-gradient(to right, transparent, var(--hover) .5rem); }
.r-actions .icon-btn { width: 1.9rem; height: 1.9rem; }
@media (hover: hover) {
.row:hover .r-actions, .row:focus-within .r-actions { display: flex; }
.row.selected:hover .r-actions, .row.active:hover .r-actions { background: linear-gradient(to right, transparent, var(--selected) .5rem); }
}
.group-head { position: sticky; top: 0; z-index: 1; padding: .35rem 1rem .3rem; font-size: .72rem; font-weight: 800; letter-spacing: .05em;
text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.row.sched { grid-template-columns: minmax(0, 1fr) auto; padding-left: 1rem; }
.row.sched.failed .r-snippet { color: var(--danger); }
.sel-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem .8rem; padding: .45rem 1rem;
font-size: .82rem; background: var(--selected); border-bottom: 1px solid var(--line); }
.row.unseen::before { content: ""; position: absolute; left: .28rem; top: 50%; width: .38rem; height: .38rem; margin-top: -.19rem; border-radius: 2px; background: var(--node); }
.row .thread-n { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-left: .35rem; }
.wm[data-layout="bottom"] .row-open, .wm[data-layout="list"] .row-open { grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr) auto; grid-template-areas: "from subject meta"; }
.menu .sep { height: 1px; margin: .25rem .3rem; background: var(--line); }
.menu .danger { color: var(--danger); }
.ctx { position: fixed; inset: auto; margin: 0; }
.search-help { position: fixed; inset: auto; position-area: bottom span-left; margin: .3rem 0 0; padding: .7rem .9rem; width: 22rem; max-width: calc(100vw - 32px); }
@supports not (position-area: bottom) { .search-help { inset: 0; margin: auto; height: fit-content; } }
.search-help strong { display: block; margin-bottom: .4rem; font-size: .85rem; }
.search .icon-btn { width: 1.8rem; height: 1.8rem; font-weight: 800; color: var(--muted); }
.sec { display: flex; gap: .65rem; align-items: flex-start; padding: .6rem .8rem; border-radius: var(--radius-sm); font-size: .85rem; }
.sec .icon { margin-top: .1rem; }
.sec ul { margin: .25rem 0 0; padding-left: 1.1rem; display: grid; gap: .15rem; }
.sec[data-level="danger"] { background: var(--danger-bg); color: var(--danger); }
.sec[data-level="danger"] ul { color: var(--fg); }
.sec[data-level="warn"] { background: var(--warn-bg); }
.sec[data-level="info"] { background: var(--selected); }
.m-auth { color: var(--muted); }
.m-auth[data-ok="true"]::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.m-unsub { font-size: .82rem; }
.thumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.thumbs:empty { display: none; }
.thumbs a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.thumbs img { display: block; width: 7.5rem; height: 5.5rem; object-fit: cover; }
.split { display: inline-flex; }
.split .btn:first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.split-arrow { border-start-start-radius: 0 !important; border-end-start-radius: 0 !important; padding: 0 .45rem !important; border-left: 1px solid rgb(255 255 255 / .25) !important; }
#send-menu { position: fixed; inset: auto; position-area: top span-right; margin: 0 0 .3rem; }
@supports not (position-area: top) { #send-menu { inset: 0; margin: auto; height: fit-content; } }
.read-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.read-empty { margin: auto; display: grid; justify-items: center; gap: .6rem; color: var(--muted); }
.read-empty p { margin: 0; }
.msg { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.msg-head { display: flex; align-items: flex-start; gap: .5rem; padding: .8rem 1.1rem .6rem; }
.msg-head h2 { flex: 1; min-width: 0; font-size: 1.15rem; line-height: 1.35; padding-top: .25rem; overflow-wrap: anywhere; outline: none; }
.msg-back { display: none; }
.wm[data-layout="list"] .msg-back { display: inline-grid; }
.msg-actions { display: flex; flex-wrap: wrap; gap: .1rem; position: relative; }
.menu { margin: 0; padding: .3rem; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
color: var(--fg); box-shadow: var(--shadow-lg); min-width: 13rem; }
.menu button { display: block; width: 100%; text-align: left; padding: .5rem .7rem; border: 0; border-radius: 7px; background: none; cursor: pointer; font-size: .86rem; }
.menu button:hover, .menu button:focus-visible { background: var(--hover); }
#msg-menu { position: fixed; inset: auto; position-area: bottom span-left; margin: .25rem 0 0; }
@supports not (position-area: bottom) { #msg-menu { inset: 0; margin: auto; } }
.thread { overflow-y: auto; padding: 0 1.1rem 1.5rem; display: grid; gap: .6rem; align-content: start; min-height: 0; flex: 1; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mcard-head { display: flex; align-items: flex-start; gap: .65rem; padding: .75rem .9rem; }
.m-who { flex: 1; min-width: 0; }
.m-toggle { display: block; max-width: 100%; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-from { font-weight: 750; }
.m-email { color: var(--muted); font-size: .82rem; }
.m-to { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.m-date { color: var(--muted); font-size: .76rem; font-family: var(--mono); white-space: nowrap; padding-top: .15rem; }
.m-body { display: grid; gap: .6rem; padding: 0 .9rem .9rem; }
.mcard.collapsed .m-body, .mcard.collapsed .m-to { display: none; }
.mcard.collapsed { background: var(--surface-2); }
.m-frame { width: 100%; min-height: 6rem; height: 8rem; border: 0; border-radius: 8px; background: #fff; color-scheme: light; display: block; }
.m-quick { display: flex; gap: .5rem; }
.atts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.att { display: inline-flex; align-items: center; gap: .4rem; max-width: 18rem; padding: .35rem .6rem; border: 1px solid var(--line-strong); border-radius: 9px;
text-decoration: none; color: var(--fg); font-size: .82rem; background: var(--surface); }
.att:hover { background: var(--hover); }
.att .a-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att small { color: var(--muted); font-family: var(--mono); font-size: .72rem; }
.view-contacts, .view-settings { grid-template-rows: auto auto minmax(0, 1fr); background: var(--surface); }
.view-settings { grid-template-rows: auto minmax(0, 1fr); }
.view-contacts .toolbar { gap: .45rem; }
.table-wrap { overflow: auto; min-height: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700;
padding: .55rem .6rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.table td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.table tr:hover td { background: var(--hover); }
.c-sel { width: 2.6rem; padding-left: 1rem !important; }
.c-act { width: 5.5rem; text-align: right; white-space: nowrap; }
.settings { display: grid; grid-template-columns: 14rem minmax(0, 1fr); min-height: 0; }
.settings-nav { display: grid; align-content: start; gap: 2px; padding: .4rem .7rem; border-right: 1px solid var(--line); overflow-y: auto; }
.settings-nav button { display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--fg-2); }
.settings-nav button:hover { background: var(--hover); }
.settings-nav button[aria-current="true"] { background: var(--selected); color: var(--accent); }
.settings-panel { overflow-y: auto; padding: .6rem 1.4rem 2rem; max-width: 46rem; align-content: start; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; font-size: .88rem; }
.kv dt { font-weight: 700; color: var(--fg-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.filters { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.filter { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.filter.off .fl-text { opacity: .55; }
.fl-text { flex: 1; min-width: 0; display: grid; }
.fl-desc { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.fl-actions { display: flex; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.rule-row { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1fr) minmax(8rem, 1.6fr) auto; gap: .4rem; align-items: center; }
.radios { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.folder-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.folder-admin li { display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; border-radius: 8px; }
.folder-admin li:hover { background: var(--hover); }
.folder-admin .fa-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.folder-admin .fa-count { color: var(--muted); font-family: var(--mono); font-size: .75rem; }
.folder-admin .fa-sys { color: var(--muted); font-size: .75rem; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: rgb(11 13 18 / .45); overflow: hidden; overscroll-behavior: contain; }
.dlg { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem 1.3rem; width: min(30rem, calc(100vw - 32px));
background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg); max-height: calc(100dvh - 32px); }
.dlg.wide { width: min(44rem, calc(100vw - 32px)); }
.dlg h2 { font-size: 1.1rem; }
.dlg-head { display: flex; align-items: center; gap: .6rem; }
.dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; align-items: center; }
.effects { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; font-size: .88rem; color: var(--fg-2); }
.effects:empty { display: none; }
#confirm-text { margin: 0; }
.compose { padding: 0; }
.compose:popover-open, .compose[open] { display: flex; position: fixed; inset: auto 1.25rem 0 auto; margin: 0;
width: min(42rem, calc(100vw - 2.5rem)); height: min(40rem, calc(100dvh - 3rem)); max-height: none;
border-end-start-radius: 0; border-end-end-radius: 0; box-shadow: 0 10px 50px -10px rgb(11 13 18 / .45); z-index: 10; }
.compose.max:popover-open, .compose.max[open] { inset: 3dvh 4vw; width: auto; height: auto; border-radius: var(--radius-lg); }
.compose.min:popover-open, .compose.min[open] { height: auto; width: min(22rem, calc(100vw - 2.5rem)); }
.compose.min .compose-form > :not(.dlg-head) { display: none; }
.compose.min .compose-status, .compose.min [data-act="compose-max"] { display: none; }
.compose.min .dlg-head { cursor: pointer; background: var(--night-800); color: #eceef4; border-start-start-radius: var(--radius-lg); border-start-end-radius: var(--radius-lg); }
.compose.min .dlg-head .icon-btn { color: #c3c8d6; }
.compose [data-act="compose-min"][aria-pressed="true"] .icon { rotate: 180deg; }
.compose-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.compose .dlg-head { padding: .8rem 1rem .5rem 1.2rem; }
.compose .dlg-head h2 { flex: none; }
.compose-status { flex: 1; font-size: .78rem; color: var(--muted); text-align: right; }
.compose-fields { display: grid; padding: 0 1.2rem; }
.cf-row { display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--line); min-height: 2.6rem; }
.cf-row label { width: 3.6rem; flex: none; font-size: .82rem; color: var(--muted); font-weight: 600; }
.cf-row input, .cf-row select { border: 0 !important; background: transparent !important; padding-left: 0 !important; min-height: 2.4rem !important; }
.cf-row input:focus-visible, .cf-row select:focus-visible { outline: none; }
.cf-row:focus-within { border-bottom-color: var(--accent-bg); }
.ac { position: relative; flex: 1; min-width: 0; }
.ac-list { position: fixed; z-index: 1; margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--line);
border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 16rem; overflow-y: auto; min-width: 18rem; }
.ac-list li { padding: .4rem .6rem; border-radius: 7px; cursor: pointer; display: grid; font-size: .86rem; }
.ac-list li small { color: var(--muted); }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--selected); }
.editor-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; padding: .35rem 1rem; border-bottom: 1px solid var(--line); }
.editor-bar b, .editor-bar i, .editor-bar u { font-size: .95rem; }
.mode-toggle { margin-left: auto; }
.editor-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.editor { flex: 1; overflow-y: auto; padding: .9rem 1.2rem; outline: none; line-height: 1.55; overflow-wrap: anywhere; min-height: 8rem; }
.editor.plain { border: 0 !important; border-radius: 0 !important; resize: none; font-family: var(--mono); font-size: .88rem; }
.editor blockquote { margin: .4rem 0; padding-left: .8rem; border-left: 3px solid var(--line-strong); color: var(--fg-2); }
.editor img { max-width: 100%; }
.editor .hp-signature { color: var(--fg-2); }
.drop-hint { display: none; position: absolute; inset: .5rem; border: 2px dashed var(--accent-bg); border-radius: var(--radius); place-items: center;
background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--accent); font-weight: 700; pointer-events: none; }
.editor-wrap.dragover .drop-hint { display: grid; }
.chips { list-style: none; margin: 0; padding: .3rem 1.2rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .2rem .15rem .55rem; border-radius: 9px; background: var(--surface-2); font-size: .8rem; max-width: 20rem; }
.chip .c-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip small { color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.chip progress { width: 4rem; height: .35rem; }
.chip .icon-btn { width: 1.6rem; height: 1.6rem; }
.chip.error { background: var(--danger-bg); color: var(--danger); }
.compose-foot { padding: .6rem 1rem; border-top: 1px solid var(--line); justify-content: flex-start; }
.compose-foot .spacer { flex: 1; }
.file-btn { cursor: pointer; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-btn:focus-within { outline: 2px solid var(--accent-bg); outline-offset: 2px; }
.toasts { position: fixed; inset: auto 1rem 1rem auto; display: grid; gap: .5rem; pointer-events: none; }
.toast { position: fixed; inset: auto 1rem 1rem auto; margin: 0; pointer-events: auto; display: flex; align-items: center; gap: .6rem; max-width: min(26rem, calc(100vw - 32px));
padding: .6rem .6rem .6rem .9rem; border: 0; border-radius: var(--radius-sm); background: var(--night-800); color: #eceef4; box-shadow: var(--shadow-lg); font-size: .88rem;
opacity: 1; translate: 0 0; transition: opacity .2s, translate .2s var(--ease), display .2s, overlay .2s; transition-behavior: allow-discrete; }
@starting-style { .toast:popover-open { opacity: 0; translate: 0 .5rem; } }
.toast:not(:popover-open) { opacity: 0; }
.toast[data-kind="error"] { background: #5b1d1b; }
.toast .icon-btn { color: #c3c8d6; }
.toast .t-text { flex: 1; }
.toast .t-action { color: var(--blue-light); }
@media (max-width: 980px) {
.view-mail { grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr); }
}
@media (max-width: 820px) {
.wm { grid-template-columns: 1fr; }
.rail { display: none; }
.rail:popover-open, .rail.open { display: flex; position: fixed; inset: 0 auto 0 0; width: min(18rem, 86vw); height: 100dvh; max-height: none; margin: 0; border: 0; z-index: 5; }
.rail::backdrop { background: rgb(11 13 18 / .5); }
.rail-close, .only-narrow { display: inline-grid; }
.view-mail, .wm[data-layout] .view-mail { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.wm .read-pane { display: none; }
.wm[data-msg-open] .list-pane { display: none; }
.wm[data-msg-open] .read-pane { display: flex; }
.wm .msg-back { display: inline-grid; }
.wm .row-open { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "from meta" "subject subject"; }
.pane-head { padding: .55rem 16px; flex-wrap: wrap; }
.pane-head h1 { max-width: none; flex: 1; }
.search { order: 3; flex-basis: 100%; max-width: none; }
.toolbar { padding-inline: 16px; }
.row { padding-inline: 16px; }
.msg-head { flex-wrap: wrap; padding-inline: 16px; }
.msg-head h2 { flex-basis: calc(100% - 3rem); }
.msg-actions { width: 100%; }
.thread { padding-inline: 8px; }
.settings { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
.settings-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: .4rem 16px; }
.settings-panel { padding: .8rem 16px 2rem; }
.hide-narrow { display: none; }
.rule-row { grid-template-columns: 1fr 1fr auto; }
.rule-row .r-value, .rule-row .a-folder, .rule-row .a-addr { grid-column: 1 / 3; }
.compose:popover-open:not(.min), .compose[open]:not(.min) { inset: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
.r-actions { display: none !important; }
.cf-row label { width: 3rem; }
.compose-foot .check { display: none; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
