/* ───────────────────────── 动森小岛设计系统（真源：摊记 DESIGN.md） ─────────────────────────
   奶油波点纸面 + 薄荷青唯一强调 + 暖棕文字阶 + 药丸/圆角体系 + 主按钮立体底影徽章
   Don't：纯黑文字 / 冷灰背景 / 蓝色对焦 / 卡片投影 / emoji 图标 */

:root {
  /* 薄荷青：唯一强调 */
  --pri: #19c8b9;
  --pri-active: #11a89b;
  --pri-tint: #e6f9f6;
  --accent-solid: #0cc0b5;
  --accent-text: #fff9e3;
  /* 暖棕文字阶梯 */
  --tx: #794f27;
  --body-c: #725d42;
  --sec: #9f927d;
  --muted: #8a7b66;
  --dis: #c4b89e;
  /* 边框 */
  --bd: #9f927d;
  --bd-l: #c4b89e;
  /* 奶油纸系 */
  --bg: #f8f8f0;
  --bgc: rgb(247, 243, 223);
  --inp: #fffbe7;
  --cream: #fffdf2;
  --pill-neutral: #f0ece2;
  --divider: #e8dcc8;
  /* 状态 */
  --err: #e05a5a;
  --err-deep: #c94444;
  --focus-yellow: #ffcc00;
  --focus-deep: #e0b800;
  /* 立体底影 */
  --shadow-btn: #bdaea0;
  --shadow-input: #d4c9b4;
  --shadow-soft: 0 8px 24px rgba(61, 52, 40, .18);
  --shadow-tiny: 0 2px 4px rgba(61, 52, 40, .10);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Nunito', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  font: 500 14px/1.55 var(--font);
  color: var(--body-c);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(158, 142, 109, .13) 1.5px, transparent 1.5px),
    radial-gradient(rgba(158, 142, 109, .09) 1px, transparent 1px);
  background-size: 28px 28px, 14px 14px;
}

button { font: inherit; cursor: pointer; color: inherit; }
input, textarea { font: inherit; color: var(--body-c); }
::placeholder { color: var(--dis); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--bd-l); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--sec); font-weight: normal; font-size: .85em; }
.error { color: var(--err); font-size: .9em; font-weight: 600; }

/* ── 输入件：奶油黄药丸，对焦暖黄光环 ── */
input[type="text"], input[type="password"], textarea {
  background: var(--inp);
  border: none;
  border-radius: 50px;
  padding: .55rem 1rem;
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow .2s var(--ease);
  outline: none;
  width: 100%;
}
input:focus, textarea:focus {
  box-shadow: 0 3px 0 0 var(--focus-deep), 0 0 0 3px rgba(255, 204, 0, .18);
}
textarea { border-radius: 16px; padding: .7rem 1rem; resize: none; }

/* ── 按钮体系：.btn 基类承载共性（药丸形态+过渡），--primary/--ghost 修饰差异（structure-hardening S2 收敛） ── */
.btn {
  background: var(--bg);
  color: var(--body-c);
  border: 2px solid var(--bd-l);
  border-radius: 50px;
  padding: .3rem 1rem;
  font-weight: 600;
  box-shadow: var(--shadow-tiny);
  transition: all .2s var(--ease);
}
.btn:hover { border-color: var(--pri); color: var(--pri-active); }

.btn--primary {
  background: var(--pri);
  color: #fff;
  border: none;
  padding: .55rem 1.4rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  box-shadow: 0 5px 0 0 var(--shadow-btn);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 0 0 var(--shadow-btn); color: #fff; }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 0 var(--shadow-btn); }
.btn--primary:disabled { opacity: .55; box-shadow: 0 3px 0 0 var(--shadow-btn); }

.btn--ghost {
  background: transparent;
  border-color: rgba(114, 93, 66, .3);
  padding: .5rem 1.4rem;
}
.btn--ghost:hover { transform: translateY(-1px); }

/* ── 登录页 ── */
.login-view { display: flex; align-items: center; justify-content: center; height: 100%; }
.login-card {
  background: var(--bgc);
  background-image:
    radial-gradient(rgba(158, 142, 109, .10) 1.5px, transparent 1.5px),
    radial-gradient(rgba(158, 142, 109, .07) 1px, transparent 1px);
  background-size: 28px 28px, 14px 14px;
  border: 2px solid var(--bd-l);
  border-radius: 20px;
  padding: 2.4rem 2.2rem 2.1rem;
  display: flex; flex-direction: column; gap: 1rem;
  width: min(360px, 92vw);
}
.ribbon {
  align-self: center;
  position: relative;
  background: #e59266;
  color: #fff;
  font-weight: 900;
  font-size: 15.5px;
  letter-spacing: 2px;
  padding: .45em 1.6em;
  border-radius: .2em;
  margin-bottom: .4rem;
  filter: drop-shadow(0 2px 2px rgba(61, 52, 40, .2));
}
.ribbon::before, .ribbon::after {
  content: '';
  position: absolute;
  top: .35em;
  border: 1.1em solid #c06a3e;
  z-index: -1;
}
.ribbon::before { left: -1.5em; border-left-color: transparent; }
.ribbon::after { right: -1.5em; border-right-color: transparent; }
.login-card input { text-align: center; letter-spacing: 2px; }
.login-card .btn--primary { width: 100%; }
.login-divider { text-align: center; color: var(--dis); font-size: .8em; position: relative; margin: .1rem 0; }
.login-divider::before, .login-divider::after { content: ''; position: absolute; top: 50%; width: 38%; border-top: 1.5px dashed var(--divider); }
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }
.login-divider span { background: var(--bgc); padding: 0 .5em; position: relative; z-index: 1; }
#passkey-login-btn { font-size: 14px; }

/* ── 主布局 ── */
.main-view { display: flex; flex-direction: column; height: 100%; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .55rem .9rem;
  background: var(--bgc);
  background-image: radial-gradient(rgba(158, 142, 109, .09) 1px, transparent 1px);
  background-size: 14px 14px;
  border-bottom: 2px solid var(--bd-l);
  flex-wrap: wrap;
}
.account-tabs { display: flex; gap: .45rem; flex-wrap: wrap; }
.account-tab {
  padding: .32rem .95rem;
  border-radius: 50px;
  border: 2px solid var(--bd-l);
  background: rgba(255, 255, 255, .55);
  color: var(--muted);
  font-weight: 600;
  transition: all .2s var(--ease);
}
.account-tab:hover { border-color: var(--pri); color: var(--pri-active); }
.account-tab.active { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-text); }
.account-tab .badge {
  margin-left: .4em; font-size: .78em; font-weight: 800;
  background: var(--pri); color: #fff;
  border-radius: 999px; padding: .05em .5em;
}
.account-tab.active .badge { background: rgba(255, 255, 255, .3); }
.account-tab .err-dot {
  margin-left: .4em; font-size: .78em; font-weight: 800;
  background: var(--err); color: #fff;
  border-radius: 999px; padding: .05em .5em;
}
.topbar-actions { display: flex; gap: .55rem; align-items: center; }
/* 宽屏 icon-btn 图标+文本形态：SVG 与文字基线对齐微调 + 文字小间距（对齐写信按钮量级） */
.topbar-actions .icon-btn svg { vertical-align: -3px; }
.icon-btn .btn-label { margin-left: .4rem; }

.layout { flex: 1; display: grid; grid-template-columns: 190px minmax(300px, 430px) minmax(0, 1fr); min-height: 0; }

/* ── 文件夹 ── */
.folder-list {
  background: var(--bgc);
  border-right: 2px solid var(--bd-l);
  overflow-y: auto; padding: .7rem .45rem;
  display: flex; flex-direction: column; gap: .25rem;
}
.folder-item {
  display: block; width: 100%; text-align: left;
  padding: .45rem .9rem;
  border: none; border-radius: 50px;
  background: transparent; color: var(--sec); font-weight: 600;
  transition: all .2s var(--ease);
}
.folder-item:hover { color: var(--pri-active); background: var(--pri-tint); }
.folder-item.active { background: var(--accent-solid); color: var(--accent-text); font-weight: 700; }

/* ── 邮件列表 ── */
.message-list { border-right: 2px solid var(--bd-l); overflow-y: auto; min-height: 0; padding: .55rem .6rem; display: flex; flex-direction: column; gap: .5rem; }
.message-item {
  display: block; width: 100%; text-align: left;
  padding: .6rem .85rem;
  border: 2px solid var(--bd-l); border-radius: 16px;
  background: var(--bgc);
  transition: all .2s var(--ease);
}
.message-item:hover { transform: translateY(-1px); border-color: var(--sec); }
.message-item.active { border-color: var(--pri); background: var(--pri-tint); }
.message-item .row1 { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.message-item .mfrom { font-weight: 700; color: var(--sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-item.unread { border-color: var(--sec); background: var(--cream); }
.message-item.unread .mfrom, .message-item.unread .msubject { color: var(--tx); }
.message-item.unread .mfrom::before {
  content: '';
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--pri);
  margin-right: .45em; vertical-align: .1em;
}
.message-item .mdate { color: var(--muted); font-size: .8em; font-weight: 600; white-space: nowrap; }
.message-item .msubject { display: block; color: var(--muted); font-size: .93em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-item .att-icon { color: var(--sec); }
.mpage { padding: .5rem; text-align: right; color: var(--muted); font-size: .85em; }
.mpage .muted { float: left; padding: .45rem .2rem; }
.loading-hint { text-align: center; padding: .8rem .5rem; color: var(--muted); font-size: .88em; }
.mpage button {
  margin: .3rem .35rem; padding: .3rem 1.1rem;
  border: 2px solid var(--bd-l); border-radius: 50px;
  background: var(--bgc); color: var(--body-c); font-weight: 600;
  box-shadow: var(--shadow-tiny);
  transition: all .2s var(--ease);
}
.mpage button:hover:not(:disabled) { border-color: var(--pri); color: var(--pri-active); }
.mpage button:disabled { opacity: .4; cursor: default; }

/* ── 阅读窗：填满窗口剩余高度，内容在 iframe 内部滚动 ── */
.reader { display: flex; flex-direction: column; padding: 1rem 1.2rem; overflow: hidden; }
.reader .placeholder { color: var(--dis); text-align: center; margin: auto; font-size: 1.05em; font-weight: 600; letter-spacing: 1px; }
.reader-title-row { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.reader-back-inline { display: none; } /* 桌面三栏列表常驻无返回需求；≤860 单栏显示 */
.reader-title-row h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: .5px; color: var(--tx); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-back-inline { flex: none; margin-right: .4rem; padding: .3rem .75rem; font-size: .88em; }
.reader .rmeta { color: var(--sec); font-size: .84em; font-weight: 600; margin-bottom: .6rem; flex: none; }
.reader .rbody {
  background: var(--cream);
  border: 2px solid var(--bd-l);
  border-radius: 20px;
  flex: 1;
  min-height: 180px;
  overflow: hidden;
}
.reader .rbody iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.reader .rbody .plaintext { white-space: pre-wrap; word-break: break-word; padding: 1.1rem 1.2rem; height: 100%; overflow-y: auto; box-sizing: border-box; }
.reader .attachments { flex: none; margin-top: .55rem; display: flex; flex-direction: column; gap: .45rem; }
.reader .attachments a {
  display: inline-flex; gap: .45rem; align-items: center; width: fit-content;
  background: var(--bgc);
  border: 2px solid var(--bd-l); border-radius: 50px;
  padding: .35rem .95rem;
  text-decoration: none; color: var(--pri-active); font-weight: 700;
  box-shadow: var(--shadow-tiny);
  transition: all .2s var(--ease);
}
.reader .attachments a:hover { border-color: var(--pri); transform: translateY(-1px); }

/* ── 写信：底部弹层 ── */
.compose-layer {
  position: fixed; inset: 0;
  background: rgba(61, 52, 40, .42);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  animation: fade-in .2s var(--ease);
  z-index: 50;
}
.compose-card {
  background: var(--bgc);
  background-image: radial-gradient(rgba(158, 142, 109, .09) 1px, transparent 1px);
  background-size: 14px 14px;
  border: 2px solid var(--bd-l); border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 32px rgba(61, 52, 40, .22);
  padding: .7rem 1.3rem 1.2rem;
  width: min(620px, 100%);
  display: flex; flex-direction: column; gap: .75rem;
  max-height: 88vh; overflow-y: auto;
  animation: slide-up .28s var(--ease);
}
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.grip { width: 44px; height: 5px; border-radius: 5px; background: var(--dis); margin: 0 auto .2rem; }
.compose-card h2 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: 1px; color: var(--tx); }
.compose-card label {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--sec);
}
.compose-card textarea { min-height: 130px; }
.compose-error { margin: 0; }
.compose-actions {
  display: flex; justify-content: flex-end; gap: .7rem;
  border-top: 2px dashed var(--divider);
  padding-top: .85rem; margin-top: .2rem;
}

/* ── 轻提示：顶部居中药丸 + 暖黄圆点 ── */
.toast {
  position: fixed; left: 50%; top: 58px; transform: translateX(-50%);
  display: flex; align-items: center; gap: .55rem;
  background: var(--bgc);
  border: 2px solid var(--bd-l);
  color: var(--body-c); font-weight: 600;
  padding: .45rem 1.1rem .45rem .6rem;
  border-radius: 50px;
  box-shadow: var(--shadow-soft);
  max-width: 88vw; z-index: 60;
}
.toast::before {
  content: '';
  width: 20px; height: 20px; flex: none;
  border-radius: 50%; background: var(--focus-yellow);
  border: 2px solid var(--focus-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: cover;
}

/* ── 列表区：搜索行 + 工具行 + 列表 + 批量条 ── */
.message-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 2px solid var(--bd-l); }
.search-row { display: flex; gap: .45rem; padding: .5rem .6rem .3rem; }
.search-row select {
  background: var(--inp); border: none; border-radius: 50px;
  padding: .4rem .6rem; color: var(--body-c); font: inherit; outline: none;
}
.search-row input { flex: 1; padding: .4rem .9rem; }
.search-row .btn { padding: .35rem .95rem; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; padding: .25rem .7rem; }
.text-link { background: none; border: none; color: var(--pri-active); font-weight: 700; padding: 0; }
.active-pill { border-color: var(--pri) !important; color: var(--pri-active) !important; background: var(--pri-tint) !important; }

.batch-bar {
  display: flex; gap: .45rem; flex-wrap: wrap;
  padding: .55rem .6rem;
  background: var(--bgc);
  border-top: 2px solid var(--bd-l);
  box-shadow: 0 -8px 20px rgba(61, 52, 40, .12);
}
.batch-bar button { padding: .35rem .85rem; font-size: .92em; }

/* 复选框：动森圆角方形，选中青底白勾 */
.checkbox {
  display: inline-block; width: 18px; height: 18px; flex: none;
  border: 2px solid var(--bd); border-radius: 6px;
  background: var(--cream);
  margin-right: .5em; vertical-align: -3px;
}
.checkbox.on { background: var(--pri); border-color: var(--pri); }
.checkbox.on::after {
  content: '';
  display: block; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  margin: 3px auto 0;
}
.message-item.selected { border-color: var(--pri); background: var(--pri-tint); }

/* 阅读窗操作栏 */
.reader-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: .8rem; }
.reader-actions button { padding: .32rem .85rem; font-size: .9em; font-weight: 600; }

/* 移动弹层 */
.move-card {
  background: var(--bgc);
  background-image: radial-gradient(rgba(158, 142, 109, .09) 1px, transparent 1px);
  background-size: 14px 14px;
  border: 2px solid var(--bd-l); border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 32px rgba(61, 52, 40, .22);
  padding: .7rem 1.3rem 1.1rem;
  width: min(420px, 100%);
  max-height: 72vh; overflow-y: auto;
  animation: slide-up .28s var(--ease);
}
.move-card h2 { margin: .2rem 0 .6rem; font-size: 16.5px; font-weight: 800; letter-spacing: 1px; color: var(--tx); }
.move-list { display: flex; flex-direction: column; gap: .2rem; }

/* 写信附件行 */
.attach-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.attach-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.attach-chip {
  display: inline-flex; align-items: center;
  background: var(--inp); border: 2px solid var(--bd-l);
  border-radius: 50px; padding: .2rem .5rem;
  font-size: .85em; font-weight: 600;
}
.chip-remove {
  background: none; border: none; color: var(--sec);
  font-weight: 800; padding: 0 .15rem 0 .3rem;
}
.chip-remove:hover { color: var(--err); }

.reader-back { display: none; margin-bottom: .55rem; }

/* ── 账号管理 ── */
.accounts-list { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .8rem; }
.account-row {
  display: flex; align-items: center; gap: .6rem;
  background: var(--cream); border: 2px solid var(--bd-l); border-radius: 14px;
  padding: .45rem .55rem .45rem .8rem;
}
.account-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.account-name { font-weight: 700; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-mail { font-size: .78em; color: var(--sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: .35rem; flex: none; }
.row-actions button { padding: .25rem .75rem; font-size: .88em; }
.remove-btn:hover { border-color: var(--err) !important; color: var(--err) !important; }
.add-account { display: flex; flex-direction: column; gap: .55rem; border-top: 2px dashed var(--divider); padding-top: .8rem; }
.add-account h3 { margin: 0; font-size: 13.5px; font-weight: 800; letter-spacing: 1px; color: var(--tx); }
.add-account label { display: flex; flex-direction: column; gap: .25rem; font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--sec); }
.check-row { flex-direction: row !important; align-items: center; gap: .45rem !important; font-size: 12px !important; letter-spacing: 0 !important; color: var(--body-c) !important; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--pri); }

/* ── 设置页（全屏视图，动森分组签分区） ── */
.settings-view {
  position: fixed;
  inset: 0;
  z-index: 40;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(158, 142, 109, .13) 1.5px, transparent 1.5px),
    radial-gradient(rgba(158, 142, 109, .09) 1px, transparent 1px);
  background-size: 28px 28px, 14px 14px;
  overflow-y: auto;
  animation: fade-in .2s var(--ease);
}
.settings-header {
  display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1rem;
  position: sticky; top: 0; z-index: 5;
  background: var(--bgc);
  background-image: radial-gradient(rgba(158, 142, 109, .09) 1px, transparent 1px);
  background-size: 14px 14px;
  border-bottom: 2px solid var(--bd-l);
}
.settings-header .ribbon { margin: 0 auto; }
.settings-header-spacer { width: 84px; flex: none; }
.settings-body { max-width: 640px; margin: 0 auto; padding: 1rem 1rem 3rem; display: flex; flex-direction: column; }
.settings-card {
  background: var(--cream);
  border: 2px solid var(--bd-l);
  border-radius: 20px;
  padding: .8rem .95rem;
  display: flex; flex-direction: column; gap: .55rem;
  margin-bottom: .5rem;
}
.settings-card h3 { margin: 0; font-size: 13.5px; font-weight: 800; letter-spacing: 1px; color: var(--tx); }
.settings-card label { display: flex; flex-direction: column; gap: .25rem; font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--sec); }

/* ── rg 域引导条（暖黄提醒，动森暖黄点亮规则） ── */
.rg-guide-bar {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  background: var(--focus-yellow);
  color: #6d5600;
  padding: .5rem .8rem;
  font-size: .85em; font-weight: 600;
  border-bottom: 2px solid var(--focus-deep);
}
.rg-guide-bar .btn { background: var(--bgc); border-color: #e0b800; color: #6d5600; box-shadow: none; }
.rg-guide-bar .btn:hover { border-color: var(--pri); color: var(--pri-active); }
.rg-guide-bar .guide-close {
  background: none; border: none; color: #6d5600;
  font-size: 1.2em; font-weight: 800; padding: 0 .3rem; margin-left: auto;
}

/* ── 设置页入口卡（账号管理独立页入口） ── */
.entry-row { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; }
.entry-title { font-weight: 800; color: var(--tx); font-size: 14px; }
.entry-desc { display: block; font-size: .78em; color: var(--sec); font-weight: 500; margin-top: .15rem; }
.entry-arrow { color: var(--pri-active); font-weight: 800; font-size: 1.1em; flex: none; }
.settings-card[role="button"] { cursor: pointer; transition: all .2s var(--ease); }
.settings-card[role="button"]:hover { border-color: var(--pri); transform: translateY(-1px); }

/* ── Web Push 订阅区 ── */
.settings-group-tag {
  align-self: flex-start;
  background: #e59266;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  padding: .25em 1.2em .25em 1em;
  border-radius: 0.4em;
  position: relative;
  margin: .6rem 0 .2rem;
  filter: drop-shadow(0 2px 1px rgba(61, 52, 40, .18));
}
.settings-group-tag::after {
  content: '';
  position: absolute;
  right: -.55em;
  top: .25em;
  border: .55em solid transparent;
  border-left-color: #c06a3e;
}
.push-section { display: flex; flex-direction: column; gap: .5rem; border-top: 2px dashed var(--divider); padding-top: .8rem; margin-top: .3rem; }
.push-section h3 { margin: 0; font-size: 13.5px; font-weight: 800; letter-spacing: 1px; color: var(--tx); }
.push-desc { margin: 0; font-size: .82em; color: var(--sec); }
.push-section .compose-actions { margin: 0; border: none; padding: 0; justify-content: flex-start; }
#push-status { margin: 0; font-size: .85em; font-weight: 600; }

/* ── 移动端：单栏切换 ── */
@media (max-width: 860px) {
  .topbar { align-items: stretch; flex-direction: column; gap: .5rem; min-width: 0; }
  .account-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; min-width: 0; padding-bottom: .15rem; }
  .account-tab { white-space: nowrap; flex: none; }
  .topbar-actions { justify-content: flex-end; }
  /* 窄屏顶栏按钮图标化：文字隐藏（aria-label/title 保留语义），SVG 照常显示。
     通配 .btn 覆盖全部按钮类（B1 教训：逐类名枚举漏掉 btn-primary 写信按钮） */
  .topbar-actions .btn { font-size: 0; padding: .45rem .6rem; gap: 0; }
  .topbar-actions .btn svg { vertical-align: middle; }
  /* span 的 margin 不随 font-size:0 塌缩，窄屏直接整个隐藏消掉占位 */
  .topbar-actions .btn-label { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .folder-list {
    flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 2px solid var(--bd-l); padding: .45rem .5rem;
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
    mask-image: linear-gradient(to right, #000 92%, transparent);
  }
  .folder-item { white-space: nowrap; width: auto; padding: .35rem .95rem; }
  .message-pane.active-on-mobile { display: none; }
  .reader { display: none; padding: .8rem; }
  .reader.active-on-mobile { display: flex; } /* 必须 flex：保持正文区撑满视口的布局（block 会令 iframe 塌缩到 180px） */
  /* 读信态整页化：reader fixed 全屏覆盖（不依赖 grid 行分配），文件夹/搜索/工具行被覆盖让位 */
  body.reading .reader.active-on-mobile {
    position: fixed; inset: 0; z-index: 45;
    display: flex; flex-direction: column; padding: .8rem;
    /* 不透明背景（与 settings-view 同款波点纸面）：覆盖层透明会令底层顶栏/文件夹/列表
       全部透出与读信内容叠印（U17 手机实测报障根因：body 背景不随 fixed 层走） */
    background-color: var(--bg);
    background-image:
      radial-gradient(rgba(158, 142, 109, .13) 1.5px, transparent 1.5px),
      radial-gradient(rgba(158, 142, 109, .09) 1px, transparent 1px);
    background-size: 28px 28px, 14px 14px;
  }
  body.reading .reader.active-on-mobile .rbody { flex: 1; min-height: 0; }
  body.reading .reader.active-on-mobile .rbody iframe { height: 100%; }
  /* 并入自原两段独立 860px 块（structure-hardening S3 合一） */
  .reader-back { display: inline-flex; }
  .reader-back-inline { display: inline-flex; }
}
