/* 千千潜秋邮箱：经典 QQ 邮箱式蓝白视觉。使用系统字体与纯 CSS，不加载外部资源。 */
:root {
  --blue-900: #164b88;
  --blue-800: #1c5fa9;
  --blue-700: #2b74c7;
  --blue-600: #3a83d4;
  --blue-500: #5b9ce0;
  --blue-100: #eaf3fc;
  --blue-50: #f3f8fd;
  --ink: #243244;
  --muted: #6f7d8e;
  --line: #d9e2ec;
  --line-soft: #e9eef5;
  --paper: #ffffff;
  --canvas: #eef4fa;
  --danger: #c53d42;
  --danger-bg: #fff0f0;
  --success: #297a55;
  --shadow-sm: 0 1px 2px rgb(24 54 86 / 7%), 0 5px 14px rgb(24 54 86 / 5%);
  --shadow-lg: 0 20px 56px rgb(17 49 82 / 23%);
  --radius: 5px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 280px; background: var(--canvas); }
body {
  margin: 0;
  min-width: 280px;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--blue-800); }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 999; top: 8px; left: 8px;
  padding: 9px 14px; border-radius: 3px;
  background: #fff; color: var(--blue-800);
  transform: translateY(-160%); transition: transform .16s ease;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #f0a625; outline-offset: 2px; }

/* 登录页 */
.login-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, var(--blue-700) 0, var(--blue-800) 230px, #eaf2fa 230px, #f4f8fc 100%);
}
.login-brand {
  width: min(100% - 48px, 1080px);
  margin: 0 auto;
  min-height: 80px;
  display: flex; align-items: center; gap: 12px;
  color: #fff;
}
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 21px; letter-spacing: .08em; }
.login-brand small { margin-top: 1px; font-size: 12px; letter-spacing: .16em; color: #d8eaff; }
.mail-mark {
  width: 43px; height: 34px;
  display: grid; place-items: center;
  color: #fff;
}
.mail-mark svg { width: 100%; height: 100%; stroke-width: 2.1; }
.login-main {
  width: min(100% - 32px, 1080px);
  margin: 26px auto 0;
  flex: 1;
  display: flex; align-items: flex-start; justify-content: center;
}
.login-card {
  width: min(100%, 440px);
  padding: 34px 38px 30px;
  border-radius: 7px;
  background: var(--paper);
  box-shadow: 0 16px 42px rgb(11 55 103 / 21%), 0 1px 0 rgb(255 255 255 / 90%) inset;
  border: 1px solid rgb(255 255 255 / 60%);
}
.login-card-heading { text-align: center; margin-bottom: 23px; }
.eyebrow {
  margin: 0 0 5px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}
.login-card h1 { margin: 0; font-size: 25px; font-weight: 600; line-height: 1.28; color: #1f3a5a; }
.login-card-heading > p:last-child { margin: 9px 0 0; font-size: 13px; color: var(--muted); }
.login-account {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px;
  border: 1px solid #d8e7f6;
  background: #f6faff;
  border-radius: 4px;
}
.account-avatar, .header-avatar, .sender-avatar {
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #4c94dc, #1d61a7);
  font-weight: 700;
}
.account-avatar { width: 38px; height: 38px; font-size: 16px; }
.login-account-copy { min-width: 0; flex: 1; }
.login-account-copy small, .login-account-copy strong { display: block; }
.login-account-copy small { color: var(--muted); font-size: 11px; }
.login-account-copy strong { overflow: hidden; color: #294864; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.verified-chip {
  padding: 2px 7px; border-radius: 10px;
  color: #3674ae; background: #e9f4ff;
  font-size: 11px; white-space: nowrap;
}
.login-step { margin-top: 17px; }
.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 21px 0 17px; color: #9aa7b5; font-size: 11px;
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.field-label { display: block; margin: 0 0 6px; color: #34516d; font-size: 12px; font-weight: 600; }
.text-input {
  width: 100%; min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd8e4; border-radius: 3px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.text-input:hover { border-color: #aabdd0; }
.text-input:focus { border-color: var(--blue-600); outline: 0; box-shadow: 0 0 0 3px rgb(57 132 212 / 14%); }
.text-input[aria-invalid="true"] { border-color: var(--danger); }
.code-input { margin-bottom: 10px; letter-spacing: .25em; font-size: 18px; }
.field-hint { min-height: 18px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-error {
  margin: 8px 0 10px; padding: 8px 10px;
  border-left: 3px solid var(--danger); border-radius: 2px;
  color: #9e3036; background: var(--danger-bg); font-size: 12px;
}
.primary-button, .secondary-button, .quiet-button, .page-button, .header-button, .icon-button, .reader-back, .search-button {
  border: 0; border-radius: 3px; transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.primary-button {
  min-height: 41px; padding: 9px 18px;
  color: #fff; background: var(--blue-700);
  border: 1px solid #286bb7;
  box-shadow: 0 1px 0 rgb(255 255 255 / 20%) inset;
  font-weight: 600;
}
.primary-button:hover:not(:disabled) { background: #2469b8; }
.primary-button:active:not(:disabled) { background: #1e5ca2; }
.primary-button:disabled { opacity: .58; }
.full-width { width: 100%; }
.secondary-button {
  min-height: 38px; padding: 7px 15px;
  border: 1px solid #c8d5e2; background: #fff; color: #3b5771;
}
.secondary-button:hover:not(:disabled) { background: #f5f9fd; border-color: #adc3d8; }
.secondary-button:disabled { opacity: .55; }
.login-disclaimer {
  margin: 23px 0 0; padding-top: 15px; border-top: 1px solid var(--line-soft);
  color: #8d99a6; font-size: 11px; line-height: 1.65; text-align: center;
}
.login-disclaimer strong { color: #67778a; font-weight: 600; }
.login-footer {
  width: min(100% - 36px, 1080px); margin: 0 auto; padding: 24px 0 27px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px;
  color: #8191a1; font-size: 11px;
}
.login-footer a { color: #647e97; text-decoration: none; }
.login-footer a:hover { color: var(--blue-700); text-decoration: underline; }

/* 主应用顶栏 */
.mail-app { min-height: 100vh; display: flex; flex-direction: column; background: #f5f8fb; }
.app-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  height: 61px; padding: 0 26px;
  color: #fff;
  background: linear-gradient(180deg, #347fce 0%, #246ab6 100%);
  border-bottom: 1px solid #1b5b9e;
  box-shadow: 0 1px 2px rgb(0 42 86 / 16%);
}
.header-leading { display: flex; align-items: center; min-width: 246px; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; opacity: .94; }
.mail-mark.compact { width: 32px; height: 25px; }
.brand-copy strong { display: block; font-size: 18px; font-weight: 600; letter-spacing: .04em; line-height: 1.2; }
.brand-copy small { display: block; margin-top: 1px; color: #d5e9ff; font-size: 10px; letter-spacing: .08em; }
.menu-button { display: none; }
.header-account {
  position: relative; display: flex; align-items: center; gap: 7px;
  margin-left: auto; min-width: 170px;
}
.header-avatar { width: 27px; height: 27px; border: 1px solid rgb(255 255 255 / 40%); font-size: 11px; background: rgb(255 255 255 / 18%); }
.account-switcher {
  max-width: 230px; min-width: 132px; padding: 5px 26px 5px 7px;
  border: 1px solid transparent; border-radius: 3px;
  color: #fff; background: rgb(255 255 255 / 10%);
  appearance: none; text-overflow: ellipsis;
}
.account-switcher:hover { border-color: rgb(255 255 255 / 38%); }
.account-switcher:focus { border-color: #d6eaff; outline: 0; background: rgb(255 255 255 / 20%); }
.account-switcher option { color: var(--ink); background: #fff; }
.select-chevron { position: absolute; right: 7px; width: 14px; height: 14px; pointer-events: none; }
.header-actions { display: flex; align-items: center; gap: 5px; }
.header-button {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 9px; color: #e8f4ff; background: transparent; font-size: 12px;
}
.header-button:hover { color: #fff; background: rgb(255 255 255 / 13%); }
.header-button svg { width: 17px; height: 17px; stroke-width: 1.6; }
.workspace-shell { flex: 1; display: flex; min-height: 0; }
.sidebar {
  flex: 0 0 217px; display: flex; flex-direction: column;
  padding: 23px 13px 14px;
  background: #fff; border-right: 1px solid #dce6f0;
}
.sidebar-primary { padding: 0 7px 20px; }
.compose-button {
  width: 100%; min-height: 40px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid #2e73be; border-radius: 3px;
  color: #fff; background: linear-gradient(180deg, #4b91d9, #2f78c5);
  box-shadow: 0 1px 0 rgb(255 255 255 / 24%) inset;
  font-weight: 600;
}
.compose-button:hover { background: linear-gradient(180deg, #559bde, #337fc9); }
.compose-button svg { width: 18px; height: 18px; }
.folder-heading {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 7px;
  color: #8494a5; font-size: 11px; font-weight: 600;
}
.icon-button {
  display: inline-grid; place-items: center;
  width: 31px; height: 31px; padding: 0;
  color: #6f8294; background: transparent;
}
.icon-button:hover { color: var(--blue-800); background: #edf5fd; }
.icon-button svg { width: 17px; height: 17px; }
.icon-button.subtle { width: 25px; height: 25px; }
.folder-list { display: flex; flex-direction: column; gap: 2px; }
.folder-button {
  width: 100%; min-height: 36px;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border: 0; border-radius: 3px;
  color: #52677d; background: transparent; text-align: left;
}
.folder-button:hover { color: var(--blue-800); background: #f3f8fe; }
.folder-button.active { color: #185c9f; background: #e6f1fc; font-weight: 600; box-shadow: inset 3px 0 0 var(--blue-600); }
.folder-button svg { flex: 0 0 auto; width: 17px; height: 17px; color: currentColor; stroke-width: 1.65; }
.folder-name { flex: 1; }
.folder-count {
  min-width: 18px; padding: 0 5px;
  border-radius: 9px; color: #6a7b8b; background: #f0f4f8;
  font-size: 10px; font-weight: 500; line-height: 17px; text-align: center;
}
.folder-button.active .folder-count { color: #2c6eaf; background: #d4e8fb; }
.folder-button.has-unread .folder-count { color: #fff; background: #e58b2e; }
.sidebar-footnote {
  margin-top: auto; padding: 14px 8px 1px;
  display: flex; align-items: center; gap: 6px;
  color: #99a6b2; font-size: 10px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #62b887; }
.sidebar-backdrop { display: none; }

.mail-main { flex: 1; display: flex; min-width: 0; background: #f6f9fc; }
.mailbox-pane {
  width: 460px; flex: 0 0 460px; min-width: 300px;
  display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid #dce6f0;
}
.mailbox-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 22px 22px 12px;
}
.mailbox-kicker { margin: 0 0 2px; color: #93a1ae; font-size: 10px; letter-spacing: .1em; }
.mailbox-toolbar h1 { margin: 0; color: #234666; font-size: 21px; font-weight: 600; }
.message-summary { padding-bottom: 2px; color: #93a1ad; font-size: 11px; white-space: nowrap; }
.search-form {
  position: relative; height: 34px; margin: 0 22px 12px;
  display: flex; align-items: center;
  border: 1px solid #d4e0ea; border-radius: 3px; background: #f9fbfd;
}
.search-form:focus-within { border-color: #93b9db; background: #fff; box-shadow: 0 0 0 2px rgb(66 141 210 / 9%); }
.search-form svg { width: 15px; height: 15px; margin-left: 10px; color: #9aabba; }
.search-form input {
  flex: 1; min-width: 0; height: 100%; padding: 0 6px 0 8px;
  border: 0; outline: 0; background: transparent; font-size: 12px;
}
.search-form input::placeholder { color: #a3b0bc; }
.search-button { height: 26px; margin-right: 4px; padding: 0 10px; color: #48729a; background: transparent; font-size: 12px; }
.search-button:hover { color: var(--blue-800); background: #edf5fd; }
.message-list { min-height: 120px; flex: 1; overflow: auto; }
.message-row {
  position: relative; width: 100%; min-height: 66px;
  display: grid; grid-template-columns: 29px minmax(0, 1fr) auto;
  column-gap: 9px; align-items: start;
  padding: 12px 20px 11px 22px;
  border: 0; border-bottom: 1px solid #eef2f6;
  color: #4b5d70; background: #fff; text-align: left;
}
.message-row:hover { background: #f5faff; }
.message-row.selected { background: #eaf4fe; box-shadow: inset 3px 0 0 #4a8ed3; }
.message-row.unread { color: #263c51; }
.message-row.unread .row-subject, .message-row.unread .row-sender { font-weight: 700; }
.row-dot { width: 7px; height: 7px; margin: 7px 0 0 2px; border-radius: 50%; background: transparent; }
.message-row.unread .row-dot { background: #3987d1; }
.row-main { min-width: 0; }
.row-sender, .row-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sender { display: flex; align-items: center; gap: 6px; color: #53677b; font-size: 12px; }
.row-subject { margin-top: 3px; color: #506275; font-size: 13px; }
.row-attachment { display: inline-flex; flex: 0 0 auto; color: #8296a9; }
.row-attachment svg { width: 13px; height: 13px; }
.row-date { padding-top: 1px; color: #9aa8b4; font-size: 10px; white-space: nowrap; }
.message-empty { padding: 44px 22px; color: #8b9aa8; text-align: center; font-size: 12px; }
.message-empty strong { display: block; margin-bottom: 5px; color: #65798d; font-size: 13px; font-weight: 500; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px 14px; border-top: 1px solid #edf1f5; }
.page-button { min-width: 57px; height: 28px; padding: 0 11px; border: 1px solid #d7e1ea; color: #52708d; background: #fff; font-size: 11px; }
.page-button:hover:not(:disabled) { border-color: #aac3d8; background: #f8fbfe; }
.page-button:disabled { color: #b5c0ca; background: #fafbfc; }
.page-info { min-width: 54px; color: #8c9aa7; font-size: 11px; text-align: center; }

/* 阅读区 */
.reader-pane { flex: 1; min-width: 0; background: #f8fafc; overflow: auto; }
.reader-empty { min-height: 100%; display: grid; place-content: center; justify-items: center; padding: 42px 24px; color: #91a0ae; text-align: center; }
.empty-illustration { display: grid; place-items: center; width: 100px; height: 88px; margin-bottom: 15px; border-radius: 50%; background: #edf3f8; color: #8fb1cf; }
.empty-illustration svg { width: 61px; height: 47px; stroke-width: 1.3; }
.reader-empty h2 { margin: 0; color: #71879a; font-size: 15px; font-weight: 500; }
.reader-empty p { margin: 7px 0 0; font-size: 11px; }
.reader-message { max-width: 960px; margin: 0 auto; padding: 27px clamp(26px, 4vw, 55px) 55px; }
.reader-topbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.reader-back { display: none; align-items: center; gap: 3px; padding: 2px 0; color: #4b749c; background: transparent; font-size: 12px; }
.reader-back svg { width: 17px; height: 17px; }
.reader-actions { display: flex; gap: 7px; margin-left: auto; }
.quiet-button { min-height: 29px; padding: 3px 9px; border: 1px solid #d7e2eb; color: #5d7690; background: #fff; font-size: 11px; }
.quiet-button:hover:not(:disabled) { border-color: #b4cbe0; color: var(--blue-800); background: #f5faff; }
.reader-heading { margin-top: 22px; padding-bottom: 18px; border-bottom: 1px solid #e1e8ef; }
.reader-heading h2 { margin: 0 0 17px; color: #274363; font-size: 22px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.reader-meta { display: flex; align-items: flex-start; gap: 10px; }
.sender-avatar { width: 34px; height: 34px; font-size: 13px; }
.reader-addresses { min-width: 0; flex: 1; }
.reader-addresses p { margin: 0; color: #8494a3; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.reader-addresses p:first-child { color: #546b80; font-size: 12px; }
.reader-meta time { color: #91a0ae; font-size: 11px; white-space: nowrap; }
.reader-body { margin-top: 22px; }
.plain-text { padding: 3px 0; color: #3d4d5e; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.reader-body iframe { display: block; width: 100%; min-height: 300px; border: 0; background: #fff; }
.attachment-section { margin-top: 28px; padding-top: 18px; border-top: 1px solid #e1e8ef; }
.attachment-section h3 { margin: 0 0 11px; color: #4a657e; font-size: 13px; font-weight: 600; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-download {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%; padding: 7px 10px;
  border: 1px solid #d5e1eb; border-radius: 3px;
  color: #4e6e8c; background: #fff; font-size: 12px;
}
.attachment-download:hover { border-color: #a7c4dd; background: #f5faff; }
.attachment-download svg { flex: 0 0 auto; width: 15px; height: 15px; }
.attachment-download span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-download small { color: #9aa8b4; font-size: 10px; white-space: nowrap; }

.app-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 11px;
  padding: 11px 18px;
  color: #8c9baa; background: #fff; border-top: 1px solid #e0e8f0;
  font-size: 10px;
}
.app-footer a { color: #71889e; text-decoration: none; }
.app-footer a:hover { color: var(--blue-700); text-decoration: underline; }
.footer-separator { color: #c3ced8; }

/* 弹窗 */
.modal {
  width: min(calc(100% - 28px), 620px); max-width: none; max-height: min(91vh, 820px);
  padding: 0; border: 0; border-radius: 5px;
  background: transparent; color: var(--ink); overflow: visible;
  box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgb(24 47 70 / 38%); backdrop-filter: blur(1px); }
.modal-card { max-height: min(91vh, 820px); overflow: auto; background: #fff; border-radius: 5px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 23px 15px; border-bottom: 1px solid #e4eaf0; }
.modal-header h2 { margin: 0; color: #294765; font-size: 19px; font-weight: 600; }
.modal-body { padding: 18px 23px 22px; }
.modal-footer { padding: 13px 23px 17px; border-top: 1px solid #e7edf3; }
.compose-modal { width: min(calc(100% - 28px), 760px); }
.compose-grid { padding-top: 8px; }
.address-row { display: flex; align-items: center; gap: 12px; min-height: 39px; border-bottom: 1px solid #edf1f5; }
.address-row label { flex: 0 0 42px; color: #7890a5; font-size: 12px; }
.line-input { flex: 1; min-width: 0; height: 36px; padding: 0 3px; border: 0; outline: 0; color: #3d5268; font-size: 13px; }
.subject-row { border-bottom: 1px solid #edf1f5; }
.subject-input { width: 100%; height: 44px; padding: 0 3px; border: 0; outline: 0; color: #344e68; font-size: 15px; }
.note-input {
  display: block; width: 100%; min-height: 210px; margin-top: 15px; padding: 12px 13px;
  resize: vertical; border: 1px solid #dce6ee; border-radius: 3px;
  color: #3d4d5e; background: #fbfdff; font-size: 14px; line-height: 1.75;
}
.note-input:focus { outline: 0; border-color: #91b8d9; background: #fff; box-shadow: 0 0 0 3px rgb(65 137 204 / 9%); }
.attachment-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.attachment-picker { display: inline-flex; align-items: center; gap: 5px; color: #47769f; font-size: 12px; cursor: pointer; }
.attachment-picker:hover { color: var(--blue-800); text-decoration: underline; }
.attachment-picker svg { width: 15px; height: 15px; }
.attachment-limit { color: #99a6b1; font-size: 11px; }
.compose-attachment-list { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; }
.compose-attachment { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 8px; border: 1px solid #e3ebf2; border-radius: 3px; background: #f8fbfd; color: #597085; font-size: 11px; }
.compose-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-attachment small { color: #96a5b2; white-space: nowrap; }
.compose-attachment button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 2px; color: #899bae; background: transparent; font-size: 15px; line-height: 1; }
.compose-attachment button:hover { color: #ad4147; background: #fff0f0; }
.compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compose-submit { display: flex; align-items: center; gap: 12px; }
.send-hint { color: #97a5b1; font-size: 10px; }
.confirm-modal { width: min(calc(100% - 32px), 380px); }
.confirm-card { padding: 27px 27px 21px; text-align: center; }
.confirm-icon { width: 34px; height: 34px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; color: #a87522; background: #fff6df; font-size: 19px; font-weight: 700; }
.confirm-card h2 { margin: 0; color: #304a62; font-size: 16px; font-weight: 600; }
.confirm-card p { margin: 10px 0 20px; color: #6f8191; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.confirm-actions { display: flex; justify-content: center; gap: 9px; }
.account-modal { width: min(calc(100% - 28px), 590px); }
.modal-body > section + form { margin-top: 22px; padding-top: 19px; border-top: 1px solid #e6edf3; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-heading h3 { margin: 0; color: #3a5874; font-size: 13px; font-weight: 600; }
.section-heading span { color: #9aa8b4; font-size: 10px; text-align: right; }
.account-list { display: flex; flex-direction: column; gap: 7px; }
.account-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #e0e9f1; border-radius: 3px; background: #fbfdff; }
.account-item.active { border-color: #bcd6ed; background: #f2f9ff; }
.account-item-avatar { width: 30px; height: 30px; font-size: 11px; }
.account-item-copy { flex: 1; min-width: 0; }
.account-item-copy strong, .account-item-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-item-copy strong { color: #46637d; font-size: 12px; font-weight: 500; }
.account-item-copy small { margin-top: 1px; color: #91a1ae; font-size: 10px; }
.account-badge { color: #4b83b3; font-size: 10px; white-space: nowrap; }
.account-remove { padding: 3px 7px; border: 1px solid #e0d4d4; border-radius: 2px; color: #a76868; background: #fff; font-size: 10px; }
.account-remove:hover:not(:disabled) { color: #a93d43; border-color: #e3baba; background: #fff7f7; }
.account-remove:disabled { color: #b4bdc5; border-color: #e3e8ed; background: #f8fafb; }
.add-account-form .field-label:not(:first-of-type) { margin-top: 11px; }
.add-account-form .primary-button { width: 100%; margin-top: 14px; }

/* Toast 与加载态 */
.toast-region { position: fixed; z-index: 80; right: 20px; bottom: 22px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; pointer-events: none; }
.toast {
  max-width: min(360px, calc(100vw - 32px)); padding: 10px 14px;
  border: 1px solid #d3e1ed; border-radius: 4px;
  color: #405a70; background: #fff; box-shadow: 0 8px 22px rgb(24 61 94 / 16%);
  font-size: 12px; animation: toast-in .18s ease-out;
}
.toast.error { border-color: #eccaca; color: #a33b41; background: #fffafa; }
.toast.success { border-color: #c7e3d4; color: #317553; background: #f9fffb; }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
button.loading { position: relative; color: transparent !important; }
button.loading::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 15px; height: 15px;
  margin: -8px 0 0 -8px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite; opacity: .9;
}
button.loading.primary-button::after { border-color: #fff; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 平板和手机：邮件列表与阅读区纵向切换，侧栏改成可展开抽屉。 */
@media (max-width: 980px) {
  .app-header { gap: 12px; padding: 0 15px; }
  .header-leading { min-width: 0; }
  .brand-copy small { display: none; }
  .sidebar { flex-basis: 185px; }
  .mailbox-pane { flex-basis: 370px; width: 370px; }
  .reader-pane { padding: 0; }
  .reader-message { padding-inline: 28px; }
}
@media (max-width: 760px) {
  .app-header { height: 56px; padding: 0 11px; gap: 8px; }
  .menu-button { display: inline-grid; width: 31px; height: 34px; color: #fff; }
  .menu-button:hover { background: rgb(255 255 255 / 13%); }
  .brand-copy strong { font-size: 16px; }
  .header-account { min-width: 0; margin-left: auto; }
  .header-avatar { display: none; }
  .account-switcher { max-width: 150px; min-width: 105px; font-size: 12px; }
  .header-actions { gap: 0; }
  .header-button { padding: 7px; }
  .header-button span { display: none; }
  .header-button svg { width: 18px; height: 18px; }
  .workspace-shell { position: relative; }
  .sidebar {
    position: fixed; z-index: 45; top: 56px; bottom: 0; left: 0;
    width: min(260px, 82vw); flex-basis: auto;
    transform: translateX(-102%); visibility: hidden;
    box-shadow: 8px 0 24px rgb(18 52 84 / 14%);
    transition: transform .2s ease, visibility .2s ease;
  }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .sidebar-backdrop {
    display: block; position: fixed; z-index: 40; inset: 56px 0 0;
    background: rgb(20 42 65 / 30%);
  }
  .mail-main { display: block; }
  .mailbox-pane { width: 100%; min-width: 0; border-right: 0; }
  .reader-pane { display: none; position: absolute; inset: 0; z-index: 20; background: #f8fafc; }
  .reader-pane.visible { display: block; }
  .reader-back { display: inline-flex; }
  .reader-message { padding: 18px 17px 38px; }
  .reader-heading h2 { font-size: 19px; }
  .reader-meta { gap: 8px; }
  .reader-meta time { font-size: 10px; }
  .app-footer { font-size: 9px; padding: 9px 12px; line-height: 1.7; }
  .app-footer .footer-separator { display: none; }
  .modal { max-height: 94vh; }
  .modal-card { max-height: 94vh; }
  .modal-header { padding: 17px 17px 13px; }
  .modal-body { padding: 15px 17px 18px; }
  .modal-footer { padding: 12px 17px 15px; }
  .compose-footer { align-items: flex-end; }
  .send-hint { display: none; }
  .compose-submit { margin-left: auto; }
  .compose-modal { width: calc(100% - 18px); }
  .toast-region { right: 12px; bottom: 13px; left: 12px; align-items: stretch; }
  .toast { max-width: none; }
}
@media (max-width: 400px) {
  .login-view { background: linear-gradient(180deg, #2f78c7 0, #246ab6 165px, #eef5fb 165px, #f7fafd 100%); }
  .login-brand { width: calc(100% - 30px); min-height: 65px; }
  .login-brand strong { font-size: 17px; }
  .mail-mark { width: 35px; height: 28px; }
  .login-main { width: calc(100% - 22px); margin-top: 20px; }
  .login-card { padding: 24px 18px 22px; }
  .login-card h1 { font-size: 21px; }
  .login-footer { padding: 20px 10px; gap: 4px 9px; font-size: 10px; }
  .login-footer span:first-child { flex-basis: 100%; text-align: center; }
  .app-header { padding-inline: 7px; gap: 3px; }
  .header-leading { gap: 0; flex: 0 1 auto; min-width: 0; }
  .brand { gap: 4px; min-width: 0; }
  .brand-copy { min-width: 0; }
  .brand-copy strong {
    max-width: 88px; overflow: hidden; text-overflow: ellipsis;
    font-size: 14px; letter-spacing: 0; white-space: nowrap;
  }
  .mail-mark.compact { width: 23px; height: 19px; flex: 0 0 auto; }
  .header-account { flex: 0 1 auto; min-width: 0; }
  .account-switcher {
    max-width: min(120px, 33vw); min-width: 0; width: min(120px, 33vw);
    padding-left: 4px; font-size: 11px;
  }
  .select-chevron { right: 1px; }
  .header-actions { flex: 0 0 auto; }
  .mailbox-toolbar { padding: 17px 14px 9px; }
  .mailbox-toolbar h1 { font-size: 19px; }
  .search-form { margin-inline: 14px; }
  .message-row { padding: 11px 13px 10px 14px; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 6px; }
  .row-date { font-size: 9px; }
  .reader-actions { gap: 3px; }
  .quiet-button { padding-inline: 7px; }
  .attachment-download { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
