/* Drive 应用专属样式 - IJerrt 个人网盘 v3
   目标：精细三端适配（手机/平板/桌面）+ UI 精致化 */
.app{position:relative;z-index:1;height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;}

/* ========== 顶栏 ========== */
.topbar{
  display:flex;align-items:center;gap:12px;
  padding:10px 16px;
  background:var(--card);
  border-bottom:1px solid var(--border);
  z-index:50;flex-shrink:0;
  min-height:56px;
  position:relative;top:auto;
  flex:0 0 auto;
}
.brand{display:flex;align-items:center;gap:10px;min-width:0;flex-shrink:0;}
.brand-icon{
  width:36px;height:36px;border-radius:11px;background:var(--grad);
  display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;
  box-shadow:0 6px 18px rgba(var(--accent-rgb),.35);
  flex-shrink:0;
}
.brand-icon svg{width:18px;height:18px;}
.brand-name{font-weight:700;font-size:15px;letter-spacing:.3px;line-height:1.2;white-space:nowrap;}
.brand-sub{font-size:10.5px;color:var(--text2);margin-top:1px;line-height:1.2;white-space:nowrap;}
.topbar-center{flex:1;min-width:0;max-width:480px;margin:0 auto;}
.search-wrap{position:relative;width:100%;}
.search-wrap svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--text3);pointer-events:none;}
.search-wrap input{
  width:100%;height:36px;padding:0 14px 0 36px;
  background:var(--tint-b);border:1px solid var(--border);border-radius:10px;
  color:var(--text);font-size:13px;outline:none;font-family:inherit;
  transition:border-color .15s,background .15s;
}
.search-wrap input:focus{border-color:var(--blue);background:var(--tint-c);}
.search-wrap input::placeholder{color:var(--text3);}
.top-actions{display:flex;align-items:center;gap:6px;flex-shrink:0;}

/* ========== 主布局 ========== */
.layout{
  flex:1 1 auto;display:grid;
  grid-template-columns:240px 1fr;
  grid-template-rows:1fr;
  min-height:0;
  overflow:hidden;
  position:relative;
}

/* ========== 侧栏 ========== */
.sidebar{
  background:var(--card);
  border-right:1px solid var(--border);
  padding:14px 10px;
  display:flex;flex-direction:column;gap:3px;
  overflow-y:auto;
  grid-column:1;grid-row:1;
  transition:transform .28s var(--ease),left .28s var(--ease);
}
.sidebar-section{display:flex;flex-direction:column;gap:1px;margin-bottom:10px;}
.sidebar-label{
  padding:5px 10px 5px;
  font-size:10.5px;font-weight:600;color:var(--text3);
  text-transform:uppercase;letter-spacing:.05em;
  display:flex;align-items:center;justify-content:space-between;
}
.sidebar-btn{
  display:flex;flex-direction:row;align-items:center;gap:9px;
  padding:8px 10px;border-radius:9px;
  color:var(--text2);font-size:13px;font-weight:500;
  cursor:pointer;background:transparent;border:none;
  font-family:inherit;transition:background .15s,color .15s;
  text-align:left;width:100%;
  white-space:nowrap;flex-shrink:0;
  overflow:hidden;text-overflow:ellipsis;
}
.sidebar-btn svg{width:15px;height:15px;flex-shrink:0;}
.sidebar-btn:hover{background:var(--tint-b);color:var(--text);}
.sidebar-btn.active{background:rgba(var(--accent-rgb),.14);color:var(--blue);font-weight:600;}
.sidebar-btn .badge{
  margin-left:auto;font-size:10px;color:var(--text3);
  background:var(--tint-b);padding:2px 7px;border-radius:10px;
  min-width:18px;text-align:center;line-height:1.2;
}
.sidebar-btn.active .badge{background:rgba(var(--accent-rgb),.18);color:var(--blue);}
.sidebar-spacer{flex:1;min-height:8px;}

/* 存储条 */
.storage-card{
  margin-top:8px;padding:11px 12px;border-radius:11px;
  background:var(--tint-b);border:1px solid var(--border);
}
.storage-label{font-size:11px;font-weight:600;color:var(--text2);margin-bottom:7px;display:flex;justify-content:space-between;align-items:center;}
.storage-track{height:5px;border-radius:3px;background:var(--tint-c);overflow:hidden;}
.storage-fill{height:100%;background:var(--grad);border-radius:3px;transition:width .4s var(--ease);}
.storage-sub{font-size:10px;color:var(--text3);margin-top:5px;}

/* ========== 主区 ========== */
.main{
  min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;
  grid-column:2;grid-row:1;
}
.main-header{
  padding:14px 20px;
  display:flex;align-items:center;gap:12px;
  background:var(--card);
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.main-header-info{flex:1;min-width:0;}
.main-title{font-size:17px;font-weight:700;display:flex;align-items:center;gap:8px;line-height:1.3;}
.main-title .crumb-sep{color:var(--text3);margin:0 4px;font-weight:400;opacity:.7;}
.main-sub{font-size:11px;color:var(--text2);margin-top:2px;}
.main-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;}
/* 排序下拉 */
.sort-select{
  height:32px;padding:0 26px 0 10px;border-radius:9px;
  background:var(--tint-b) url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23555%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E") no-repeat right 8px center/12px;
  border:1px solid var(--border);color:var(--text2);font-size:12.5px;font-family:inherit;
  outline:none;cursor:pointer;-webkit-appearance:none;appearance:none;transition:border-color .15s,background .15s;
}
.sort-select:focus{border-color:var(--blue);}
.sort-select option{background:var(--card);color:var(--text);}
.crumbs{display:flex;align-items:center;gap:3px;flex-wrap:wrap;}
.crumb{padding:3px 7px;border-radius:6px;color:var(--text2);cursor:pointer;font-size:12px;font-weight:500;transition:background .15s,color .15s;}
.crumb:hover{background:var(--tint-b);color:var(--text);}
.crumb.current{color:var(--text);font-weight:600;cursor:default;}
.crumb.current:hover{background:none;}

/* 上传区 */
.drop-zone{
  position:relative;
  margin:0 20px 14px;
  padding:14px;
  border-radius:14px;
  border:2px dashed var(--border-2);
  background:var(--tint-a);
  text-align:center;cursor:pointer;
  transition:border-color .2s,background .2s;
}
.drop-zone:hover,.drop-zone.drag{
  border-color:var(--blue);
  background:rgba(var(--accent-rgb),.05);
}
.drop-zone.drag{animation:pulse-border-2 1.2s ease-in-out infinite;}
@keyframes pulse-border-2{50%{border-color:var(--blue-press);background:rgba(var(--accent-rgb),.1);}}
.drop-zone-icon{
  width:28px;height:28px;margin:0 auto 6px;color:var(--blue);
  display:flex;align-items:center;justify-content:center;
}
.drop-zone-icon svg{width:100%;height:100%;}
.drop-zone-title{font-size:13px;font-weight:600;color:var(--text);}
.drop-zone-sub{font-size:11px;color:var(--text2);margin-top:3px;}

/* 视图切换 */
.view-toggle{display:flex;background:var(--tint-a);border:1px solid var(--border);border-radius:9px;padding:2px;gap:2px;}
.view-toggle button{
  border:none;background:transparent;color:var(--text2);cursor:pointer;
  width:28px;height:26px;border-radius:6px;
  display:flex;align-items:center;justify-content:center;transition:all .15s;
}
.view-toggle button.active{background:var(--blue);color:#fff;}
.view-toggle button svg{width:13px;height:13px;}

/* ========== 文件网格 ========== */
.grid{
  flex:1;overflow-y:auto;padding:0 20px 20px;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
  gap:12px;
  align-content:start;
}
.grid::after{content:'';display:block;min-height:60px;}

/* 列表视图 */
.list{flex:1;overflow-y:auto;padding:0 20px 20px;}
.list-table{
  width:100%;border-collapse:collapse;
  background:var(--card);border:1px solid var(--border);
  border-radius:12px;overflow:hidden;
}
.list-table th{
  text-align:left;font-size:10.5px;font-weight:600;color:var(--text3);
  padding:9px 12px;background:var(--tint-a);
  text-transform:uppercase;letter-spacing:.04em;
  border-bottom:1px solid var(--border);
}
.list-table td{
  padding:9px 12px;font-size:12.5px;border-bottom:1px solid var(--border);
  vertical-align:middle;
}
.list-table tr:last-child td{border-bottom:none;}
.list-table tbody tr{cursor:pointer;transition:background .12s;}
.list-table tbody tr:hover{background:var(--tint-b);}
.list-table .row-icon{
  width:32px;height:32px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  background:var(--tint-b);
}
.list-table .row-icon svg{width:16px;height:16px;}
.list-table .row-name{font-weight:600;color:var(--text);}
.list-table .row-meta{color:var(--text2);font-size:11px;}

/* ========== 文件卡 ========== */
.file-card{
  content-visibility:auto;contain-intrinsic-size:150px;  /* 2026-08-28：大列表只渲染可视区 */

  position:relative;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:13px;
  cursor:pointer;
  transition:background .2s,border-color .2s,transform .2s,box-shadow .2s;
  min-width:0;
  overflow:hidden;
}
.file-card:hover{
  background:var(--card-2);
  border-color:var(--border-2);
  transform:translateY(-2px);
  box-shadow:var(--shadow-hover);
}.file-card.selected{
  border-color:var(--blue);
  background:rgba(var(--accent-rgb),.08);
}
.file-card .file-actions{
  position:absolute;top:8px;right:8px;
  display:flex;gap:4px;opacity:0;transition:opacity .15s;
  z-index:2;
}
.file-card:hover .file-actions,.file-card.selected .file-actions{opacity:1;}
.file-card .file-actions button{
  width:26px;height:26px;border-radius:7px;
  border:none;background:rgba(0,0,0,.35);color:#fff;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background .15s,color .15s;
}
.file-card .file-actions button:hover{background:var(--blue);}
.file-card .file-actions button svg{width:13px;height:13px;}
.file-icon{
  width:42px;height:42px;border-radius:11px;
  display:flex;align-items:center;justify-content:center;
  background:var(--tint-b);color:var(--blue);
  margin-bottom:9px;
}
.file-icon svg{width:22px;height:22px;}
.file-icon.dir{background:rgba(255,159,10,.12);color:var(--orange);}
.file-icon.img{background:rgba(255,45,85,.12);color:#ff6b8a;}
.file-icon.doc{background:rgba(10,132,255,.12);color:var(--blue);}
.file-icon.vid{background:rgba(175,82,222,.12);color:#af52de;}
.file-icon.zip{background:rgba(48,209,88,.12);color:var(--green);}
.file-icon.pdf{background:rgba(255,69,58,.12);color:var(--red);}
.file-icon.audio{background:rgba(255,159,10,.12);color:var(--orange);}
.file-icon.code{background:rgba(94,92,230,.12);color:#5e5ce6;}
.file-icon.ppt{background:rgba(255,69,58,.12);color:#ff453a;}
.file-icon.xls{background:rgba(48,209,88,.12);color:#30d158;}

.file-thumb{
  width:100%;height:108px;border-radius:8px;
  background:var(--tint-b);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;margin-bottom:9px;
}
.file-thumb img{width:100%;height:100%;object-fit:cover;}
.file-name{
  font-size:12.5px;font-weight:600;line-height:1.4;
  overflow:hidden;text-overflow:ellipsis;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  color:var(--text);word-break:break-all;
}
.file-meta{
  font-size:10.5px;color:var(--text3);margin-top:3px;
  display:flex;align-items:center;gap:5px;flex-wrap:wrap;
}
.badge-share{
  font-size:9.5px;padding:1px 5px;border-radius:4px;
  background:rgba(48,209,88,.12);color:var(--green);
  font-weight:600;
}
.badge-conv{
  font-size:9.5px;padding:1px 5px;border-radius:4px;
  background:rgba(94,92,230,.12);color:#5e5ce6;
  font-weight:600;
}

/* 空状态 */
.empty-state{
  padding:60px 24px;text-align:center;
  display:flex;flex-direction:column;align-items:center;gap:12px;
  color:var(--text2);
}
.empty-icon{
  width:72px;height:72px;border-radius:50%;
  background:linear-gradient(135deg,var(--tint-b),var(--tint-a));
  display:flex;align-items:center;justify-content:center;
  color:var(--text3);
  border:1px solid var(--border);
}
.empty-icon svg{width:30px;height:30px;}
.empty-title{font-size:15px;font-weight:600;color:var(--text);}
.empty-desc{font-size:12.5px;color:var(--text2);max-width:320px;line-height:1.6;}

/* ========== 上传列表 ========== */
.upload-list{
  position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);
  z-index:200;display:flex;flex-direction:column;gap:9px;
  width:min(400px, 90vw);max-height:60vh;overflow-y:auto;
}
.upload-row{
  background:var(--card);border:1px solid var(--border-2);
  border-radius:14px;padding:11px 13px;
  box-shadow:0 12px 40px rgba(0,0,0,.35);
  display:flex;flex-direction:column;gap:7px;
  animation:slideUp .25s var(--ease);
}
.upload-row .ur-head{display:flex;align-items:center;gap:8px;}
.upload-row .ur-icon{width:24px;height:24px;border-radius:7px;background:var(--tint-b);color:var(--blue);display:flex;align-items:center;justify-content:center;}
.upload-row .ur-icon svg{width:13px;height:13px;}
.upload-row .ur-name{flex:1;font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.upload-row .ur-pct{font-size:11px;color:var(--text2);font-weight:600;}
.upload-row .ur-bar{height:4px;background:var(--tint-c);border-radius:2px;overflow:hidden;}
.upload-row .ur-fill{height:100%;background:var(--grad);border-radius:2px;transition:width .15s;}

/* ========== 预览弹窗 ========== */
.preview-modal{
  background:var(--modal-bg);
  border:1px solid var(--border-2);
  border-radius:18px;
  width:100%;max-width:920px;max-height:90vh;
  display:flex;flex-direction:column;overflow:hidden;
  box-shadow:var(--shadow-heavy);
  animation:slideUp .25s var(--ease);
}
.preview-modal.large{max-width:1200px;}
.preview-head{
  display:flex;align-items:center;gap:12px;
  padding:13px 18px;border-bottom:1px solid var(--border);
  background:var(--card);
}
.preview-head .pf-icon{
  width:36px;height:36px;border-radius:10px;
  background:var(--tint-b);color:var(--blue);
  display:flex;align-items:center;justify-content:center;
}
.preview-head .pf-icon svg{width:18px;height:18px;}
.preview-head .pf-info{flex:1;min-width:0;}
.preview-head .pf-name{font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.preview-head .pf-meta{font-size:11px;color:var(--text2);margin-top:2px;}
.preview-head .pf-tools{display:flex;align-items:center;gap:6px;}
.preview-body{
  flex:1;min-height:0;overflow:auto;
  display:flex;align-items:center;justify-content:center;
  background:#0a0a0a;position:relative;
}
[data-theme="light"] .preview-body{background:#f0f0f3;}
.preview-body img{max-width:100%;max-height:100%;object-fit:contain;cursor:zoom-in;}
.preview-body video{width:100%;height:100%;max-height:80vh;outline:none;}
.preview-body audio{width:80%;margin:auto;}
@media (max-width:640px){ .preview-body audio{width:100%;padding:0 12px;} }
.preview-body .pdf-page{margin:8px auto;box-shadow:0 4px 16px rgba(0,0,0,.3);}
.preview-body pre{
  background:#1d1d1f;color:#e6e6e6;padding:20px 26px;
  border-radius:0;width:100%;overflow:auto;
  font-family:ui-monospace,Menlo,monospace;font-size:12px;
  line-height:1.6;text-align:left;max-height:75vh;margin:0;
}
[data-theme="light"] .preview-body pre{background:#f6f6f8;color:#1d1d1f;}
.preview-body .office-loading,
.preview-body .office-error{
  display:flex;flex-direction:column;align-items:center;gap:14px;
  color:var(--text2);padding:60px 24px;text-align:center;
}
.preview-body .office-loading .icon-wrap,
.preview-body .office-error .icon-wrap{
  width:60px;height:60px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
}
.preview-body .office-loading .icon-wrap{background:rgba(var(--accent-rgb),.12);color:var(--blue);}
.preview-body .office-error .icon-wrap{background:rgba(255,69,58,.12);color:var(--red);}
.preview-body .office-loading .icon-wrap svg{animation:spin 2s linear infinite;width:26px;height:26px;}
.preview-body .office-error .icon-wrap svg{width:26px;height:26px;}
@keyframes spin{to{transform:rotate(360deg);}}

.pdf-toolbar{
  display:flex;align-items:center;gap:6px;
  padding:7px 14px;background:var(--card);border-top:1px solid var(--border);
  justify-content:center;
}
.pdf-toolbar button{
  border:none;background:transparent;color:var(--text2);cursor:pointer;
  width:30px;height:30px;border-radius:7px;
  display:flex;align-items:center;justify-content:center;transition:all .15s;
}
.pdf-toolbar button:hover{background:var(--tint-b);color:var(--text);}
.pdf-toolbar button:disabled{opacity:.4;cursor:not-allowed;}
.pdf-toolbar button svg{width:15px;height:15px;}
.pdf-toolbar .pdf-info{font-size:12px;color:var(--text2);margin:0 7px;font-variant-numeric:tabular-nums;}
.pdf-toolbar input[type=range]{accent-color:var(--blue);width:85px;}

/* ========== 弹窗 ========== */
.modal-overlay{
  position:fixed;inset:0;z-index:200;
  background:var(--overlay-bg);
  display:flex;align-items:center;justify-content:center;
  padding:20px;
  animation:fadeIn .2s ease;
}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}
.modal{
  background:var(--modal-bg);
  border:1px solid var(--border-2);
  border-radius:16px;
  padding:22px;
  width:100%;max-width:440px;
  max-height:85vh;overflow-y:auto;
  box-shadow:var(--shadow-heavy);
  animation:slideUp .25s var(--ease);
}
.modal-lg{max-width:680px;}
.modal-xl{max-width:880px;}
@keyframes slideUp{from{transform:translateY(20px) scale(.97);opacity:0;}to{transform:none;opacity:1;}}
.modal-title{font-size:17px;font-weight:700;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:10px;}
.modal-title h3{margin:0;font-size:16px;}
.modal-desc{font-size:12.5px;color:var(--text2);margin-bottom:16px;line-height:1.6;}
.modal-actions{display:flex;gap:8px;margin-top:18px;justify-content:flex-end;flex-wrap:wrap;}
.modal-actions .btn{width:auto;flex:0 0 auto;padding:10px 18px;min-width:90px;}
.modal-close{
  width:30px;height:30px;border-radius:8px;border:none;background:var(--tint-b);color:var(--text2);
  cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s;
}
.modal-close:hover{background:var(--tint-c);color:var(--text);}

/* 分享/移动 弹窗 */
.share-link-box{display:flex;gap:8px;align-items:stretch;margin-top:8px;}
.share-link-box input{flex:1;}
.move-list{max-height:300px;overflow-y:auto;display:flex;flex-direction:column;gap:4px;margin-top:8px;}
.move-opt svg{width:16px;height:16px;vertical-align:-3px;flex-shrink:0;}  /* 2026-08-28：移动弹窗文件夹图标尺寸（此前无约束致超大） */
.list-table .row-name svg{width:14px;height:14px;vertical-align:-2px;}  /* 2026-08-28：列表行文件夹图标尺寸 */
.move-opt{
  padding:10px 14px;border-radius:10px;background:var(--tint-b);
  border:1px solid var(--border);font-size:13px;cursor:pointer;
  transition:background .15s,border-color .15s;
}
.move-opt:hover{background:var(--tint-c);border-color:var(--border-2);}

/* ========== 移动端 FAB ========== */
.fab{
  position:fixed;bottom:20px;right:20px;z-index:40;
  width:54px;height:54px;border-radius:50%;
  background:var(--blue);color:#fff;
  display:none;align-items:center;justify-content:center;
  box-shadow:0 12px 30px rgba(var(--accent-rgb),.4);
  border:none;cursor:pointer;transition:transform .15s;
}
.fab:hover{transform:scale(1.05);}
.fab:active{transform:scale(.95);}
.fab svg{width:22px;height:22px;}

/* ========== 多选工具栏 ========== */
.selection-toolbar{
  position:fixed;bottom:20px;left:50%;transform:translateX(-50%);
  z-index:150;display:none;align-items:center;gap:6px;
  padding:7px 12px;background:var(--modal-bg);border:1px solid var(--border-2);
  border-radius:14px;box-shadow:var(--shadow-heavy);
  animation:slideUp .25s var(--ease);
}
.selection-toolbar.show{display:flex;}
.selection-toolbar .st-count{font-size:12.5px;color:var(--text2);padding:0 8px;font-weight:600;}
.selection-toolbar button{
  border:none;background:transparent;color:var(--text);
  padding:7px 10px;border-radius:7px;cursor:pointer;
  display:flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;font-family:inherit;
  transition:background .15s;
}
.selection-toolbar button:hover{background:var(--tint-b);}
.selection-toolbar button.danger:hover{background:rgba(255,69,58,.12);color:var(--red);}
.selection-toolbar button svg{width:14px;height:14px;}

/* 通告条 */
.notice{
  margin:0 20px 14px;padding:10px 14px;border-radius:12px;
  font-size:12px;background:rgba(var(--accent-rgb),.10);
  border:1px solid rgba(var(--accent-rgb),.25);color:var(--text);
  display:flex;align-items:center;gap:8px;
}
.notice.warn{background:rgba(255,69,58,.10);border-color:rgba(255,69,58,.25)}
.notice .close{margin-left:auto;background:none;border:none;color:var(--text2);cursor:pointer;font-size:16px;line-height:1;padding:0 4px;}

/* 右键菜单 */
.ctx-menu{
  position:fixed;z-index:300;min-width:170px;padding:6px;
  background:var(--modal-bg);border:1px solid var(--border-2);
  border-radius:12px;box-shadow:var(--shadow-heavy);
  animation:pop .15s var(--ease);
}
.ctx-item{
  padding:8px 12px;border-radius:8px;
  font-size:13px;color:var(--text);cursor:pointer;
  display:flex;align-items:center;gap:10px;
}
.ctx-item:hover{background:var(--tint-b);}
.ctx-item.danger{color:var(--red);}
.ctx-item.danger:hover{background:rgba(255,69,58,.12);}
.ctx-item svg{width:14px;height:14px;}

/* ========== 响应式：平板 ========== */
@media (max-width:1024px) and (min-width:641px) {
  .layout{grid-template-columns:1fr;}
  .sidebar{
    position:fixed;left:-260px;top:56px;width:240px;height:calc(100dvh - 56px);
    z-index:45;background:var(--glass-bg);
    transition:left .28s var(--ease);
    box-shadow:0 0 30px rgba(0,0,0,.2);
  }
  .sidebar.open{left:0;}
  .sidebar-backdrop{
    position:fixed;inset:0;z-index:44;background:rgba(0,0,0,.5);
    opacity:0;pointer-events:none;transition:opacity .25s;
  }
  .sidebar-backdrop.show{opacity:1;pointer-events:auto;}
  .main{grid-column:1;grid-row:1;}
  #sideToggle{display:flex !important;}
  .grid{grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));}
}

/* ========== 响应式：手机 ========== */
@media (max-width:640px) {
  /* 顶栏两行布局：第一行 logo+操作，第二行搜索 */
  .topbar{
    flex-wrap:wrap;
    padding:max(8px, env(safe-area-inset-top)) 12px 0;
    gap:6px 8px;
    min-height:0;
  }
  .brand{
    order:1;
    flex:0 0 auto;
    min-width:0;
    gap:8px;
  }
  .brand-sub{display:none;}
  .brand-name{font-size:14px;max-width:76px;overflow:hidden;text-overflow:ellipsis;}
  .brand-icon{width:32px;height:32px;border-radius:9px;}
  .brand-icon svg{width:16px;height:16px;}
  .top-actions{
    order:2;
    margin-left:auto;
    gap:4px;
  }
  .top-actions .btn-primary{display:none;}  /* 上传走 FAB */
  .top-actions .icon-btn{width:32px;height:32px;border-radius:8px;}
  .top-actions .icon-btn svg{width:15px;height:15px;}
  .topbar-center{
    order:3;
    flex-basis:100%;
    margin:0 0 8px;
    max-width:none;
  }
  .search-wrap input{height:34px;font-size:13px;border-radius:9px;}

  #sideToggle{display:flex !important;}
  #sideToggle{width:32px;height:32px;border-radius:8px;}
  #sideToggle svg{width:14px;height:14px;}

  /* 手机端性能：关闭背景光晕、模糊与重阴影，降低重绘开销 */
  body::before, body::after{display:none;}
  .bg-orbs span{opacity:calc(var(--orbs-opacity) * .5);}
  .glass,.file-card,.sidebar,.topbar,.main-header,
  .file-card{box-shadow:none;}
  .file-card:hover{transform:none;}
  .file-card{will-change:auto;}

  .layout{grid-template-columns:1fr;flex:1;min-height:0;height:auto;}
  .app{height:100dvh;}
  .sidebar{
    position:fixed;left:-260px;top:56px;width:240px;height:calc(100dvh - 56px);
    z-index:45;background:var(--glass-bg);
    transition:left .28s var(--ease);
    box-shadow:0 0 30px rgba(0,0,0,.2);
    grid-column:1;
  }
  .sidebar.open{left:0;}
  .sidebar-backdrop{
    position:fixed;inset:0;z-index:44;background:rgba(0,0,0,.5);
    opacity:0;pointer-events:none;transition:opacity .25s;
  }
  .sidebar-backdrop.show{opacity:1;pointer-events:auto;}
  .main{grid-column:1;min-height:0;}

  .main-header{padding:10px 14px;gap:8px;flex-wrap:wrap;}
  .main-title{font-size:15px;}
  .main-actions{gap:6px;}
  .main-actions .btn-secondary{display:none;}  /* 隐藏"新建文件夹"按钮，由侧栏新建 */
  .view-toggle button{width:34px;height:34px;}

  .drop-zone{margin:0 14px 12px;padding:12px;border-radius:12px;}
  .drop-zone-title{font-size:12.5px;}
  .drop-zone-sub{font-size:10.5px;}

  .grid{padding:0 14px 14px;gap:10px;grid-template-columns:repeat(auto-fill, minmax(140px, 1fr));}
  .file-card{padding:11px;border-radius:12px;}
  .file-icon{width:38px;height:38px;border-radius:9px;}
  .file-icon svg{width:20px;height:20px;}
  .file-name{font-size:12px;}
  .file-meta{font-size:10px;}

  .fab{display:flex !important;width:50px;height:50px;}
  .fab svg{width:20px;height:20px;}

  /* 弹窗：iOS 风格 bottom-sheet（手机端从底部滑入） */
  .modal{
    padding:20px 18px;
    max-width:100%;width:100%;
    border-radius:18px 18px 0 0;
    margin-top:auto;
    max-height:88vh;
    animation:sheetUp .3s var(--ease);
  }
  .modal-title{font-size:17px;}
  .modal-overlay{align-items:flex-end;padding:0;padding-top:60px;}
  .modal::before{
    content:'';display:block;width:36px;height:4px;
    background:var(--border-2);border-radius:2px;
    margin:-10px auto 12px;
  }
  @keyframes sheetUp{from{transform:translateY(100%);opacity:.5;}to{transform:none;opacity:1;}}
  .modal.closing{animation:sheetDown .25s var(--ease) forwards;}
  @keyframes sheetDown{from{transform:none;opacity:1;}to{transform:translateY(100%);opacity:.5;}}

  .list-table th{padding:7px 10px;font-size:10px;}
  .list-table td{padding:8px 10px;font-size:12px;}
  .selection-toolbar{bottom:calc(80px + env(safe-area-inset-bottom));width:max-content;max-width:94vw;}
  .upload-list{bottom:calc(80px + env(safe-area-inset-bottom));}
}

/* ========== 响应式：超小屏 ========== */
@media (max-width:380px) {
  .grid{grid-template-columns:repeat(2, 1fr);gap:8px;}
  .file-card{padding:10px;}
  .file-thumb{height:80px;margin-bottom:7px;}
}

/* ========== 响应式：超宽屏 ========== */
@media (min-width:1600px) {
  .layout{grid-template-columns:280px 1fr;}
  .sidebar{padding:18px 14px;}
  .grid{grid-template-columns:repeat(auto-fill, minmax(190px, 1fr));gap:14px;}
}
/* 2026-08-27：分享状态指示点（index.html shareStatusDot） */
.dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex-shrink:0;vertical-align:middle;}

/* 2026-08-27：补桌面端弹窗关闭动画（design.css 引用但未定义） */
@keyframes fadeOut{from{opacity:1;}to{opacity:0;}}
@keyframes slideDown{from{transform:translateY(-8px);opacity:1;}to{transform:translateY(8px);opacity:0;}}

/* 2026-08-27：回收站操作按钮容器 */
.trash-actions{display:flex;gap:8px;margin-top:10px;}
.trash-actions .btn{flex:1;}

/* 2026-08-27：触屏无 hover → 操作按钮常显，避免看不见/点不到 */
@media (hover:none){
  .file-actions{opacity:1;transform:none;}
}

/* 2026-08-27：手机列表视图精简列（按类隐藏，兼容回收站列布局） */
@media (max-width:640px){
  .list-table th.c-time, .list-table td.c-time,
  .list-table th.c-size, .list-table td.c-size{display:none;}
}

/* 2026-08-27：≤380px 多选工具栏只留图标 */
@media (max-width:380px){
  .selection-toolbar .st-label{display:none;}
  .selection-toolbar .st-btn span{display:none;}
  .selection-toolbar .st-btn{width:36px;padding:0;justify-content:center;}
}

/* 2026-08-27：预览弹窗：桌面端 stretch 全高，手机端保持 bottom-sheet */
.preview-overlay{align-items:stretch !important;padding:30px !important;}
@media (max-width:640px){
  .preview-overlay{align-items:flex-end !important;padding:0 !important;}
  .preview-overlay .modal{max-height:92vh;}
  #previewModalBox{max-height:92vh;display:flex;flex-direction:column;}
  #previewModalBox .preview-body{flex:1;min-height:0;}
}

/* 2026-08-27：safe-area 适配（灵动岛/底部手势条） */
.topbar{padding-top:calc(10px + env(safe-area-inset-top));}
.app{min-height:100dvh;}
@media (max-width:640px){
  .fab{bottom:calc(20px + env(safe-area-inset-bottom));}
}

/* ===== 2026-08-28：BUG 修复与三端/UI 优化 ===== */

/* 分享弹窗可从预览弹窗中打开 → 需叠在预览之上 */
.modal-overlay#shareModal{z-index:260;}

/* 回收站列表行操作按钮 */
.trash-actions.inline{display:flex;gap:6px;justify-content:flex-end;}
.trash-actions.inline .btn{width:auto;padding:6px 12px;font-size:12px;}

/* ---- 加载骨架屏 ---- */
.skel-card{
  border-radius:14px;border:1px solid var(--border);
  background:var(--tint-a);padding:13px;
  display:flex;flex-direction:column;gap:9px;min-height:118px;
}
.skel-line,.skel-block{
  position:relative;overflow:hidden;
  background:var(--tint-b);border-radius:7px;
}
.skel-block{height:52px;width:52px;border-radius:11px;}
.skel-line{height:10px;width:82%;}
.skel-line.short{width:48%;}
.skel-line.w40{width:36%;margin-left:auto;}
.skel-line::after,.skel-block::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.09) 50%,transparent 80%);
  transform:translateX(-100%);animation:shimmer 1.4s var(--ease) infinite;
}
[data-theme="light"] .skel-line::after,[data-theme="light"] .skel-block::after{
  background:linear-gradient(100deg,transparent 20%,rgba(0,0,0,.06) 50%,transparent 80%);
}
@keyframes shimmer{to{transform:translateX(100%);}}
@media (prefers-reduced-motion:reduce){.skel-line::after,.skel-block::after{animation:none;}}

/* ---- 空状态插画感（纯 CSS）---- */
.empty-icon{
  position:relative;
  background:
    radial-gradient(circle at 30% 25%, rgba(var(--accent-rgb),.16), transparent 65%),
    linear-gradient(135deg,var(--tint-b),var(--tint-a));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 14px 34px rgba(var(--accent-rgb),.14);
  color:rgba(var(--accent-rgb),.85);
}
.empty-icon::before,.empty-icon::after{
  content:'';position:absolute;border-radius:50%;
  border:2px dashed rgba(var(--accent-rgb),.28);
}
.empty-icon::before{width:98px;height:98px;top:-14px;left:-14px;opacity:.55;}
.empty-icon::after{
  width:10px;height:10px;right:-22px;bottom:4px;background:none;
  border-style:solid;border-color:rgba(var(--accent-rgb),.5);
  animation:list-in 2.4s var(--ease) infinite alternate;
}

/* ---- 手机端（<640px）：网格降级为单列、触摸目标 ≥40px、避免 iOS 聚焦缩放 ---- */
@media (max-width:640px){
  .grid{grid-template-columns:1fr;}
  /* 单列时文件卡转横向布局：图标 + 名称 + 次行元信息 */
  .file-card{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:11px 13px;}
  .file-card .file-icon{margin:0;width:42px;height:42px;border-radius:10px;flex-shrink:0;}
  .file-thumb{width:52px;height:52px;margin:0;border-radius:10px;flex-shrink:0;}
  .file-name{-webkit-line-clamp:1;display:block;white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:13.5px;}
  .file-meta{flex-basis:100%;margin:0;padding-left:54px;font-size:11px;}
  .file-icon + .file-name ~ .file-meta{padding-left:0;}
  .trash-actions{flex-basis:100%;justify-content:flex-end;margin-top:2px;}
  .file-card.selected{transform:none;}

  /* 触摸目标 */
  .sidebar-btn{min-height:40px;}
  .sidebar-label .icon-btn{width:28px;height:28px;}
  .ctx-item{min-height:44px;}
  .ctx-item svg{width:16px;height:16px;}
  .view-toggle button{width:38px;height:34px;}
  .crumb{padding:7px 8px;font-size:12.5px;}
  .move-opt{padding:12px 14px;min-height:44px;display:flex;align-items:center;}
  .selection-toolbar button{min-height:40px;padding:8px 12px;}
  .selection-toolbar button svg{width:15px;height:15px;}
  .modal-close{width:38px;height:38px;}
  .preview-head .pf-tools .icon-btn{width:40px !important;height:40px !important;}
  .pdf-toolbar button{width:38px;height:38px;}
  .drop-zone-title{font-size:13px;}

  /* 输入聚焦不触发 iOS 自动放大 */
  .search-wrap input,.modal .input,#inputModalField{font-size:16px;}
  #sharePwd,#shareExpire{font-size:16px;}
  .upload-list{width:min(420px,94vw);}
}

/* 平板端触摸目标兜底（平板常带触屏且无 hover） */
@media (hover:none) and (min-width:641px){
  .sidebar-btn{min-height:40px;}
  .view-toggle button{width:32px;height:30px;}
}

/* 列表视图表格小屏保留可读性：名称列不换行省略 */
@media (max-width:640px){
  .row-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52vw;}
  .list-table td{height:44px;}
}

/* 列表视图选中态（updateSelection 现已同步标记 tr） */
.list-table tbody tr.selected{background:rgba(var(--accent-rgb),.10);}
.list-table tbody tr.selected td:first-child{box-shadow:inset 3px 0 0 var(--blue);}

/* ========== 2026-08-28v3 精细打磨 ========== */
::selection{background:rgba(var(--accent-rgb),.35);color:inherit;}
*::-webkit-scrollbar{width:8px;height:8px;}
*::-webkit-scrollbar-track{background:transparent;}
*::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:8px;border:2px solid transparent;background-clip:content-box;}
*::-webkit-scrollbar-thumb:hover{background:var(--text3);border:2px solid transparent;background-clip:content-box;}
*{scrollbar-width:thin;scrollbar-color:var(--border-2) transparent;}

.btn-primary{
  background:var(--blue) !important;
  box-shadow:0 4px 14px rgba(var(--accent-rgb),.35),inset 0 1px 0 rgba(255,255,255,.18);
  border:none;
}
.btn{transition:transform .15s var(--ease),box-shadow .2s var(--ease),background .15s;}
.btn-primary:hover{box-shadow:0 6px 20px rgba(var(--accent-rgb),.45);transform:translateY(-1px);}
.btn-primary:active{transform:translateY(0) scale(.98);}

@media (hover:hover) and (min-width:769px){
  .file-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.1);}
}
.file-card{transition:transform .18s var(--ease),box-shadow .18s var(--ease),background .15s,border-color .15s;}

.search-wrap:focus-within{box-shadow:0 0 0 3px rgba(var(--accent-rgb),.18);border-radius:12px;}

@media (min-width:769px){
  .modal{border-radius:20px;box-shadow:0 24px 70px rgba(0,0,0,.3);}
}
.empty-state .empty-icon{animation:floaty 3.2s ease-in-out infinite;}
@keyframes floaty{0%,100%{transform:translateY(0);}50%{transform:translateY(-6px);}}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms !important;transition-duration:.01ms !important;}
}

/* ========== v4 2026-08-28：手机端导航整屏化 + 全站触控打磨 ========== */
.nav-mobile-head{display:none;}
@media (max-width:640px){
  /* 侧栏 = 独立整屏页面：全屏滑入，无遮罩无阴影叠加 */
  .sidebar{
    position:fixed;inset:0;z-index:80;width:100% !important;max-width:none !important;
    border-radius:0;transform:translateX(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1);
    padding-top:max(10px, env(safe-area-inset-top));
    overflow-y:auto;-webkit-overflow-scrolling:touch;
  }
  .sidebar.open{transform:none;box-shadow:none;}
  .sidebar-backdrop{display:none !important;}
  .nav-mobile-head{
    display:flex;align-items:center;gap:10px;
    padding:6px 12px 12px;font-size:15px;font-weight:600;color:var(--text);
  }
  .nav-back{
    display:flex;align-items:center;justify-content:center;
    width:38px;height:38px;border-radius:11px;border:1px solid var(--border);
    background:var(--card);color:var(--text);cursor:pointer;flex:0 0 auto;
  }
  .nav-back:active{transform:scale(.94);}
  /* 触控目标 ≥44px */
  .sidebar-btn{padding:12px 14px;font-size:14.5px;border-radius:12px;}
  .sidebar-btn svg{width:18px;height:18px;}
  .file-card{padding:12px;}
  /* 2026-08-29：统一单列横向卡片（此前双列 !important 与单列规则冲突挤压） */
  .file-name{font-size:13px;}
  /* FAB 避开手势条 */
  .fab{bottom:calc(18px + env(safe-area-inset-bottom));right:16px;width:54px;height:54px;}
  /* 主列表底部留白，避免被 FAB 挡住最后一行 */

  /* 面包屑可横向滚动 */
  .crumbs{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;}
  .crumbs::-webkit-scrollbar{display:none;}
  /* 模态：贴边全宽，输入框字号 ≥16px 防 iOS 缩放 */
  .modal-card{width:calc(100% - 24px) !important;max-height:86vh;border-radius:18px;}
  .modal-card input,.modal-card select,.modal-card textarea{font-size:16px !important;}
}
/* 全站：去点按高亮、滚动顺滑、键盘可达性 */
*{-webkit-tap-highlight-color:transparent;}
html{scroll-behavior:smooth;}
@media (min-width:641px){ .nav-mobile-head{display:none;} }
/* 修正：主内容容器实际类名为 .main */
@media (max-width:640px){ .main{padding-bottom:calc(88px + env(safe-area-inset-bottom));} }

/* ========== v4 登录页手机端：居中独立页面（不走弹窗底部抽屉样式） ========== */
@media (max-width:640px){
  #loginPage{align-items:center;justify-content:center;padding:0 20px;}
  #loginPage .glass{padding:34px 24px !important;max-width:360px;width:100%;border-radius:22px;}
  #loginPage .btn-primary{width:100%;height:48px;font-size:15px;border-radius:14px;}
  #loginPage .brand-icon{width:56px !important;height:56px !important;}
}

/* ========== 客户端 Office 预览（docx/xlsx 直渲染） ========== */
.docx-view{background:#fff;color:#222;padding:24px 18px;min-height:60vh;border-radius:10px;overflow-x:auto;}
.docx-view .docx-wrapper{background:#fff;padding:0;}
.xlsx-view{background:var(--card);border-radius:10px;padding:14px;max-width:100%;overflow-x:auto;}
.xlsx-sheet-title{font-weight:700;font-size:13px;margin:10px 0 6px;color:var(--text);}
.xlsx-view table{border-collapse:collapse;font-size:12px;margin-bottom:14px;max-width:100%;}
.xlsx-view td{border:1px solid var(--border-2,#ddd);padding:4px 8px;white-space:nowrap;color:var(--text);}

/* ========== v5 2026-08-28：手机端交互分流 + 底部固定元素避让 ========== */
@media (max-width:640px){
  /* 拖拽上传属鼠标设备，触屏隐藏（上传走 FAB） */
  #dropZone{display:none !important;}
  /* 固定在底部的元素全部抬到浏览器导航/手势条之上 */
  .upload-list{bottom:calc(88px + env(safe-area-inset-bottom));width:calc(100vw - 24px);}
  .selection-toolbar{bottom:calc(88px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);flex-wrap:wrap;justify-content:center;}
  .selection-toolbar button{padding:11px 12px;font-size:13px;}
  /* 右键菜单改为触屏样式 */
  .ctx-menu{min-width:min(220px, calc(100vw - 16px));}
  .ctx-item{padding:13px 14px;font-size:14px;}
  /* 弹窗内容可滚到底部按钮（不被浏览器工具栏遮住） */
  .modal{max-height:calc(100dvh - 32px);overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:calc(16px + env(safe-area-inset-bottom)) !important;}
  /* 顶栏主体也在安全区内 */
  .topbar{padding-top:max(8px, env(safe-area-inset-top));}
}

/* ========== 统一重绘图标集（纯 SVG mask，无 emoji，自动跟随文字颜色） ========== */
.i{display:inline-block;width:1.15em;height:1.15em;vertical-align:-0.22em;flex-shrink:0;background:currentColor;-webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat;}
button .i,.icon-btn .i{width:18px;height:18px;vertical-align:middle;}
.brand-icon .i,.big-icon .i,.empty-icon .i{width:60%;height:60%;}
.modal-close .i{width:16px;height:16px;}
[data-ico="menu"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18M3%2012h18M3%2018h18%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="x"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%206L6%2018M6%206l12%2012%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="plus"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="minus"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2012h14%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="check"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%206L9%2017l-5-5%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="search"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%227%22%2F%3E%3Cpath%20d%3D%22M21%2021l-4.3-4.3%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="user"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M4%2021c0-4%204-6%208-6s8%202%208%206%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="users"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%229%22%20cy%3D%228%22%20r%3D%223.5%22%2F%3E%3Cpath%20d%3D%22M2%2020c0-3.5%203-5%207-5s7%201.5%207%205M16%204.5a3.5%203.5%200%20010%206.5M22%2020c0-3-2-4.6-5-5%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="folder"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207a2%202%200%20012-2h4l2%202h8a2%202%200%20012%202v9a2%202%200%2001-2%202H5a2%202%200%2001-2-2z%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="file"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%202h8l4%204v14a2%202%200%2001-2%202H6a2%202%200%2001-2-2V4a2%202%200%20012-2z%22%2F%3E%3Cpath%20d%3D%22M14%202v6h6%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="note"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%202h8l4%204v14a2%202%200%2001-2%202H6a2%202%200%2001-2-2V4a2%202%200%20012-2z%22%2F%3E%3Cpath%20d%3D%22M14%202v6h6M9%2013h6M9%2017h4%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="upload"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2015v4a2%202%200%2001-2%202H5a2%202%200%2001-2-2v-4M17%208l-5-5-5%205M12%203v12%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="download"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2015v4a2%202%200%2001-2%202H5a2%202%200%2001-2-2v-4M7%2010l5%205%205-5M12%2015V3%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="trash"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18M8%206V4a2%202%200%20012-2h4a2%202%200%20012%202v2M19%206l-1%2014a2%202%200%2001-2%202H8a2%202%200%2001-2-2L5%206%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="pin"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2017v5M9%203h6l1%207%202.4%202.4a1.4%201.4%200%2001-1%202.4H6.6a1.4%201.4%200%2001-1-2.4L8%2010z%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="star"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%202l3.09%206.26L22%209.27l-5%204.87%201.18%206.88L12%2017.77l-6.18%203.25L7%2014.14%202%209.27l6.91-1.01z%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="eye"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M1%2012s4-7%2011-7%2011%207%2011%207-4%207-11%207S1%2012%201%2012z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="link"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M10%2013a5%205%200%20007.5.5l3-3a5%205%200%2000-7-7l-1.7%201.7M14%2011a5%205%200%2000-7.5-.5l-3%203a5%205%200%20007%207l1.7-1.7%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="clock"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22M12%207v5l3%203%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="tag"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20.6%2013.4L11%203H4v7l9.6%209.6a2%202%200%20002.8%200l4.2-4.2a2%202%200%20000-2.8z%22%2F%3E%3Ccircle%20cx%3D%227.5%22%20cy%3D%227.5%22%20r%3D%221%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="palette"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203a9%209%200%20000%2018h1.5a1.8%201.8%200%20001.8-1.8%201.8%201.8%200%20011.8-1.8H19a4%204%200%20004-4c0-5.5-5-10.4-11-10.4z%22%2F%3E%3Ccircle%20cx%3D%227.5%22%20cy%3D%2210.5%22%20r%3D%221%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%227.5%22%20r%3D%221%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%2216.5%22%20cy%3D%2210.5%22%20r%3D%221%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="shuffle"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%203h5v5M4%2020L21%203M21%2016v5h-5M15%2015l6%206M4%204l5%205%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="back"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M19%2012H5M12%2019l-7-7%207-7%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="chevl"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M15%2018l-6-6%206-6%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="chevr"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%2018l6-6-6-6%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="dots"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%225%22%20r%3D%221.8%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.8%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2219%22%20r%3D%221.8%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="table"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M3%209h18M9%209v12%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="code"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%2018l6-6-6-6M8%206l-6%206%206%206%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="hash"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%209h16M4%2015h16M10%203L8%2021M16%203l-2%2018%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="target"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%225%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="maximize"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%203H5a2%202%200%2000-2%202v3M16%203h3a2%202%200%20012%202v3M16%2021h3a2%202%200%20002-2v-3M8%2021H5a2%202%200%2001-2-2v-3%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="info"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22M12%208h.01M12%2012v4%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="music"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%2018V5l12-2v13%22%2F%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2218%22%20r%3D%223%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2216%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="key"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%227.5%22%20cy%3D%2215.5%22%20r%3D%224.5%22%2F%3E%3Cpath%20d%3D%22M10.7%2012.3L21%202M15%208l3%203%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="grid"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="list"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%206h13M8%2012h13M8%2018h13%22%2F%3E%3Cpath%20d%3D%22M3%206h.01M3%2012h.01M3%2018h.01%22%2F%3E%3C%2Fsvg%3E");}
[data-ico="inbox"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M22%2012h-6l-2%203h-4l-2-3H2M5%205h14l3%207v7a2%202%200%2001-2%202H4a2%202%200%2001-2-2v-7z%22%2F%3E%3C%2Fsvg%3E");}

/* ================================================================
   v12b 实体化主题层（修正版）—— 实色卡片，明暗主题各自取正确变量
   ================================================================ */
:root{--card-2:#2c2c2e;--solid-border:rgba(255,255,255,.09);}
@media (prefers-color-scheme:light){
  :root:not([data-theme=dark]){--card-2:#f2f2f7;--solid-border:rgba(0,0,0,.09);}
}
[data-theme=light]{--card-2:#f2f2f7;--solid-border:rgba(0,0,0,.09);}
[data-theme=dark]{--card-2:#2c2c2e;--solid-border:rgba(255,255,255,.09);}
/* 不再覆盖 --card / --glass-bg：直接沿用 design.css 的明暗取值 */

/* 主站同款背景辉光（纯装饰，不遮挡） */
body::before{content:'';position:fixed;width:120%;height:60%;top:-12%;left:50%;transform:translateX(-50%);
  background:radial-gradient(ellipse at center,rgba(10,132,255,.13) 0%,rgba(10,132,255,.05) 32%,transparent 62%);
  pointer-events:none;z-index:0;}

/* ================================================================
   PC 端独立适配（≥1024px，按 px 断点，与手机端规则完全分开）
   ================================================================ */
@media (min-width:1024px){
  .topbar{height:60px;padding:0 24px;}
  .sidebar{width:264px;}
  .note-row,.note-row *{font-size:inherit;}
  .note-row{padding:14px 18px;}
  .note-row h3{font-size:14.5px;}
  .note-row p{font-size:12.5px;}
  .ql-editor{font-size:15px;line-height:1.9;padding:32px 48px 80px;max-width:860px;}
  .modal{max-width:640px;}
  .ctx-menu{box-shadow:0 16px 44px rgba(0,0,0,.28);}
  /* 悬停反馈仅鼠标端启用 */
  .btn:hover{filter:brightness(1.08);}
  .note-row:hover{transform:translateX(2px);transition:transform .15s ease;}
  .icon-btn:hover{background:var(--card-2);}
}

/* ================================================================
   手机端独立适配（≤767px，与 PC 规则互不干涉）
   ================================================================ */
@media (max-width:767px){
  .topbar{height:auto;min-height:54px;padding:0 12px;padding-top:max(6px, env(safe-area-inset-top));}
  .note-row{padding:12px 14px;}
  .note-row h3{font-size:14px;}
  .note-row p{font-size:12px;}
  .ql-editor{font-size:14px;line-height:1.75;padding:16px 16px 48px;}
  .modal{width:calc(100vw - 20px) !important;max-height:calc(100dvh - 24px);overflow-y:auto;}
  /* 触控目标统一 ≥44px */
  .icon-btn{width:40px;height:40px;}
  .btn{min-height:46px;}
  .ctx-item{min-height:46px;display:flex;align-items:center;}
  .modal-close{width:40px;height:40px;}
}


/* ========== 弹窗美化：层次、标题、动效 ========== */
.modal-overlay{background:rgba(0,0,0,.55) !important;}
.modal,.modal-card{position:relative;border-radius:20px !important;animation:popIn .22s cubic-bezier(.2,.9,.3,1.2) !important;}
.modal-title h3,.modal h3{font-size:16px !important;font-weight:700 !important;margin:0;}
.modal-close{position:absolute;top:14px;right:14px;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--card-2);border:1px solid var(--solid-border);transition:transform .15s;}
.modal-close:hover{transform:rotate(90deg);}
.modal .btn{border-radius:12px;}
@keyframes popIn{from{opacity:0;transform:translateY(14px) scale(.96);}to{opacity:1;transform:none;}}
@media (max-width:767px){
  .modal{border-radius:18px !important;animation:sheetUp .25s cubic-bezier(.2,.9,.3,1.1) !important;}
  @keyframes sheetUp{from{transform:translateY(40px);opacity:.4;}to{transform:none;opacity:1;}}
}

/* ========== v12c 彩色图标修复 ========== */
.brand-icon .i{color:#fff !important;}
.brand-icon{background:var(--grad) !important;box-shadow:0 6px 18px rgba(var(--accent-rgb),.35) !important;}
.sidebar-btn .i{color:var(--text2);}
.sidebar-btn.active .i,.sidebar-btn[data-view="all"].active .i{color:var(--blue);}
.sidebar-btn[data-view="pinned"].active .i{color:var(--orange,#ff9f0a);}
.sidebar-btn[data-view="shared"].active .i{color:var(--green);}
.sidebar-btn[data-view="trash"].active .i{color:var(--red);}
.sidebar-btn[data-view="starred"].active .i{color:var(--orange,#ff9f0a);}
[data-ico="pin"].i{color:var(--orange,#ff9f0a);}
[data-ico="star"].i,.act-star .i{color:var(--orange,#ff9f0a);}
[data-ico="trash"].i,.btn-danger .i{color:var(--red);}
[data-ico="link"].i,.btn-primary .i{color:inherit;}
[data-ico="tag"].i{color:var(--blue);}
[data-ico="palette"].i{color:var(--purple,#bf5af2);}
[data-ico="users"].i{color:var(--green);}
[data-ico="clock"].i{color:var(--blue);}
[data-ico="upload"].i,[data-ico="download"].i{color:var(--blue);}
.empty-icon .i,.big-icon .i{width:44px !important;height:44px !important;color:var(--blue);opacity:.9;}
.btn .i{color:inherit;}
.icon-btn .i{color:var(--text2);}


/* ========== v13 2026-08-28 手机端终修层：侧边栏/面板/弹窗适配（最后加载，权威覆盖） ========== */
@media (max-width:640px){
  /* --- 弹窗：可滚动 + 安全区，撤销一切裁切 --- */
  .modal,.modal-card{
    overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;
    max-height:calc(100dvh - 24px);
    width:calc(100vw - 20px) !important;max-width:calc(100vw - 20px) !important;
    left:10px;right:10px;margin:auto;
    padding:18px 16px calc(18px + env(safe-area-inset-bottom)) !important;
    border-radius:18px !important;
  }
  .modal input,.modal select,.modal textarea,.modal-card input{font-size:16px !important;}
  .modal-close{width:34px;height:34px;top:10px;right:10px;z-index:2;}
  /* --- 侧边栏：整屏页，无缝无阴影边框 --- */
  .sidebar{
    position:fixed;inset:0;width:100vw !important;max-width:none !important;
    border:none !important;border-radius:0 !important;box-shadow:none !important;
    background:var(--bg,#0a0a0c);
    z-index:120;transform:translateX(-102%);
    transition:transform .28s cubic-bezier(.4,0,.2,1);
    padding-top:max(10px, env(safe-area-inset-top));
    overflow-y:auto;-webkit-overflow-scrolling:touch;
  }
  .sidebar.open{transform:none;}
  .topbar{border:none !important;border-bottom:1px solid var(--border);box-shadow:none !important;
    padding-top:max(8px, env(safe-area-inset-top)) !important;}
  .list-pane,.editor-pane{border:none !important;box-shadow:none !important;width:100% !important;}
  /* 触控目标 */
  .icon-btn,.sidebar-btn{min-width:40px;min-height:40px;}
  body::before{display:none;}
}
@media (min-width:768px){
  .modal{max-height:calc(100dvh - 48px);overflow-y:auto;overflow-x:hidden;}
}
@media (min-width:1024px){
  .modal-close:hover{background:var(--card-2);}
}


/* ========== v14 svg→.i 选择器映射（图标重绘后保持原定位/尺寸） ========== */
.brand-icon .i {width:18px;height:18px;}
  .brand-icon .i {width:16px;height:16px;}
.search-wrap .i {position:absolute;left:12px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--text3);pointer-events:none;}
.sidebar-btn .i {width:15px;height:15px;flex-shrink:0;}
  .sidebar-btn .i {width:18px;height:18px;}
.fab .i {width:22px;height:22px;}
  .fab .i {width:20px;height:20px;}
  .top-actions .icon-btn .i {width:15px;height:15px;}
  #sideToggle .i {width:14px;height:14px;}
  .top-actions .icon-btn .i {width:15px;height:15px;}
.search-wrap .i{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--text3);pointer-events:none;}
.search-wrap input{padding-left:34px;}

/* ========== v15 相册视图 + image 图标 ========== */
[data-ico="image"]{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22/%3E%3Ccircle%20cx%3D%228.5%22%20cy%3D%228.5%22%20r%3D%221.5%22/%3E%3Cpath%20d%3D%22M21%2015l-5-5L5%2021%22/%3E%3C/svg%3E");}
#albumGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:8px;flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;align-content:start;padding:0 14px 14px;}
.album-cell{position:relative;aspect-ratio:1;border-radius:12px;overflow:hidden;background:var(--card-2);cursor:pointer;border:none;padding:0;}
.album-cell img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s;}
.album-cell:hover img{transform:scale(1.06);}
.album-cell .album-name{position:absolute;left:0;right:0;bottom:0;padding:14px 8px 6px;font-size:11px;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.65));white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;}
@media (max-width:640px){#albumGrid{grid-template-columns:repeat(3,1fr);gap:6px;}}
#lightbox{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.94);display:none;align-items:center;justify-content:center;}
#lightbox.open{display:flex;}
#lightbox img.lb-img{max-width:94vw;max-height:82vh;object-fit:contain;border-radius:6px;}
.lb-btn{position:absolute;background:rgba(255,255,255,.12);border:none;color:#fff;width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:18px;}
.lb-btn:active{transform:scale(.92);}
#lbClose{top:calc(14px + env(safe-area-inset-top));right:14px;}
#lbPrev{left:10px;top:50%;transform:translateY(-50%);}
#lbNext{right:10px;top:50%;transform:translateY(-50%);}
#lbCount{position:absolute;top:calc(20px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);color:rgba(255,255,255,.85);font-size:13px;}
@media (max-width:640px){#lbPrev{left:6px}#lbNext{right:6px}}

.crumbs:empty{display:none !important;}

/* ========== 文件详情面板 ========== */
.info-body{padding:18px 20px 20px;}
.info-head{display:flex;align-items:center;gap:14px;margin-bottom:16px;}
.info-ico{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0;}
.info-ico svg{width:26px;height:26px;}
.info-cat-image{background:linear-gradient(135deg,#3b82f6,#60a5fa);}
.info-cat-video{background:linear-gradient(135deg,#8b5cf6,#a78bfa);}
.info-cat-audio{background:linear-gradient(135deg,#10b981,#34d399);}
.info-cat-office{background:linear-gradient(135deg,#f59e0b,#fbbf24);}
.info-cat-pdf{background:linear-gradient(135deg,#ef4444,#f87171);}
.info-cat-archive{background:linear-gradient(135deg,#a16207,#ca8a04);}
.info-cat-code{background:linear-gradient(135deg,#06b6d4,#22d3ee);}
.info-cat-other{background:linear-gradient(135deg,#64748b,#94a3b8);}
.info-name{font-size:16px;font-weight:700;word-break:break-all;line-height:1.4;}
.info-rows{border:1px solid var(--border, rgba(128,128,128,.2));border-radius:12px;overflow:hidden;}
.info-row{display:flex;padding:11px 14px;border-bottom:1px solid var(--border, rgba(128,128,128,.2));}
.info-row:last-child{border-bottom:none;}
.info-k{width:84px;color:var(--text3);font-size:13px;flex-shrink:0;}
.info-v{flex:1;font-size:13px;word-break:break-all;font-weight:500;}
.info-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;}

/* v16 深色主题页面底色跟随 */
html{background:var(--bg);}


/* ========== v17 平板统一（641-1023 抽屉机制，≥1024 桌面三栏） ========== */
@media (min-width:641px) and (max-width:1023px){
  .layout{grid-template-columns:1fr !important;flex:1;min-height:0;height:auto;}
  .app{height:100dvh;}
  .sidebar{
    position:fixed !important;left:-260px !important;top:56px;width:240px !important;
    height:calc(100dvh - 56px);z-index:45;background:var(--glass-bg);
    transition:left .28s var(--ease);box-shadow:0 0 30px rgba(0,0,0,.2);
    grid-column:1;grid-row:1;transform:none !important;
  }
  .sidebar.open{left:0 !important;}
  .sidebar-backdrop{position:fixed;inset:0;z-index:44;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .25s;}
  .sidebar-backdrop.show{opacity:1;pointer-events:auto;}
  .main{grid-column:1 !important;grid-row:1;min-height:0;}
  #sideToggle{display:flex !important;}
  .topbar{height:auto;min-height:54px;padding:0 12px;}
  .modal{width:calc(100vw - 20px) !important;max-height:calc(100dvh - 24px);overflow-y:auto;}
  .icon-btn{width:40px;height:40px;}
  .btn{min-height:46px;}
  .main-actions .btn-secondary{display:none;}
  .grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr)) !important;}
  #dropZone{position:relative;z-index:1;}
}
@media (min-width:1024px){
  .sidebar{position:static !important;left:auto !important;transform:none !important;width:264px;}
  .main{grid-column:2 !important;grid-row:1;}
  body{background:var(--bg);}
}

/* ========== v18 桌面列宽修正：侧栏 264px，网格列同步，消除压叠 ========== */
@media (min-width:1024px){
  .layout{grid-template-columns:264px 1fr !important;}
}

/* ========== v20 桌面视口锁定：应用恒为整屏，页面级滚动清零 ========== */
@media (min-width:1024px){
  html,body{height:100%;overflow:hidden;overscroll-behavior:none;}
  body{margin:0;}
  /* 2026-08-28z：不依赖 vh/dvh（国产内核/浏览器缩放计算偏差），直接钉满视口 */
  .app{position:fixed;left:0;top:0;width:100%;overflow:hidden;display:flex;flex-direction:column;}
}

/* 2026-08-28：641-767px 横屏手机/小平板顶栏双行（此前单行挤压搜索框） */
@media (max-width:767px) and (min-width:641px){
  .topbar{flex-wrap:wrap;padding:max(8px, env(safe-area-inset-top)) 12px 0;gap:6px 8px;min-height:0;}
  .brand{order:1;flex:0 0 auto;min-width:0;gap:8px;}
  .brand-sub{display:none;}
  .brand-name{font-size:14px;max-width:76px;overflow:hidden;text-overflow:ellipsis;}
  .brand-icon{width:32px;height:32px;border-radius:9px;}
  .brand-icon svg{width:16px;height:16px;}
  .top-actions{order:2;margin-left:auto;gap:4px;}
  .top-actions .icon-btn{width:32px;height:32px;border-radius:8px;}
  .top-actions .icon-btn svg{width:15px;height:15px;}
  .topbar-center{order:3;flex-basis:100%;margin:0 0 8px;max-width:none;}
  .search-wrap input{height:34px;font-size:13px;border-radius:9px;}
}

/* 2026-08-28：触屏端操作按钮放大到 36px（此前 26px 过小） */
@media (hover:none){
  .file-card .file-actions button{width:36px;height:36px;border-radius:10px;}
  .list-table .act-more{width:36px;height:36px;border-radius:9px;}
}

/* 2026-08-28：列表行"更多"按钮 */
.list-table .act-more{
  width:30px;height:30px;border-radius:8px;
  border:none;background:transparent;color:var(--text2);
  cursor:pointer;display:inline-flex;align-items:center;justify-content:center;
  transition:background .15s,color .15s;
}
.list-table .act-more:hover{background:var(--tint-b);color:var(--text);}
.list-table td:last-child{text-align:center;}

/* 2026-08-28：预览头部手机端紧凑 */
@media (max-width:640px){
  .preview-head{padding:10px 12px;}
  .preview-head .pf-icon{width:34px;height:34px;border-radius:10px;}
  .preview-head .pf-icon svg{width:16px;height:16px;}
  .preview-head .pf-name{font-size:13.5px;}
}

/* 2026-08-28：音频预览图标容器 */
.audio-visual{
  width:64px;height:64px;margin:0 auto 14px;border-radius:16px;
  background:var(--tint-b);color:var(--blue);
  display:flex;align-items:center;justify-content:center;
}
.audio-visual .i{width:30px;height:30px;}

/* ========== 自定义视频播放器（2026-08-28）========== */
.vp-wrap{
  position:relative;width:100%;max-width:100%;max-height:100%;
  background:#000;border-radius:12px;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
}
.vp-wrap video{width:100%;max-height:calc(92vh - 90px);object-fit:contain;outline:none;display:block;margin:auto;}
.vp-wrap:fullscreen{border-radius:0;height:100%;}
.vp-wrap:fullscreen video{max-height:100%;height:100%;}
/* 控制条 */
.vp-ui{
  position:absolute;left:0;right:0;bottom:0;
  background:linear-gradient(transparent, rgba(0,0,0,.75));
  padding:26px 12px 8px;
  opacity:0;transform:translateY(8px);
  transition:opacity .25s,transform .25s;
  pointer-events:none;
}
.vp-ui.show,.vp-ui.hover{opacity:1;transform:none;pointer-events:auto;}
/* 进度条 */
.vp-bar{
  position:relative;height:5px;border-radius:3px;
  background:rgba(255,255,255,.22);cursor:pointer;margin-bottom:8px;
  transition:height .15s;
}
.vp-bar:hover{height:7px;}
.vp-buffered{position:absolute;left:0;top:0;bottom:0;background:rgba(255,255,255,.3);border-radius:3px;}
.vp-fill{position:absolute;left:0;top:0;bottom:0;background:var(--blue);border-radius:3px;}
.vp-thumb{
  position:absolute;left:0;top:50%;width:12px;height:12px;border-radius:50%;
  background:#fff;transform:translate(0,-50%);
  box-shadow:0 1px 4px rgba(0,0,0,.5);
  transition:transform .15s;
}
.vp-bar:hover .vp-thumb{transform:translate(-50%,-50%) scale(1.25);}
.vp-tip{
  position:absolute;bottom:16px;transform:translateX(-50%);
  background:rgba(0,0,0,.8);color:#fff;font-size:11px;
  padding:2px 7px;border-radius:6px;white-space:nowrap;pointer-events:none;
}
/* 控制按钮行 */
.vp-ctrl{display:flex;align-items:center;gap:2px;}
.vp-btn{
  width:38px;height:38px;border:none;background:transparent;color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:8px;cursor:pointer;flex-shrink:0;
  transition:background .15s;
}
.vp-btn:hover{background:rgba(255,255,255,.18);}
.vp-btn.vp-speed{width:auto;padding:0 10px;font-size:13px;font-weight:600;font-family:inherit;}
.vp-time{color:rgba(255,255,255,.9);font-size:12px;font-variant-numeric:tabular-nums;padding:0 6px;white-space:nowrap;}
.vp-sp{flex:1;}
/* 加载 spinner */
.vp-loading{
  position:absolute;inset:0;display:none;align-items:center;justify-content:center;
  background:rgba(0,0,0,.35);z-index:2;
}
.vp-spinner{
  width:36px;height:36px;border-radius:50%;
  border:3px solid rgba(255,255,255,.25);border-top-color:var(--blue);
  animation:vp-spin .8s linear infinite;
}
@keyframes vp-spin{to{transform:rotate(360deg);}}
/* 错误提示 */
.vp-err{
  position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;
  gap:8px;background:rgba(0,0,0,.6);color:#fff;z-index:2;text-align:center;padding:20px;
}
.vp-err b{font-size:15px;}
.vp-err span{font-size:12px;color:rgba(255,255,255,.7);}
/* 触屏：控制条常显 */
@media (hover:none){
  .vp-ui{opacity:1;transform:none;pointer-events:auto;padding:18px 8px 6px;}
  .vp-btn{width:44px;height:44px;}
}
/* 手机端 */
@media (max-width:640px){
  .vp-wrap{border-radius:10px;}
  .vp-btn{width:40px;height:40px;}
  .vp-time{font-size:11px;}
}

/* 2026-08-28：触控目标放大 ≥44px */
@media (max-width:640px){
  .pdf-toolbar button{width:44px;height:44px;}
  .vp-btn{width:44px !important;height:44px !important;}
  .view-toggle button{width:40px;height:40px;}
}

/* 2026-08-28：列表收藏星标 */
.row-star{color:var(--orange,#ff9f0a);font-size:12px;}
.badge-share,.badge-conv{display:inline-block;margin-left:6px;font-size:10px;line-height:1.4;padding:1px 6px;border-radius:5px;vertical-align:1px;}
.badge-share{background:rgba(48,209,88,.12);color:var(--green);}
.badge-conv{background:rgba(10,132,255,.12);color:var(--blue);}

/* 2026-08-29：深色模式 Prism 代码高亮 token（默认主题为白底设计，深底不可读） */
[data-theme="dark"] .preview-body pre .token.comment,[data-theme="dark"] .preview-body pre .token.prolog,[data-theme="dark"] .preview-body pre .token.doctype,[data-theme="dark"] .preview-body pre .token.cdata{color:#8e8e93;}
[data-theme="dark"] .preview-body pre .token.punctuation{color:#c7c7cc;}
[data-theme="dark"] .preview-body pre .token.property,[data-theme="dark"] .preview-body pre .token.tag,[data-theme="dark"] .preview-body pre .token.boolean,[data-theme="dark"] .preview-body pre .token.number,[data-theme="dark"] .preview-body pre .token.constant,[data-theme="dark"] .preview-body pre .token.symbol,[data-theme="dark"] .preview-body pre .token.deleted{color:#ff6b8a;}
[data-theme="dark"] .preview-body pre .token.selector,[data-theme="dark"] .preview-body pre .token.attr-name,[data-theme="dark"] .preview-body pre .token.string,[data-theme="dark"] .preview-body pre .token.char,[data-theme="dark"] .preview-body pre .token.builtin,[data-theme="dark"] .preview-body pre .token.inserted{color:#30d158;}
[data-theme="dark"] .preview-body pre .token.operator,[data-theme="dark"] .preview-body pre .token.entity,[data-theme="dark"] .preview-body pre .token.url,[data-theme="dark"] .preview-body pre .language-css .token.string,[data-theme="dark"] .preview-body pre .style .token.string{color:#5ac8fa;}
[data-theme="dark"] .preview-body pre .token.atrule,[data-theme="dark"] .preview-body pre .token.attr-value,[data-theme="dark"] .preview-body pre .token.keyword{color:#bf5af2;}
[data-theme="dark"] .preview-body pre .token.function,[data-theme="dark"] .preview-body pre .token.class-name{color:#ff9f0a;}
[data-theme="dark"] .preview-body pre .token.regex,[data-theme="dark"] .preview-body pre .token.important,[data-theme="dark"] .preview-body pre .token.variable{color:#ffd60a;}

/* 2026-08-29：打印样式（桌面 .app fixed 会只打印一屏） */
@media print{
  body{background:#fff !important;}
  .topbar,.sidebar,.fab,.selection-toolbar,.upload-list,.drop-zone,.bg-orbs,.theme-wrap{display:none !important;}
  .app{position:static !important;height:auto !important;overflow:visible !important;display:block !important;}
  .layout{display:block !important;height:auto !important;}
  .main{overflow:visible !important;height:auto !important;}
  #grid,#list{overflow:visible !important;height:auto !important;display:block !important;}
  .file-card,.file-icon{break-inside:avoid;}
}

/* 2026-08-29：预览内容不被 flex 压缩变形（PDF/图片放大时） */
.preview-body > img,.preview-body > canvas,.preview-body > video{flex:none;}
