/* 速记板样式 v3：靛蓝主色、浅/深双主题、桌面左右分栏、手机单栏 + 底部导航 + 底部抽屉式弹窗 */
* { box-sizing: border-box; }
:root {
  --bg: #f3f4f8; --surface: #ffffff; --surface-2: #f7f8fb; --surface-3: #eef0f5;
  --line: #e5e7ee; --line-2: #d6d9e3;
  --fg: #151827; --fg-2: #3b4056; --muted: #6d7387; --ph: #a3a8b8;
  --accent: #4f46e5; --accent-2: #6d5dfc; --accent-fg: #ffffff; --accent-soft: #eef0ff; --accent-line: #c9cbff;
  --green: #0f9f6e; --green-soft: #e3f6ee; --amber: #b7791f; --amber-soft: #fdf3e0;
  --danger: #dc3b3b; --danger-soft: #fdecec; --violet: #8b5cf6; --violet-soft: #f1ebff;
  --shadow-sm: 0 1px 2px rgba(20, 24, 50, .06);
  --shadow: 0 1px 2px rgba(20, 24, 50, .04), 0 6px 24px -6px rgba(20, 24, 50, .10);
  --shadow-lg: 0 24px 60px -12px rgba(20, 24, 50, .30);
  --code-bg: #f5f6fa; --viewer-bg: #0d0f15;
  --hl-c: #8a91a5; --hl-s: #11845b; --hl-n: #b45309; --hl-k: #7c3aed; --hl-f: #2563eb; --hl-p: #0f766e;
  --r: 16px; --r-sm: 10px;
  --top-h: 60px; --mbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #0b0d12; --surface: #141720; --surface-2: #191d28; --surface-3: #202533;
    --line: #242938; --line-2: #2f3547;
    --fg: #e9ebf3; --fg-2: #c3c7d6; --muted: #8b91a6; --ph: #5b6176;
    --accent: #8b8cff; --accent-2: #a78bfa; --accent-fg: #0b0d12; --accent-soft: #1d1f3f; --accent-line: #3a3d7a;
    --green: #34d399; --green-soft: #10271f; --amber: #f0b454; --amber-soft: #2e2413;
    --danger: #ff7070; --danger-soft: #331819; --violet: #b89cff; --violet-soft: #251c3d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -8px rgba(0, 0, 0, .55);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .75);
    --code-bg: #10131b; --viewer-bg: #07080c;
    --hl-c: #6c7389; --hl-s: #7ee2b8; --hl-n: #f6b26b; --hl-k: #c4a1ff; --hl-f: #8fb8ff; --hl-p: #5fd3c8;
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0b0d12; --surface: #141720; --surface-2: #191d28; --surface-3: #202533;
  --line: #242938; --line-2: #2f3547;
  --fg: #e9ebf3; --fg-2: #c3c7d6; --muted: #8b91a6; --ph: #5b6176;
  --accent: #8b8cff; --accent-2: #a78bfa; --accent-fg: #0b0d12; --accent-soft: #1d1f3f; --accent-line: #3a3d7a;
  --green: #34d399; --green-soft: #10271f; --amber: #f0b454; --amber-soft: #2e2413;
  --danger: #ff7070; --danger-soft: #331819; --violet: #b89cff; --violet-soft: #251c3d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .75);
  --code-bg: #10131b; --viewer-bg: #07080c;
  --hl-c: #6c7389; --hl-s: #7ee2b8; --hl-n: #f6b26b; --hl-k: #c4a1ff; --hl-f: #8fb8ff; --hl-p: #5fd3c8;
}

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--fg); background: var(--bg);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body::before { /* 顶部一抹柔和光晕 */
  content: ""; position: fixed; inset: 0 0 auto 0; height: 360px; pointer-events: none; z-index: -1;
  background: radial-gradient(600px 260px at 15% -40px, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
              radial-gradient(520px 240px at 90% -60px, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 70%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono, code, kbd, pre { font-family: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, "Courier New", monospace; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-fg); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 10px; }
.spacer { flex: 1; }
[hidden] { display: none !important; }
.ui-icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.menu .cur { margin-left: auto; color: var(--accent); }
.menu small { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar-in { max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: .02em; color: var(--fg); white-space: nowrap; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.brand small { font-weight: 500; font-size: 12.5px; color: var(--muted); letter-spacing: 0; }
.brand .title-text { overflow: hidden; text-overflow: ellipsis; }
.code-jump { display: flex; align-items: center; gap: 6px; margin-left: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 12px; box-shadow: var(--shadow-sm); }
.code-jump input { width: 118px; border: 0; background: transparent; outline: none; font-size: 14px; letter-spacing: .12em; padding: 4px 0; }
.code-jump input::placeholder { letter-spacing: 0; color: var(--ph); }
.code-jump button { border: 0; background: var(--accent); color: var(--accent-fg); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.usage { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.meter { width: 70px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; user-select: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s;
}
.btn:hover { background: var(--surface-2); border-color: var(--line-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--accent-fg); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn.soft:hover { background: color-mix(in srgb, var(--accent-soft) 80%, var(--accent) 12%); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); background: var(--surface); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: transparent; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.xs { min-height: 28px; padding: 0 8px; font-size: 12.5px; border-radius: 7px; }
.btn.icon { padding: 0; width: 38px; }
.btn.sm.icon { width: 32px; }
.btn.xs.icon { width: 28px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 46px; font-size: 15px; border-radius: 12px; }
.text-button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-size: inherit; }

/* ---------- 布局 ---------- */
.shell { max-width: 1280px; margin: 0 auto; padding: 20px 20px 40px; display: grid; grid-template-columns: minmax(360px, 430px) 1fr; gap: 20px; align-items: start; }
.col-left { position: sticky; top: calc(var(--top-h) + 20px); display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - var(--top-h) - 40px); overflow: auto; scrollbar-width: thin; padding-bottom: 2px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

/* 分段切换 */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 7px 10px; font-size: 14px; font-weight: 550; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.seg.mini { display: inline-grid; padding: 3px; border-radius: 9px; }
.seg.mini button { padding: 3px 10px; font-size: 12.5px; border-radius: 7px; }

/* ---------- 编辑器 ---------- */
.composer { padding: 14px; }
.composer .seg { margin-bottom: 14px; }
.field { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.field:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); background: var(--surface); }
.field::placeholder, textarea::placeholder { color: var(--ph); }
.title-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.title-row .title-input { flex: 1; min-width: 0; }
.title-row .seg.mini { flex: none; }
.title-input { font-weight: 600; font-size: 15px; }
.seg.mini button { white-space: nowrap; }
.editor-box { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.editor-box:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); background: var(--surface); }
.fmtbar { display: flex; align-items: center; gap: 2px; padding: 5px 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.fmtbar::-webkit-scrollbar { display: none; }
.fmtbar button { flex: none; border: 0; background: transparent; min-width: 30px; height: 30px; border-radius: 7px; color: var(--fg-2); cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 6px; }
.fmtbar button:hover { background: var(--surface-3); color: var(--fg); }
.fmtbar button.on { background: var(--accent-soft); color: var(--accent); }
.fmtbar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; flex: none; }
.fmtbar b { font-weight: 800; } .fmtbar i { font-style: italic; font-family: Georgia, serif; }
textarea.editor { display: block; width: 100%; min-height: 220px; max-height: 60vh; resize: vertical; border: 0; outline: none; background: transparent; padding: 12px 14px; font-size: 14.5px; line-height: 1.7; tab-size: 2; }
.editor.mono-on { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: 13.5px; }
.preview { min-height: 220px; max-height: 60vh; overflow: auto; padding: 12px 16px; }
.editor-meta { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); }

/* 发布选项 */
.opts { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.opt-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13.5px; }
.opt-row + .opt-row { border-top: 1px solid var(--line); }
.opt-row .lbl { display: flex; align-items: center; gap: 8px; color: var(--fg-2); flex: 1; min-width: 0; }
.opt-row .lbl small { color: var(--muted); font-size: 12px; }
.opt-row .lbl .ui-icon { color: var(--muted); width: 16px; height: 16px; }
.ttl-pills { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ttl-pills button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; color: var(--fg-2); }
.ttl-pills .adm { display: none; }
body.is-admin .ttl-pills .adm { display: inline-block; }
.ttl-pills button.adm.on { background: var(--green); border-color: var(--green); }
.ttl-pills button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pw-input { width: 150px; padding: 6px 10px; font-size: 13px; }
/* 开关 */
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.danger input:checked + span { background: var(--danger); }

.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions .primary { flex: 1; }
.helper { font-size: 12px; color: var(--muted); margin: 8px 2px 0; }
kbd { font-size: 11px; padding: 1px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--fg-2); }
.edit-banner { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }

/* ---------- 上传 ---------- */
.drop {
  width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 28px 16px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); cursor: pointer; color: var(--fg-2);
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .big-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 24px -10px var(--accent); margin-bottom: 4px; }
.drop .big-ico .ui-icon { width: 26px; height: 26px; }
.drop strong { font-size: 15px; color: var(--fg); }
.drop strong em { font-style: normal; color: var(--accent); }
.drop .helper { margin: 0; }
.up-src { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.uplist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.uprow { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.uprow .t-ico { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.uprow .nm { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uprow .st { grid-column: 2; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uprow .upa { grid-row: span 2; grid-column: 3; display: flex; gap: 4px; }
.uprow .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: transparent; }
.uprow .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s; }
.uprow.done .t-ico { background: var(--green-soft); color: var(--green); }
.uprow.done .bar i { background: var(--green); }
.uprow.fail .t-ico { background: var(--danger-soft); color: var(--danger); }
.uprow.fail .st { color: var(--danger); }
.uprow.fail .bar i { background: var(--danger); }
.uprow.done .code-chip { margin-left: 6px; }

/* 保存结果 */
.result { padding: 16px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), color-mix(in srgb, var(--accent-2) 8%, var(--surface))); border: 1px solid var(--accent-line); }
.result-top { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.result-top .ok-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.result-top .ok-dot .ui-icon { width: 14px; height: 14px; }
.pickup { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.pickup .digits { display: flex; gap: 6px; }
.pickup .digits span { width: 40px; height: 50px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font: 700 26px/1 ui-monospace, "SF Mono", Consolas, monospace; color: var(--accent); box-shadow: var(--shadow-sm); }
.pickup small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.linkbox { display: flex; gap: 6px; }
.linkbox input { flex: 1; min-width: 0; font-size: 13px; padding: 8px 10px; }
.result .row-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.result p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

.privacy-note { display: flex; gap: 8px; font-size: 12px; color: var(--muted); margin: 0 4px; line-height: 1.55; }
.privacy-note .ui-icon { width: 15px; height: 15px; margin-top: 2px; }

/* ---------- 列表 ---------- */
.panel { padding: 18px; min-height: 480px; }
.list-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--fg-2); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chip .ui-icon { width: 15px; height: 15px; }
.chip b { font-weight: 600; font-size: 11.5px; color: var(--muted); }
.chip.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip.on b { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 0 10px; width: 240px; }
.search:focus-within { border-color: var(--accent-line); background: var(--surface); }
.search .ui-icon { color: var(--muted); width: 16px; }
.search input { border: 0; outline: 0; background: transparent; padding: 8px 0; flex: 1; min-width: 0; font-size: 14px; }
.list-status { font-size: 12px; color: var(--muted); margin: -4px 2px 10px; min-height: 18px; display: flex; gap: 10px; align-items: center; }

.list { display: flex; flex-direction: column; gap: 8px; }
.row-item { position: relative; display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.row-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.row-item.pinned { border-color: var(--accent-line); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 40%); }
.row-item.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.thumb { width: 46px; height: 46px; border-radius: 11px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); position: relative; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ui-icon { width: 22px; height: 22px; }
.thumb.t-note { background: var(--accent-soft); color: var(--accent); }
.thumb.t-image { background: var(--green-soft); color: var(--green); }
.thumb.t-video { background: var(--violet-soft); color: var(--violet); }
.thumb.t-audio { background: var(--amber-soft); color: var(--amber); }
.thumb.t-pdf { background: var(--danger-soft); color: var(--danger); }
.thumb.t-archive { background: var(--amber-soft); color: var(--amber); }
.thumb.t-lock { background: var(--surface-3); color: var(--fg-2); }
.thumb .ext { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.row-item .meta { min-width: 0; }
.row-item .nm { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; min-width: 0; }
.row-item .nm a { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .nm a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; } /* 整行可点 */
.row-item .nm .ui-icon { width: 14px; height: 14px; color: var(--muted); }
.row-item .pv { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.row-item .sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 4px; }
.row-item .acts { position: relative; z-index: 1; display: flex; gap: 4px; align-items: center; }
.row-item .check { position: relative; z-index: 2; width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.list.selecting .row-item { grid-template-columns: 22px 46px 1fr auto; }

.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; line-height: 1; padding: 4px 7px; border-radius: 6px; background: var(--surface-3); color: var(--fg-2); white-space: nowrap; font-weight: 500; }
.tag .ui-icon { width: 12px; height: 12px; vertical-align: 0; }
.tag.perm { background: var(--green-soft); color: var(--green); }
.tag.soon { background: var(--danger-soft); color: var(--danger); }
.tag.hid { background: var(--amber-soft); color: var(--amber); }
.tag.lock { background: var(--violet-soft); color: var(--violet); }
.tag.burn { background: var(--danger-soft); color: var(--danger); }
.tag.pin { background: var(--accent-soft); color: var(--accent); }
.tag.mine { background: var(--accent-soft); color: var(--accent); }
.code-chip { position: relative; z-index: 1; font: 600 11.5px/1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .08em; padding: 4px 6px; border-radius: 6px; border: 1px dashed var(--line-2); color: var(--fg-2); background: var(--surface); cursor: copy; }

/* 缩略图网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); aspect-ratio: 1 / 1; }
.tile a.tm { position: absolute; inset: 0; display: block; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tile:hover img, .tile:hover video { transform: scale(1.04); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.tile .play { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; pointer-events: none; backdrop-filter: blur(4px); }
.tile .badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; pointer-events: none; }
.tile .tact { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.tile .tact .btn { background: rgba(0,0,0,.45); border-color: transparent; color: #fff; backdrop-filter: blur(6px); }
.tile .locked { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.tile .locked .ui-icon { width: 34px; height: 34px; }
.tile .check { position: absolute; left: 8px; bottom: 8px; width: 20px; height: 20px; z-index: 2; accent-color: var(--accent); }

.empty { text-align: center; color: var(--muted); padding: 50px 16px; }
.empty .e-ico { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.empty .e-ico .ui-icon { width: 30px; height: 30px; }
.empty strong { display: block; color: var(--fg); font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0; font-size: 13px; }
.skel { height: 68px; border-radius: 14px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* 批量操作条 */
.bulkbar { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); z-index: 45; display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--fg); color: var(--bg); box-shadow: var(--shadow-lg); max-width: calc(100vw - 20px); overflow-x: auto; }
.bulkbar .btn { background: transparent; border-color: color-mix(in srgb, var(--bg) 25%, transparent); color: var(--bg); flex: none; }
.bulkbar .btn:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.bulkbar .btn.danger { color: #ff8a8a; }
.bulkbar b { padding: 0 8px; white-space: nowrap; font-size: 13px; }

/* ---------- 对话框 ---------- */
dialog.dlg { border: 0; padding: 0; background: var(--surface); color: var(--fg); border-radius: 18px; box-shadow: var(--shadow-lg); width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; }
dialog.dlg.wide { width: min(720px, calc(100vw - 32px)); }
dialog.dlg::backdrop { background: rgba(10, 12, 20, .45); backdrop-filter: blur(3px); }
dialog.dlg[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg form, .dlg .dlg-in { padding: 20px; margin: 0; }
.dlg h3 { margin: 0 0 12px; font-size: 17px; }
.dlg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dlg-head h3 { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-text { color: var(--fg-2); margin: 0 0 6px; font-size: 14px; }
.dlg input:not([type=checkbox]):not([type=radio]), .dlg select { width: 100%; }
.dlg-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.form-grid { display: grid; gap: 12px; }
.form-grid label.fl { display: grid; gap: 5px; font-size: 13px; color: var(--fg-2); font-weight: 550; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.menu { display: grid; gap: 2px; padding: 8px; }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; padding: 11px 12px; border-radius: 10px; font-size: 14.5px; color: var(--fg); cursor: pointer; text-align: left; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-3); text-decoration: none; }
.menu .ui-icon { color: var(--muted); }
.menu .danger { color: var(--danger); } .menu .danger .ui-icon { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.menu-head { padding: 14px 18px 6px; display: flex; align-items: center; gap: 10px; }
.menu-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-box { display: grid; place-items: center; gap: 10px; padding: 6px 0 4px; }
.qr-box canvas { width: 220px; height: 220px; border-radius: 14px; background: #fff; padding: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); image-rendering: pixelated; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; } .stat span { font-size: 12px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tool-grid button { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 13.5px; }
.tool-grid button:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.tool-grid button small { display: block; color: var(--muted); font-size: 11.5px; }
.tool-grid h4 { grid-column: 1 / -1; margin: 8px 2px 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.cli pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 6px 0 12px; }
.cli p { margin: 0; font-size: 13px; color: var(--fg-2); }

/* 全屏拖放提示 */
.drop-overlay { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; background: color-mix(in srgb, var(--accent) 18%, rgba(10,12,20,.5)); backdrop-filter: blur(4px); pointer-events: none; }
.drop-overlay.show { display: grid; }
.drop-overlay div { padding: 34px 48px; border-radius: 24px; border: 2px dashed #fff; color: #fff; font-size: 20px; font-weight: 650; text-align: center; }

/* ---------- 提示 ---------- */
.toast { position: fixed; left: 50%; top: calc(var(--top-h) + 12px); transform: translate(-50%, -12px); z-index: 90; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 8px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.toast.err { background: var(--danger); color: #fff; }

/* ---------- 底部导航（手机） ---------- */
.mbar { display: none; }
.footer { max-width: 1280px; margin: 0 auto; padding: 0 20px 30px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.footer button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline dotted; }

/* ---------- 详情页 ---------- */
.detail { max-width: 1180px; margin: 0 auto; padding: 20px 20px 60px; display: grid; grid-template-columns: 1fr 330px; gap: 20px; align-items: start; }
.detail-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--top-h) + 20px); }
.hero { padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.hero .thumb { width: 54px; height: 54px; border-radius: 14px; }
.hero h1 { margin: 0; font-size: 20px; line-height: 1.35; word-break: break-word; }
.hero .sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--muted); align-items: center; }
.hero .sub .dot::before { content: "·"; margin-right: 6px; }
.act-row { display: flex; gap: 8px; flex-wrap: wrap; }
.viewer { background: var(--viewer-bg); border-radius: var(--r); overflow: hidden; display: grid; place-items: center; min-height: 200px; border: 1px solid var(--line); }
.viewer img { max-width: 100%; max-height: 78vh; display: block; cursor: zoom-in; }
.viewer video { width: 100%; max-height: 78vh; display: block; background: #000; }
.viewer audio { width: min(560px, 92%); margin: 40px 0; }
.viewer iframe { width: 100%; height: 78vh; border: 0; background: #fff; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; background: var(--amber-soft); color: var(--amber); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.notice.info { background: var(--accent-soft); color: var(--accent); }
.notice .ui-icon { margin-top: 2px; }
.note-box { overflow: hidden; }
.note-tools { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.note-tools .count { font-size: 12px; color: var(--muted); }
.note-body { padding: 18px 20px; }
pre.note { margin: 0; padding: 14px 0; overflow: auto; font-size: 13.5px; line-height: 1.65; background: var(--code-bg); max-height: 78vh; }
pre.note.wrap { white-space: pre-wrap; word-break: break-word; }
pre.note.lines { counter-reset: ln; }
pre.note .ln { display: block; padding: 0 16px 0 0; }
pre.note .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3.4em; padding-right: 1em; margin-right: .8em; text-align: right; color: var(--ph); border-right: 1px solid var(--line); user-select: none; }
pre.note.wrap .ln { padding-left: 4.9em; text-indent: -4.9em; }
.lock-card { padding: 34px 22px; text-align: center; }
.lock-card .e-ico { width: 70px; height: 70px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); }
.lock-card.burn .e-ico { background: var(--danger-soft); color: var(--danger); }
.lock-card .e-ico .ui-icon { width: 32px; height: 32px; }
.lock-card h2 { margin: 0 0 6px; font-size: 18px; }
.lock-card p { margin: 0 auto 16px; color: var(--muted); max-width: 420px; font-size: 14px; }
.lock-form { display: flex; gap: 8px; max-width: 360px; margin: 0 auto; }
.lock-form input { flex: 1; min-width: 0; }
.side-card { padding: 16px; }
.side-card h3 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.side-card .qr-box canvas { width: 180px; height: 180px; }
.side-card .linkbox + .linkbox { margin-top: 6px; }
.side-card .pickup { justify-content: center; margin: 12px 0 4px; }
.side-card .pickup .digits span { width: 36px; height: 44px; font-size: 22px; }
.kv-list { display: grid; gap: 0; font-size: 13px; }
.kv-list div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv-list div:last-child { border-bottom: 0; }
.kv-list span { color: var(--muted); }
.hist { display: flex; flex-direction: column; gap: 6px; }
.hist button { display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; cursor: pointer; text-align: left; }
.hist button:hover { border-color: var(--accent-line); }
.hist button span { color: var(--muted); font-size: 12px; }
.zip-list { max-height: 60vh; overflow: auto; font-size: 13px; }
.zip-list table { width: 100%; border-collapse: collapse; }
.zip-list td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.zip-list td:last-child { text-align: right; color: var(--muted); white-space: nowrap; }
.zip-list .dir { color: var(--muted); }
.zip-list .ui-icon { width: 15px; height: 15px; color: var(--muted); margin-right: 6px; }
dialog.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(0,0,0,.92); border-radius: 0; display: none; }
dialog.lightbox[open] { display: grid; place-items: center; }
dialog.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
dialog.lightbox .btn { position: fixed; top: 14px; right: 14px; background: rgba(255,255,255,.15); color: #fff; border: 0; }

/* ---------- Markdown ---------- */
.md { font-size: 15px; line-height: 1.75; word-wrap: break-word; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { margin: 1.3em 0 .5em; line-height: 1.35; }
.md h1 { font-size: 1.6em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.md h2 { font-size: 1.32em; padding-bottom: .25em; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 1.14em; }
.md p { margin: .7em 0; }
.md ul, .md ol { padding-left: 1.5em; margin: .6em 0; }
.md li.task { list-style: none; margin-left: -1.3em; }
.md li.task input { margin-right: 6px; vertical-align: -1px; accent-color: var(--accent); }
.md blockquote { margin: .8em 0; padding: .3em 1em; border-left: 3px solid var(--accent-line); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--fg-2); }
.md code { font-size: .88em; padding: .15em .4em; border-radius: 5px; background: var(--code-bg); border: 1px solid var(--line); }
.md pre.code { position: relative; margin: .9em 0; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line); overflow: hidden; }
.md pre.code code { display: block; padding: 12px 14px; overflow: auto; border: 0; background: none; font-size: 13px; line-height: 1.6; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px 5px 14px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); text-transform: lowercase; font-family: inherit; }
.copy-code { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; cursor: pointer; color: var(--fg-2); }
.md table { border-collapse: collapse; margin: .8em 0; display: block; overflow: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 12px; }
.md th { background: var(--surface-2); }
.md img { max-width: 100%; border-radius: 8px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.hl .c, .md .c { color: var(--hl-c); font-style: italic; }
.hl .s, .md .s { color: var(--hl-s); } .hl .n, .md .n { color: var(--hl-n); }
.hl .k, .md .k { color: var(--hl-k); } .hl .f, .md .f { color: var(--hl-f); } .hl .p, .md .p { color: var(--hl-p); }

/* ---------- 平板 ---------- */
@media (max-width: 1060px) {
  .shell { grid-template-columns: 380px 1fr; }
  .search { width: 100%; order: 3; }
  .usage .meter { display: none; }
  .detail { grid-template-columns: 1fr; }
  .detail-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* ---------- 发送面板（手机首页）/ 设置摘要 / 批次条 / 我最近发的 ---------- */
.send-head, .send-grid, .opts-sum, .recent-mine { display: none; }
.batchbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13.5px; }
.batchbar[hidden] { display: none; }
.batchbar .bb-txt { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 140px; color: var(--fg-2); }
.batchbar .bb-txt .ui-icon { width: 16px; height: 16px; color: var(--accent); }
.batchbar b { color: var(--fg); }
.app-promo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; }
.app-promo[hidden] { display: none; }
.app-promo:hover { text-decoration: none; }
.app-promo img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.app-promo > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-promo small { color: var(--muted); font-size: 12px; }
.rm-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 8px; font-size: 14px; }
.rm-list { display: flex; flex-direction: column; gap: 6px; }
.rm-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; }
.rm-row:hover { text-decoration: none; }
.rm-row .thumb { width: 40px; height: 40px; border-radius: 10px; }
.rm-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rm-nm { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-sub { font-size: 12px; color: var(--muted); }

/* ---------- 手机 ---------- */
@media (max-width: 820px) {
  :root { --top-h: 54px; }
  body { font-size: 15px; padding-bottom: calc(var(--mbar-h) + var(--safe-b)); }
  .topbar-in { padding: 0 12px; gap: 4px; }
  .brand small, .code-jump, .usage, #cliBtn { display: none; }
  .brand img { width: 28px; height: 28px; }
  .shell { display: block; padding: 12px 12px 20px; }
  .col-left { position: static; max-height: none; overflow: visible; gap: 12px; }
  /* 按底部导航只显示一个视图 */
  body[data-view=list] .col-left { display: none; }
  body:not([data-view=list]) .col-right { display: none; }
  .composer > .seg { display: none; }
  .composer { padding: 12px; border-radius: 16px; }
  textarea.editor { min-height: 38vh; max-height: none; font-size: 16px; } /* 16px 防止 iOS 聚焦放大 */
  .field, .search input, .code-jump input, .pw-input { font-size: 16px; }
  .panel { padding: 12px; border-radius: 16px; min-height: 0; }
  .list-tools { gap: 8px; }
  .search { width: 100%; }
  .row-item { grid-template-columns: 42px 1fr auto; gap: 10px; padding: 10px; }
  .thumb { width: 42px; height: 42px; }
  .row-item .acts .wide-only { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .up-src { grid-template-columns: repeat(3, 1fr); }
  .drop { padding: 22px 12px; }
  .opt-row { padding: 10px 12px; }
  .ttl-pills button { padding: 5px 10px; }
  .footer { display: none; }
  .mbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--mbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--line);
  }
  .mbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: var(--muted); cursor: pointer; position: relative; }
  .mbar button .ui-icon { width: 23px; height: 23px; }
  .mbar button.on { color: var(--accent); font-weight: 600; }
  .mbar button.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .mbar .badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 700; }
  .bulkbar { bottom: calc(var(--mbar-h) + var(--safe-b) + 10px); }
  .toast { top: auto; bottom: calc(var(--mbar-h) + var(--safe-b) + 14px); transform: translate(-50%, 12px); }
  .toast.show { transform: translate(-50%, 0); }
  /* 弹窗改成底部抽屉 */
  dialog.dlg:not(.lightbox) { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 88dvh; padding-bottom: var(--safe-b); }
  dialog.dlg:not(.lightbox)[open] { animation: sheet .22s ease-out; }
  dialog.dlg:not(.lightbox)::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 8px auto 0; }
  .dlg-acts .btn { flex: 1; min-height: 44px; }
  .menu button, .menu a { padding: 13px 12px; font-size: 15.5px; }
  .detail { padding: 12px 12px 30px; gap: 12px; }
  .detail-main { gap: 12px; }
  .detail-side { grid-template-columns: 1fr; gap: 12px; }
  .hero { padding: 14px; }
  .hero h1 { font-size: 17px; }
  .act-row .btn { flex: 1 1 auto; }
  .note-body { padding: 14px; }
  .viewer { border-radius: 14px; }
  .detail-page { padding-bottom: var(--safe-b); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  /* 发送面板：大按钮代替拖放区 */
  #paneUpload .drop, #paneUpload .up-src { display: none; }
  .send-head { display: block; padding: 2px 2px 12px; }
  .send-head h1 { margin: 0; font-size: 19px; letter-spacing: .01em; }
  .send-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
  .send-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .sg-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 112px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
  .sg-btn:active { transform: scale(.97); }
  .sg-btn b { font-size: 16px; margin-top: auto; }
  .sg-btn small { font-size: 12px; color: var(--muted); line-height: 1.35; }
  .sg-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--fg-2); }
  .sg-ico .ui-icon { width: 22px; height: 22px; }
  .sg-photo { background: linear-gradient(135deg, #4f46e5, #7c3aed); border-color: transparent; color: #fff; box-shadow: 0 10px 24px -12px #4f46e5; }
  .sg-photo small { color: rgba(255,255,255,.82); }
  .sg-photo .sg-ico { background: rgba(255,255,255,.2); color: #fff; }
  .sg-camera .sg-ico { background: var(--green-soft); color: var(--green); }
  .sg-file .sg-ico { background: var(--amber-soft); color: var(--amber); }
  .sg-clip .sg-ico { background: var(--violet-soft); color: var(--violet); }
  .sg-note { grid-column: 1 / -1; min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; padding: 12px 14px; }
  .sg-note .sg-ico { grid-row: span 2; background: var(--accent-soft); color: var(--accent); }
  .sg-note b { margin: 0; flex: 1; }
  .sg-note small { flex-basis: 100%; padding-left: 52px; margin-top: -8px; }
  .sg-note .sg-go { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--accent); }
  .sg-note .sg-go .ui-icon { width: 20px; height: 20px; }
  /* 发布设置折叠成一行，点开才展开 */
  .opts-sum { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg-2); font-size: 13.5px; cursor: pointer; text-align: left; }
  .opts-sum > .ui-icon { width: 17px; height: 17px; color: var(--muted); flex: none; }
  .opts-sum .os-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .opts-sum .os-more { color: var(--accent); font-size: 13px; flex: none; }
  .opts-sum .os-more::after { content: " ▾"; font-size: 10px; }
  .opts-sum.warn { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); color: var(--danger); }
  .composer:not(.opts-open) .opts { display: none; }
  .composer.opts-open .opts { margin-top: 8px; }
  .composer.opts-open .opts-sum .os-more::after { content: " ▴"; }
  body[data-view=upload] .recent-mine:not([hidden]) { display: block; }
  body[data-view=upload] .uplist:not(:empty) ~ .recent-mine { display: none; }
  .batchbar .bb-txt { flex-basis: 100%; }
  .batchbar .btn { flex: 1; min-height: 40px; }
  /* 上传行：状态（含取件码）允许换行，操作按钮另起一行 */
  .uprow { grid-template-columns: 34px 1fr; padding: 10px 12px 12px; }
  .uprow .st { white-space: normal; }
  .uprow .upa { grid-row: auto; grid-column: 1 / -1; justify-content: flex-end; }
  .uprow .upa:empty { display: none; }
  .uprow .upa .btn.xs { min-height: 34px; padding: 0 12px; }
  .uprow .upa .btn.xs.icon { width: 34px; padding: 0; }
  /* 结果卡（取件码）放到最上面，传完一眼就看到 */
  .result { order: -1; }
  .pickup .digits span { width: 46px; height: 56px; font-size: 30px; }
  .result .row-btns .btn { flex: 1; min-height: 40px; }
  .privacy-note { font-size: 12px; }
  #noteHelp { display: none; } /* 手机上没有 Ctrl+Enter，提示没意义 */
}
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
@media (hover: none) { .row-item:hover { box-shadow: none; } .tile:hover img { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
