/* Mail */
.app-mail { position: relative; --ml-accent: #2f7cf6; --ml-unread: var(--ml-accent); }
[data-theme="dark"] .app-mail { --ml-accent: #5b9bff; }
.app-mail [hidden] { display: none !important; }
.app-mail .ml-split { display: flex; flex: 1; min-height: 0; }

/* ---------- sidebar ---------- */
.app-mail .ml-side { width: 228px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 1px; padding: 12px 10px 10px; overflow-y: auto; background: var(--sidebar); border-right: 1px solid var(--line); }
.app-mail .ml-compose-btn { height: 42px; border-radius: 14px; justify-content: flex-start; padding: 0 16px; font-size: 14px; margin-bottom: 10px; background: var(--ml-accent); color: #fff; box-shadow: 0 6px 18px -8px rgba(47, 124, 246, .7); }
.app-mail .ml-folders { display: flex; flex-direction: column; gap: 1px; }
.app-mail .ml-folder .ic { color: var(--text-2); }
.app-mail .ml-folder.on { background: rgba(47, 124, 246, .16); color: var(--text); }
.app-mail .ml-folder.on .ic { color: var(--ml-accent); }
.app-mail .ml-folder .count.ml-strong { color: var(--text); font-weight: 700; }
.app-mail .ml-lab-head { display: flex; align-items: center; justify-content: space-between; padding-right: 2px; margin-top: 8px; }
.app-mail .ml-lab-add { width: 24px; height: 24px; border-radius: 7px; color: var(--text-3); }
.app-mail .ml-side-hint { font-size: 12px; color: var(--text-3); padding: 2px 10px 6px; }
.app-mail .ml-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; margin: 0 3px; }
.app-mail .ml-account { display: flex; align-items: center; gap: 10px; padding: 8px; margin-top: 8px; border: 0; border-radius: 12px; background: var(--tile); color: var(--text); text-align: left; min-width: 0; }
.app-mail .ml-account:hover { background: var(--tile-hover); }
.app-mail .ml-account-t { display: flex; flex-direction: column; min-width: 0; }
.app-mail .ml-account-t b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-mail .ml-account-t small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- avatars, labels ---------- */
.app-mail .ml-av { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: 0 0 auto; background-size: cover; background-position: center; user-select: none; }
.app-mail .ml-av-sys { background: var(--tile-hover); color: var(--text-2); }
.app-mail .ml-lab { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); white-space: nowrap; flex: 0 0 auto; }
.app-mail .ml-lab button { border: 0; background: none; color: inherit; padding: 0; display: grid; opacity: .7; cursor: pointer; }
.app-mail .ml-lab button:hover { opacity: 1; }

/* ---------- list ---------- */
.app-mail .ml-listpane { width: 380px; flex: 0 0 auto; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.app-mail .ml-listhead { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px; }
.app-mail .ml-search { flex: 1; }
.app-mail .ml-search .input { height: 34px; border-radius: 12px; background: var(--tile); box-shadow: none; }
.app-mail .ml-search .input:focus { box-shadow: inset 0 0 0 2px var(--ml-accent); background: var(--surface-2); }
.app-mail .ml-menu-btn, .app-mail .ml-compose-mini { display: none; }
.app-mail .ml-listbar { height: 40px; flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--line); }
.app-mail .ml-listbar .icon-btn { width: 30px; height: 30px; color: var(--text-2); }
.app-mail .ml-listtitle { font-size: 13px; font-weight: 700; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-mail .ml-selcount { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 0 6px; white-space: nowrap; }
.app-mail .ml-check { width: 16px; height: 16px; accent-color: var(--ml-accent); margin: 0; flex: 0 0 auto; cursor: pointer; }
.app-mail .ml-spin svg { animation: spin .8s linear infinite; }
.app-mail .ml-banner { display: flex; align-items: center; gap: 12px; margin: 2px 10px 8px; padding: 10px 12px; border-radius: 12px; background: rgba(47, 124, 246, .1); box-shadow: inset 0 0 0 1px rgba(47, 124, 246, .22); }
.app-mail .ml-banner-ic { color: var(--ml-accent); display: grid; flex: 0 0 auto; }
.app-mail .ml-banner-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-mail .ml-banner-t b { font-size: 13px; }
.app-mail .ml-banner-t small { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.app-mail .ml-banner .btn-primary { background: var(--ml-accent); color: #fff; }
.app-mail .ml-list { flex: 1; outline: none; display: flex; flex-direction: column; }
.app-mail .ml-row { position: relative; display: flex; gap: 11px; padding: 11px 12px 11px 14px; border-bottom: 1px solid var(--line); cursor: default; flex: 0 0 auto; }
.app-mail .ml-row:hover { background: var(--hover); }
.app-mail .ml-row.on { background: rgba(47, 124, 246, .13); }
.app-mail .ml-row.checked { background: rgba(47, 124, 246, .09); }
.app-mail .ml-row.unread::before { content: ''; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--ml-unread); }
.app-mail .ml-row-av { position: relative; width: 38px; height: 38px; flex: 0 0 auto; }
.app-mail .ml-row-av .ml-check { position: absolute; inset: 0; width: 38px; height: 38px; opacity: 0; }
.app-mail .ml-row:hover .ml-row-av .ml-av, .app-mail .ml-row.checked .ml-row-av .ml-av { opacity: .0; }
.app-mail .ml-row:hover .ml-row-av .ml-check, .app-mail .ml-row.checked .ml-row-av .ml-check { opacity: 1; width: 18px; height: 18px; inset: 10px; }
.app-mail .ml-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-mail .ml-row-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.app-mail .ml-row-from { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-mail .ml-row-att { color: var(--text-3); display: grid; align-self: center; }
.app-mail .ml-row-time { flex: 0 0 auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.app-mail .ml-row-subj { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--text); }
.app-mail .ml-row-subj > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.app-mail .ml-row-snip { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-mail .ml-row.unread .ml-row-from, .app-mail .ml-row.unread .ml-row-subj > span:first-child { font-weight: 700; }
.app-mail .ml-row.unread .ml-row-time { color: var(--ml-accent); font-weight: 700; }
.app-mail .ml-draft { color: #e5484d; font-weight: 700; }
.app-mail .ml-star { position: absolute; right: 8px; bottom: 9px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--text-3); display: grid; place-items: center; opacity: 0; cursor: pointer; }
.app-mail .ml-row:hover .ml-star, .app-mail .ml-star.on { opacity: 1; }
.app-mail .ml-star:hover { background: var(--hover); color: var(--text); }
.app-mail .ml-star.on { color: #f5b301; }
.app-mail .ml-star.on svg { fill: currentColor; }
.app-mail .ml-star.big { position: static; opacity: 1; width: 34px; height: 34px; }
.app-mail .ml-more { margin: 14px auto; flex: 0 0 auto; }
.app-mail .ml-loading { flex: 1; display: grid; place-items: center; padding: 40px; }
.app-mail .ml-loading.small { padding: 16px; }
.app-mail .ml-empty-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #93c5fd, #2563eb); box-shadow: 0 10px 24px -12px rgba(37, 99, 235, .8); }
.app-mail .ml-empty-ic.big { width: 76px; height: 76px; border-radius: 24px; }

/* ---------- reading pane ---------- */
.app-mail .ml-read { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.app-mail .ml-noread { color: var(--text-2); }
.app-mail .ml-readbar { height: 48px; flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.app-mail .ml-readbar .icon-btn { width: 34px; height: 34px; color: var(--text-2); }
.app-mail .ml-readbar .icon-btn:hover { color: var(--text); }
.app-mail .ml-back { display: none !important; }
.app-mail .ml-readbody { flex: 1; padding: 18px 26px 30px; display: flex; flex-direction: column; gap: 12px; }
.app-mail .ml-subject-row { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.app-mail .ml-subject { flex: 1 1 260px; margin: 2px 0 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.app-mail .ml-subject-labels { display: flex; gap: 5px; flex-wrap: wrap; align-self: center; }
.app-mail .ml-subject-labels:empty { display: none; }
.app-mail .ml-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; color: var(--text-2); background: var(--tile); }
.app-mail .ml-notice > span:first-child { display: grid; color: var(--ml-accent); }
.app-mail .ml-notice > span:nth-child(2) { flex: 1 1 200px; }
.app-mail .ml-notice.warn > span:first-child { color: #d29500; }
.app-mail .ml-notice.err > span:first-child { color: #e5484d; }
.app-mail .ml-card { border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); flex: 0 0 auto; }
.app-mail .ml-card-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.app-mail .ml-card:not(.open) .ml-card-head { cursor: pointer; }
.app-mail .ml-card:not(.open):hover { background: var(--tile); }
.app-mail .ml-card-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.app-mail .ml-card-from { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 14px; }
.app-mail .ml-card-from b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-mail .ml-addr { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.app-mail .ml-card-to { border: 0; background: none; padding: 0; text-align: left; color: var(--text-3); font-size: 12.5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-mail .ml-card-to:hover { color: var(--text-2); text-decoration: underline; }
.app-mail .ml-card-snip { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-mail .ml-card-time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.app-mail .ml-details { margin: -4px 14px 8px 66px; padding: 8px 12px; border-radius: 10px; background: var(--tile); display: grid; gap: 3px; font-size: 12.5px; }
.app-mail .ml-details > div { display: flex; gap: 10px; }
.app-mail .ml-details span { width: 40px; color: var(--text-3); flex: 0 0 auto; }
.app-mail .ml-details b { font-weight: 500; overflow-wrap: anywhere; }
.app-mail .ml-card-body { padding: 0 18px 14px 66px; display: flex; flex-direction: column; gap: 10px; }
.app-mail .ml-frame { width: 100%; border: 0; min-height: 40px; display: block; color-scheme: normal; background: transparent; }
.app-mail .ml-frame.paper { background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.app-mail .ml-atts { padding: 0 18px 16px 66px; }
.app-mail .ml-atts-head { font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 8px; }
.app-mail .ml-atts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.app-mail .ml-att { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.app-mail .ml-att-thumb { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ml-accent); background: var(--tile); background-size: cover; background-position: center; }
.app-mail .ml-att-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-mail .ml-att-t b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-mail .ml-att-t small { font-size: 11.5px; color: var(--text-3); }
.app-mail .ml-att-a { display: flex; }
.app-mail .ml-att-a .icon-btn { width: 28px; height: 28px; color: var(--text-2); }
.app-mail .ml-replyrow { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 0 2px; }

/* ---------- compose ---------- */
.app-mail .ml-compose-layer { position: absolute; right: 16px; bottom: 0; z-index: 20; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.app-mail .ml-compose { pointer-events: auto; width: min(560px, calc(100vw - 32px)); height: min(600px, calc(100% - 20px)); max-height: calc(100vh - 140px); display: flex; flex-direction: column; border-radius: 16px 16px 0 0; background: var(--surface); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line-2); transform: translateY(24px); opacity: 0; transition: transform .2s var(--ease), opacity .18s; overflow: hidden; }
.app-mail .ml-compose.in { transform: none; opacity: 1; }
.app-mail .ml-compose.min { height: 46px !important; }
.app-mail .ml-compose.min .ml-cbody, .app-mail .ml-compose.min .ml-cfoot { display: none; }
.app-mail .ml-compose.max { position: fixed; }
.app-mail .ml-compose-layer:has(.ml-compose.max) { inset: 16px; right: 16px; justify-content: center; align-items: stretch; }
.app-mail .ml-compose.max { position: static; width: min(900px, 100%); height: auto; max-height: none; border-radius: 16px; }
.app-mail .ml-compose.drop { box-shadow: var(--shadow-pop), 0 0 0 3px var(--ml-accent); }
.app-mail .ml-chead { height: 46px; flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 0 8px 0 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); cursor: default; }
.app-mail .ml-chead .icon-btn { width: 30px; height: 30px; color: var(--text-2); }
.app-mail .ml-ctitle { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.app-mail .ml-cbody { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.app-mail .ml-crow { position: relative; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px 14px; border-bottom: 1px solid var(--line); }
.app-mail .ml-clabel { font-size: 13px; color: var(--text-3); width: 36px; flex: 0 0 auto; }
.app-mail .ml-fromval { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-mail .ml-chipfield { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 3px 0; cursor: text; }
.app-mail .ml-chipinput { flex: 1 1 120px; min-width: 80px; height: 28px; border: 0; outline: 0; background: none; color: var(--text); font-size: 13.5px; }
.app-mail .ml-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 3px; border-radius: 13px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; max-width: 100%; }
.app-mail .ml-chip > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-mail .ml-chip button { width: 18px; height: 18px; border: 0; border-radius: 50%; background: none; color: var(--text-3); display: grid; place-items: center; padding: 0; cursor: pointer; }
.app-mail .ml-chip button:hover { background: var(--hover); color: var(--text); }
.app-mail .ml-chip.bad { background: rgba(229, 72, 77, .14); box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .5); color: #e5484d; }
.app-mail .ml-cctoggle { font-size: 12.5px; flex: 0 0 auto; }
.app-mail .ml-sugg { position: absolute; left: 50px; top: calc(100% - 2px); z-index: 5; width: min(360px, calc(100% - 60px)); max-height: 260px; overflow-y: auto; padding: 5px; border-radius: 12px; background: var(--glass-solid); box-shadow: var(--shadow-pop); }
.app-mail .ml-sugg-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; }
.app-mail .ml-sugg-row span { display: flex; flex-direction: column; min-width: 0; }
.app-mail .ml-sugg-row b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-mail .ml-sugg-row small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-mail .ml-sugg-row.on, .app-mail .ml-sugg-row:hover { background: rgba(47, 124, 246, .16); }
.app-mail .ml-subjin { flex: 1; height: 32px; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px; font-weight: 600; }
.app-mail .ml-subjin::placeholder { color: var(--text-3); font-weight: 500; }
.app-mail .ml-ctools { display: flex; align-items: center; gap: 1px; padding: 4px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.app-mail .ml-ctools .icon-btn { width: 30px; height: 30px; color: var(--text-2); }
.app-mail .ml-tsep { width: 1px; height: 18px; background: var(--line-2); margin: 0 4px; }
.app-mail .ml-editor { flex: 1 0 140px; padding: 12px 16px; outline: none; font-size: 14px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.app-mail .ml-editor a { color: var(--ml-accent); }
.app-mail .ml-editor blockquote { margin: 6px 0 6px 2px; padding-left: 12px; border-left: 3px solid var(--line-2); color: var(--text-2); }
.app-mail .ml-editor .ml-quote-head, .app-mail .ml-editor .ml-sig { color: var(--text-2); }
.app-mail .ml-editor p { margin: 0 0 .7em; }
.app-mail .ml-editor ul, .app-mail .ml-editor ol { padding-left: 1.4em; margin: .3em 0; }
.app-mail .ml-editor img { max-width: 100%; }
.app-mail .ml-catts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.app-mail .ml-catts:empty { display: none; }
.app-mail .ml-catt { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 6px 0 10px; border-radius: 10px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; max-width: 260px; }
.app-mail .ml-catt::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: var(--p, 0); background: var(--ml-accent); transition: width .15s; }
.app-mail .ml-catt > span:first-child { color: var(--ml-accent); display: grid; }
.app-mail .ml-catt-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; min-width: 0; }
.app-mail .ml-catt small { color: var(--text-3); white-space: nowrap; }
.app-mail .ml-catt button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: var(--text-3); display: grid; place-items: center; padding: 0; cursor: pointer; flex: 0 0 auto; }
.app-mail .ml-catt.err { box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .5); }
.app-mail .ml-catt.err small { color: #e5484d; }
.app-mail .ml-cerr { color: #e5484d; font-size: 12.5px; padding: 0 16px 8px; }
.app-mail .ml-cerr:empty { display: none; }
.app-mail .ml-cfoot { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.app-mail .ml-cfoot .icon-btn { color: var(--text-2); }
.app-mail .ml-sendgroup { display: flex; }
.app-mail .ml-send { border-radius: 18px 0 0 18px; height: 36px; padding: 0 16px 0 14px; background: var(--ml-accent); color: #fff; }
.app-mail .ml-send-more { border-radius: 0 18px 18px 0; height: 36px; width: 32px; padding: 0; margin-left: 1px; background: var(--ml-accent); color: #fff; }
.app-mail .ml-cstatus { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- snackbar, settings ---------- */
.app-mail .ml-snack { position: absolute; left: 50%; bottom: 18px; z-index: 30; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 12px; background: #1f2633; color: #fff; font-size: 13px; box-shadow: var(--shadow-pop); transition: transform .2s var(--ease), opacity .16s; max-width: calc(100% - 32px); }
[data-theme="light"] .app-mail .ml-snack { background: #232a37; }
.app-mail .ml-snack.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.app-mail .ml-snack .link { color: #8fb8ff; }
.app-mail.ml-composing .ml-snack { left: calc(50% - 140px); }
.ml-settings { width: min(420px, 92vw); align-items: stretch; text-align: left; }
.ml-settings .dialog-title { margin-bottom: 4px; }
.ml-settings .ml-setlabel { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-top: 6px; }
.ml-settings .textarea, .ml-settings .select { width: 100%; }
.ml-settings .ml-setcheck { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 4px; }

/* ---------- medium windows: folders become a drawer ---------- */
.app-mail .ml-scrim { display: none; }
.app-mail.ml-medium .ml-side { position: absolute; left: 0; top: 0; bottom: 0; z-index: 15; transform: translateX(-102%); transition: transform .22s var(--ease); background: var(--surface); box-shadow: var(--shadow-pop); }
.app-mail.ml-medium.ml-drawer .ml-side { transform: none; }
.app-mail.ml-medium.ml-drawer .ml-scrim { display: block; position: absolute; inset: 0; z-index: 14; background: rgba(0, 0, 0, .25); }
.app-mail.ml-medium .ml-menu-btn, .app-mail.ml-medium .ml-compose-mini { display: inline-grid; }
.app-mail.ml-medium .ml-listpane { width: 340px; }

/* ---------- phone / narrow: one pane at a time ---------- */
.app-mail.ml-narrow .ml-listpane { width: 100%; border-right: 0; }
.app-mail.ml-narrow .ml-read { display: none; }
.app-mail.ml-narrow.ml-show-read .ml-listpane { display: none; }
.app-mail.ml-narrow.ml-show-read .ml-read { display: flex; }
.app-mail.ml-narrow .ml-back { display: inline-grid !important; }
.app-mail.ml-narrow .ml-readbody { padding: 14px 12px 24px; }
.app-mail.ml-narrow .ml-card-body, .app-mail.ml-narrow .ml-atts { padding-left: 14px; padding-right: 14px; }
.app-mail.ml-narrow .ml-details { margin-left: 14px; }
.app-mail.ml-narrow .ml-subject { font-size: 18px; }
.app-mail.ml-narrow .ml-readbar { overflow-x: auto; }
.app-mail.ml-narrow .ml-compose-layer { inset: 0; right: 0; }
.app-mail.ml-narrow .ml-compose { width: 100%; height: 100%; max-height: none; border-radius: 0; }
.app-mail.ml-narrow .ml-cmax { display: none; }
.app-mail.ml-narrow .ml-star { opacity: 1; }
.app-mail.ml-narrow .ml-row-av .ml-check { display: none; }
.app-mail.ml-narrow .ml-row:hover .ml-row-av .ml-av { opacity: 1; }
.app-mail.ml-narrow.ml-composing .ml-snack { left: 50%; }
.app-mail .ml-showquote { align-self: flex-start; height: 18px; padding: 0 8px; border: 0; border-radius: 9px; background: var(--tile-hover); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.app-mail .ml-showquote:hover { background: var(--press); color: var(--text); }
.app-mail .ml-row-snip { padding-right: 22px; }
