/* v10 手机端专用：触控优先、单列卡片、底部快捷栏 */
:root {
  --m10-bg: #eef1f5;
  --m10-page: #f7f8fa;
  --m10-card: #ffffff;
  --m10-ink: #172033;
  --m10-sub: #6f7787;
  --m10-line: #e3e7ed;
  --m10-accent: #3157d5;
  --m10-accent-ink: #ffffff;
  --m10-soft: #eaf0ff;
  --m10-top: rgba(247, 248, 250, .9);
}
:root[data-theme="dark"] {
  --m10-bg: #0e1219;
  --m10-page: #121722;
  --m10-card: #1a2130;
  --m10-ink: #edf1f8;
  --m10-sub: #929cac;
  --m10-line: #2b3444;
  --m10-accent: #82a5ff;
  --m10-accent-ink: #101a33;
  --m10-soft: #202d49;
  --m10-top: rgba(18, 23, 34, .9);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--m10-bg); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
#app { min-height: 100vh; min-height: 100svh; }

.m10-page {
  position: relative; max-width: 640px; min-height: 100vh; min-height: 100svh;
  margin: 0 auto; color: var(--m10-ink); background: var(--m10-page);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  box-shadow: 0 0 50px rgba(23, 32, 51, .08);
}
.m10-topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  height: 64px; padding: 10px 18px; border-bottom: 1px solid var(--m10-line);
  background: var(--m10-top); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.m10-logo {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: 12px; color: var(--m10-accent-ink); background: var(--m10-accent);
  font-size: 18px; font-weight: 800;
}
.m10-top-title { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.m10-top-title strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.m10-top-title span { margin-top: 2px; color: var(--m10-sub); font-size: 8px; letter-spacing: 1.5px; }
.m10-icon-btn {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--m10-line); border-radius: 12px; color: var(--m10-ink); background: var(--m10-card);
}
/* 顶栏搜索小图标：贴在日夜间图标左侧，搜索框滚出屏幕后出现 */
.m10-topsearch {
  position: absolute; top: 13px; right: 162px; font-size: 17px;
  opacity: 0; transform: scale(.75); pointer-events: none;
  transition: opacity .2s ease, transform .24s cubic-bezier(.22,1,.36,1);
}
.m10-topsearch.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.m10-main { padding: 16px 16px 112px; }

.m10-hero { padding: 0 0 8px; }
.m10-announce {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; margin-bottom: 10px;
  padding: 6px 12px; overflow: hidden; border: 1px solid var(--m10-line); border-radius: 13px;
  color: var(--m10-sub); background: var(--m10-page); font-size: 11px; text-align: left;
}
.m10-announce > span:first-child { flex: none; color: var(--m10-accent); font-weight: 700; }
.m10-announce-track { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .18s, transform .18s; }
.m10-announce-track.out { opacity: 0; transform: translateY(-5px); }
.m10-search { padding: 14px; border: 1px solid var(--m10-line); border-radius: 13px; background: var(--m10-page); }
.m10-search-tabs, .m10-search-engines {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin-left: -14px; padding-left: 14px; margin-right: -14px; padding-right: 14px;
}
.m10-search-tabs::-webkit-scrollbar, .m10-search-engines::-webkit-scrollbar { display: none; }
.m10-search-tabs { margin-bottom: 10px; }
.m10-search-tabs button {
  flex: none; min-height: 32px; padding: 0 14px; border: none; border-radius: 16px;
  color: var(--m10-sub); background: transparent; font-size: 13px; font-weight: 600;
}
.m10-search-tabs button.on { color: var(--m10-accent-ink); background: var(--m10-accent); font-weight: 700; }
.m10-search-engines { margin-bottom: 12px; }
.m10-search-engines button {
  flex: none; padding: 5px 10px; border: none; border-radius: 8px;
  color: var(--m10-sub); background: var(--m10-soft); font-size: 11px;
}
.m10-search-engines button.on { color: var(--m10-accent); font-weight: 700; }
.m10-search-row { display: flex; gap: 8px; }
.m10-search-row input {
  width: 100%; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--m10-line);
  border-radius: 10px; outline: none; color: var(--m10-ink); background: var(--m10-card); font-size: 14px;
}
.m10-search-row input:focus { border-color: var(--m10-accent); }
.m10-search-row button {
  flex: none; min-width: 60px; padding: 0 14px; border: 0; border-radius: 10px;
  color: var(--m10-accent-ink); background: var(--m10-accent); font-size: 13px; font-weight: 700;
}

.m10-section { margin-top: 16px; scroll-margin-top: 76px; }
.m10-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 3px 12px; }
.m10-section-head h2 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
.m10-section-head span { color: var(--m10-sub); font-size: 8px; letter-spacing: 1.2px; }
.m10-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.m10-quick-tabs { display: flex; gap: 7px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.m10-quick-tabs::-webkit-scrollbar { display: none; }
.m10-quick-tabs button {
  flex: none; min-height: 36px; padding: 0 13px; border: 1px solid var(--m10-line); border-radius: 10px;
  color: var(--m10-sub); background: var(--m10-card); font-size: 11px;
}
.m10-quick-tabs button.on { border-color: var(--m10-accent); color: var(--m10-accent); background: var(--m10-soft); font-weight: 700; }
.m10-common-list { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; }
.m10-common-list::-webkit-scrollbar { display: none; }
.m10-common-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex: none;
  min-height: 44px; padding: 0 14px; border: 1px solid var(--m10-line); border-radius: 13px;
  background: var(--m10-card); font-size: 12px;
}
.m10-common-list span, .m10-friends span { color: var(--m10-accent); }

.m10-category { margin-bottom: 18px; scroll-margin-top: 76px; }
.m10-category-title { display: flex; align-items: center; justify-content: space-between; padding: 0 0 10px; }
.m10-category-title h3 { margin: 0; font-size: 14px; font-weight: 600; }
.m10-category-count { font-size: 11px; color: var(--m10-sub); font-weight: 400; }
.m10-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m10-link {
  display: flex; align-items: center; min-width: 0; min-height: 62px; padding: 11px 12px; gap: 10px;
  border: 1px solid var(--m10-line); border-radius: 13px; background: var(--m10-page);
}
.m10-link > strong { flex: 1 1 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.m10-link > span { overflow: hidden; color: var(--m10-sub); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.m10-link:active { border-color: var(--m10-accent); transform: scale(.98); }
.m10-link-icon {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; margin-right: 0;
  border-radius: 11px; color: var(--m10-accent); background: var(--m10-soft);
  font-size: 14px; font-weight: 800; line-height: 1;
}
.m10-friends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m10-friends a { display: flex; justify-content: space-between; gap: 8px; padding: 13px; border: 1px solid var(--m10-line); border-radius: 13px; background: var(--m10-card); font-size: 11px; }
.m10-footer { padding: 10px 4px 4px; color: var(--m10-sub); text-align: center; font-size: 10px; line-height: 1.8; }
.m10-footer div { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.m10-footer button { padding: 8px 12px; border: 0; color: var(--m10-sub); background: transparent; font-size: 11px; }

.m10-dock {
  position: fixed; z-index: 40; bottom: max(10px, env(safe-area-inset-bottom)); left: 50%;
  display: grid; grid-template-columns: repeat(4, 1fr); width: calc(100% - 24px); max-width: 616px;
  padding: 7px; transform: translateX(-50%); border: 1px solid var(--m10-line); border-radius: 20px;
  background: var(--m10-top); box-shadow: 0 12px 36px rgba(10,20,40,.18); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.m10-dock a, .m10-dock button {
  display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 5px;
  flex-direction: column; border: 0; border-radius: 14px; color: var(--m10-ink); background: transparent;
  font-size: 11px; font-weight: 600;
}
.m10-dock a:active, .m10-dock button:active { background: var(--m10-soft); }
.m10-dock span { margin-bottom: 3px; color: var(--m10-accent); font-size: 8px; letter-spacing: 1px; }
.m10-dock b { font: inherit; }

.m10-modal { position: fixed; z-index: 100; inset: 0; display: none; }
.m10-modal.show { display: block; }
.m10-mask { position: absolute; inset: 0; background: rgba(6,12,24,.55); backdrop-filter: blur(3px); }
.m10-sheet {
  position: absolute; right: 0; bottom: 0; left: 0; max-width: 640px; max-height: 88vh; max-height: 88svh;
  margin: 0 auto; padding: 15px 18px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto;
  border: 1px solid var(--m10-line); border-bottom: 0; border-radius: 26px 26px 0 0;
  color: var(--m10-ink); background: var(--m10-card); animation: m10-up .22s ease-out;
}
.m10-grabber { width: 38px; height: 4px; margin: 0 auto 17px; border-radius: 5px; background: var(--m10-line); }
.m10-sheet h2 { margin: 0 45px 20px 0; font-size: 21px; }
.m10-close {
  position: absolute; top: 26px; right: 18px; width: 36px; height: 36px; border: 1px solid var(--m10-line);
  border-radius: 50%; color: var(--m10-sub); background: var(--m10-page); font-size: 20px;
}
.m10-login-form { display: grid; gap: 10px; }
.m10-login-form input {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--m10-line); border-radius: 13px;
  outline: none; color: var(--m10-ink); background: var(--m10-page);
}
.m10-login-form input:focus { border-color: var(--m10-accent); }
.m10-cap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--m10-sub); font-size: 10px; }
.m10-cap > span:first-child { margin-right: 3px; }
.cap-code { padding: 5px 6px; border-radius: 6px; color: var(--m10-accent); background: var(--m10-soft); font-family: ui-monospace, monospace; letter-spacing: .5px; }
.m10-primary { min-height: 48px; border: 0; border-radius: 13px; color: var(--m10-accent-ink); background: var(--m10-accent); font-weight: 700; }
.m10-primary:disabled, .m10-source button:disabled { opacity: .4; cursor: not-allowed; }
.m10-sheet-block { margin-top: 20px; }
.m10-block-label { display: block; margin-bottom: 9px; color: var(--m10-sub); font-size: 10px; }
.m10-op-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.m10-op-grid button, .m10-two-buttons button {
  min-height: 40px; padding: 6px; border: 1px solid var(--m10-line); border-radius: 10px;
  color: var(--m10-ink); background: var(--m10-page); font-size: 11px;
}
.m10-op-grid button:disabled { opacity: .4; cursor: not-allowed; }
.m10-source { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m10-source button { min-height: 43px; border: 1px solid var(--m10-line); border-radius: 11px; color: var(--m10-sub); background: var(--m10-page); }
.m10-source button.on { border-color: var(--m10-accent); color: var(--m10-accent); background: var(--m10-soft); font-weight: 700; }
.m10-account p { margin: 0 0 14px; color: var(--m10-sub); }
.m10-two-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m10-text-sheet { min-height: 35vh; }
.m10-text-body { color: var(--m10-sub); font-size: 13px; line-height: 1.85; }
.m10-text-body section { padding: 13px 0; border-top: 1px solid var(--m10-line); }
.m10-text-body h3 { margin: 0 0 8px; color: var(--m10-ink); font-size: 14px; }
.m10-text-body p { margin: 0; white-space: pre-wrap; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--m10-accent); outline-offset: 2px; }

/* ====== 全屏搜索弹层 ====== */
.m10-search-overlay {
  position: fixed; z-index: 200; inset: 0; display: flex; flex-direction: column;
  background: var(--m10-page); opacity: 0; pointer-events: none;
  transform: translateY(100%); transition: transform .3s ease-out, opacity .25s ease-out;
}
.m10-search-overlay.show {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
/* 头部：关闭 + 输入框 + 搜索按钮 */
.m10-so-header {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--m10-line); background: var(--m10-top);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  flex: none;
}
.m10-so-close {
  flex: none; width: 36px; height: 36px; border: none; background: transparent;
  color: var(--m10-sub); font-size: 24px; cursor: pointer; display: grid; place-items: center;
  border-radius: 10px;
}
.m10-so-close:active { background: var(--m10-soft); }
.m10-so-input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--m10-line);
  border-radius: 12px; outline: none; color: var(--m10-ink); background: var(--m10-card);
  font-size: 16px;
}
.m10-so-input:focus { border-color: var(--m10-accent); }
.m10-so-submit {
  flex: none; min-width: 60px; height: 42px; padding: 0 16px; border: 0; border-radius: 12px;
  color: var(--m10-accent-ink); background: var(--m10-accent); font-size: 14px; font-weight: 700;
}
/* 弹层内容区 */
.m10-so-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 20px 16px; scroll-behavior: smooth;
}
.m10-so-section { margin-bottom: 20px; }
.m10-so-label {
  font-size: 12px; color: var(--m10-sub); font-weight: 600;
  margin-bottom: 10px; padding-left: 2px;
}
/* 分类 tab */
.m10-so-tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.m10-so-tabs::-webkit-scrollbar { display: none; }
.m10-so-tabs button {
  flex: none; min-height: 36px; padding: 0 18px; border: none; border-radius: 18px;
  color: var(--m10-sub); background: var(--m10-soft); font-size: 14px; font-weight: 600;
}
.m10-so-tabs button.on { color: var(--m10-accent-ink); background: var(--m10-accent); font-weight: 700; }
/* 引擎子 tab */
.m10-so-engines {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.m10-so-engines::-webkit-scrollbar { display: none; }
.m10-so-engines button {
  flex: none; padding: 7px 12px; border: 1px solid var(--m10-line); border-radius: 10px;
  color: var(--m10-sub); background: var(--m10-card); font-size: 12px;
}
.m10-so-engines button.on { border-color: var(--m10-accent); color: var(--m10-accent); font-weight: 700; background: var(--m10-soft); }
/* 常用搜索 */
.m10-so-common {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.m10-so-common a {
  display: flex; align-items: center; gap: 6px; padding: 10px 16px;
  border: 1px solid var(--m10-line); border-radius: 12px; background: var(--m10-card);
  color: var(--m10-ink); font-size: 13px; text-decoration: none;
}
.m10-so-common a span { color: var(--m10-accent); font-size: 11px; }

@keyframes m10-up { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 370px) {
  .m10-main { padding-right: 12px; padding-left: 12px; }
  .m10-quick-grid { gap: 7px; }
  .m10-link { padding-right: 9px; padding-left: 9px; }
  .m10-op-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ========== 图标样式三形态：全部 flex-wrap，卡片宽度由内容决定，一行摆几个看容器宽 ========== */

/* square：方形纵向卡（图标上、文字下），grid 等宽工整；具体列数由 JS 运行时计算最长卡片宽度写入 auto-fill minmax */
html[data-icon-shape="square"] .m10-quick-grid,
html[data-icon-shape="square"] .m10-link-grid { display: grid; gap: 9px; }
html[data-icon-shape="square"] .m10-link {
  flex-direction: column; justify-content: center; align-items: center;
  padding: 12px 6px 10px; border-radius: 12px; min-height: 84px;
}
html[data-icon-shape="square"] .m10-link-icon { width: 34px; height: 34px; font-size: 15px; margin-bottom: 8px; }
html[data-icon-shape="square"] .m10-link > strong { font-size: 11px; text-align: center; white-space: normal; overflow: visible; flex: none; max-width: none; }
html[data-icon-shape="square"] .m10-link > span { display: none; }

/* rect：矩形横排卡（图标左、文字右），grid 等宽工整 */
html[data-icon-shape="rect"] .m10-quick-grid,
html[data-icon-shape="rect"] .m10-link-grid { display: grid; gap: 10px; }
html[data-icon-shape="rect"] .m10-link {
  flex-direction: row; justify-content: flex-start; align-items: center;
  padding: 10px 10px; gap: 8px; border-radius: 13px; min-height: 62px;
}
html[data-icon-shape="rect"] .m10-link-icon { width: 34px; height: 34px; font-size: 15px; }
html[data-icon-shape="rect"] .m10-link > strong { font-size: 12px; white-space: nowrap; }
html[data-icon-shape="rect"] .m10-link > span { display: none; }

/* bar：条形按钮，按内容宽度动态撑满，flex-wrap 自动不规则换行 */
html[data-icon-shape="bar"] .m10-quick-grid,
html[data-icon-shape="bar"] .m10-link-grid { display: flex; flex-wrap: wrap; gap: 7px; }
html[data-icon-shape="bar"] .m10-link {
  flex: 0 0 auto; min-width: 0; width: auto;
  flex-direction: row; justify-content: flex-start; align-items: center;
  padding: 0 14px; gap: 12px; border-radius: 13px; min-height: 44px;
}
html[data-icon-shape="bar"] .m10-link-icon { width: 22px; height: 22px; font-size: 10px; border-radius: 7px; }
html[data-icon-shape="bar"] .m10-link > strong { font-size: 12px; white-space: nowrap; }
html[data-icon-shape="bar"] .m10-link > span { display: none; }

/* ========== 排列密度三档（auto 默认不写；compact 全缩，large 全放，只管 gap / padding / 图标 / 字号 / min-height） ========== */
/* ---------- compact：全缩 ---------- */
html[data-layout="compact"][data-icon-shape="square"] .m10-quick-grid,
html[data-layout="compact"][data-icon-shape="square"] .m10-link-grid { gap: 7px; }
html[data-layout="compact"][data-icon-shape="square"] .m10-link { padding: 6px 3px 5px; min-height: 60px; }
html[data-layout="compact"][data-icon-shape="square"] .m10-link-icon { width: 26px; height: 26px; font-size: 11px; margin-bottom: 4px; }
html[data-layout="compact"][data-icon-shape="square"] .m10-link > strong { font-size: 10px; }

html[data-layout="compact"][data-icon-shape="rect"] .m10-quick-grid,
html[data-layout="compact"][data-icon-shape="rect"] .m10-link-grid { gap: 7px; }
html[data-layout="compact"][data-icon-shape="rect"] .m10-link { padding: 7px 7px; min-height: 48px; gap: 6px; }
html[data-layout="compact"][data-icon-shape="rect"] .m10-link-icon { width: 26px; height: 26px; font-size: 11px; }
html[data-layout="compact"][data-icon-shape="rect"] .m10-link > strong { font-size: 11px; }

html[data-layout="compact"][data-icon-shape="bar"] .m10-quick-grid,
html[data-layout="compact"][data-icon-shape="bar"] .m10-link-grid { gap: 5px; }
html[data-layout="compact"][data-icon-shape="bar"] .m10-link { padding: 0 10px; min-height: 36px; gap: 8px; }
html[data-layout="compact"][data-icon-shape="bar"] .m10-link-icon { width: 18px; height: 18px; font-size: 9px; border-radius: 5px; }
html[data-layout="compact"][data-icon-shape="bar"] .m10-link > strong { font-size: 11px; }

/* ---------- large：全放 ---------- */
html[data-layout="large"][data-icon-shape="square"] .m10-quick-grid,
html[data-layout="large"][data-icon-shape="square"] .m10-link-grid { gap: 12px; }
html[data-layout="large"][data-icon-shape="square"] .m10-link { padding: 15px 7px 13px; min-height: 96px; }
html[data-layout="large"][data-icon-shape="square"] .m10-link-icon { width: 38px; height: 38px; font-size: 16px; margin-bottom: 9px; }
html[data-layout="large"][data-icon-shape="square"] .m10-link > strong { font-size: 12px; }

html[data-layout="large"][data-icon-shape="rect"] .m10-quick-grid,
html[data-layout="large"][data-icon-shape="rect"] .m10-link-grid { gap: 13px; }
html[data-layout="large"][data-icon-shape="rect"] .m10-link { padding: 13px 13px; min-height: 72px; gap: 11px; }
html[data-layout="large"][data-icon-shape="rect"] .m10-link-icon { width: 38px; height: 38px; font-size: 16px; }
html[data-layout="large"][data-icon-shape="rect"] .m10-link > strong { font-size: 13px; }

html[data-layout="large"][data-icon-shape="bar"] .m10-quick-grid,
html[data-layout="large"][data-icon-shape="bar"] .m10-link-grid { gap: 9px; }
html[data-layout="large"][data-icon-shape="bar"] .m10-link { padding: 0 16px; min-height: 50px; gap: 14px; }
html[data-layout="large"][data-icon-shape="bar"] .m10-link-icon { width: 24px; height: 24px; font-size: 11px; }
html[data-layout="large"][data-icon-shape="bar"] .m10-link > strong { font-size: 13px; }

/* ========== 设置面板 ========== */
.m10-settings-panel {
  position: absolute; top: 64px; right: 18px; width: 220px; z-index: 50;
  border: 1px solid var(--m10-line); border-radius: 14px;
  background: var(--m10-card); box-shadow: 0 12px 32px rgba(23, 32, 51, .16);
  overflow: hidden; transform-origin: top right;
  transform: scale(.96) translateY(-6px); opacity: 0; pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}
.m10-settings-panel.show {
  transform: scale(1) translateY(0); opacity: 1; pointer-events: auto;
}
.m10-settings-item + .m10-settings-item { border-top: 1px solid var(--m10-line); }
.m10-settings-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 12px 14px; border: 0; background: transparent;
  color: var(--m10-ink); font-size: 13px; font-weight: 600; cursor: pointer;
}
.m10-settings-head span {
  display: inline-block; margin-left: auto; margin-left: 6px;
  transition: transform .18s ease; font-size: 10px; color: var(--m10-sub);
}
.m10-settings-item.collapsed .m10-settings-head span { transform: rotate(-90deg); }
.m10-settings-body {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 0 12px 12px 12px;
  max-height: 120px; overflow: hidden;
  transition: max-height .22s ease, padding .22s ease, opacity .22s ease;
}
.m10-settings-item.collapsed .m10-settings-body {
  max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0;
}
.m10-settings-body button {
  padding: 7px 4px; border: 1px solid var(--m10-line); border-radius: 8px;
  background: var(--m10-page); color: var(--m10-ink); font-size: 11px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.m10-settings-body button:hover { border-color: var(--m10-accent); color: var(--m10-accent); }
.m10-settings-body button.active {
  border-color: var(--m10-accent); background: var(--m10-accent); color: #fff;
}
