:root {
  --paper: #fff;
  --ink: #111;
  --muted: #757575;
  --line: #e8e8e8;
  --soft: #f5f5f5;
  --max: 760px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { background: #f1f1f1; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
.site { width: 100%; max-width: var(--max); min-height: 100vh; margin: 0 auto; background: var(--paper); }
.page { padding: 0 18px 88px; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 18px; border-bottom: 1px solid rgba(232,232,232,.88); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.brand { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.top-action, .icon-button { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 0; background: transparent; cursor: pointer; }
.top-action svg, .icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.search-wrap { padding: 16px 18px 4px; }
.search { display: flex; align-items: center; height: 44px; padding: 0 14px; border: 1px solid #dcdcdc; border-radius: 12px; background: white; }
.search:focus-within { border-color: #111; }
.search svg { width: 18px; margin-right: 10px; fill: none; stroke: #555; stroke-width: 1.7; }
.search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; }
.search input::placeholder { color: #9a9a9a; }
.section { margin-top: 30px; }
.section:first-child { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.section-title { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.025em; }
.section-meta { font-size: 12px; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px 8px; }
.category-card { display: block; min-width: 0; }
.category-cover { position: relative; overflow: hidden; aspect-ratio: 1; margin-bottom: 7px; border-radius: 11px; background: var(--soft); }
.category-cover img { width: 100%; height: 100%; object-fit: cover; }
.category-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: #aaa; font-size: 28px; }
.category-name { overflow: hidden; margin: 0; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 560; }
.category-count { overflow: hidden; margin-top: 3px; color: var(--muted); text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.asset-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px 9px; }
.asset-card { display: block; min-width: 0; width: 100%; margin: 0; }
.asset-image { overflow: hidden; aspect-ratio: 1; border-radius: 11px; background: var(--soft); }
.asset-image img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.asset-name { overflow: hidden; margin: 7px 2px 0; color: #272727; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; line-height: 1.4; }
.crumbs { display: flex; overflow-x: auto; gap: 6px; padding: 15px 0 2px; scrollbar-width: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs a:last-child { color: var(--ink); }
.crumb-sep { color: #b9b9b9; }
.page-heading { margin: 22px 0 6px; font-size: 25px; line-height: 1.2; letter-spacing: -.04em; }
.page-subtitle { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.empty { padding: 64px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.detail { padding-bottom: 110px; }
.detail-preview { overflow: hidden; margin: 0; border-radius: 13px; background: var(--soft); }
.detail-preview img { width: 100%; height: auto; }
.detail-body { padding-top: 22px; }
.detail-name { margin: 0; overflow-wrap: anywhere; font-size: 19px; font-weight: 600; line-height: 1.45; letter-spacing: -.02em; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 20px; margin: 22px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.meta-value { font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.tag { padding: 6px 9px; background: var(--soft); color: #333; font-size: 11px; }
.download-bar { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.download-bar-inner { max-width: calc(var(--max) - 36px); margin: auto; }
.primary-button { display: grid; width: 100%; height: 48px; place-items: center; border: 1px solid var(--ink); border-radius: 11px; background: var(--ink); color: white; font-weight: 600; cursor: pointer; }
.outline-button { display: grid; width: 100%; height: 44px; place-items: center; border: 1px solid #cfcfcf; border-radius: 11px; background: white; cursor: pointer; }
.bottom-nav { position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
.bottom-nav-inner { display: grid; grid-template-columns: repeat(4,1fr); max-width: var(--max); height: 64px; margin: auto; }
.nav-item { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: #8a8a8a; font-size: 10px; }
.nav-item.active { color: var(--ink); }
.nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.55; }
.login-page { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 32px 22px; }
.login-box { width: 100%; max-width: 360px; }
.login-mark { width: 42px; height: 42px; margin-bottom: 30px; background: var(--ink); }
.login-title { margin: 0 0 8px; font-size: 28px; letter-spacing: -.045em; }
.login-copy { margin: 0 0 36px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.field { margin-bottom: 17px; }
.field label { display: block; margin-bottom: 7px; color: #333; font-size: 12px; }
.field input, .field select { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #d8d8d8; border-radius: 9px; outline: 0; background: white; }
.field input:focus, .field select:focus { border-color: #111; }
.form-error { min-height: 22px; margin-top: 12px; color: #555; font-size: 12px; }
.login-help { margin: 22px 0 0; color: #999; text-align: center; font-size: 11px; }
.account-block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.account-label { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.account-value { font-size: 16px; }
.device { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.device-name { font-size: 13px; }
.device-time { margin-top: 4px; color: var(--muted); font-size: 11px; }
.loading { display: grid; min-height: 55vh; place-items: center; color: var(--muted); font-size: 13px; }
.toast { position: fixed; z-index: 100; right: 18px; bottom: 82px; left: 18px; max-width: 500px; margin: auto; padding: 12px 14px; background: #111; color: white; text-align: center; font-size: 12px; }
.home-category-section { min-height: 44vh; }
.home-category-section .category-count { display: none; }
.home-popular-section { margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (min-width: 761px) {
  body { box-shadow: 0 0 0 1px #e6e6e6; }
  .site { box-shadow: 0 0 0 1px #e5e5e5; }
  .asset-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .category-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

/* Admin */
.admin-shell { min-height: 100vh; background: #fafafa; }
.admin-header { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 24px; border-bottom: 1px solid var(--line); background: white; }
.admin-main { max-width: 1120px; margin: auto; padding: 30px 24px 80px; }
.admin-tabs { display: flex; overflow-x: auto; gap: 25px; margin-bottom: 30px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-tab { padding: 0 0 13px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.admin-tab.active { border-color: var(--ink); color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 20px; border: 1px solid var(--line); background: white; }
.stat-number { font-size: 27px; letter-spacing: -.04em; }
.stat-label { margin-top: 7px; color: var(--muted); font-size: 12px; }
.admin-card { margin-top: 20px; padding: 22px; border: 1px solid var(--line); background: white; }
.admin-card h2 { margin: 0 0 20px; font-size: 17px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compact-button { height: 38px; padding: 0 13px; border: 1px solid #d3d3d3; border-radius: 9px; background: white; cursor: pointer; font-size: 12px; }
.member-list { display: grid; gap: 10px; }
.member-row { padding: 16px; border: 1px solid var(--line); background: white; }
.member-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-qq { font-weight: 620; }
.status { padding: 4px 7px; background: var(--soft); font-size: 10px; }
.member-meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 9px 0 13px; color: var(--muted); font-size: 11px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice { margin-bottom: 18px; padding: 15px; border: 1px solid #111; background: white; white-space: pre-wrap; font-size: 12px; line-height: 1.7; }
.tree-row { display: flex; align-items: center; justify-content: space-between; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tree-count { color: var(--muted); font-size: 11px; }
.upload-zone { padding: 28px; border: 1px dashed #bcbcbc; text-align: center; }
.upload-zone input { max-width: 100%; }
.progress { height: 2px; margin-top: 18px; background: #e5e5e5; }
.progress > div { height: 100%; width: 0; background: #111; transition: width .2s; }
.admin-copy { margin: 0; color: #666; font-size: 13px; line-height: 1.8; }
.flush-card { margin-top: 0; }
.explorer { border: 1px solid var(--line); background: white; }
.explorer-head { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.folder-breadcrumbs { display: flex; min-width: 0; align-items: center; gap: 8px; overflow-x: auto; white-space: nowrap; }
.folder-breadcrumbs button { padding: 4px 0; border: 0; background: transparent; cursor: pointer; font-size: 12px; }
.folder-breadcrumbs span { color: #aaa; }
.explorer-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; min-height: 520px; }
.folder-main { min-width: 0; padding: 20px; border-right: 1px solid var(--line); }
.folder-properties { padding: 20px; background: #fafafa; }
.folder-properties h3 { margin: 0 0 16px; font-size: 15px; }
.folder-properties form { margin-bottom: 18px; }
.folder-properties .field { margin-bottom: 9px; }
.root-properties { display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); text-align: center; }
.root-properties p { max-width: 160px; font-size: 12px; line-height: 1.7; }
.new-folder { display: flex; gap: 8px; margin-bottom: 20px; }
.new-folder input { min-width: 0; flex: 1; height: 38px; padding: 0 11px; border: 1px solid #d3d3d3; border-radius: 9px; outline: 0; }
.new-folder input:focus { border-color: #111; }
.folder-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px 12px; }
.folder-card { min-width: 0; padding: 0; border: 0; background: white; text-align: left; cursor: pointer; }
.folder-cover { display: grid; overflow: hidden; aspect-ratio: 1; margin-bottom: 8px; border-radius: 11px; place-items: center; background: var(--soft); }
.folder-cover img, .property-cover img { width: 100%; height: 100%; object-fit: cover; }
.folder-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 580; }
.folder-info { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.folder-icon { position: relative; display: block; width: 56px; height: 38px; border: 1px solid #bcbcbc; background: white; }
.folder-icon::before { position: absolute; top: -8px; left: -1px; width: 23px; height: 8px; border: 1px solid #bcbcbc; border-bottom: 0; background: white; content: ""; }
.folder-icon.large { width: 72px; height: 48px; }
.folder-icon.large::before { width: 30px; }
.property-cover { display: grid; overflow: hidden; width: 100%; aspect-ratio: 1; margin-bottom: 20px; border-radius: 11px; place-items: center; background: #eee; }
.full-small { width: 100%; margin-top: -2px; }
.property-actions { display: grid; gap: 8px; margin-top: 24px; }
.danger-button { color: #555; }
.leaf-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.leaf-head h2 { margin: 0; font-size: 18px; }
.leaf-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.upload-here { width: auto; min-width: 150px; padding: 0 18px; }
.explorer-empty { display: grid; min-height: 240px; place-items: center; color: var(--muted); text-align: center; font-size: 12px; }
.admin-file-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px 10px; }
.admin-file { position: relative; min-width: 0; }
.admin-file-image { overflow: hidden; aspect-ratio: 1; border-radius: 10px; background: var(--soft); }
.admin-file-image img { width: 100%; height: 100%; object-fit: cover; }
.admin-file-name { overflow: hidden; margin-top: 7px; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.admin-file-meta { overflow: hidden; margin-top: 3px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.file-check { position: absolute; z-index: 3; top: 7px; left: 7px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; background: rgba(255,255,255,.92); cursor: pointer; }
.file-check input { width: 14px; height: 14px; margin: 0; accent-color: #111; }
.file-delete { position: absolute; z-index: 3; top: 7px; right: 7px; display: grid; width: 24px; height: 24px; padding: 0; place-items: center; border: 0; border-radius: 7px; background: rgba(255,255,255,.92); cursor: pointer; font-size: 18px; line-height: 1; }
.file-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 15px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.trash-list { display: grid; gap: 0; margin-top: 24px; border-top: 1px solid var(--line); }
.trash-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.trash-symbol { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #d5d5d5; border-radius: 9px; color: #777; font-size: 20px; }
.trash-info { min-width: 0; }
.trash-info strong, .trash-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-info strong { font-size: 13px; }
.trash-info span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.upload-zone { display: grid; min-height: 190px; place-items: center; align-content: center; gap: 14px; transition: background .15s, border-color .15s; }
.upload-zone.dragging { border-color: #111; background: #f5f5f5; }
#selected-files { max-width: 560px; color: #777; font-size: 12px; line-height: 1.7; }
#selected-files strong { display: block; margin-bottom: 8px; color: #111; }
.upload-fields { margin-top: 20px; }
.check-row { display: flex; gap: 8px; align-items: center; margin: 0 0 18px; font-size: 12px; }
@media (max-width: 620px) {
  .admin-header { padding: 0 16px; }
  .admin-main { padding: 22px 16px 70px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .admin-card { padding: 17px; }
  .explorer-body { grid-template-columns: 1fr; }
  .folder-main { border-right: 0; border-bottom: 1px solid var(--line); padding: 15px; }
  .folder-properties { padding: 16px; }
  .folder-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-file-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .leaf-head { align-items: flex-start; flex-direction: column; }
  .upload-here { width: 100%; }
  .trash-row { grid-template-columns: 38px minmax(0,1fr); }
  .trash-row .row-actions { grid-column: 1 / -1; }
}
