:root {
  --ground: #f6f7f5;
  --panel: #fff;
  --ink: #15171c;
  --ink-2: #2a2d34;
  --muted: #5b616e;
  --line: #e4e6ea;
  --line-soft: #eef0f2;
  --accent: #0f766e;
  --accent-ink: #115e59;
  --accent-soft: #e6f2f1;
  --warn: #8a4208;
  --warn-soft: #fdf1e7;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --good-soft: #e7f5ec;
  --radius: 10px;
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); background: var(--ground); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pad { padding: 20px; }

/* buttons + fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 14px; border-radius: var(--radius); border: 1px solid #d6dadf; background: var(--panel); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: #b9c0c8; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-danger { color: var(--danger); border-color: #f1c4c4; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.link-btn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea { border: 1px solid #d6dadf; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-weight: 400; color: var(--ink); background: #fff; }
.field input:focus, .field textarea:focus, .row-field input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.notice { padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.notice-error { background: var(--danger-soft); color: var(--danger); }

/* login */
.login-page { background: linear-gradient(180deg, #e6f2f1 0, var(--ground) 320px); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.login-card p { margin: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; white-space: nowrap; }
.brand b { color: var(--accent); }
.brand-lg { font-size: 20px; }

/* app frame */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.search { flex: 1 1 320px; max-width: 640px; display: flex; align-items: center; gap: 8px; background: #f1f3f2; border-radius: 10px; padding: 0 12px; color: var(--muted); }
.search input { border: 0; background: transparent; padding: 10px 0; flex: 1; outline: none; color: var(--ink); min-width: 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; }
.sync-state { font-size: 12px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); border: 0; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.avatar-lg { width: 40px; height: 40px; background: var(--warn-soft); color: #b45309; cursor: default; }
.menu { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(21, 23, 28, .12); min-width: 220px; padding: 6px; z-index: 30; display: flex; flex-direction: column; }
.menu-head { padding: 8px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu button { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.menu button:hover { background: var(--line-soft); }

.layout { flex: 1; display: flex; min-height: 0; }
.sidebar { width: 236px; flex: none; padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.compose-btn { min-height: 44px; }
.folders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.folder { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink-2); }
.folder:hover { background: #eceeec; }
.folder.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { font-size: 12px; font-weight: 700; color: var(--accent); }

.list-pane { width: 400px; flex: none; background: #fff; border-left: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.list-head { padding: 14px 16px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.list-head h1 { margin: 0; font-size: 18px; }
.filters { display: flex; gap: 4px; }
.filters button { border: 0; background: none; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.filters button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.banner { background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.bulk { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fafbfa; flex-wrap: wrap; font-size: 13px; }
.bulk span { margin-right: auto; font-weight: 600; }
.messages { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.msg { display: flex; align-items: flex-start; gap: 4px; border-bottom: 1px solid var(--line-soft); padding: 0 6px 0 10px; position: relative; }
.msg:hover { background: #fafbfa; }
.msg.open { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.msg.selected { background: #f0f6f5; }
.pick { margin: 16px 4px 0 0; width: 15px; height: 15px; accent-color: var(--accent); opacity: .35; }
.msg:hover .pick, .pick:checked, .msg.selected .pick { opacity: 1; }
.msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; border: 0; background: none; text-align: left; padding: 12px 4px; cursor: pointer; }
.msg-top { display: flex; justify-content: space-between; gap: 8px; }
.who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.when { font-size: 12px; color: var(--muted); flex: none; }
.subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.prev { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.unread .who, .msg.unread .subj { font-weight: 700; }
.msg.unread::before { content: ""; position: absolute; left: 3px; top: 18px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #b45309; flex: none; }
.tags { display: flex; gap: 4px; }
.tags:empty { display: none; }
.tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #f1f3f2; color: var(--muted); }
.star { border: 0; background: none; padding: 12px 4px; cursor: pointer; color: #c1c6cd; }
.star.on { color: #d97706; }
.star.on svg { fill: currentColor; }
.list-empty { padding: 24px 16px; color: var(--muted); }
.list-foot { padding: 12px 16px; display: flex; justify-content: center; border-top: 1px solid var(--line-soft); }
.list-foot:empty { display: none; }

.read-pane { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.empty { margin: auto; text-align: center; color: var(--muted); }
.empty svg { width: 56px; height: 56px; stroke-width: 1.4; }
#reader { padding: 18px 26px 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
.reader-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reader-actions .spacer { flex: 1; }
.reader-actions select.btn { padding-right: 8px; }
.reader-subject { margin: 0; font-size: 21px; line-height: 1.3; word-break: break-word; }
.reader-head { display: flex; gap: 12px; align-items: flex-start; }
.reader-who { flex: 1; min-width: 0; word-break: break-word; }
.reader-date { flex: none; }
.images-bar { background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.att { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff; text-decoration: none; color: var(--ink); max-width: 300px; }
.att:hover { border-color: #b9c0c8; }
.att > span { display: flex; flex-direction: column; min-width: 0; }
.att-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-body { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; flex: 1; min-height: 320px; display: flex; }
.mail-frame { border: 0; width: 100%; flex: 1; min-height: 480px; }
.mail-text { margin: 0; white-space: pre-wrap; word-break: break-word; font: 14px/1.6 var(--font); color: var(--ink-2); }

.reader-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.reader-labels:empty { display: none; }
.draft-tag { color: var(--danger); font-weight: 700; }

/* branding */
.brand-logo { height: 30px; width: auto; max-width: 160px; object-fit: contain; }
.brand-logo-lg { height: 44px; max-width: 220px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.brand-name { overflow: hidden; text-overflow: ellipsis; }
.app-foot { flex: none; text-align: center; font-size: 12px; color: var(--muted); padding: 6px 12px; border-top: 1px solid var(--line); background: #fff; }
.app-foot a { color: inherit; font-weight: 600; text-decoration: none; }
.app-foot a:hover { color: var(--accent); }
.login-page .app-foot { background: none; border: 0; padding-top: 16px; }
.login-wrap { flex-direction: column; }

/* sidebar extras */
.side-section { display: flex; flex-direction: column; gap: 4px; }
.side-title { display: flex; justify-content: space-between; align-items: center; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-title .link-btn { text-transform: none; letter-spacing: 0; font-size: 12px; }
.side-empty { padding: 4px 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.muted-count { color: var(--muted); font-weight: 600; }
.quota { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.quota strong { color: var(--ink); }
.quota-bar, .usage-bar { height: 6px; border-radius: 999px; background: #e3e6e4; overflow: hidden; }
.quota-bar > div, .usage-bar > div { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s; }
.quota-bar > .warm { background: #d97706; }
.quota-bar > .hot, .usage-bar > .hot { background: var(--danger); }

/* list header */
.list-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sort select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.filters { flex-wrap: wrap; }
.label-chip { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); }
.dropdown { position: relative; display: inline-flex; }
.dropdown .menu { top: 36px; max-height: 300px; overflow-y: auto; }
.dropdown .menu-left { left: 0; right: auto; }
.menu button { display: flex; align-items: center; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* compose */
.overlay { position: fixed; inset: 0; background: rgba(21, 23, 28, .35); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.compose { width: 100%; max-width: 1040px; height: min(720px, calc(100vh - 32px)); background: #fff; border-radius: 14px; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(21, 23, 28, .25); overflow: hidden; }
.compose-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 20px; border-bottom: 1px solid var(--line); font-size: 15px; }
.compose-head-actions { display: flex; gap: 2px; }
.compose-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
.compose-main { padding: 10px 20px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; }
.compose-side { border-left: 1px solid var(--line); background: #fafbfa; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }
.compose-side h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.from-line { margin: 0; }
.chip-field { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border: 1px solid #d6dadf; border-radius: 10px; padding: 5px 8px; min-height: 42px; background: #fff; cursor: text; }
.chip-field:focus-within, .plain-field input:focus, .editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chip-label { color: var(--muted); font-size: 13px; font-weight: 600; width: 34px; flex: none; padding-left: 2px; }
.chips { display: contents; }
.chip-field input { flex: 1 1 140px; min-width: 120px; border: 0; outline: none; padding: 5px 2px; background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; font-weight: 500; max-width: 100%; }
.chip-bad { background: var(--danger-soft); color: var(--danger); }
.chip-x { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: inherit; width: 22px; height: 22px; border-radius: 50%; flex: none; opacity: .7; }
.chip-x:hover { background: rgba(0, 0, 0, .08); opacity: 1; }
.cc-toggles { display: flex; gap: 14px; justify-content: flex-end; margin-top: -4px; }
.plain-field input { width: 100%; border: 1px solid #d6dadf; border-radius: 10px; padding: 10px 12px; outline: none; font-size: 15px; font-weight: 600; }
.editor { border: 1px solid #d6dadf; border-radius: 10px; display: flex; flex-direction: column; flex: 1; min-height: 260px; background: #fff; }
.editor-sm { min-height: 0; flex: none; }
.toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: #fafbfa; border-radius: 10px 10px 0 0; }
.toolbar button { width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--ink-2); }
.toolbar button:hover { background: var(--line-soft); }
.toolbar button.on { background: var(--accent-soft); color: var(--accent-ink); }
.toolbar svg { width: 17px; height: 17px; }
.tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.editable { flex: 1; padding: 12px 14px; outline: none; overflow-y: auto; font: 14px/1.6 var(--font); min-height: 180px; word-break: break-word; }
.editor-sm .editable { min-height: 110px; max-height: 260px; }
.editable p { margin: 0 0 .6em; }
.editable ul, .editable ol { margin: 0 0 .6em; padding-left: 1.6em; }
.editable blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--ink-2); }
.editable img { max-width: 100%; height: auto; }
.editable .mio-signature { color: var(--muted); margin-top: 12px; }
.editor-foot { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; border-top: 1px solid var(--line-soft); }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; border: 2px dashed #cdd3d0; border-radius: 12px; padding: 22px 12px; background: #fff; cursor: pointer; color: var(--ink-2); transition: border-color .15s, background .15s; }
.dropzone svg { width: 34px; height: 34px; color: var(--accent); stroke-width: 1.5; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .link { color: var(--accent); font-weight: 600; text-decoration: underline; }
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.att-item { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.att-thumb { width: 40px; height: 40px; border-radius: 6px; flex: none; object-fit: cover; background: var(--line-soft); color: var(--muted); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-transform: uppercase; }
.att-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-info .att-name { display: block; }

.compose-foot { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.compose-foot .spacer { flex: 1; }
#sendBtn { background: #ea580c; border-color: #ea580c; min-width: 110px; }
#sendBtn:hover { background: #c2410c; border-color: #c2410c; }
.compose-error { color: var(--danger); font-size: 13px; }
.compose-error:empty { display: none; }
.compose-mini { position: fixed; right: 20px; bottom: 44px; z-index: 35; display: flex; align-items: center; gap: 10px; max-width: 340px; padding: 12px 16px; background: #13201f; color: #fff; border: 0; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); cursor: pointer; text-align: left; }
.compose-mini #composeMiniText { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-mini .muted { color: #a9b6b4; flex: none; }

/* dialogs + settings */
.dialog { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog-wide { max-width: 640px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog h2 { margin: 0; font-size: 18px; }
.dialog p { margin: 0; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 8px 12px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent-ink); border-color: var(--accent); }
.tab-panel { display: flex; flex-direction: column; gap: 14px; }
.field > span:first-child { color: var(--muted); }
.field .editor { font-weight: 400; color: var(--ink); }
.hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input, .rule-form input, .rule-form select, .manage-list input { border: 1px solid #d6dadf; border-radius: 8px; padding: 7px 10px; background: #fff; min-width: 0; }
.inline-form input { flex: 1 1 180px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.manage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.manage-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.manage-list input { flex: 1; }
.manage-list .grow { flex: 1; min-width: 0; }
.rule-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfa; }
.rule-form input { flex: 1 1 140px; }

.toast { position: fixed; bottom: 44px; left: 50%; transform: translateX(-50%); background: #13201f; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; font-size: 14px; max-width: calc(100vw - 32px); }
.toast-error { background: var(--danger); }

.only-mobile { display: none; }
.list-pane { position: relative; }
.fab { position: absolute; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); cursor: pointer; align-items: center; justify-content: center; z-index: 5; }
.fab svg { width: 22px; height: 22px; }
.composing .fab { display: none; }

@media (max-width: 1100px) {
  .list-pane { width: 340px; }
  .sidebar { width: 210px; }
  .compose-cols { grid-template-columns: minmax(0, 1fr) 240px; }
}
@media (max-width: 820px) {
  .only-mobile { display: inline-flex; }
  .topbar .brand-name { display: none; }
  .topbar { gap: 8px; padding: 8px 10px; }
  .search { flex: 1 1 auto; min-width: 0; }
  .topbar-right { margin-left: 0; }
  .sync-state { display: none; }
  .sidebar { position: fixed; top: 57px; bottom: 0; left: 0; width: 270px; background: #fff; z-index: 20; transform: translateX(-100%); transition: transform .18s; box-shadow: 0 0 30px rgba(0,0,0,.15); }
  .show-sidebar .sidebar { transform: none; }
  .list-pane { width: 100%; border: 0; }
  .read-pane { display: none; }
  .show-reader .list-pane { display: none; }
  .show-reader .read-pane { display: flex; }
  #reader { padding: 12px 14px 20px; }
  .reader-date { display: none; }
  .mail-frame { min-height: 60vh; }
  .overlay { padding: 0; }
  .compose { max-width: none; height: 100%; max-height: none; border-radius: 0; }
  .compose-cols { display: flex; flex-direction: column; overflow-y: auto; }
  .compose-main { overflow: visible; padding: 10px 14px; }
  .editor { min-height: 300px; }
  .compose-side { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .dropzone { padding: 14px; }
  .compose-foot { padding: 10px 14px; }
  #sendBtn { flex: 1; }
  .compose-mini { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .dialog { max-height: 100vh; height: 100%; border-radius: 0; }
  .app-foot { display: none; }
  .login-page .app-foot { display: block; }
}

.nf-title { margin: 0; font-size: 20px; }
.notice a { color: inherit; font-weight: 700; word-break: break-all; }
.login-card .brand { white-space: normal; flex-wrap: wrap; row-gap: 8px; }
.login-card .brand-name { overflow: visible; }
