/* sMail (module "mail") - /mail/assets/sp-mail.css. Layout and colours follow the approved mockups (sMail
   design canvas, 2026-11-16). Fonts: Inter from the panel (/webfonts/sp), system fonts otherwise. */
@font-face { font-family: "Inter"; src: url("/webfonts/sp/Inter-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/webfonts/sp/Inter-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/webfonts/sp/Inter-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/webfonts/sp/Inter-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
	--accent: #1D5FD6; --accent-h: #164AA8; --accent-soft: #E8F0FD; --accent-row: #EEF4FE;
	--ink: #0F172A; --ink2: #2A3445; --ink3: #445064; --muted: #556274; --faint: #5B6878; --line: #E3E8EF; --line2: #EEF1F5; --field: #D5DCE6;
	--bg: #F4F6F9; --card: #FFFFFF; --read: #FBFCFD; --night: #0E1A2B; --night2: #16263B; --night-line: #2B3B52; --night-ink: #A9B6C8;
	--red-bg: #FDE2E1; --red-line: #F3B4B0; --red-ink: #7A1A14; --amber-bg: #FEF3E2; --amber-line: #F5D19C; --amber-ink: #7C3A0A;
	--green-bg: #E3F4EA; --green-ink: #146C2E; --star: #E8A317; --star-line: #B7790B;
	--r: 10px; --r-lg: 14px; --shadow: 0 16px 40px rgba(14, 26, 43, .18);
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-h); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.u-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spm-noscript { padding: 24px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons */
.spm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--field); background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.spm-btn:hover { background: #F8FAFC; color: var(--ink); }
.spm-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.spm-btn-primary:hover { background: var(--accent-h); color: #fff; }
.spm-btn-danger { background: #B42318; border-color: #B42318; color: #fff; }
.spm-btn-ghost { border-color: transparent; background: transparent; color: var(--accent); }
.spm-btn-block { width: 100%; height: 48px; font-size: 15px; }
.spm-btn[disabled] { opacity: .55; cursor: default; }
.spm-icon-btn { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--field); background: #fff; color: var(--ink2); display: inline-grid; place-items: center; padding: 0; }
.spm-icon-btn:hover { background: #F8FAFC; }
.spm-icon-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- loading */
.spm-loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); gap: 10px; }
.spm-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spm-spin .8s linear infinite; display: inline-block; }
@keyframes spm-spin { to { transform: rotate(360deg); } }

/* ---------- top bar */
.spm-app { min-height: 100vh; display: flex; flex-direction: column; }
.spm-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 10px 24px; background: var(--night); color: #fff; position: relative; z-index: 6; }
.spm-brand { display: flex; align-items: baseline; gap: .22em; flex: 0 1 230px; color: #fff; text-decoration: none; min-width: 0; font-size: 22px; }
.spm-brand-logo { display: inline-flex; align-self: baseline; }
/* brand rule: the icon is as tall as the "l" of the wordmark (Inter Display Bold: 0.7275 em), bottom on the baseline */
.spm-brand-icon { display: block; width: .7275em; height: .7275em; }
.spm-brand-name { font-weight: 700; font-size: 1em; letter-spacing: -.02em; white-space: nowrap; line-height: 1; }
.spm-brand-tag { align-self: center; font-size: 12px; color: var(--night-ink); border: 1px solid var(--night-line); border-radius: 999px; padding: 2px 8px; }
.spm-searchwrap { flex: 999 1 420px; min-width: 0; position: relative; display: flex; gap: 8px; }
.spm-search { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: var(--r); background: var(--night2); border: 1px solid var(--night-line); min-width: 0; }
.spm-search svg { color: var(--night-ink); }
.spm-search input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; color: #fff; font-size: 14px; }
.spm-search input::placeholder { color: #8695AA; }
.spm-search .spm-clear { border: 0; background: transparent; color: var(--night-ink); font-size: 18px; padding: 0 4px; }
.spm-top .spm-tbtn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--night-line); background: transparent; color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.spm-top .spm-tbtn:hover { background: var(--night2); color: #fff; }
.spm-top-actions { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; justify-content: flex-end; }
.spm-avatar-me { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; }
.spm-filters { position: absolute; top: 52px; left: 0; right: 0; z-index: 8; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.spm-filters label.spm-f { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; }
.spm-filters input[type=text], .spm-filters select { height: 40px; border: 1px solid var(--field); border-radius: 9px; padding: 0 12px; font-weight: 400; background: #fff; }
.spm-filters .spm-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.spm-filters .spm-check input { width: 18px; height: 18px; }
.spm-filters .spm-row-end { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.spm-menu-btn { display: none; }
.spm-look { background: #FEF3C7; color: #78350F; font-size: 13px; padding: 6px 24px; display: flex; gap: 10px; align-items: center; }

/* ---------- three panes */
.spm-body { display: flex; flex: 1; align-items: stretch; min-height: 0; }
.spm-side { flex: 0 0 260px; background: #fff; border-right: 1px solid var(--line); padding: 16px 12px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: calc(100vh - 64px); position: sticky; top: 0; }
.spm-acct { position: relative; }
.spm-acct-btn { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: #F8FAFC; text-align: left; }
.spm-acct-ini { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.spm-acct-txt { flex: 1; min-width: 0; }
.spm-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); }
.spm-acct-addr { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-acct-menu { position: absolute; top: 58px; left: 0; right: -60px; z-index: 7; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-height: 60vh; overflow-y: auto; }
.spm-acct-menu .spm-kicker { padding: 8px 10px 4px; }
.spm-acct-item { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); font-size: 13px; text-align: left; }
.spm-acct-item span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-acct-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.spm-acct-item:hover { background: #F4F7FB; }
.spm-acct-note { border-top: 1px solid var(--line2); margin-top: 6px; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.spm-badge { font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 8px; }
.spm-count { font-size: 12px; font-weight: 600; color: var(--muted); }
.spm-compose-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px; background: var(--accent); color: #fff; border: 0; font-size: 15px; font-weight: 600; }
.spm-compose-btn:hover { background: var(--accent-h); }
.spm-folders { display: flex; flex-direction: column; gap: 2px; }
.spm-folder { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border: 0; border-radius: var(--r); background: transparent; color: var(--ink2); font-size: 14px; font-weight: 500; text-align: left; position: relative; }
.spm-folder:hover { background: #F4F7FB; }
.spm-folder[aria-current="page"] { font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.spm-folder .spm-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-folder.is-drop { outline: 2px dashed var(--accent); }
.spm-folder .spm-dot { width: 10px; height: 10px; border-radius: 3px; margin: 0 4px; flex: none; }
.spm-folders-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--faint); }
.spm-mini-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink3); font-size: 16px; line-height: 1; padding: 0; }
.spm-folder-more { display: none; position: absolute; right: 6px; top: 7px; width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent; color: var(--ink3); padding: 0; }
.spm-folder:hover .spm-folder-more, .spm-folder:focus-within .spm-folder-more { display: grid; place-items: center; }
.spm-storage { margin-top: auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; color: var(--ink3); }
.spm-storage-row { display: flex; justify-content: space-between; font-weight: 600; color: var(--ink); }
.spm-bar { height: 6px; border-radius: 999px; background: var(--line2); margin: 8px 0 6px; overflow: hidden; }
.spm-bar > div { height: 100%; border-radius: 999px; background: var(--accent); }
.spm-bar.is-high > div { background: #C2410C; }

.spm-list { flex: 0 1 420px; min-width: 300px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; max-height: calc(100vh - 64px); position: sticky; top: 0; }
.spm-list-head { padding: 16px 18px 10px; border-bottom: 1px solid var(--line2); }
.spm-list-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.spm-list-title h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-list-title .spm-sub { font-size: 13px; color: var(--muted); white-space: nowrap; }
.spm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.spm-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--field); background: #fff; color: var(--ink2); font-size: 13px; font-weight: 600; }
.spm-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.spm-chip svg.i { width: 14px; height: 14px; }
.spm-list-tools { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.spm-list-tools .spm-sel-info { font-size: 13px; color: var(--muted); flex: 1; }
.spm-rows { flex: 1; overflow-y: auto; }
.spm-row { display: flex; gap: 6px; padding: 12px 14px 12px 8px; border-bottom: 1px solid var(--line2); background: var(--read); position: relative; touch-action: pan-y; }
.spm-row.is-unread { background: #fff; }
.spm-row.is-current { background: var(--accent-row); box-shadow: inset 3px 0 0 var(--accent); }
.spm-row.is-selected { background: #F0F5FF; }
.spm-row-check { flex: none; width: 22px; display: grid; place-items: center; margin-top: 10px; }
.spm-row-check input { width: 16px; height: 16px; margin: 0; }
.spm-row-check { opacity: 0; }
.spm-row:hover .spm-row-check, .spm-row.is-selected .spm-row-check, .spm-row-check:focus-within, .spm-list.has-sel .spm-row-check { opacity: 1; }
.spm-star { flex: none; width: 36px; height: 36px; margin-top: 2px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; color: #8A96A8; padding: 0; }
.spm-star svg.i { width: 18px; height: 18px; }
.spm-star[aria-pressed="true"] svg.i { fill: var(--star); stroke: var(--star-line); }
.spm-row-main { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; color: inherit; }
.spm-row-line { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.spm-udot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.is-unread .spm-udot { background: var(--accent); }
.spm-from { font-size: 14px; font-weight: 500; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.is-unread .spm-from { font-weight: 700; color: var(--ink); }
.spm-tcount { flex: none; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--line2); border-radius: 6px; padding: 0 6px; }
.spm-grow { flex: 1; }
.spm-time { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.is-unread .spm-time { font-weight: 700; color: var(--accent); }
.spm-subj { font-size: 14px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-unread .spm-subj { font-weight: 600; color: var(--ink); }
.spm-prev { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-tag { align-self: flex-start; margin-top: 4px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; background: var(--line2); color: var(--ink3); }
.spm-clip { flex: none; display: inline-flex; color: var(--faint); }
.spm-clip svg.i { width: 14px; height: 14px; }
/* placeholder rows while the first page of a folder loads */
.spm-row.spm-skel { flex-direction: column; gap: 8px; padding: 14px 16px 14px 44px; background: #fff; pointer-events: none; }
.spm-skel span { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--line2) 0%, var(--line) 50%, var(--line2) 100%); background-size: 200% 100%; animation: spm-skel 1.2s ease-in-out infinite; }
.spm-skel .spm-skel-a { width: 38%; height: 12px; }
.spm-skel .spm-skel-b { width: 72%; }
.spm-skel .spm-skel-c { width: 56%; }
@keyframes spm-skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.spm-empty { padding: 48px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.spm-empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.spm-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line2); font-size: 13px; color: var(--muted); }
.spm-datasaver { display: none; padding: 14px 16px; font-size: 12px; color: var(--muted); text-align: center; }
.spm-swipe-bg { position: absolute; inset: 0; display: none; align-items: center; justify-content: space-between; padding: 0 22px; color: #fff; font-weight: 600; font-size: 13px; }
.spm-row.is-swiping .spm-swipe-bg { display: flex; }
.spm-row.is-swiping { background: #fff; }

/* ---------- reading pane */
.spm-read { flex: 999 1 520px; min-width: 0; padding: 20px 22px 40px; display: flex; flex-direction: column; gap: 14px; }
.spm-read-empty { flex: 1; display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 60px 20px; }
.spm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.spm-back { display: none; }
.spm-subject { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.spm-meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.spm-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--line2); color: var(--ink3); }
.spm-pill svg.i { width: 12px; height: 12px; stroke-width: 3; }
.spm-pill.is-ok { background: var(--green-bg); color: var(--green-ink); }
.spm-pill.is-warn { background: var(--amber-bg); color: var(--amber-ink); }
.spm-pill.is-bad { background: var(--red-bg); color: #A3221B; }
.spm-alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.spm-alert svg.i { width: 22px; height: 22px; }
.spm-alert.is-red { background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red-ink); }
.spm-alert.is-amber { background: var(--amber-bg); border: 1px solid var(--amber-line); color: var(--amber-ink); }
.spm-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.spm-alert .spm-btn { height: 34px; font-size: 13px; }
.spm-imgbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.spm-imgbar > span { flex: 1 1 260px; }
.spm-imgbar .spm-btn { height: 36px; font-size: 13px; }
.spm-thread { display: flex; flex-direction: column; gap: 10px; }
.spm-msg { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.spm-msg-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; background: transparent; text-align: left; color: inherit; }
.spm-av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.spm-msg-who { flex: 1; min-width: 0; }
.spm-msg-name { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-msg-name span { font-weight: 400; color: var(--muted); }
.spm-msg-sub { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-msg-time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.spm-msg-body { padding: 0 18px 18px 66px; display: flex; flex-direction: column; gap: 12px; }
.spm-msg-body iframe { width: 100%; border: 0; display: block; background: #fff; border-radius: 6px; }
.spm-text { font-size: 15px; line-height: 1.6; color: #1E2937; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-family: var(--font); }
.spm-text .q { color: #6B7789; }
.spm-msg-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.spm-link { border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: 13px; padding: 4px 0; }
.spm-source { max-height: 420px; overflow: auto; background: #0E1A2B; color: #DCE3EE; border-radius: 10px; padding: 12px 14px; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.spm-atts { display: flex; flex-wrap: wrap; gap: 10px; }
.spm-att { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-width: 240px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.spm-att-kind { flex: none; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.spm-att.is-risky .spm-att-kind { background: var(--amber-bg); color: var(--amber-ink); }
.spm-att-info { flex: 1; min-width: 0; font-size: 13px; }
.spm-att-name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-att-meta { display: block; color: var(--muted); }
.spm-att-meta .w { color: var(--amber-ink); font-weight: 600; }
.spm-att a { font-size: 13px; font-weight: 600; white-space: nowrap; }
.spm-quick { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.spm-quick label { font-size: 13px; font-weight: 600; color: var(--ink3); }
.spm-quick textarea { resize: vertical; border: 1px solid var(--field); border-radius: var(--r); padding: 10px 12px; font-size: 14px; line-height: 1.5; min-height: 76px; }
.spm-quick-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spm-quick-row .spm-sub { font-size: 13px; color: var(--muted); }
.spm-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; font-size: 13px; }
.spm-sec h3 { margin: 0 0 2px; font-size: 15px; }
.spm-sec p { margin: 0 0 10px; color: var(--muted); }
.spm-sec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.spm-sec li { display: flex; gap: 10px; }
.spm-sec-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--line2); color: var(--ink3); }
.spm-sec-ic svg.i { width: 12px; height: 12px; stroke-width: 3; }
.spm-sec-ic.is-ok { background: var(--green-bg); color: var(--green-ink); }
.spm-sec-ic.is-bad { background: var(--red-bg); color: #A3221B; }
.spm-sec-ic.is-warn { background: var(--amber-bg); color: var(--amber-ink); }
.spm-sec-t { font-weight: 600; color: var(--ink); }
.spm-sec-d { color: var(--muted); }

/* ---------- compose */
.spm-compose { position: fixed; z-index: 20; right: 24px; bottom: 0; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 80px); background: #fff; border: 1px solid var(--field); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -10px 40px rgba(14, 26, 43, .22); display: flex; flex-direction: column; }
.spm-compose.is-full { inset: 64px 0 0 0; width: auto; max-height: none; right: 0; border-radius: 0; border: 0; box-shadow: none; background: var(--bg); padding: 20px 24px 32px; overflow-y: auto; }
.spm-compose.is-min .spm-c-body { display: none; }
.spm-c-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 16px; background: var(--night); color: #fff; border-radius: 14px 14px 0 0; }
.spm-compose.is-full .spm-c-bar { background: transparent; color: var(--ink); padding: 0 0 12px; border-radius: 0; max-width: 980px; margin: 0 auto; width: 100%; }
.spm-c-title { flex: 1; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-compose.is-full .spm-c-title { font-size: 24px; }
.spm-c-bar button { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: inherit; display: grid; place-items: center; padding: 0; }
.spm-c-bar button:hover { background: rgba(255, 255, 255, .12); }
.spm-compose.is-full .spm-c-bar button:hover { background: var(--line2); }
.spm-c-saved { font-size: 12px; color: var(--night-ink); white-space: nowrap; }
.spm-compose.is-full .spm-c-saved { color: var(--muted); }
.spm-c-body { display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.spm-compose.is-full .spm-c-body { max-width: 980px; margin: 0 auto; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: visible; }
.spm-c-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 6px 16px; border-bottom: 1px solid var(--line2); min-height: 46px; position: relative; }
.spm-c-row > label, .spm-c-lab { flex: none; width: 56px; font-size: 13px; font-weight: 600; color: var(--muted); }
.spm-c-row input[type=text], .spm-c-row input:not([type]) { flex: 1; min-width: 140px; border: 0; outline: 0; height: 34px; font-size: 14px; background: transparent; }
.spm-c-row select { border: 1px solid var(--field); border-radius: 8px; height: 34px; padding: 0 8px; background: #fff; max-width: 100%; }
.spm-c-ccbtn { border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: 13px; }
.spm-rcpt { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--accent-soft); color: #173E86; font-size: 13px; font-weight: 600; }
.spm-rcpt.is-bad { background: var(--red-bg); color: var(--red-ink); }
.spm-rcpt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-rcpt button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: inherit; padding: 0; font-size: 15px; line-height: 1; }
.spm-suggest { position: absolute; left: 70px; right: 16px; top: 100%; z-index: 4; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.spm-suggest button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.spm-suggest button[aria-selected="true"], .spm-suggest button:hover { background: var(--accent-soft); }
.spm-suggest .n { display: block; font-weight: 600; font-size: 14px; }
.spm-suggest .e { display: block; font-size: 12px; color: var(--muted); }
.spm-suggest-note { padding: 6px 8px 2px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line2); margin-top: 4px; }
.spm-fmt { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px 12px; border-bottom: 1px solid var(--line2); background: #FAFBFC; }
.spm-fmt button { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--ink2); display: grid; place-items: center; padding: 0; }
.spm-fmt button:hover { background: var(--line2); }
.spm-fmt label { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink3); }
.spm-editor { min-height: 220px; padding: 14px 16px; font-size: 15px; line-height: 1.6; outline: 0; overflow-wrap: anywhere; }
.spm-compose:not(.is-full) .spm-editor { min-height: 180px; max-height: 42vh; overflow-y: auto; }
.spm-editor:empty::before { content: attr(data-placeholder); color: #8A96A8; }
.spm-editor blockquote { margin: 6px 0; padding-left: 12px; border-left: 3px solid var(--field); color: var(--ink3); }
.spm-plain { width: 100%; min-height: 220px; border: 0; outline: 0; padding: 14px 16px; font: 14px/1.55 ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.spm-c-quote { padding: 8px 16px 12px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.spm-c-quote pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 var(--font); color: var(--ink3); border-left: 3px solid var(--field); padding-left: 10px; max-height: 240px; overflow-y: auto; }
.spm-c-atts { padding: 10px 16px; border-top: 1px solid var(--line2); display: flex; flex-direction: column; gap: 8px; }
.spm-c-atts-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 13px; }
.spm-c-atts-head b { font-weight: 600; }
.spm-c-atts-head span { color: var(--muted); }
.spm-c-files { display: flex; flex-wrap: wrap; gap: 8px; }
.spm-c-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; min-width: 220px; max-width: 100%; }
.spm-c-file .spm-att-kind { width: 34px; height: 34px; }
.spm-c-file .spm-att-info { font-size: 12px; }
.spm-c-file button { width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent; font-size: 16px; padding: 0; }
.spm-prog { height: 4px; border-radius: 999px; background: var(--line2); overflow: hidden; margin-top: 4px; }
.spm-prog > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.spm-c-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line2); }
.spm-c-foot .spm-grow { flex: 1; }
.spm-c-aup { margin: 0; padding: 6px 16px 0; font-size: 12px; color: var(--ink3); }
.spm-c-aup.is-paused { color: #8a1f11; font-weight: 600; }
.spm-c-foot label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink3); }
.spm-c-err { color: #A3221B; font-size: 13px; font-weight: 600; padding: 0 16px 8px; }
.spm-drop { outline: 3px dashed var(--accent); outline-offset: -6px; }

/* ---------- toasts, dialogs, menus */
.spm-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.spm-toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 999px; background: var(--night); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(14, 26, 43, .3); max-width: calc(100vw - 32px); }
.spm-toast.is-err { background: #7A1A14; }
.spm-toast button { border: 0; background: transparent; color: #9CC0FF; font-weight: 700; min-height: 32px; }
.spm-modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(14, 26, 43, .45); display: grid; place-items: center; padding: 16px; }
.spm-modal { width: min(440px, 100%); background: #fff; border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.spm-modal h2 { margin: 0; font-size: 18px; }
.spm-modal p { margin: 0; color: var(--ink3); }
.spm-modal input[type=text] { height: 42px; border: 1px solid var(--field); border-radius: var(--r); padding: 0 12px; }
.spm-modal-row { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.spm-pop { position: fixed; z-index: 45; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; max-height: 60vh; overflow-y: auto; }
.spm-pop button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 14px; color: var(--ink2); }
.spm-pop button:hover, .spm-pop button:focus { background: var(--accent-soft); }
.spm-pop .spm-kicker { padding: 6px 10px; }
.spm-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.spm-keys kbd { font: 600 12px ui-monospace, Menlo, monospace; background: var(--line2); border: 1px solid var(--field); border-radius: 6px; padding: 1px 6px; }

/* ---------- login */
.spm-login { background: var(--bg); }
.spm-login-wrap { min-height: 100vh; display: flex; flex-wrap: wrap; }
.spm-login-aside { flex: 1 1 420px; background: var(--night); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; gap: 28px; }
.spm-login-aside .spm-brand { font-size: 26px; flex: none; }
.spm-login-pitch { margin-top: auto; max-width: 440px; }
.spm-login-pitch h2 { margin: 0; font-size: 34px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.spm-login-pitch ul { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; color: #C9D3E0; line-height: 1.5; }
.spm-login-pitch li { padding-left: 32px; position: relative; }
.spm-login-pitch li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 12px; height: 7px; border-left: 2px solid var(--accent-night, #5B8DEF); border-bottom: 2px solid var(--accent-night, #5B8DEF); transform: rotate(-45deg); }
.spm-login-host { font-size: 13px; color: var(--night-ink); }
.spm-login-main { flex: 999 1 520px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.spm-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.spm-card h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.spm-card .spm-sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.spm-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.spm-field input { height: 46px; border: 1px solid #C9D2DE; border-radius: var(--r); padding: 0 12px; font-size: 15px; font-weight: 400; }
.spm-field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.spm-hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.spm-pw { display: flex; align-items: center; border: 1px solid #C9D2DE; border-radius: var(--r); padding-right: 4px; }
.spm-pw input { flex: 1; min-width: 0; border: 0; outline: 0; height: 44px; }
.spm-pw:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.spm-pw-toggle { height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); font-size: 13px; font-weight: 600; }
.spm-error { margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--red-bg); color: var(--red-ink); font-size: 14px; }
.spm-login-alt { padding-top: 14px; border-top: 1px solid var(--line2); font-size: 14px; color: var(--ink3); line-height: 1.5; }
.spm-login .spm-card .spm-btn { text-decoration: none; }

/* ---------- tablets: list + reader, folders in a drawer */

/* ---------- phase 2: header sections, Settings, Contacts (mockups Settings / Contacts / Login, 2026-11-16) */
.spm-nav { display: flex; gap: 4px; }
.spm-nav button { height: 40px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: #C9D3E0; font-size: 14px; font-weight: 600; }
.spm-nav button[aria-current="page"] { background: #1B2B42; color: #fff; }
.spm-nav button:hover { color: #fff; }
.spm-app.is-view .spm-body, .spm-app.is-view .spm-fab, .spm-app.is-view .spm-searchwrap { display: none; }
.spm-view { flex: 1; min-width: 0; }
.spm-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; }
.spm-check input { width: 18px; height: 18px; flex: none; }
.spm-hint2 { font-size: 13px; color: var(--muted); line-height: 1.45; }
.spm-strong { font-weight: 600; font-size: 14px; }
.spm-set { display: flex; align-items: flex-start; min-height: calc(100vh - 64px); }
.spm-set-nav { flex: 0 0 240px; position: sticky; top: 0; padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); background: #fff; min-height: calc(100vh - 64px); }
.spm-set-nav .spm-kicker { padding: 6px 12px 8px; }
.spm-set-nav a { display: flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 8px; color: var(--ink2); text-decoration: none; font-size: 14px; }
.spm-set-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.spm-set-main { flex: 1; min-width: 0; padding: 24px 28px 60px; display: flex; flex-direction: column; gap: 18px; }
.spm-set-top { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; }
.spm-set-top h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.spm-set-top .spm-sub { margin: 4px 0 0; color: var(--muted); }
.spm-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
.spm-set-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; scroll-margin-top: 16px; }
.spm-set-card h2 { margin: 0; font-size: 17px; font-weight: 600; }
.spm-set-card h3 { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.spm-set-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.spm-set-sub { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line2); }
.spm-set-sub:empty { display: none; }
.spm-f2 { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; min-width: 0; }
.spm-f2 input:not([type=checkbox]):not([type=range]), .spm-f2 select, .spm-f2 textarea, .spm-inline input, .spm-inline select, .spm-cond input, .spm-cond select, .spm-ct-list input[type=search] {
	height: 42px; border: 1px solid var(--field); border-radius: 9px; padding: 0 12px; font-size: 14px; font-weight: 400; background: #fff; min-width: 0; }
.spm-f2 textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.spm-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.spm-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spm-inline input[type=email], .spm-inline input[type=text] { flex: 1 1 200px; }
.spm-row-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spm-set-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.spm-set-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line2); font-size: 14px; }
.spm-set-list li:first-child { border-top: 0; }
.spm-danger-link { color: #B42318; }
.spm-note { padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); color: #1D4FA8; font-size: 14px; margin: 0; }
.spm-note.is-warn { background: var(--amber-bg); color: var(--amber-ink); }
.spm-note.is-bad { background: var(--red-bg); color: var(--red-ink); }
.spm-switch { width: 52px; height: 30px; border-radius: 999px; border: 0; padding: 3px; display: flex; justify-content: flex-start; background: #C9D2DE; flex: none; }
.spm-switch[aria-checked="true"] { justify-content: flex-end; background: var(--accent); }
.spm-switch span { width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.spm-storage-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.spm-gauge { position: relative; width: 150px; height: 150px; flex: none; }
.spm-gauge-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.spm-gauge-txt strong { font-size: 28px; font-weight: 700; }
.spm-gauge-txt span { font-size: 12px; color: var(--muted); }
.spm-storage-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.spm-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.spm-meter { height: 8px; border-radius: 999px; background: var(--line2); overflow: hidden; }
.spm-meter div { height: 100%; width: 0; border-radius: 999px; transition: width .2s; }
.spm-meter.is-1 div { background: #A3221B; }
.spm-meter.is-2 div { background: #B45309; }
.spm-meter.is-3 div { background: #13795B; }
.spm-sig-ed { min-height: 110px; border: 1px solid var(--field); border-radius: 9px; padding: 10px 12px; }
.spm-rules { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; }
.spm-rules li { padding: 8px 0; border-top: 1px solid var(--line2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; }
.spm-rules li:first-child { border-top: 0; }
.spm-conds { display: flex; flex-direction: column; gap: 8px; }
.spm-cond { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(140px, 2fr) auto; gap: 8px; align-items: center; }
.spm-range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.spm-chips2 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.spm-chip2 { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: var(--accent-soft); color: #1D4FA8; }
.spm-chip2 button { border: 0; background: transparent; color: inherit; font-size: 15px; padding: 0 2px; }
.spm-seg { display: inline-flex; gap: 6px; }
.spm-seg button { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--field); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink2); }
.spm-seg button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.spm-devgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.spm-qr { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.spm-qr input { height: 42px; border: 1px solid var(--field); border-radius: 9px; padding: 0 12px; width: 100%; }
.spm-qr svg, .spm-set-sub svg { border: 1px solid var(--line); border-radius: 10px; }
.spm-setup { margin: 0; display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 14px; font-size: 14px; }
.spm-setup dt { color: var(--muted); }
.spm-setup dd { margin: 0; font-weight: 600; word-break: break-word; }
.spm-setup code, .spm-apppw code { font: 600 15px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.spm-apppw { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--r); background: var(--green-bg); }
.spm-apppw code { font-size: 19px; letter-spacing: .04em; }
.spm-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.spm-codes code { font: 600 15px ui-monospace, Consolas, monospace; padding: 6px 10px; background: var(--line2); border-radius: 7px; text-align: center; }
.spm-code { font: 700 22px/1 ui-monospace, Consolas, monospace !important; letter-spacing: .3em; text-align: center; }
.spm-modal-wide { width: min(640px, 100%); }
.spm-att.is-held { border-style: dashed; }
.spm-folder-sched { margin-top: 6px; }
.spm-ct { display: flex; flex-wrap: wrap; align-items: stretch; min-height: calc(100vh - 64px); }
.spm-ct-side { flex: 1 1 230px; max-width: 100%; background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.spm-ct-io { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.spm-ct-list { flex: 2 1 340px; min-width: 0; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.spm-ct-list .spm-list-head { display: flex; flex-direction: column; gap: 10px; }
.spm-ct-rows { display: flex; flex-direction: column; overflow-y: auto; }
.spm-ct-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; border: 0; border-bottom: 1px solid var(--line2); background: #fff; text-align: left; color: inherit; }
.spm-ct-row[aria-current="true"] { background: var(--accent-row); box-shadow: inset 3px 0 0 var(--accent); }
.spm-ct-txt { min-width: 0; display: flex; flex-direction: column; }
.spm-ct-txt .n { font-weight: 600; font-size: 14px; }
.spm-ct-txt .e { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-ct-main { flex: 999 1 440px; min-width: 0; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 16px; }
.spm-ct-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.spm-ct-head h2 { margin: 0; font-size: 24px; font-weight: 600; }
.spm-av-big { width: 72px; height: 72px; font-size: 28px; }
.spm-drop-zone { border: 2px dashed #C9D2DE; border-radius: 12px; padding: 22px; text-align: center; font-size: 14px; color: var(--ink3); cursor: pointer; }
.spm-drop-zone.is-drop { border-color: var(--accent); background: var(--accent-soft); }
.spm-login-back { align-self: flex-start; font-weight: 600; font-size: 14px; text-decoration: none; }
@media (max-width: 820px) {
	.spm-nav { order: 2; flex: 1 1 100%; }
	.spm-nav button { flex: 1; }
	.spm-set { display: block; }
	.spm-set-nav { display: none; }
	.spm-set-main { padding: 16px 12px 60px; }
	.spm-cond { grid-template-columns: 1fr 1fr; }
	.spm-cond input { grid-column: 1 / -1; }
	.spm-ct-main { padding: 16px 12px 40px; }
	.spm-ct-side, .spm-ct-list { border-right: 0; }
}

@media (max-width: 1180px) {
	.spm-side { position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; max-height: none; width: 300px; transform: translateX(-105%); transition: transform .18s ease; box-shadow: var(--shadow); }
	.spm-app.is-drawer .spm-side { transform: none; }
	.spm-drawer-bg { display: none; }
	.spm-app.is-drawer .spm-drawer-bg { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(14, 26, 43, .45); border: 0; }
	.spm-menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r); background: transparent; color: #fff; padding: 0; }
	.spm-top { padding: 10px 14px; }
}
/* ---------- phones: one pane at a time (list -> message -> reply) */
@media (max-width: 820px) {
	.spm-top { gap: 8px; padding: 8px 10px 10px; }
	.spm-brand { flex: 1 1 auto; }
	.spm-brand-tag { display: none; }
	.spm-top-actions .spm-tbtn span { display: none; }
	.spm-top-actions .spm-tbtn { padding: 0 12px; }
	.spm-searchwrap { flex: 1 1 100%; order: 3; }
	.spm-filters { grid-template-columns: 1fr; }
	.spm-body { display: block; }
	.spm-list { max-height: none; position: static; border-right: 0; min-width: 0; }
	.spm-app.is-reading .spm-list, .spm-app.is-reading .spm-top { display: none; }
	.spm-read { display: none; padding: 0 0 96px; gap: 10px; }
	.spm-app.is-reading .spm-read { display: flex; }
	.spm-toolbar { position: sticky; top: 0; z-index: 5; background: var(--night); padding: 8px 6px; gap: 2px; }
	.spm-toolbar .spm-icon-btn { background: transparent; border: 0; color: #fff; width: 44px; height: 44px; }
	.spm-toolbar .spm-tb-reply { display: none; }
	.spm-back { display: inline-grid; }
	.spm-read > :not(.spm-toolbar) { margin: 0 12px; }
	.spm-subject { font-size: 21px; }
	.spm-msg-body { padding: 0 14px 14px; }
	.spm-msg-head { padding: 12px 14px; }
	.spm-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 12px 16px; background: #fff; border-top: 1px solid var(--line); }
	.spm-mobile-bar .spm-btn { height: 48px; border-radius: 12px; font-size: 15px; }
	.spm-quick-desktop { display: none !important; }
	.spm-fab { position: fixed; right: 16px; bottom: 20px; z-index: 12; height: 56px; padding: 0 20px; border-radius: 16px; background: var(--accent); color: #fff; border: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; box-shadow: 0 8px 24px rgba(29, 95, 214, .35); }
	.spm-app.is-reading .spm-fab { display: none; }
	.spm-rows { padding-bottom: 96px; }
	.spm-datasaver { display: block; }
	.spm-row-check { display: none; }
	.spm-compose, .spm-compose.is-full { inset: 0; width: auto; max-height: none; border-radius: 0; padding: 0; background: #fff; }
	.spm-compose .spm-c-bar, .spm-compose.is-full .spm-c-bar { border-radius: 0; background: var(--night); color: #fff; padding: 8px 8px 8px 14px; max-width: none; }
	.spm-compose.is-full .spm-c-title { font-size: 15px; }
	.spm-compose .spm-c-body, .spm-compose.is-full .spm-c-body { border: 0; border-radius: 0; max-width: none; flex: 1; overflow-y: auto; }
	.spm-c-full-btn, .spm-c-min-btn { display: none !important; }
	.spm-editor { min-height: 40vh; }
	.spm-login-aside { display: none; }
	.spm-card { padding: 24px 20px; }
	.spm-att { min-width: 0; width: 100%; }
	.spm-sec-wrap { order: 9; }
}
@media (min-width: 821px) {
	.spm-fab, .spm-mobile-bar, .spm-datasaver { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 16 Nov 2026: Report phishing, read receipts, large messages */
.spm-btn-phish { background: #FDE2E1; border-color: #F3B4B0; color: #7A1A14; }
.spm-btn-phish:hover { background: #FBD0CE; }
.spm-mdnbar { background: #F2F7FE; border-color: #C9D6EA; }
.spm-large { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.spm-large-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.spm-large-list { list-style: none; margin: 0; padding: 0; }
.spm-large-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.spm-large-main { flex: 1 1 220px; min-width: 0; }
.spm-large-subj { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spm-large-size { font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.spm-btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }

/* touch targets (audit 16 Nov): filter chips, "New folder", "Clear search" at least 40 px, 44 px on touch screens */
.spm-chip { height: auto; min-height: 36px; }
.spm-search .spm-clear { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; }
.spm-folders-head .spm-mini-btn { min-width: 36px; min-height: 36px; }
.spm-chip2 button { min-width: 28px; min-height: 28px; }
@media (pointer: coarse) {
	.spm-chip, .spm-search .spm-clear, .spm-folders-head .spm-mini-btn { min-height: 44px; min-width: 44px; }
	.spm-chip2 button { min-width: 44px; min-height: 44px; }
}

/* 16 Nov 2026: phone swipe actions, row menu, first-time tip (Mail Mobile mockup) */
.spm-row { padding: 0; overflow: hidden; }
.spm-row-fg { flex: 1; min-width: 0; display: flex; gap: 6px; padding: 12px 6px 12px 8px; background: inherit; position: relative; z-index: 1; }
.spm-row.is-current { box-shadow: none; }
.spm-row.is-current .spm-row-fg { box-shadow: inset 3px 0 0 var(--accent); }
.spm-row.is-swiping .spm-row-fg { box-shadow: 0 0 12px rgba(14, 26, 43, .14); }
.spm-row-more { flex: none; align-self: flex-start; width: 32px; height: 36px; margin-top: 2px; border: 0; border-radius: 8px; background: transparent; color: #5B6878; display: grid; place-items: center; padding: 0; opacity: 0; cursor: pointer; }
.spm-row-more svg.i { width: 18px; height: 18px; stroke-width: 3.2; }
.spm-row:hover .spm-row-more, .spm-row-more:focus-visible, .spm-row-more[aria-expanded="true"] { opacity: 1; }
.spm-row-more:hover, .spm-row-more:focus-visible { background: var(--line2); }
.spm-swipe-bg { z-index: 0; padding: 0 20px; }
.spm-swipe-bg > span { display: none; align-items: center; gap: 8px; transition: transform .12s ease; }
.spm-swipe-bg svg.i { width: 20px; height: 20px; stroke: currentColor; }
.spm-row.swipe-right .spm-swipe-bg { background: var(--accent); justify-content: flex-start; }
.spm-row.swipe-left .spm-swipe-bg { background: #13795B; justify-content: flex-end; }
.spm-row.swipe-right .spm-swipe-r, .spm-row.swipe-left .spm-swipe-l { display: inline-flex; }
.spm-row.is-armed .spm-swipe-bg > span { transform: scale(1.12); }
.spm-swipe-tip { display: flex; align-items: center; gap: 10px; margin: 10px 12px; padding: 10px 6px 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-h); font-size: 13px; line-height: 1.4; }
.spm-swipe-tip .spm-swipe-tip-i { flex: none; width: 22px; height: 22px; stroke: currentColor; }
.spm-swipe-tip-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.spm-swipe-tip-x:hover, .spm-swipe-tip-x:focus-visible { background: rgba(29, 63, 122, .1); }
.spm-device-row { display: flex; align-items: center; gap: 14px; }
@media (max-width: 820px) {
	.spm-row-fg { padding: 12px 4px 12px 10px; }
	.spm-row-more { opacity: 1; width: 40px; height: 40px; margin-top: 0; }
	.spm-row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
@media (pointer: coarse) { .spm-row-more { opacity: 1; } }

/* sign-in: "or" divider, Continue with Google, six code boxes */
.spm-or { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.spm-or span { flex: 1; height: 1px; background: var(--line); }
.spm-btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid #C9D2DE; color: #1F1F1F; font-weight: 600; text-decoration: none; }
.spm-btn-google:hover { background: #F6F8FB; }
.spm-google { margin-top: 14px; }
.spm-otp { border: 0; margin: 0; padding: 0; min-width: 0; }
.spm-otp-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.spm-otp-box { width: 100%; min-width: 0; height: 54px; box-sizing: border-box; border: 1px solid #C9D2DE; border-radius: 10px; text-align: center; font: inherit; font-size: 22px; font-weight: 700; color: var(--ink); background: #fff; }
.spm-otp-box:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.spm-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spm-card [hidden] { display: none !important; }

/* 22 Nov 2026: phones, design board "sMail (phone)": one compact header (menu, Mail / Contacts / Settings, account
 * actions; search pill below), quick filters on one swipeable row, folders and mailboxes as a bottom sheet, safe areas. */
@media (max-width: 820px) {
	.spm-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "menu nav acts" "search search search"; align-items: center; gap: 8px 4px; padding: calc(6px + env(safe-area-inset-top)) calc(6px + env(safe-area-inset-right)) 10px calc(6px + env(safe-area-inset-left)); }
	.spm-menu-btn { grid-area: menu; }
	.spm-brand { display: none; }
	.spm-nav { grid-area: nav; order: 0; display: flex; gap: 2px; min-width: 0; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
	.spm-nav button { flex: 1 1 0; min-width: 0; min-height: 40px; height: 40px; padding: 0 4px; border-radius: 10px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.spm-top-actions { grid-area: acts; display: flex; align-items: center; gap: 2px; }
	.spm-top-actions .spm-tbtn { width: 40px; height: 40px; min-height: 40px; padding: 0 !important; justify-content: center; border-color: transparent; }
	.spm-top-actions .spm-tbtn[aria-label="Keyboard shortcuts"], .spm-top-actions .spm-tbtn[title="Keyboard shortcuts"] { display: none; }
	.spm-searchwrap { grid-area: search; order: 0; display: flex; gap: 8px; min-width: 0; }
	.spm-search { flex: 1; min-width: 0; border-radius: 999px; }
	.spm-search input { font-size: 16px; }
	.spm-searchwrap > .spm-tbtn { border-radius: 999px; }
	/* quick filters: one row that scrolls sideways, no scrollbar */
	.spm-chips { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-right: -16px; padding-right: 16px; }
	.spm-chips::-webkit-scrollbar { display: none; }
	.spm-chips > * { flex: none; }
	/* folders + mailbox switcher: a bottom sheet instead of a side drawer */
	.spm-side { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 86vh; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 20px 20px 0 0; transform: translateY(105%); transition: transform .22s ease; padding-top: 22px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
	.spm-side::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #CBD3DE; }
	.spm-app.is-drawer .spm-side { transform: none; }
	/* home indicator / notch */
	.spm-mobile-bar { padding-bottom: calc(16px + env(safe-area-inset-bottom)); padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }
	.spm-fab { bottom: calc(20px + env(safe-area-inset-bottom)); right: calc(16px + env(safe-area-inset-right)); }
	.spm-compose .spm-c-bar, .spm-compose.is-full .spm-c-bar { padding-top: calc(8px + env(safe-area-inset-top)); }
	.spm-toolbar { padding-top: calc(8px + env(safe-area-inset-top)); }
}
@media (max-width: 820px) and (prefers-reduced-motion: reduce) { .spm-side { transition: none; } }

/* module whitelabel: a theme pack's lockup in the Mail header, "Mail" as a superscript pill */
.spm-brand-wl { align-items: flex-start; gap: 6px; }
.spm-brand-lockup { display: block; height: 1.05em; width: auto; }
.spm-brand-sup { align-self: flex-start; margin-top: -2px; font-size: 11px; font-weight: 700; color: #F5F8FF; background: var(--accent); border-color: transparent; padding: 1px 7px; }
