/* =========================================================
   云链 · 直链网盘
   深色极简 / 细腻过渡 / 参考现代文件站体验
   ========================================================= */

:root {
  --bg: #121415;
  --bg-deep: #0d0f10;
  --surface: rgba(30, 34, 36, 0.82);
  --surface-solid: #1e2224;
  --surface-2: #252a2d;
  --surface-3: #2c3236;
  --surface-glass: rgba(30, 34, 36, 0.7);
  --modal-bg: linear-gradient(180deg, #212629 0%, #1b1f21 100%);
  --menu-bg: rgba(33, 38, 41, 0.96);
  --toast-bg: rgba(32, 37, 40, 0.97);
  --input-bg: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.065);
  --line-2: rgba(255, 255, 255, 0.115);
  --text: #eef2f4;
  --text-2: #c4cdd3;
  --muted: #8c969e;
  --faint: #626c74;
  --accent: #4d8dff;
  --accent-2: #8ab5ff;
  --accent-deep: #2f6fed;
  --accent-soft: rgba(77, 141, 255, 0.13);
  --accent-border: rgba(77, 141, 255, 0.34);
  --danger: #ff7373;
  --danger-soft: rgba(255, 107, 107, 0.12);
  --danger-border: rgba(255, 107, 107, 0.25);
  --success: #54d6a4;
  --success-soft: rgba(84, 214, 164, 0.12);
  --warning: #f0b35d;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.42), 0 2px 10px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 14px 38px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 5px 16px rgba(0, 0, 0, 0.2);
  --topbar-bg: rgba(18, 20, 21, 0.78);
  --preview-bg: rgba(8, 10, 11, 0.94);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.2, 1.25, 0.4, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f1f4f7;
  --bg-deep: #e8edf2;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-2: #f5f8fb;
  --surface-3: #eaf0f6;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --modal-bg: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  --menu-bg: rgba(255, 255, 255, 0.97);
  --toast-bg: rgba(255, 255, 255, 0.98);
  --input-bg: rgba(15, 23, 42, 0.025);
  --line: rgba(15, 23, 42, 0.07);
  --line-2: rgba(15, 23, 42, 0.12);
  --text: #111821;
  --text-2: #3b4856;
  --muted: #687584;
  --faint: #96a1ae;
  --accent: #2f6fed;
  --accent-2: #245ed0;
  --accent-deep: #1e56c8;
  --accent-soft: rgba(47, 111, 237, 0.085);
  --accent-border: rgba(47, 111, 237, 0.26);
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, 0.075);
  --danger-border: rgba(229, 72, 77, 0.2);
  --success: #14996a;
  --success-soft: rgba(20, 153, 106, 0.09);
  --warning: #b7791f;
  --shadow-lg: 0 24px 70px rgba(31, 50, 81, 0.11), 0 2px 10px rgba(31, 50, 81, 0.04);
  --shadow-md: 0 14px 38px rgba(31, 50, 81, 0.1);
  --shadow-sm: 0 5px 16px rgba(31, 50, 81, 0.07);
  --topbar-bg: rgba(241, 244, 247, 0.82);
  --preview-bg: rgba(238, 242, 246, 0.96);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -16%, rgba(77, 141, 255, 0.145), transparent 68%),
    radial-gradient(680px 420px at 96% 8%, rgba(119, 91, 255, 0.05), transparent 70%);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(900px 520px at 50% -16%, rgba(47, 111, 237, 0.09), transparent 68%),
    radial-gradient(680px 420px at 96% 8%, rgba(129, 104, 255, 0.035), transparent 70%);
}

::selection {
  background: rgba(77, 141, 255, 0.32);
  color: var(--text);
}

h1, h2, h3, p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--faint);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic .fill,
.fill {
  fill: currentColor;
  stroke: none;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent-deep);
  color: #fff;
  font-size: 13px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

.shell {
  width: min(920px, calc(100% - 40px));
  margin-inline: auto;
}

/* ---------- 背景光晕 ---------- */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.orb-a {
  width: 560px;
  height: 560px;
  top: -300px;
  left: 14%;
  background: #2f6fed;
  opacity: 0.13;
  animation: drift-a 26s ease-in-out infinite alternate;
}

.orb-b {
  width: 460px;
  height: 460px;
  top: 34%;
  right: -260px;
  background: #5a76ff;
  opacity: 0.075;
  animation: drift-b 32s ease-in-out infinite alternate;
}

[data-theme="light"] .orb-a {
  opacity: 0.07;
}

[data-theme="light"] .orb-b {
  opacity: 0.045;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.topbar.scrolled {
  background: var(--topbar-bg);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

[data-theme="light"] .topbar.scrolled {
  box-shadow: 0 10px 30px rgba(31, 50, 81, 0.055);
}

.topbar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #5b9aff 0%, #2f6fed 74%);
  color: #fff;
  box-shadow: 0 7px 20px rgba(47, 111, 237, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s ease;
  flex: none;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand:hover .brand-mark {
  transform: rotate(-7deg) scale(1.055);
  box-shadow: 0 9px 26px rgba(47, 111, 237, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.05;
}

.brand-name {
  font-size: 16.5px;
  font-weight: 760;
  letter-spacing: 0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  margin-top: 4px;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.22em;
  color: var(--faint);
  white-space: nowrap;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.search-trigger {
  width: 228px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  font-size: 12.5px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease;
}

[data-theme="light"] .search-trigger {
  background: rgba(255, 255, 255, 0.72);
}

.search-trigger:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
}

.search-trigger:focus-visible {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.search-trigger .ic {
  width: 16px;
  height: 16px;
}

.search-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
}

.search-kbd,
.kbd {
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  line-height: 1.1;
  white-space: nowrap;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.15s ease;
  flex: none;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn .ic {
  width: 18px;
  height: 18px;
}

.icon-btn.tiny {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.icon-btn.tiny .ic {
  width: 15px;
  height: 15px;
}

.avatar-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #5b9aff, #345fd7);
  color: #fff;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 5px 16px rgba(47, 111, 237, 0.3);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}

.avatar-btn:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 7px 20px rgba(47, 111, 237, 0.4);
}

.avatar-btn.small {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.status-dot {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg);
}

/* ---------- 顶部进度条 ---------- */

.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.top-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
}

.top-progress.active {
  opacity: 1;
}

.top-progress.active span {
  animation: progress-run 1.4s ease-in-out infinite;
}

/* ---------- 公告 / 页头 ---------- */

.announce {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 13px;
  border: 1px solid var(--accent-border);
  border-radius: 13px;
  background: linear-gradient(120deg, var(--accent-soft), transparent 72%);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.65;
  animation: fade-down 0.4s var(--ease) both;
}

.announce-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.announce-icon .ic {
  width: 14px;
  height: 14px;
}

.announce p {
  flex: 1;
  min-width: 0;
  white-space: pre-line;
  padding-top: 1px;
}

.announce .icon-btn {
  margin: -3px -3px 0 0;
  color: var(--muted);
}

.page-head {
  margin-top: 34px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}

.crumbs::-webkit-scrollbar {
  display: none;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  transition: color 0.16s ease;
  flex: none;
}

.crumb:hover {
  color: var(--text);
}

.crumb.current {
  color: var(--text-2);
  font-weight: 600;
}

.crumb .ic {
  width: 13px;
  height: 13px;
}

.crumb-sep {
  color: var(--faint);
  display: inline-flex;
  flex: none;
}

.crumb-sep .ic {
  width: 11px;
  height: 11px;
}

/* ---------- 主卡片 ---------- */

.surface {
  margin-top: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-glass);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  overflow: hidden;
  animation: surface-in 0.5s var(--ease) both;
}

[data-theme="light"] .surface {
  box-shadow: var(--shadow-lg);
}

.toolbar {
  min-height: 59px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.toolbar-left {
  gap: 10px;
}

.toolbar-right {
  gap: 6px;
}

.toolbar-divider {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.item-count {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 7px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11.5px;
  transition: color 0.16s, background 0.16s;
}

.sort-btn:hover,
.sort-btn[aria-expanded="true"] {
  background: var(--surface-2);
  color: var(--text-2);
}

.sort-btn .chev {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.sort-btn[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

[data-theme="light"] .segmented {
  background: rgba(15, 23, 42, 0.025);
}

.segmented button {
  width: 30px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--faint);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.segmented button .ic {
  width: 15px;
  height: 15px;
}

.segmented button:hover {
  color: var(--text-2);
}

.segmented button.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.17);
}

[data-theme="light"] .segmented button.active {
  background: #fff;
  box-shadow: 0 2px 7px rgba(31, 50, 81, 0.1);
}

.btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.btn .ic {
  width: 15px;
  height: 15px;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  cursor: default;
  opacity: 0.65;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #5293ff 0%, #2f6fed 80%);
  box-shadow: 0 7px 18px rgba(47, 111, 237, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 9px 23px rgba(47, 111, 237, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

[data-theme="light"] .btn-ghost {
  background: rgba(15, 23, 42, 0.025);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--text);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff7b7b, #e5484d);
  box-shadow: 0 7px 18px rgba(229, 72, 77, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-danger:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-sm {
  height: 32px;
  padding: 0 11px;
  font-size: 11.5px;
  border-radius: 9px;
}

.btn-block {
  width: 100%;
  height: 44px;
  border-radius: 11px;
  font-size: 13px;
}

.toolbar-action {
  height: 34px;
}

/* ---------- 文件列表 ---------- */

.list-area {
  min-height: 180px;
}

.list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 142px 76px;
  gap: 16px;
  align-items: center;
  padding: 13px 20px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--faint);
  text-transform: uppercase;
}

.list-head .lh-actions {
  text-align: right;
}

.file-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 142px 76px;
  gap: 16px;
  align-items: center;
  min-height: 65px;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  animation: row-in 0.46s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 24ms);
  transition: background 0.17s ease;
}

.file-row:hover,
.file-row.is-menu {
  background: rgba(255, 255, 255, 0.032);
}

[data-theme="light"] .file-row:hover,
[data-theme="light"] .file-row.is-menu {
  background: rgba(47, 111, 237, 0.035);
}

.file-row:active {
  background: rgba(255, 255, 255, 0.05);
}

.file-main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.file-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 11px;
  color: #8e9ba5;
  background: rgba(142, 155, 165, 0.08);
  transition: transform 0.28s var(--ease-spring), background 0.2s,
    border-color 0.2s;
}

.file-icon .ic {
  width: 19px;
  height: 19px;
}

.file-row:hover .file-icon,
.file-card:hover .file-icon {
  transform: translateY(-1px) scale(1.035);
}

.file-icon[data-kind="folder"] {
  color: #6ea8ff;
  background: rgba(77, 141, 255, 0.115);
  border-color: rgba(77, 141, 255, 0.17);
}

.file-icon[data-kind="folder"] .ic {
  fill: currentColor;
  fill-opacity: 0.16;
}

.file-icon[data-kind="image"] {
  color: #55d6a8;
  background: rgba(84, 214, 164, 0.1);
  border-color: rgba(84, 214, 164, 0.16);
}

.file-icon[data-kind="video"] {
  color: #a995ff;
  background: rgba(169, 149, 255, 0.1);
  border-color: rgba(169, 149, 255, 0.16);
}

.file-icon[data-kind="audio"] {
  color: #f0b35d;
  background: rgba(240, 179, 93, 0.1);
  border-color: rgba(240, 179, 93, 0.16);
}

.file-icon[data-kind="pdf"] {
  color: #ff8585;
  background: rgba(255, 115, 115, 0.1);
  border-color: rgba(255, 115, 115, 0.16);
}

.file-icon[data-kind="archive"] {
  color: #f2b24e;
  background: rgba(242, 178, 78, 0.1);
  border-color: rgba(242, 178, 78, 0.16);
}

.file-icon[data-kind="doc"] {
  color: #68a8ff;
  background: rgba(104, 168, 255, 0.1);
  border-color: rgba(104, 168, 255, 0.16);
}

.file-icon[data-kind="sheet"] {
  color: #42d4a0;
  background: rgba(66, 212, 160, 0.1);
  border-color: rgba(66, 212, 160, 0.16);
}

.file-icon[data-kind="slide"] {
  color: #fb9b60;
  background: rgba(251, 155, 96, 0.1);
  border-color: rgba(251, 155, 96, 0.16);
}

.file-icon[data-kind="code"] {
  color: #6ed9e8;
  background: rgba(110, 217, 232, 0.1);
  border-color: rgba(110, 217, 232, 0.16);
}

.file-icon[data-kind="text"] {
  color: #a9b8c5;
  background: rgba(169, 184, 197, 0.09);
  border-color: rgba(169, 184, 197, 0.15);
}

.file-info {
  min-width: 0;
  flex: 1;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13.6px;
  font-weight: 545;
  color: var(--text);
}

.file-name .name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row.is-dir .file-name {
  font-weight: 600;
}

.ext-badge {
  flex: none;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 4px 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
}

.file-sub {
  display: none;
  margin-top: 3px;
  font-size: 10.8px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size,
.file-date {
  font-size: 11.8px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.17s ease, transform 0.2s var(--ease);
}

.file-row:hover .file-actions,
.file-row:focus-within .file-actions,
.file-card:hover .file-actions,
.file-card:focus-within .file-actions {
  opacity: 1;
  transform: none;
}

.row-action {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.row-action .ic {
  width: 15px;
  height: 15px;
}

.row-action:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.file-list .file-row:first-child {
  border-top: 0;
}

/* 网格 */

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 11px;
  padding: 14px;
}

.file-card {
  position: relative;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
  animation: card-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 24ms);
  transition: transform 0.25s var(--ease), border-color 0.2s ease,
    background 0.2s ease, box-shadow 0.25s ease;
}

[data-theme="light"] .file-card {
  background: rgba(255, 255, 255, 0.68);
}

.file-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

[data-theme="light"] .file-card:hover {
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 50, 81, 0.09);
}

.file-card:active {
  transform: translateY(-1px) scale(0.995);
}

.card-thumb {
  position: relative;
  height: 86px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(130px 80px at 50% 0%, rgba(255, 255, 255, 0.035), transparent 70%),
    rgba(255, 255, 255, 0.022);
}

[data-theme="light"] .card-thumb {
  background:
    radial-gradient(130px 80px at 50% 0%, rgba(47, 111, 237, 0.035), transparent 70%),
    rgba(15, 23, 42, 0.018);
}

.card-thumb .file-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.card-thumb .file-icon .ic {
  width: 23px;
  height: 23px;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.file-card:hover .card-thumb img {
  transform: scale(1.045);
}

.card-actions {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  display: flex;
  gap: 2px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.16s, transform 0.16s;
}

.card-actions .row-action {
  width: 27px;
  height: 27px;
  background: rgba(10, 13, 15, 0.52);
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .card-actions .row-action {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-2);
  border-color: var(--line-2);
}

.card-actions .row-action:hover {
  background: var(--accent-deep);
  color: #fff;
  border-color: transparent;
}

.card-body {
  padding: 10px 3px 3px;
  min-width: 0;
}

.card-name {
  font-size: 12.4px;
  font-weight: 560;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.file-card.is-dir .card-name {
  font-weight: 620;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 10.2px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta i {
  width: 2px;
  height: 2px;
  background: var(--faint);
  border-radius: 50%;
  flex: none;
}

/* 空状态 / 错误 */

.empty-state {
  padding: 76px 24px 82px;
  text-align: center;
  animation: fade-up 0.45s var(--ease) both;
}

.empty-art {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto 21px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, var(--accent-soft), transparent 68%);
  color: var(--accent);
  animation: float-soft 4.8s ease-in-out infinite;
}

.empty-art::before,
.empty-art::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px dashed var(--line);
  border-radius: 50%;
  opacity: 0.7;
}

.empty-art::after {
  inset: -19px;
  opacity: 0.35;
}

.empty-art .ic {
  width: 37px;
  height: 37px;
  stroke-width: 1.35;
}

.empty-art.danger {
  color: var(--danger);
  background: radial-gradient(circle at 50% 34%, var(--danger-soft), transparent 68%);
}

.empty-title {
  font-size: 16px;
  font-weight: 660;
  letter-spacing: -0.01em;
}

.empty-desc {
  margin: 7px auto 0;
  max-width: 360px;
  font-size: 12.3px;
  line-height: 1.7;
  color: var(--muted);
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 19px;
  flex-wrap: wrap;
}

/* 骨架 */

.skeleton-wrap {
  padding: 8px 0;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.skeleton-row:last-child {
  border-bottom: 0;
}

.sk {
  display: block;
  border-radius: 7px;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.035) 30%,
    rgba(255, 255, 255, 0.075) 50%,
    rgba(255, 255, 255, 0.035) 70%
  );
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

[data-theme="light"] .sk {
  background: linear-gradient(
    100deg,
    rgba(15, 23, 42, 0.035) 30%,
    rgba(15, 23, 42, 0.075) 50%,
    rgba(15, 23, 42, 0.035) 70%
  );
  background-size: 220% 100%;
}

.sk-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex: none;
}

.sk-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sk-line {
  height: 9px;
}

.sk-line.w1 { width: 34%; }
.sk-line.w2 { width: 48%; }
.sk-line.w3 { width: 26%; }

.sk-meta {
  width: 65px;
  height: 9px;
  flex: none;
}

/* ---------- 页脚 ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 46px;
  color: var(--faint);
  font-size: 11.3px;
  text-align: center;
}

.footer-dot {
  color: var(--line-2);
}

.footer-link {
  color: var(--muted);
  font-size: inherit;
  border-bottom: 1px dotted transparent;
  transition: color 0.16s, border-color 0.16s;
}

.footer-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-border);
}

.footer-stats {
  color: var(--faint);
}

.footer-version {
  color: var(--faint);
  opacity: 0.7;
  font-size: 10px;
}

/* ---------- 遮罩与弹窗 ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 8, 10, 0.62);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  opacity: 0;
  transition: opacity 0.22s ease;
  overflow-y: auto;
}

[data-theme="light"] .overlay {
  background: rgba(25, 37, 52, 0.35);
}

.overlay.is-open {
  opacity: 1;
}

.overlay.is-closing {
  opacity: 0;
}

body.modal-open {
  overflow: hidden;
}

.modal-card {
  position: relative;
  width: min(430px, 100%);
  padding: 27px;
  border: 1px solid var(--line-2);
  border-radius: 21px;
  background: var(--modal-bg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 2px 0 rgba(255, 255, 255, 0.03) inset;
  transform: translateY(14px) scale(0.972);
  opacity: 0;
  transition: transform 0.34s var(--ease-spring), opacity 0.25s ease;
}

[data-theme="light"] .modal-card {
  box-shadow: 0 30px 80px rgba(31, 50, 81, 0.2), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.overlay.is-open .modal-card {
  transform: none;
  opacity: 1;
}

.overlay.is-closing .modal-card {
  transform: translateY(8px) scale(0.985);
  opacity: 0;
}

.modal-card.compact {
  width: min(420px, 100%);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.16s, color 0.16s;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal-close .ic {
  width: 16px;
  height: 16px;
}

.modal-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
}

.modal-icon.accent {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.modal-icon.danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.modal-icon .ic {
  width: 22px;
  height: 22px;
}

.modal-card h2 {
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.018em;
}

.modal-desc {
  margin: 6px 0 19px;
  font-size: 12.2px;
  line-height: 1.68;
  color: var(--muted);
  word-break: break-word;
}

.form {
  display: flex;
  flex-direction: column;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 13px;
}

.field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.field input,
.field select {
  width: 100%;
  height: 43px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.field select {
  cursor: pointer;
  padding-right: 34px;
}

.field input::placeholder {
  color: var(--faint);
}

.field input:hover,
.field select:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .field input:hover,
[data-theme="light"] .field select:hover {
  border-color: rgba(15, 23, 42, 0.2);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-error {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid var(--danger-border);
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11.6px;
  line-height: 1.55;
  animation: shake 0.36s ease;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 7px;
}

.login-foot {
  margin-top: 17px;
  font-size: 10px;
  line-height: 1.75;
  color: var(--faint);
  word-break: break-word;
}

.login-foot code {
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--muted);
  white-space: nowrap;
}

.spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.form.is-loading .spinner,
.btn.is-loading .spinner {
  display: inline-block;
}

.form.is-loading .btn-label,
.btn.is-loading .btn-label {
  opacity: 0.7;
}

.form.is-loading button {
  pointer-events: none;
}

/* ---------- 搜索面板 ---------- */

#searchOverlay {
  align-items: flex-start;
  padding-top: max(78px, 11vh);
}

.palette {
  width: min(640px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--modal-bg);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transform: translateY(-12px) scale(0.985);
  opacity: 0;
  transition: transform 0.32s var(--ease-spring), opacity 0.22s ease;
}

[data-theme="light"] .palette {
  box-shadow: 0 30px 90px rgba(31, 50, 81, 0.2);
}

#searchOverlay.is-open .palette {
  transform: none;
  opacity: 1;
}

#searchOverlay.is-closing .palette {
  transform: translateY(-7px) scale(0.99);
  opacity: 0;
}

.palette-head {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.palette-head .ic {
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.palette-head input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14.5px;
  color: var(--text);
}

.palette-head input::placeholder {
  color: var(--faint);
}

.palette-results {
  max-height: min(54vh, 430px);
  overflow-y: auto;
  padding: 6px;
}

.palette-hint {
  padding: 53px 20px 57px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.palette-hint .hint-art {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}

.palette-hint .ic {
  width: 22px;
  height: 22px;
}

.search-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 9px;
  border-radius: 10px;
  text-align: left;
  transition: background 0.12s;
}

.search-result:hover,
.search-result.selected {
  background: var(--accent-soft);
}

.search-result .file-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.search-result .file-icon .ic {
  width: 17px;
  height: 17px;
}

.sr-text {
  flex: 1;
  min-width: 0;
}

.sr-name {
  font-size: 12.8px;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sr-name mark {
  color: var(--accent);
  background: transparent;
  font-weight: 700;
}

.sr-path {
  margin-top: 2px;
  font-size: 10.3px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sr-kind {
  flex: none;
  font-size: 9.5px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
}

.search-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.search-empty .ic {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  color: var(--faint);
}

.search-loading {
  padding: 38px 20px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}

.palette-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 41px;
  padding: 0 15px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.3px;
}

.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.palette-foot kbd {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font);
  font-size: 9px;
}

.palette-foot-tip {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 分享 ---------- */

.share-card {
  width: min(536px, 100%);
}

.share-file {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0 16px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
}

.share-file .file-icon {
  width: 38px;
  height: 38px;
}

.share-file-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.share-file-info strong {
  font-size: 12.8px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-file-info span {
  font-size: 10.5px;
  color: var(--muted);
}

.share-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 44vh;
  overflow-y: auto;
  padding-right: 2px;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-label {
  width: 73px;
  flex: none;
  font-size: 10.7px;
  color: var(--muted);
}

.share-value {
  flex: 1;
  min-width: 0;
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 10.7px;
  line-height: 33px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--input-bg);
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.copy-btn .ic {
  width: 14px;
  height: 14px;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.copy-btn.copied {
  color: var(--success);
  border-color: var(--success);
  background: var(--success-soft);
}

.share-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 14px;
  font-size: 10.2px;
  line-height: 1.65;
  color: var(--faint);
}

.share-tip .ic {
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

/* ---------- 菜单 ---------- */

.menu-card {
  position: fixed;
  z-index: 120;
  min-width: 178px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--menu-bg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: menu-in 0.14s ease-out both;
  transform-origin: top left;
}

.menu-card button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 12.2px;
  text-align: left;
  transition: background 0.13s, color 0.13s;
}

.menu-card button .ic {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.menu-card button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.menu-card button.danger,
.menu-card button.danger .ic {
  color: var(--danger);
}

.menu-card button.danger:hover {
  background: var(--danger-soft);
}

.menu-card button:disabled {
  opacity: 0.4;
  cursor: default;
}

.menu-card button .check {
  margin-left: auto;
  color: var(--accent);
  opacity: 0;
  width: 14px;
  height: 14px;
}

.menu-card button.selected .check {
  opacity: 1;
}

.menu-sep {
  height: 1px;
  margin: 5px 7px;
  background: var(--line);
}

.admin-menu {
  min-width: 202px;
}

.admin-menu-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px 9px;
}

.admin-menu-head > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.admin-menu-head strong {
  font-size: 12.3px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-menu-head span:not(.avatar-btn) {
  font-size: 10px;
  color: var(--faint);
}

/* 右键菜单专用 */

.context-menu {
  position: fixed;
  z-index: 121;
  min-width: 186px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--menu-bg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: menu-in 0.14s ease-out both;
  transform-origin: top left;
}

.context-menu button {
  width: 100%;
  height: 33px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 12.2px;
  text-align: left;
}

.context-menu button .ic {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.context-menu button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.context-menu button.danger,
.context-menu button.danger .ic {
  color: var(--danger);
}

.context-menu button.danger:hover {
  background: var(--danger-soft);
}

.context-menu .menu-sep {
  margin: 4px 7px;
}

/* ---------- 预览 ---------- */

.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--preview-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  animation: fade-in 0.22s ease both;
}

.preview-overlay:focus {
  outline: none;
}

.preview-overlay.is-closing {
  animation: fade-out 0.18s ease both;
}

.preview-head {
  height: 66px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(8, 10, 11, 0.4);
}

[data-theme="light"] .preview-head {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.preview-title .file-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .preview-title .file-icon {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text-2);
}

.preview-title .file-icon .ic {
  width: 17px;
  height: 17px;
}

.preview-title-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-title-text strong {
  color: #fff;
  font-size: 12.8px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="light"] .preview-title-text strong {
  color: var(--text);
}

.preview-title-text span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 10.3px;
}

[data-theme="light"] .preview-title-text span {
  color: var(--muted);
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.preview-actions .icon-btn {
  color: rgba(255, 255, 255, 0.6);
}

.preview-actions .icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .preview-actions .icon-btn {
  color: var(--muted);
}

[data-theme="light"] .preview-actions .icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

.preview-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 78px;
}

.preview-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.preview-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 7px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  animation: preview-zoom 0.35s var(--ease) both;
}

.preview-stage video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  animation: preview-zoom 0.35s var(--ease) both;
}

.preview-stage iframe {
  width: min(1000px, 100%);
  height: 100%;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  animation: preview-zoom 0.35s var(--ease) both;
}

.audio-card {
  width: min(430px, 100%);
  padding: 31px 26px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 21px;
  background:
    radial-gradient(320px 180px at 50% 0%, rgba(77, 141, 255, 0.2), transparent 70%),
    rgba(22, 26, 29, 0.88);
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  animation: preview-zoom 0.35s var(--ease) both;
}

[data-theme="light"] .audio-card {
  background:
    radial-gradient(320px 180px at 50% 0%, rgba(47, 111, 237, 0.1), transparent 70%),
    #fff;
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.audio-art {
  width: 104px;
  height: 104px;
  margin: 0 auto 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(140deg, #5b9aff, #345fd7 65%, #6c53f2);
  box-shadow: 0 14px 40px rgba(47, 111, 237, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
}

.audio-art::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  animation: spin 22s linear infinite;
}

.audio-art .ic {
  width: 38px;
  height: 38px;
}

.audio-card h3 {
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  word-break: break-word;
}

[data-theme="light"] .audio-card h3 {
  color: var(--text);
}

.audio-card p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
}

[data-theme="light"] .audio-card p {
  color: var(--muted);
}

.audio-card audio {
  width: 100%;
  margin-top: 22px;
  height: 38px;
}

.text-preview {
  width: min(920px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(12, 15, 17, 0.7);
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  animation: preview-zoom 0.35s var(--ease) both;
}

[data-theme="light"] .text-preview {
  border-color: var(--line);
  background: #fff;
}

.text-preview-head {
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  letter-spacing: 0.02em;
}

[data-theme="light"] .text-preview-head {
  border-bottom-color: var(--line);
  color: var(--muted);
}

.text-copy {
  height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  transition: background 0.15s, color 0.15s;
}

.text-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

[data-theme="light"] .text-copy {
  border-color: var(--line-2);
  color: var(--muted);
}

[data-theme="light"] .text-copy:hover {
  background: var(--surface-2);
  color: var(--text);
}

.text-preview pre {
  flex: 1;
  margin: 0;
  padding: 20px 22px 28px;
  overflow: auto;
  color: #d3dce3;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.78;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

[data-theme="light"] .text-preview pre {
  color: var(--text-2);
}

.preview-fallback {
  max-width: 390px;
  text-align: center;
  padding: 30px;
  animation: preview-zoom 0.35s var(--ease) both;
}

.preview-fallback .file-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.preview-fallback .file-icon .ic {
  width: 31px;
  height: 31px;
}

[data-theme="light"] .preview-fallback .file-icon {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text-2);
}

.preview-fallback h3 {
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  word-break: break-word;
}

[data-theme="light"] .preview-fallback h3 {
  color: var(--text);
}

.preview-fallback p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11.5px;
  line-height: 1.7;
}

[data-theme="light"] .preview-fallback p {
  color: var(--muted);
}

.preview-fallback .btn {
  margin-top: 19px;
}

.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
  transition: background 0.17s, color 0.17s, transform 0.17s;
}

[data-theme="light"] .preview-nav {
  border-color: var(--line-2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

.preview-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

[data-theme="light"] .preview-nav:hover {
  background: #fff;
  color: var(--text);
}

.preview-nav.prev {
  left: 20px;
}

.preview-nav.next {
  right: 20px;
}

.preview-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.preview-foot {
  height: 45px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.36);
  font-size: 10.2px;
}

[data-theme="light"] .preview-foot {
  border-top-color: var(--line);
  color: var(--faint);
}

#previewPath {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-hint {
  white-space: nowrap;
}

/* ---------- 上传 ---------- */

.drop-overlay {
  position: fixed;
  inset: 14px;
  z-index: 70;
  display: grid;
  place-items: center;
  border: 2px dashed var(--accent);
  border-radius: 22px;
  background: rgba(11, 16, 25, 0.72);
  backdrop-filter: blur(14px);
  pointer-events: none;
  animation: fade-in 0.17s ease both;
}

[data-theme="light"] .drop-overlay {
  background: rgba(241, 246, 255, 0.82);
}

.drop-box {
  text-align: center;
  color: var(--text);
  padding: 30px;
}

.drop-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 17px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(140deg, #5b9aff, #2f6fed);
  box-shadow: 0 14px 38px rgba(47, 111, 237, 0.35);
  animation: float-soft 1.7s ease-in-out infinite;
}

.drop-icon .ic {
  width: 30px;
  height: 30px;
}

.drop-box strong {
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.drop-box p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.upload-tray {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 75;
  width: 352px;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--menu-bg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
  animation: slide-up 0.35s var(--ease) both;
}

.upload-head {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 11px 0 14px;
  border-bottom: 1px solid var(--line);
}

.upload-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 11.8px;
}

.upload-title strong {
  font-weight: 620;
  white-space: nowrap;
}

.upload-title > span:last-child {
  color: var(--muted);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-pulse {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(77, 141, 255, 0.45);
  animation: pulse-ring 1.5s ease-out infinite;
}

.upload-head-actions {
  display: flex;
  gap: 1px;
}

.upload-list {
  max-height: 258px;
  overflow-y: auto;
}

.upload-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.upload-item:last-child {
  border-bottom: 0;
}

.upload-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.4px;
}

.upload-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
}

.upload-state {
  flex: none;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.upload-state.ok {
  color: var(--success);
}

.upload-state.err {
  color: var(--danger);
}

.upload-bar {
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.upload-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.upload-item.done .upload-bar span {
  background: var(--success);
}

.upload-item.error .upload-bar span {
  background: var(--danger);
}

.upload-tray.collapsed .upload-list {
  display: none;
}

.upload-tray.collapsed #uploadCollapse .ic {
  transform: rotate(180deg);
}

#uploadCollapse .ic {
  transition: transform 0.2s;
}

/* ---------- FAB ---------- */

.fab-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 55;
  display: none;
}

.fab {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #5b9aff, #2f6fed);
  box-shadow: 0 12px 32px rgba(47, 111, 237, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.2s;
}

.fab:active {
  transform: scale(0.94);
}

.fab .ic {
  width: 22px;
  height: 22px;
  transition: transform 0.25s var(--ease-spring);
}

.fab-wrap.open .fab .ic {
  transform: rotate(45deg);
}

.fab-menu {
  position: absolute;
  right: 0;
  bottom: 61px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
  animation: fade-up 0.2s var(--ease) both;
}

.fab-menu button {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--menu-bg);
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
  font-size: 11.8px;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}

.fab-menu button .ic {
  width: 15px;
  height: 15px;
}

/* ---------- Toast ---------- */

.toast-region {
  position: fixed;
  top: 84px;
  right: 22px;
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--toast-bg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  animation: toast-in 0.34s var(--ease-spring) both;
}

.toast.out {
  animation: toast-out 0.24s ease forwards;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

.toast-icon .ic {
  width: 12px;
  height: 12px;
}

.toast.success .toast-icon {
  background: var(--success-soft);
  color: var(--success);
}

.toast.error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast-msg {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast-close {
  flex: none;
  color: var(--faint);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
}

.toast-close:hover {
  color: var(--text);
  background: var(--surface-2);
}

/* ---------- 动画 ---------- */

@keyframes drift-a {
  from { transform: translate3d(-3%, 0, 0) scale(1); }
  to { transform: translate3d(5%, 38px, 0) scale(1.08); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-40px, -30px, 0) scale(1.1); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes row-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(9px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes surface-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-3px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(14px) scale(0.97); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes preview-zoom {
  from { opacity: 0; transform: scale(0.972); }
  to { opacity: 1; transform: none; }
}

@keyframes shimmer {
  from { background-position: 180% 0; }
  to { background-position: -60% 0; }
}

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(77, 141, 255, 0.4); }
  70% { box-shadow: 0 0 0 7px rgba(77, 141, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 141, 255, 0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes progress-run {
  0% { transform: scaleX(0); opacity: 1; }
  55% { transform: scaleX(0.62); opacity: 1; }
  100% { transform: scaleX(0.94); opacity: 0.6; }
}

/* ---------- 响应式 ---------- */

@media (hover: none) {
  .file-actions,
  .card-actions {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 28px);
  }

  .topbar-inner {
    height: 64px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-sub {
    display: none;
  }

  .head-actions {
    gap: 4px;
  }

  .search-trigger {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .search-label,
  .search-kbd {
    display: none;
  }

  .page-head {
    margin-top: 25px;
  }

  .surface {
    border-radius: 17px;
  }

  .toolbar {
    padding: 9px 12px;
  }

  .toolbar-divider {
    display: none;
  }

  .toolbar-left {
    gap: 7px;
  }

  .toolbar-right {
    gap: 4px;
  }

  .toolbar-action {
    height: 33px;
    padding: 0 10px;
  }

  .file-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 63px;
    padding: 10px 13px;
  }

  .list-head,
  .file-size,
  .file-date {
    display: none;
  }

  .file-sub {
    display: block;
  }

  .file-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .file-icon .ic {
    width: 18px;
    height: 18px;
  }

  .file-name {
    font-size: 13.2px;
  }

  .file-actions {
    opacity: 1;
    transform: none;
  }

  .file-actions .share-action {
    display: none;
  }

  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 9px;
    padding: 10px;
  }

  .card-thumb {
    height: 78px;
  }

  .empty-state {
    padding: 61px 18px 67px;
  }

  .empty-art {
    width: 82px;
    height: 82px;
    margin-bottom: 18px;
  }

  .empty-art .ic {
    width: 32px;
    height: 32px;
  }

  .announce {
    margin-top: 16px;
  }

  .site-footer {
    margin: 28px 0 34px;
  }

  .overlay {
    padding: 14px;
  }

  .modal-card {
    padding: 23px;
    border-radius: 18px;
  }

  .modal-actions .btn {
    flex: 1;
  }

  .share-value {
    font-size: 10.2px;
  }

  .share-label {
    width: 62px;
  }

  .preview-head {
    height: 60px;
    padding: 0 10px 0 13px;
    gap: 8px;
  }

  .preview-actions {
    gap: 2px;
  }

  .preview-actions .icon-btn {
    width: 33px;
    height: 33px;
  }

  .preview-actions .btn-sm {
    width: 33px;
    padding: 0;
  }

  .preview-actions .btn-sm span {
    display: none;
  }

  .preview-title-text strong {
    max-width: 40vw;
  }

  .preview-body {
    padding: 10px;
  }

  .preview-nav {
    width: 35px;
    height: 35px;
    background: rgba(15, 18, 20, 0.48);
  }

  .preview-nav.prev {
    left: 12px;
  }

  .preview-nav.next {
    right: 12px;
  }

  .preview-foot {
    padding: 0 14px;
  }

  .preview-hint {
    display: none;
  }

  .text-preview pre {
    padding: 16px 14px 22px;
    font-size: 11.5px;
  }

  .upload-tray {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }

  .toast-region {
    top: 72px;
    right: 12px;
    left: auto;
  }

  .fab-wrap {
    display: block;
  }

  .fab-wrap[hidden] {
    display: none !important;
  }

  .admin-menu {
    right: 10px;
  }

  .palette-foot-tip {
    display: none !important;
  }

  #searchOverlay {
    padding-top: 10px;
  }

  .palette-results {
    max-height: calc(100vh - 170px);
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 15.2px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .avatar-btn {
    width: 34px;
    height: 34px;
  }

  .toolbar {
    gap: 8px;
  }

  .toolbar-action span {
    display: none;
  }

  .toolbar-action {
    width: 34px;
    padding: 0;
  }

  .toolbar-action .ic {
    width: 16px;
    height: 16px;
  }

  .segmented button {
    width: 28px;
  }

  .item-count {
    font-size: 11px;
  }

  .sort-btn {
    font-size: 11px;
  }

  .file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-thumb {
    height: 84px;
  }

  .empty-title {
    font-size: 15px;
  }

  .modal-card h2 {
    font-size: 18px;
  }

  .login-foot {
    font-size: 9.5px;
  }

  .login-foot code {
    display: inline-block;
    white-space: normal;
    word-break: break-all;
  }

  .share-row {
    gap: 5px;
  }

  .share-label {
    width: 54px;
    font-size: 10px;
  }

  .copy-btn {
    width: 32px;
    height: 32px;
  }

  .share-value {
    height: 33px;
    line-height: 31px;
    padding: 0 7px;
  }

  .preview-actions #previewExternal {
    display: none;
  }

  .preview-title-text strong {
    max-width: 34vw;
  }

  .preview-title-text span {
    display: none;
  }

  .preview-title .file-icon {
    display: none;
  }

  .preview-foot {
    font-size: 9.5px;
  }

  .preview-foot #previewPath {
    max-width: 82%;
  }

  .site-footer {
    font-size: 10.5px;
    gap: 6px;
  }

  .footer-version {
    display: none;
  }

  .announce {
    font-size: 11.8px;
  }
}

@media (max-width: 380px) {
  .shell {
    width: calc(100% - 22px);
  }

  .topbar-inner {
    height: 60px;
  }

  .head-actions .icon-btn#themeBtn {
    display: none;
  }

  .file-grid {
    gap: 7px;
    padding: 8px;
  }

  .card-thumb {
    height: 74px;
  }
}

/* ---------- 可访问性 / 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .topbar,
  .toolbar,
  .site-footer,
  .fab-wrap,
  .file-actions,
  .announce {
    display: none !important;
  }

  .surface {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
