:root {
  --bg: #f2f5f8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --text: #141c24;
  --text-secondary: #5c6b7a;
  --text-muted: #8b98a6;
  --border: #e5eaf0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --xhs: #ff2442;
  --remark-bg: #fef7e4;
  --remark-border: #f3d999;
  --remark-text: #7a5210;
  --fresh-bg: #ecfdf5;
  --fresh-text: #047857;
  --used-bg: #fff7ed;
  --used-text: #c2410c;
  --danger: #dc2626;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 12px rgba(15, 23, 42, 0.05);
  --shadow-float: 0 10px 28px rgba(37, 99, 235, 0.28);
  --sidebar-w: 248px;
  --bottom-nav-h: 62px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* ===== 按钮与表单 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn-xs { padding: 4px 8px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-xhs { background: var(--xhs); color: #fff; }
.btn-secondary { background: #e8eef6; color: var(--text); }
.btn-secondary:hover { background: #dde6f2; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f8fafc; color: var(--text); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-danger:hover { background: #fecaca; }
.btn-light { background: rgba(255, 255, 255, 0.92); color: #111; }

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
}
.form-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
}

/* ===== 登录页 ===== */
.login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top right, #dbeafe 0%, #f2f5f8 45%, #fff1f2 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.login-brand h1 {
  margin: 0;
  font-size: 21px;
}
.login-brand p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.login-tip {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ===== 应用主壳体 ===== */
.app-shell {
  min-height: 100dvh;
  display: flex;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.brand-name {
  font-weight: 700;
  font-size: 15px;
}
.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}
.nav-item:hover { background: #f3f6fa; color: var(--text); }
.nav-item.active { background: #eff6ff; color: var(--primary); }
.nav-badge {
  margin-left: auto;
  font-size: 12px;
  background: #edf2f7;
  color: var(--text-secondary);
  padding: 1px 7px;
  border-radius: 99px;
}
.nav-item.active .nav-badge { background: #dbeafe; color: var(--primary); }

.sidebar-section {
  margin-top: 20px;
  flex: 1;
  overflow-y: auto;
}
.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.icon-btn-xs {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #eff6ff;
  color: var(--primary);
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
}
.sidebar-tag-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}
.sidebar-tag-item:hover { background: #f5f7fa; }
.sidebar-tag-item.active { background: #eef2ff; color: var(--primary); font-weight: 600; }
.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ===== 主内容与顶部吸顶栏 ===== */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 234, 240, 0.8);
  padding: 12px 18px 10px;
}
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.topbar-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.topbar-title-wrap h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.topbar-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.search-box {
  flex: 1;
  min-width: 190px;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0 12px;
  height: 36px;
}
.search-icon { font-size: 13px; margin-right: 6px; opacity: 0.65; }
.search-box input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  background: transparent;
  color: var(--text);
}
.clear-btn {
  border: none;
  background: #e2e8f0;
  color: #475569;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}
.extra-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.select-pill {
  height: 36px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.toggle-pill input { accent-color: var(--primary); }

.tag-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 0 2px;
  scrollbar-width: none;
}
.tag-strip::-webkit-scrollbar { display: none; }
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.14s ease;
}
.tag-pill.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ===== 内容区与瀑布流 ===== */
.content-body {
  padding: 14px 16px 90px;
  flex: 1;
}
.masonry-grid {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.masonry-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Recall 风格帖子卡片 */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(226, 232, 240, 0.7);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.card-media-wrap {
  position: relative;
  background: #e9eef4;
  overflow: hidden;
}
.card-media-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 360px;
}
.card-media-placeholder {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}
.card-badge-tl,
.card-badge-tr {
  position: absolute;
  top: 8px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.card-badge-tl { left: 8px; background: rgba(15, 23, 42, 0.68); color: #fff; }
.card-badge-tr { right: 8px; background: rgba(255, 255, 255, 0.92); color: var(--text); }
.card-badge-tr.fresh { background: var(--fresh-bg); color: var(--fresh-text); }
.card-badge-tr.used { background: var(--used-bg); color: var(--used-text); }

.card-body {
  padding: 10px 11px 11px;
}
.card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.card-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}
.mini-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-weight: 500;
}
/* Recall 风格醒目备注区 */
.card-remark {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--remark-bg);
  border: 1px solid var(--remark-border);
  color: var(--remark-text);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

/* 拖拽上传横幅 */
.dropzone-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone-banner.drag-over {
  border-color: var(--primary);
  background: #eff6ff;
}
.dropzone-banner strong { display: block; font-size: 14px; }
.dropzone-banner span { font-size: 12.5px; color: var(--text-secondary); }

/* 空状态 & 加载更多 */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
}
.empty-icon { font-size: 42px; margin-bottom: 10px; }
.empty-state h3 { margin: 0 0 6px; font-size: 17px; }
.empty-state p { margin: 0 0 18px; color: var(--text-secondary); font-size: 13.5px; }
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* 回收站与管理面板 */
.segmented-tabs {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 11px;
  margin-bottom: 14px;
}
.seg-btn {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.seg-btn.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.trash-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.trash-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}
.trash-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
}
.trash-info { flex: 1; min-width: 0; }
.trash-info h4 {
  margin: 0 0 4px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trash-info p { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-header h3 { margin: 0; font-size: 16px; }
.status-kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kv-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
}
.kv-box .k { font-size: 12px; color: var(--text-muted); }
.kv-box .v { font-size: 14px; font-weight: 700; margin-top: 2px; }
.list-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}
.list-row-main { min-width: 0; }
.list-row-title { font-weight: 600; font-size: 13.5px; }
.list-row-sub { font-size: 12px; color: var(--text-muted); }

/* ===== 悬浮按钮 & 底部导航 ===== */
.fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  box-shadow: var(--shadow-float);
  cursor: pointer;
  z-index: 30;
}
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  z-index: 25;
}
.bottom-nav-item {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.bottom-nav-item .bnav-icon { font-size: 20px; line-height: 1.1; }
.bottom-nav-item.active { color: var(--primary); }

/* ===== 弹窗与详情 ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}
.modal-dialog {
  width: 100%;
  max-width: 720px;
  max-height: 90dvh;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close {
  border: none;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}
.modal-body {
  padding: 16px 18px 22px;
  overflow-y: auto;
}

.copy-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.note-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.gallery-item {
  position: relative;
  flex: 0 0 auto;
  width: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--border);
  scroll-snap-align: start;
}
.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.gallery-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: #fff;
  font-size: 12px;
}
.note-video-player {
  width: 100%;
  max-height: 380px;
  border-radius: 14px;
  background: #000;
}
.note-desc-box {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  max-height: 240px;
  overflow-y: auto;
}
.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag-choice {
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12.5px;
  cursor: pointer;
}
.tag-choice.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.parse-result-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.parse-result-item {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.parse-result-item.created { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.parse-result-item.duplicate { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.parse-result-item.failed { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* 全屏灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  flex-direction: column;
}
.lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #fff;
}
.lightbox-top-actions { display: flex; align-items: center; gap: 10px; }
.lightbox-close {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}
.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px;
  overflow: hidden;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}
.lightbox-arrow.left { left: 14px; }
.lightbox-arrow.right { right: 14px; }

/* Toast */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.2s ease;
}
.toast.error { background: rgba(185, 28, 28, 0.95); }
.toast.success { background: rgba(6, 95, 70, 0.95); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 移动端响应式适配 ===== */
@media (max-width: 899px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .fab { display: flex; align-items: center; justify-content: center; }
  .topbar { padding: 10px 12px 8px; }
  .content-body { padding: 10px 10px calc(var(--bottom-nav-h) + 84px); }
  .masonry-grid { gap: 9px; }
  .masonry-col { gap: 9px; }
  .dropzone-banner { flex-direction: column; align-items: flex-start; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-dialog {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
  }
}
