/* ============ 梦河 · 全局样式与主题 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --radius: 14px; }
html, body { height: 100%; }

/* ---- 治愈系-暖阳 (默认) ---- */
body[data-theme="warm"] {
  --bg: #F5E6D3; --bg-panel: #FFF9F0; --bg-hover: #FBF0E0; --bg-input: #FFFFFF;
  --fg: #5C4B37; --fg-dim: #A08C72; --fg-faint: #C9B9A3;
  --accent: #FFB74D; --accent-hover: #F5A623; --accent-contrast: #4A3724;
  --accent2: #81C784; --accent2-hover: #66BB6A;
  --border: #EFDFC9; --shadow: 0 6px 24px rgba(180, 140, 90, 0.14);
  --danger: #E57373; --danger-hover: #E03939;
  background: linear-gradient(160deg, #FBF0E0 0%, #F5E6D3 45%, #FBEEDC 100%);
}
/* ---- 中国风-蓝橘 ---- */
body[data-theme="china"] {
  --bg: #2C3E50; --bg-panel: #34495E; --bg-hover: #3D566E; --bg-input: #2C3E50;
  --fg: #ECF0F1; --fg-dim: #A8B6C2; --fg-faint: #7A8C9C;
  --accent: #E67E22; --accent-hover: #D35400; --accent-contrast: #FFFFFF;
  --accent2: #F1C40F; --accent2-hover: #F39C12;
  --border: #4A5F75; --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --danger: #E74C3C; --danger-hover: #C0392B;
  background: linear-gradient(160deg, #34495E 0%, #2C3E50 55%, #2A3646 100%);
}
/* ---- 简约白 ---- */
body[data-theme="white"] {
  --bg: #F4F6FA; --bg-panel: #FFFFFF; --bg-hover: #F0F4FA; --bg-input: #FFFFFF;
  --fg: #2D3A4E; --fg-dim: #7C8CA0; --fg-faint: #B4BfCE;
  --accent: #4A90D9; --accent-hover: #3A7BC0; --accent-contrast: #FFFFFF;
  --accent2: #50B87B; --accent2-hover: #3FA567;
  --border: #E3E9F0; --shadow: 0 4px 20px rgba(60, 90, 130, 0.10);
  --danger: #E05555; --danger-hover: #C93A3A;
  background: #F4F6FA;
}
/* ---- 暗夜模式 ---- */
body[data-theme="dark"] {
  --bg: #1E1E1E; --bg-panel: #262626; --bg-hover: #2F2F2F; --bg-input: #1E1E1E;
  --fg: #E4E4E4; --fg-dim: #9E9E9E; --fg-faint: #6E6E6E;
  --accent: #FF8C42; --accent-hover: #FF7A2A; --accent-contrast: #1E1E1E;
  --accent2: #4EC9B0; --accent2-hover: #3BB59C;
  --border: #383838; --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --danger: #E06C6C; --danger-hover: #CC5555;
  background: #1E1E1E;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--fg); font-size: 14px; transition: background 0.4s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--fg);
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

/* ============ 登录页 ============ */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  width: 380px; max-width: 100%; background: var(--bg-panel); border-radius: 22px;
  padding: 40px 36px 30px; box-shadow: var(--shadow); border: 1px solid var(--border);
  animation: rise .5s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-logo { font-size: 30px; font-weight: 700; text-align: center; letter-spacing: 2px; }
.auth-sub { text-align: center; color: var(--fg-dim); margin: 8px 0 24px; font-size: 13px; }
.auth-tabs { display: flex; background: var(--bg-hover); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.tab-btn { flex: 1; padding: 9px; border-radius: 9px; color: var(--fg-dim); font-size: 14px; }
.tab-btn.active { background: var(--bg-panel); color: var(--fg); box-shadow: var(--shadow); font-weight: 600; }
.auth-card label { display: block; font-size: 13px; color: var(--fg-dim); margin-bottom: 14px; }
.auth-card label input { width: 100%; margin-top: 6px; }
.auth-msg { text-align: center; color: var(--danger); min-height: 22px; margin-top: 10px; font-size: 13px; }
.auth-msg.ok { color: var(--accent2); }

/* ============ 主布局 ============ */
.main-wrap { display: flex; height: 100vh; overflow: hidden; }
#sidebar {
  width: 236px; flex-shrink: 0; background: var(--bg-panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px; transition: transform .3s ease;
}
.side-logo { font-size: 21px; font-weight: 700; padding: 4px 10px 18px; letter-spacing: 1px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px;
  color: var(--fg-dim); font-size: 14.5px; text-align: left; transition: all .2s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--fg); }
.nav-item.active { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--fg); font-weight: 600; }
.side-quota { margin-top: auto; padding: 12px; background: var(--bg-hover); border-radius: 12px; font-size: 12px; }
.quota-row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--fg-dim); }
.quota-row span:last-child { color: var(--fg); font-weight: 600; }
.side-theme { margin-top: 14px; padding: 0 4px; }
.theme-dots { display: flex; gap: 8px; justify-content: center; }
.theme-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
.side-user { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px; border-top: 1px solid var(--border); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; flex-shrink: 0; }
.side-user-info { font-size: 13.5px; min-width: 0; }
.side-user-info > div { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { color: var(--accent); font-size: 12px; padding: 2px 0; }
.link-btn:hover { text-decoration: underline; }

.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  background: color-mix(in srgb, var(--bg-panel) 82%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); min-height: 58px;
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--fg-dim); position: relative; transition: background .2s; }
.icon-btn:hover { background: var(--bg-hover); color: var(--fg); }
.badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; font-size: 10px;
  min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.seg { display: flex; background: var(--bg-hover); border-radius: 10px; padding: 3px; }
.seg-btn { padding: 6px 14px; border-radius: 8px; color: var(--fg-dim); font-size: 13px; }
.seg-btn.active { background: var(--bg-panel); color: var(--fg); font-weight: 600; box-shadow: var(--shadow); }
.user-chip { font-size: 13px; color: var(--fg-dim); padding: 6px 10px; background: var(--bg-hover); border-radius: 10px; font-weight: 600; }

#content { flex: 1; overflow-y: auto; padding: 18px 22px 90px; }

/* ============ 通用组件 ============ */
.btn { padding: 9px 18px; border-radius: 11px; font-size: 14px; font-weight: 600; transition: all .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--bg-hover); color: var(--fg); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

.card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search-box { flex: 1; min-width: 160px; max-width: 320px; position: relative; }
.search-box input { width: 100%; padding-left: 34px; }
.search-box::before { content: "🔍"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .7; }
.spacer { flex: 1; }

.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 12px; }
.crumb { color: var(--fg-dim); padding: 4px 8px; border-radius: 8px; transition: all .15s; }
.crumb:hover { background: var(--bg-hover); color: var(--accent); }
.crumb.active { color: var(--fg); font-weight: 700; }
.crumb-sep { color: var(--fg-faint); }

/* ---- 文件表格 ---- */
.file-table { width: 100%; border-collapse: collapse; }
.file-table th { text-align: left; font-size: 12px; color: var(--fg-dim); font-weight: 600;
  padding: 8px 12px; border-bottom: 1px solid var(--border); user-select: none; }
.file-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.file-row { cursor: pointer; transition: background .15s; }
.file-row:hover { background: var(--bg-hover); }
.file-row.selected { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.file-row .fname { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.file-row .fname .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.ficon { font-size: 20px; flex-shrink: 0; }
.row-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.file-row:hover .row-actions { opacity: 1; }
.act-btn { width: 30px; height: 30px; border-radius: 8px; font-size: 14px; color: var(--fg-dim); display: flex; align-items: center; justify-content: center; }
.act-btn:hover { background: var(--bg-hover); color: var(--accent); }
.act-btn.danger:hover { color: var(--danger); }
.batch-bar { display: flex; align-items: center; gap: 10px; background: var(--accent); color: var(--accent-contrast);
  border-radius: 12px; padding: 9px 14px; margin-bottom: 12px; font-weight: 600; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--fg-dim); }
.empty-state .big { font-size: 52px; margin-bottom: 12px; }
.empty-state h3 { color: var(--fg); margin-bottom: 6px; font-size: 17px; }
.empty-state p { font-size: 13px; margin-bottom: 16px; }

.drop-hint { border: 2px dashed var(--accent); border-radius: var(--radius); padding: 28px; text-align: center;
  color: var(--accent); font-weight: 600; margin-bottom: 12px; background: color-mix(in srgb, var(--accent) 8%, transparent); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

/* ---- 上传进度 ---- */
.upload-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.upload-item { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.up-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.up-bar { height: 6px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; }
.up-bar > div { height: 100%; background: var(--accent); border-radius: 3px; transition: width .2s; }
.up-bar.done > div { background: var(--accent2); }

/* ---- 预览 ---- */
.preview-img { max-width: 100%; max-height: 70vh; border-radius: 10px; display: block; margin: 0 auto; }
.preview-text { white-space: pre-wrap; word-break: break-all; max-height: 65vh; overflow: auto;
  font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; line-height: 1.7; }

/* ---- 备忘录 ---- */
.memos-layout { display: grid; grid-template-columns: 200px 260px 1fr; gap: 14px; height: calc(100vh - 160px); min-height: 420px; }
.memo-panel { display: flex; flex-direction: column; overflow: hidden; }
.memo-panel-header { padding: 12px 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.memo-tree { flex: 1; overflow-y: auto; padding: 8px; }
.mtree-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--fg-dim); }
.mtree-item:hover { background: var(--bg-hover); color: var(--fg); }
.mtree-item.active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--fg); font-weight: 600; }
.mtree-item .grp { margin-left: auto; display: flex; gap: 2px; opacity: 0; }
.mtree-item:hover .grp { opacity: 1; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.tag-chip { padding: 4px 11px; border-radius: 20px; background: var(--bg-hover); border: 1px solid var(--border); font-size: 12.5px; color: var(--fg-dim); cursor: pointer; }
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.memo-list { flex: 1; overflow-y: auto; }
.memo-item { padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.memo-item:hover { background: var(--bg-hover); }
.memo-item.active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.memo-item .mt { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.memo-item .mt .pin { color: var(--accent); font-size: 12px; }
.memo-item .ex { color: var(--fg-dim); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memo-item .meta { display: flex; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--fg-faint); }
.editor-panel { display: flex; flex-direction: column; overflow: hidden; }
.editor-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.etool { width: 32px; height: 32px; border-radius: 8px; font-size: 15px; color: var(--fg-dim); display: flex; align-items: center; justify-content: center; }
.etool:hover { background: var(--bg-hover); color: var(--accent); }
.etool.on { background: var(--accent); color: var(--accent-contrast); }
.etool-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.editor-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.editor-input { flex: 1; border: none; border-radius: 0; resize: none; padding: 16px; font-size: 14px; line-height: 1.75;
  font-family: ui-monospace, "SF Mono", Consolas, monospace; background: transparent; }
.editor-preview { flex: 1; overflow-y: auto; padding: 16px 20px; line-height: 1.8; font-size: 14.5px; }
.editor-preview h1, .editor-preview h2, .editor-preview h3 { margin: 16px 0 8px; }
.editor-preview p { margin: 8px 0; }
.editor-preview ul, .editor-preview ol { padding-left: 22px; margin: 8px 0; }
.editor-preview code { background: var(--bg-hover); padding: 2px 6px; border-radius: 5px; font-size: 13px; font-family: ui-monospace, Consolas, monospace; }
.editor-preview pre { background: var(--bg-hover); padding: 12px; border-radius: 10px; overflow-x: auto; margin: 10px 0; }
.editor-preview pre code { background: none; padding: 0; }
.editor-preview blockquote { border-left: 4px solid var(--accent); padding-left: 12px; color: var(--fg-dim); margin: 10px 0; }
.editor-preview table { border-collapse: collapse; margin: 10px 0; }
.editor-preview th, .editor-preview td { border: 1px solid var(--border); padding: 6px 12px; }
.editor-preview img { max-width: 100%; border-radius: 8px; }
.editor-preview input[type="checkbox"] { margin-right: 6px; }
.editor-foot { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--fg-faint); }
.editor-foot .save-state.ok { color: var(--accent2); }

/* ---- 管理 ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 18px; text-align: center; }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--accent); }
.stat-card .lbl { font-size: 12.5px; color: var(--fg-dim); margin-top: 4px; }
.admin-users td { font-size: 13px; }
.quota-input { width: 110px; padding: 5px 8px; font-size: 13px; border-radius: 7px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.settings-card { padding: 18px; }
.settings-card h4 { margin-bottom: 14px; font-size: 15px; }
.set-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.set-row label { font-size: 13.5px; color: var(--fg-dim); }
.set-row input[type="number"] { width: 110px; text-align: right; }
.set-row input[type="text"] { width: 200px; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { display: none; }
.switch .sl { position: absolute; inset: 0; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 13px; transition: .25s; }
.switch .sl::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--fg-faint); top: 2px; left: 2px; transition: .25s; }
.switch input:checked + .sl { background: var(--accent2); border-color: var(--accent2); }
.switch input:checked + .sl::after { left: 22px; background: #fff; }

/* ---- 通知 ---- */
.noti-wrap { position: relative; }
.noti-panel { position: absolute; right: 0; top: 46px; width: 320px; max-height: 380px; overflow-y: auto;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); z-index: 50; }
.noti-item { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.6; }
.noti-item.unread { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.noti-item .t { color: var(--fg-faint); font-size: 11.5px; margin-top: 4px; }
.noti-empty { padding: 26px; text-align: center; color: var(--fg-dim); font-size: 13px; }

/* ---- 弹窗 ---- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 18px; backdrop-filter: blur(2px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  width: 460px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; animation: rise .25s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal-head h3 { font-size: 16.5px; }
.modal-close { width: 32px; height: 32px; border-radius: 9px; color: var(--fg-dim); font-size: 16px; }
.modal-close:hover { background: var(--bg-hover); color: var(--danger); }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 20px 18px; }
.modal .field { margin-bottom: 14px; }
.modal .field label { display: block; font-size: 13px; color: var(--fg-dim); margin-bottom: 6px; }
.modal .field input, .modal .field textarea, .modal .field select { width: 100%; }
.danger-zone { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; }

/* ---- Toast ---- */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--fg); color: var(--bg); padding: 10px 20px; border-radius: 12px; font-size: 13.5px;
  box-shadow: var(--shadow); animation: rise .3s ease; max-width: 90vw; }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--accent2); color: #fff; }

/* ---- 分享页 ---- */
.share-page { max-width: 760px; margin: 40px auto; padding: 30px 26px; }
.share-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.share-head .avatar { width: 46px; height: 46px; font-size: 22px; }
.share-title { font-size: 24px; font-weight: 800; }
.share-meta { color: var(--fg-dim); font-size: 13px; }

/* ============ 响应式 ============ */
#btn-hamburger { display: none; }
#btn-theme-mobile { display: none; }
#bottom-nav { display: none; }

@media (max-width: 1023px) {
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); box-shadow: var(--shadow); }
  #sidebar.open { transform: translateX(0); }
  #btn-hamburger { display: flex; }
  .side-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
  .memos-layout { grid-template-columns: 220px 1fr; }
  .memo-tree-panel { display: none; }
  .memos-layout.show-tree { grid-template-columns: 200px 1fr; }
  .memos-layout.show-tree .memo-tree-panel { display: flex; }
  .memos-layout.show-tree .memo-list-panel { display: none; }
}
@media (max-width: 767px) {
  #bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-panel);
    border-top: 1px solid var(--border); z-index: 40; height: 58px; padding-bottom: env(safe-area-inset-bottom); }
  .bnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--fg-dim); font-size: 11px; }
  .bnav-item span { font-size: 19px; }
  .bnav-item.active { color: var(--accent); }
  .bnav-item.active span { transform: scale(1.12); }
  #topbar { padding: 10px 12px; }
  #content { padding: 12px 12px 80px; }
  .side-user, .side-quota, .side-theme { display: none; }
  .user-chip { display: none; }
  #btn-theme-mobile { display: flex; }
  #zone-switch .seg-btn { padding: 6px 10px; font-size: 12.5px; }
  .memos-layout { display: flex; flex-direction: column; height: auto; }
  .memo-list-panel, .memo-tree-panel { min-height: 300px; }
  .editor-panel { min-height: 70vh; }
  .file-table th:nth-child(3), .file-table td:nth-child(3),
  .file-table th:nth-child(4), .file-table td:nth-child(4) { display: none; }
  .row-actions { opacity: 1; }
  .modal { width: 100%; }
  .search-box { max-width: none; }
}

/* ============ 管理后台 · 用户内容管理 ============ */
.ac-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px;
  padding: 10px 14px; background: var(--bg-hover); border-radius: 10px; margin-bottom: 12px; }
.ac-head b { font-size: 15px; }
.ac-head span { color: var(--fg-dim); }
.ac-sec-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin: 12px 0 8px; }
.ac-memo-list { max-height: 440px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.ac-memo-list .memo-item { border-radius: 0; }
#ac-body .row-actions { opacity: 1; }
