@charset "UTF-8";
/* ============================================================
   oss-lite 视觉样式（浅色萌系主题）
   体系说明：
   - 仅保留浅色主题：天空蓝到奶油白的底色渐变，樱花粉作点缀
   - 全部颜色、阴影、圆角、动效收敛为 :root 设计变量
   - 圆角整体加大一档：按钮/输入 12px，卡片 16px，大容器 22px，登录卡 28px
   - 动效：入场弹跳、吉祥物浮动、拖拽摇摆、进度光泽、按钮回弹，
     全部随 prefers-reduced-motion 降级关闭
   - 图标统一 24 栅格线性风格（stroke-width 2、圆角端点）
   ============================================================ */

/* ---------- 设计变量（浅色） ---------- */
:root {
  color-scheme: light;

  /* 品牌色（亮蓝） */
  --accent: #7180e5;
  --accent-strong: #5664c6;
  --accent-soft: rgba(113, 128, 229, .13);
  --accent-ring: rgba(113, 128, 229, .22);
  --grad-brand: linear-gradient(135deg, #74c9f1, #8580e8);

  /* 樱花粉点缀 */
  --pink: #ef7ea8;
  --pink-ring: rgba(239, 126, 168, .28);
  --blush: #ffc2d8;

  /* 中性色 */
  --bg: #edf7ff;
  --card: #fffdf9;
  --tile: #f1efff;
  --text: #2c3555;
  --text-sub: #5f6e89;
  --line: #e1e7f3;
  --line-strong: #cbd7e9;

  /* 语义色 */
  --danger: #d95063;
  --danger-soft: rgba(217, 80, 99, .1);
  --ok: #2f9d78;

  /* 阴影（柔雾蓝调） */
  --shadow-sm: 0 3px 10px rgba(74, 100, 151, .08);
  --shadow-md: 0 16px 34px rgba(74, 100, 151, .15), 0 3px 9px rgba(74, 100, 151, .07);
  --shadow-brand: 0 11px 24px rgba(88, 105, 204, .25);

  /* 顶栏毛玻璃 */
  --topbar-bg: rgba(255, 252, 246, .96);

  /* 圆角与动效 */
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;
  --speed: .2s;
  --ease: cubic-bezier(.3, .7, .3, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- 基础与重置 ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

html, body { margin: 0; padding: 0; }

body {
  /* 极浅天空蓝到奶油白的主底渐变，四角晕开一点粉与蓝 */
  background:
    radial-gradient(620px 390px at 4% -5%, rgba(255, 192, 218, .3), transparent 66%),
    radial-gradient(840px 520px at 96% 4%, rgba(117, 202, 241, .28), transparent 64%),
    linear-gradient(180deg, #e5f5ff 0%, #f3f2ff 50%, #fff9f1 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

svg { display: block; }

::selection { background: rgba(240, 107, 164, .22); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: #c2d4ea; }

.hidden { display: none !important; }

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

/* 数字统一等宽对齐（用量、百分比、时间） */
.badge, .progress-pct, .file-sub { font-variant-numeric: tabular-nums; }

/* ---------- 关键帧 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 吉祥物缓慢上下浮动 */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* 登录页白云横向缓漂 */
@keyframes drift {
  from { transform: translateX(-3vw); }
  to   { transform: translateX(3vw); }
}

/* 拖入文件时上传图标左右摇摆 */
@keyframes wiggle {
  0%, 100% { transform: translateY(-3px) rotate(0deg); }
  25%      { transform: translateY(-3px) rotate(-8deg); }
  75%      { transform: translateY(-3px) rotate(8deg); }
}

/* 文件卡片入场：轻微弹跳上滑 */
@keyframes pop-in {
  0%   { opacity: 0; transform: translateY(14px) scale(.95); }
  62%  { opacity: 1; transform: translateY(-3px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  padding: 12px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease),
              color var(--speed) var(--ease), box-shadow var(--speed) var(--ease),
              transform .18s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { cursor: wait; transform: none; box-shadow: none; background: #e7eaf2; color: #3f4a68; }

/* 主按钮（登录） */
.btn.primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, #5366ca, #4052a5);
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #4b5ebc, #394b9b);
  box-shadow: 0 12px 28px rgba(63, 85, 167, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn.primary:active {
  transform: translateY(0) scale(.985);
  box-shadow: 0 5px 14px rgba(63, 135, 245, .3), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn.primary:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.btn.primary:disabled { background: #e7eaf2; color: #3f4a68; box-shadow: none; opacity: 1; }

/* 描边按钮（刷新等） */
.btn.ghost {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--text-sub);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn.small { padding: 7px 13px; font-size: 13px; }
.btn .btn-ico { width: 15px; height: 15px; flex: none; }

/* 图标按钮（顶栏退出） */
.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease),
              transform .18s var(--ease-out);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); transform: scale(1.06); }
.icon-btn:active { transform: scale(.97); }

/* ---------- 登录页 ---------- */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 28px 20px calc(28px + var(--safe-bottom));
  background:
    radial-gradient(640px 340px at 14% 6%, rgba(255, 200, 224, .42), transparent 62%),
    radial-gradient(720px 420px at 88% 12%, rgba(150, 198, 255, .5), transparent 66%),
    linear-gradient(180deg, #cde9ff 0%, #e8f5ff 46%, #fdf4e9 100%);
}

/* 背景层：漂浮的白云剪影 */
.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cloud {
  position: absolute;
  fill: rgba(255, 255, 255, .92);
  filter: drop-shadow(0 8px 16px rgba(110, 150, 200, .2));
}
.cloud.c1 { width: 150px; height: 150px; top: 13%; left: 7%; opacity: .9;  animation: drift 46s ease-in-out infinite alternate; }
.cloud.c2 { width: 100px; height: 100px; top: 58%; right: 9%; opacity: .72; animation: drift 58s ease-in-out infinite alternate-reverse; }
.cloud.c3 { width: 68px;  height: 68px;  top: 22%; right: 21%; opacity: .6; animation: drift 38s ease-in-out infinite alternate; }

.login-card {
  position: relative;
  width: min(100%, 380px);
  margin: auto;
  padding: 30px 30px 30px;
  border-radius: 28px;
  text-align: center;
  color: var(--text);
  background: rgba(255, 255, 255, .78);
  border: 0;
  box-shadow: 0 28px 70px rgba(70, 94, 142, .2);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  animation: rise .5s var(--ease) backwards;
}

/* 不支持毛玻璃时的实底回退 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-card { background: #fff; }
}

/* 吉祥物：登录卡主角，闲置时缓慢浮动 */
.mascot {
  width: 150px;
  margin: 0 auto 8px;
  animation: floaty 3.6s ease-in-out infinite;
}
.mascot svg { width: 100%; height: auto; }

.login-card h1 {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--text);
}
.login-card .sub { margin: 0 0 24px; font-size: 13.5px; color: var(--text-sub); }

.login-card input {
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease),
              background-color var(--speed) var(--ease);
}
.login-card input::placeholder { color: #a5b4cd; }
.login-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
/* 浅色卡片上的自动填充修正 */
.login-card input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 99999s;
}

.error {
  margin: 14px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(229, 72, 77, .26);
  border-radius: var(--radius-s);
  background: #fdeded;
  color: #d23c42;
  font-size: 13px;
}

/* ---------- 主布局 ---------- */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 4px 18px 8px;
}

/* 主内容进入时的轻量级联 */
.app-main > * { animation: rise .4s var(--ease) backwards; }
.app-main > :nth-child(2) { animation-delay: .05s; }
.app-main > :nth-child(3) { animation-delay: .09s; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar { background: var(--card); }
}

.topbar-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 10px;
  background: var(--grad-brand);
  box-shadow: 0 4px 12px rgba(63, 135, 245, .3), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-mark svg { width: 17px; height: 17px; color: #fff; }
.brand-text { font-size: 16.5px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }

.topbar-right { display: flex; align-items: center; gap: 8px; flex: none; }

.badge {
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--text-sub);
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- 上传区 ---------- */
.upload-zone {
  position: relative;
  margin-top: 18px;
  padding: 40px 24px 36px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-l);
  background:
    linear-gradient(180deg, rgba(63, 135, 245, .04), rgba(63, 135, 245, 0) 60%),
    rgba(255, 255, 255, .8);
  transition: border-color var(--speed) var(--ease), background-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease), transform .12s var(--ease);
}
.upload-zone:hover {
  border-color: rgba(63, 135, 245, .55);
}
.upload-zone:active { transform: scale(.99); }
/* 拖入高亮：樱花粉 */
.upload-zone.dragover {
  border-color: var(--pink);
  background-color: #fff0f6;
  box-shadow: 0 0 0 5px var(--pink-ring);
}

.upload-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--grad-brand);
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .25s var(--ease);
}
.upload-icon svg { width: 28px; height: 28px; color: #fff; }
.upload-zone:hover .upload-icon { transform: translateY(-3px) scale(1.03); }
/* 拖入时云朵图标持续摇摆 */
.upload-zone.dragover .upload-icon {
  transform: translateY(-3px);
  animation: wiggle .5s ease-in-out infinite;
}

.upload-title { font-size: 15.5px; font-weight: 600; }
.upload-hint { margin-top: 5px; font-size: 13px; color: var(--text-sub); }

/* ---------- 上传进度 ---------- */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.progress-item {
  padding: 12px 14px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--card);
  box-shadow: none;
  animation: rise .3s var(--ease) backwards;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.progress-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.progress-pct { flex: none; color: var(--text-sub); font-size: 12px; }

.bar {
  height: 7px;
  border-radius: 999px;
  background: var(--tile);
  overflow: hidden;
}

.bar-fill {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, #79b3ff, var(--accent));
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  transition: transform .18s ease-out, background-color var(--speed) var(--ease);
}
.bar-fill::after { content: none; }
.bar-fill.done { background: linear-gradient(90deg, #5ecd90, var(--ok)); }
.bar-fill.fail { background: linear-gradient(90deg, #f48387, var(--danger)); }
.bar-fill.done::after,
.bar-fill.fail::after { display: none; }

/* ---------- 文件列表 ---------- */
.files-section { margin-top: 26px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
}
/* 樱花粉小圆点强调 */
.section-head h2::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffa8cd, var(--pink));
  box-shadow: 0 2px 6px rgba(240, 107, 164, .4);
}

.file-list { display: flex; flex-direction: column; gap: 9px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--card);
  box-shadow: none;
  transition: border-color var(--speed) var(--ease),
              transform var(--speed) var(--ease);
}

@media (hover: hover) {
  .file-item:hover {
    border-color: #f6c6dc;
    box-shadow: none;
    transform: translateY(-1px);
  }
}

/* 类型图标底座：内联 SVG 由 JS 生成，修饰类决定配色（浅底 + 深图形） */
.file-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--tile);
}
.file-icon svg { width: 22px; height: 22px; }

.file-icon.fi-image { background: #ffe8f1; color: #ef6a9d; }
.file-icon.fi-video { background: #f1e9ff; color: #9c6cf2; }
.file-icon.fi-audio { background: #e6f0ff; color: #4a8df5; }
.file-icon.fi-zip   { background: #fff2da; color: #e79c33; }
.file-icon.fi-pdf   { background: #ffe9e6; color: #ee5a52; }
.file-icon.fi-doc   { background: #e9edff; color: #6478ee; }
.file-icon.fi-sheet { background: #e3f6ea; color: #35ae72; }
.file-icon.fi-slide { background: #ffeedd; color: #f2813c; }
.file-icon.fi-text  { background: #eef2f8; color: #8494ad; }
.file-icon.fi-code  { background: #e0f5f2; color: #23a394; }
.file-icon.fi-app   { background: #e3f3fc; color: #3ba3d8; }
.file-icon.fi-file  { background: #f0f4fa; color: #98a6bc; }

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

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.file-sub { margin-top: 2px; font-size: 12px; color: var(--text-sub); }

.file-actions { display: flex; gap: 4px; flex: none; }

/* 文件行操作按钮内容为空，下载与删除图标由 CSS 蒙版绘制。 */
.act-btn {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-sub);
  font-size: 0;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease),
              transform .18s var(--ease-out);
}
.act-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.act-btn[data-act="download"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}
.act-btn[data-act="delete"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E");
}
.act-btn:hover { background: var(--accent-soft); color: var(--accent); transform: scale(1.08); }
.act-btn:active { transform: scale(.9); }
.act-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- 空状态 ---------- */
.empty-tip { padding: 36px 20px 44px; text-align: center; }
.empty-art {
  width: 150px;
  margin: 0 auto;
  animation: floaty 4.2s ease-in-out infinite;
}
.empty-art svg { width: 100%; height: auto; }
.empty-tip p { margin: 16px 0 0; font-size: 14.5px; font-weight: 600; }
.empty-tip .empty-sub { margin-top: 5px; font-size: 13px; font-weight: 400; color: var(--text-sub); }

/* ---------- 区块操作按钮组 ---------- */
.section-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- 面包屑路径条 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 12px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, .72);
  font-size: 13px;
}

.crumb {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease),
              transform .18s var(--ease-out);
}
.crumb:hover { background: var(--accent-soft); }
.crumb:active { transform: scale(.96); }
/* 当前位置：不可点击，弱化为正文灰 */
.crumb.current {
  color: var(--text);
  font-weight: 600;
  cursor: default;
}
.crumb.current:hover { background: transparent; }
.crumb-sep { color: var(--line-strong); font-weight: 400; user-select: none; }

/* ---------- 文件夹网格 ---------- */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.folder-card {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--card);
  box-shadow: none;
  text-align: center;
  cursor: default;
  user-select: none;
  transition: border-color var(--speed) var(--ease),
              transform var(--speed) var(--ease);
}

@media (hover: hover) {
  .folder-card:hover {
    border-color: #f6c6dc;
    box-shadow: none;
    transform: translateY(-2px);
  }
}
.folder-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 132px;
  padding: 14px 12px 12px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.folder-open:focus-visible { outline: 3px solid #6678d5; outline-offset: -4px; }
.folder-open:active { transform: scale(.98); }

/* 文件夹图标底座：暖琥珀色，与冷蓝的文件图标形成层级对比 */
.folder-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 8px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff3d6, #ffe3b8);
  color: #e29a2e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .25s var(--ease);
}
.folder-icon svg { width: 24px; height: 24px; }
.folder-card:hover .folder-icon { transform: translateY(-2px) scale(1.05); }

.folder-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
}

.folder-sub { margin-top: 3px; font-size: 11.5px; color: var(--text-sub); }

/* 文件夹删除按钮始终可见，并使用清晰的垃圾桶图标。 */
.folder-del {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 36px;
  height: 36px;
  opacity: 1;
  background: #fff1f4;
  color: #a94e64;
}
.folder-del::before { display: none; }
.folder-del-icon { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; pointer-events: none; }

/* ---------- 新建文件夹模态框 ---------- */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(43, 58, 87, .32);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  animation: fade-in .18s var(--ease) backwards;
}
/* 不支持毛玻璃时加深遮罩保证可读性 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .modal-overlay { background: rgba(43, 58, 87, .5); }
}

.modal-card {
  width: min(100%, 380px);
  padding: 24px 24px 22px;
  border: 0;
  border-radius: var(--radius-l);
  background: #fff;
  box-shadow: 0 22px 56px rgba(42, 54, 95, .22);
  animation: pop-in .32s var(--ease-out) backwards;
}

.modal-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}
/* 与 section-head 同款樱花粉小圆点强调 */
.modal-card h3::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffa8cd, var(--pink));
  box-shadow: 0 2px 6px rgba(240, 107, 164, .4);
}

.modal-sub {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--text-sub);
  overflow-wrap: anywhere;
}

.modal-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.modal-card input::placeholder { color: #a5b4cd; }
.modal-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.modal-card .error { margin: 10px 0 0; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.modal-actions .btn { padding: 10px 18px; }
/* 主按钮默认 width:100%（登录页全宽），这里回退为自适应 */
.modal-actions .btn.primary { width: auto; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + var(--safe-bottom));
  z-index: 200;
  max-width: 86vw;
  padding: 11px 19px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  text-align: center;
  box-shadow: 0 14px 34px rgba(102, 140, 190, .28);
  transform: translateX(-50%);
  animation: toast-in .24s var(--ease-out) backwards;
}

/* ---------- 页脚 ---------- */
.footer {
  padding: 26px 18px calc(22px + var(--safe-bottom));
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  opacity: .75;
}

/* ---------- 响应式 ---------- */
@media (min-width: 720px) {
  .upload-zone { padding-top: 48px; padding-bottom: 44px; }
}

@media (max-width: 560px) {
  .app-main { padding-left: 13px; padding-right: 13px; }
  .topbar-inner { padding-left: 13px; padding-right: 13px; }
  .badge { display: block; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
  .upload-zone { margin-top: 14px; padding: 30px 16px 28px; }
  .upload-icon { width: 54px; height: 54px; border-radius: 18px; }
  .upload-icon svg { width: 25px; height: 25px; }
  .files-section { margin-top: 22px; }
  .file-item { gap: 10px; padding: 10px 11px; }
  .file-icon { width: 38px; height: 38px; border-radius: 12px; }
  .file-icon svg { width: 20px; height: 20px; }
  .file-actions { gap: 2px; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
  .folder-card { padding: 12px 10px 10px; }
  .folder-icon { width: 40px; height: 40px; border-radius: 12px; }
  .folder-icon svg { width: 21px; height: 21px; }
  .breadcrumb { padding: 6px 8px; font-size: 12.5px; }
  .crumb { max-width: 130px; }
  .modal-card { padding: 20px 18px 18px; }
  .mascot { width: 130px; }
  .empty-art { width: 128px; }
  .cloud.c1 { width: 110px; height: 110px; }
  .cloud.c2 { width: 80px; height: 80px; }
  .cloud.c3 { width: 56px; height: 56px; }
}

@media (max-width: 360px) {
  .brand-text { display: none; }
  .login-card { padding: 28px 22px 26px; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 动漫云端收纳屋：界面层级 ---------- */
.app-main > * { animation: none; }

.login-screen {
  background:
    radial-gradient(ellipse at 8% 10%, rgba(255, 199, 222, .54), transparent 28rem),
    radial-gradient(ellipse at 90% 4%, rgba(139, 207, 242, .62), transparent 30rem),
    linear-gradient(155deg, #cceeff 0%, #e5edff 56%, #fff3ed 100%);
}
.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: stretch;
  gap: 0;
  width: min(100%, 1000px);
  padding: 14px;
  border: 0;
  border-radius: 34px;
  background: #fffaf2;
  box-shadow: 0 28px 70px rgba(70, 94, 142, .2);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-align: left;
}
.login-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 530px;
  overflow: hidden;
  border-radius: 25px;
  background:
    radial-gradient(circle at 17% 20%, rgba(255, 255, 255, .32) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 72%, rgba(255, 255, 255, .26) 0 2px, transparent 3px),
    linear-gradient(145deg, #70c4ed 0%, #75b9ee 48%, #898be2 100%);
}
.login-art::before {
  content: "";
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(255, 255, 255, .08), 0 0 0 54px rgba(255, 255, 255, .06);
}
.login-art::after {
  content: "";
  position: absolute;
  inset: auto 8% 8%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255, 245, 223, .22);
  filter: blur(24px);
}
.sky-spark { position: absolute; width: 17px; height: 17px; opacity: .8; }
.sky-spark::before, .sky-spark::after { content: ""; position: absolute; inset: 0; margin: auto; border-radius: 99px; background: #fff7d5; }
.sky-spark::before { width: 2px; height: 17px; }
.sky-spark::after { width: 17px; height: 2px; }
.spark-one { top: 19%; right: 16%; transform: rotate(45deg); }
.spark-two { bottom: 24%; left: 7%; width: 11px; height: 11px; transform: rotate(45deg); }
.spark-three { top: 44%; right: 6%; width: 8px; height: 8px; transform: rotate(45deg); }
.spark-three::before { height: 8px; }
.spark-three::after { width: 8px; }
.login-art .mascot {
  z-index: 1;
  width: min(86%, 430px);
  margin: 26px 0 0;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, .74);
  border-radius: 28px;
  animation: floaty 4.2s ease-in-out infinite;
}
.mascot img { display: block; width: 100%; height: auto; }
.art-label, .art-note { position: absolute; z-index: 2; color: #fff; font-weight: 700; }
.art-label {
  top: 24px;
  left: 26px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 999px;
  background: rgba(41, 56, 94, .78);
  font-size: 11px;
  letter-spacing: .14em;
}
.art-label-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffe397; }
.art-note {
  right: 24px;
  bottom: 22px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff8eb;
  color: #4f5c83;
  font-size: 13px;
  box-shadow: 0 8px 22px rgba(53, 76, 128, .12);
}
.art-note svg { width: 15px; height: 15px; margin-right: 5px; fill: #e9a845; vertical-align: -3px; }
.art-orbit { position: absolute; border: 1px dashed rgba(255, 255, 255, .48); border-radius: 50%; }
.orbit-one { width: 82%; aspect-ratio: 1; transform: rotate(-24deg) scaleY(.34); }
.orbit-two { width: 92%; aspect-ratio: 1; transform: rotate(28deg) scaleY(.27); }

.login-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px clamp(28px, 5vw, 62px);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; color: #38436c; font-weight: 800; }
.login-brand img { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; }
.login-brand span { font-size: 18px; letter-spacing: .02em; }
.login-content h1 {
  margin: 0;
  color: #283456;
  font-size: clamp(31px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;
  text-align: left;
}
.login-content .sub { margin: 15px 0 23px; color: #5f6e89; font-size: 15px; line-height: 1.8; }
.login-fact { display: flex; align-items: center; gap: 9px; margin: 0 0 25px; color: #536282; font-size: 13px; }
.fact-mark { width: 17px; height: 17px; flex: none; fill: #e8a745; }
.login-content .btn.primary {
  min-height: 54px;
  border-radius: 16px;
  background: #29385e;
  box-shadow: 0 8px 18px rgba(41, 56, 94, .18);
}
.login-content .btn.primary:hover { background: #354771; box-shadow: 0 12px 24px rgba(41, 56, 94, .22); }
.github-mark { width: 19px; height: 19px; flex: none; }
.login-note { margin: 13px 0 0; color: #65718b; font-size: 12px; text-align: center; }
.login-content .error { text-align: left; }

.app { background: transparent; }
.topbar { background: rgba(255, 253, 248, .97); border-bottom-color: rgba(111, 135, 179, .14); }
.topbar-inner { max-width: 1120px; padding: 12px 24px; }
.brand { gap: 12px; }
.brand-mark { width: 45px; height: 45px; border-radius: 15px; background: transparent; box-shadow: none; object-fit: cover; }
.brand-lockup { display: flex; flex-direction: column; gap: 1px; }
.brand-text { color: #334064; font-size: 17px; line-height: 1.1; }
.brand-sub { color: #65728e; font-size: 11px; letter-spacing: .06em; }
.topbar-right { gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 14px; background: #f0effb; color: #59658a; }

.app-main { max-width: 1120px; padding: 33px 24px 16px; }
.workspace-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.workspace-copy h1 { margin: 0; color: #2d385b; font-size: clamp(25px, 3vw, 33px); font-weight: 800; letter-spacing: -.025em; }
.workspace-copy p { margin: 8px 0 0; color: #5f6e89; font-size: 14px; }
.storage-note { display: flex; align-items: center; gap: 11px; min-width: 170px; padding: 10px 15px; border-radius: 16px; background: #fff8e9; color: #6d5a35; }
.storage-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: #ffe7ae; color: #a86b28; }
.storage-mark svg { width: 17px; height: 17px; fill: currentColor; }
.storage-note > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.storage-label { color: #6d5a35; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.storage-note .badge { max-width: 190px; overflow: hidden; padding: 0; border: 0; background: transparent; color: #51482f; font-size: 12px; text-overflow: ellipsis; }

.upload-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 22px;
  min-height: 236px;
  margin-top: 0;
  padding: 24px 34px 24px 38px;
  border: 2px dashed rgba(103, 129, 209, .4);
  border-radius: 27px;
  background: linear-gradient(112deg, #d9f2ff 0%, #e5eaff 57%, #f2e9ff 100%);
  box-shadow: none;
  text-align: left;
}
.upload-zone::before { content: ""; position: absolute; top: -72px; right: 26%; width: 185px; height: 185px; border-radius: 50%; background: rgba(255, 255, 255, .32); pointer-events: none; }
.upload-zone:hover { border-color: rgba(91, 107, 207, .72); }
.upload-zone.dragover { border-color: #e277a5; background: #f8eaff; box-shadow: 0 0 0 4px rgba(239, 126, 168, .14); }
.upload-copy { position: relative; z-index: 1; }
.upload-title { color: #2d3a62; font-size: clamp(21px, 2.6vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.upload-hint { max-width: 52ch; margin-top: 9px; color: #5e6d89; font-size: 14px; line-height: 1.7; }
.upload-action { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 10px 17px; border-radius: 13px; background: #4e60c6; color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 5px 12px rgba(80, 99, 190, .19); }
.upload-arrow { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.upload-mascot { position: relative; z-index: 1; width: 205px; justify-self: end; }
.upload-mascot img { display: block; width: 100%; height: auto; border: 3px solid rgba(255, 255, 255, .76); border-radius: 22px; }
.upload-spark { position: absolute; z-index: 2; color: #fff5c7; text-shadow: 0 2px 8px rgba(78, 104, 167, .24); }
.upload-spark svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.spark-a { top: 2%; left: 2%; width: 16px; height: 16px; }
.spark-b { right: -2%; bottom: 13%; width: 20px; height: 20px; }
.upload-zone:hover .upload-mascot { transform: translateY(-3px) rotate(1deg); }
.progress-list { margin-top: 15px; }
.progress-item { border-color: #e2e7f3; border-radius: 16px; background: #fffdf9; box-shadow: none; }
.bar { background: #e8eafb; }
.bar-fill { background: linear-gradient(90deg, #6dc8ef, #817be7); }

.files-section { margin-top: 35px; }
.section-head { align-items: center; margin-bottom: 13px; }
.section-title-group h2 { color: #2d385b; font-size: 22px; }
.section-title-group h2::before { background: #ef8eb2; box-shadow: 0 2px 6px rgba(239, 126, 168, .25); }
.section-title-group p { margin: 4px 0 0; color: #66728d; font-size: 12px; }
.section-actions { gap: 7px; }
.btn.ghost { border-color: #dfe4f0; border-radius: 12px; background: #fffdf9; color: #5d6886; }
.btn.ghost:hover { border-color: #9b9ee8; background: #f1efff; color: #545fc0; }
.breadcrumb { margin-bottom: 15px; padding: 7px 4px; border: 0; border-bottom: 1px solid rgba(109, 126, 167, .18); border-radius: 0; background: transparent; }
.crumb { color: #5b6ac2; }
.crumb.current { color: #465274; }
.crumb { min-height: 36px; }
.folder-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.folder-card { border-color: #e3e7f1; border-radius: 18px; background: #fffdf9; box-shadow: none; }
.folder-open { min-height: 132px; }
.folder-del { width: 40px; height: 40px; }
.folder-icon { border-radius: 15px; background: linear-gradient(145deg, #fff0c8, #ffe3bd); color: #a86d31; }
.file-list { gap: 8px; }
.file-item { border-color: rgba(220, 226, 238, .88); border-radius: 16px; background: #fffefa; box-shadow: none; }
.file-icon { border-radius: 13px; }
.file-actions { opacity: 1; transform: none; }
.file-actions .act-btn { width: 38px; height: 38px; }
.act-btn { border-radius: 11px; }
.act-btn:hover { background: #eeefff; color: #5865cf; }
.act-btn.danger:hover { background: #fff0f2; color: #d95063; }
.empty-tip { padding: 26px 20px 42px; }
.empty-art { width: min(190px, 45vw); }
.empty-art img { display: block; width: 100%; height: auto; border: 3px solid rgba(255, 255, 255, .8); border-radius: 22px; }
.empty-tip p { color: #3b4668; font-size: 16px; }
.empty-tip .empty-sub { color: #5f6e89; font-size: 13px; }
.footer { color: #65718b; }
.modal-overlay { background: rgba(39, 52, 87, .36); }
.modal-card { border: 0; border-radius: 22px; background: #fffaf2; box-shadow: 0 22px 56px rgba(42, 54, 95, .22); }
.modal-card h3 { color: #2d385b; }
.modal-card input { border-radius: 13px; }
.toast { border: 0; }
.section-actions .btn.small { min-height: 40px; padding: 8px 12px; font-size: 12px; }

@media (max-width: 760px) {
  .login-card { grid-template-columns: 1fr; width: min(100%, 540px); padding: 10px; }
  .login-art { min-height: 290px; }
  .login-art .mascot { width: min(67%, 250px); margin: 28px 0 0; }
  .login-content { padding: 29px 25px 31px; }
  .login-brand { margin-bottom: 21px; }
  .login-content h1 { font-size: 31px; }
  .login-content .sub { margin: 11px 0 17px; }
  .login-fact { margin-bottom: 19px; }
  .workspace-intro { align-items: start; }
  .storage-note { min-width: 0; padding: 8px 11px; }
  .storage-note .badge { max-width: 120px; }
}

@media (max-width: 560px) {
  .topbar-inner { padding: 9px 14px; }
  .brand-mark { width: 40px; height: 40px; }
  .app-main { padding: 23px 15px 12px; }
  .workspace-intro { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 16px; }
  .workspace-copy h1 { font-size: 25px; }
  .storage-note { align-self: flex-start; }
  .upload-zone { grid-template-columns: minmax(0, 1fr) 112px; min-height: 178px; gap: 10px; padding: 18px 14px 18px 18px; border-radius: 22px; }
  .upload-title { font-size: 19px; }
  .upload-hint { margin-top: 6px; font-size: 12px; }
  .upload-action { margin-top: 13px; padding: 8px 12px; font-size: 12px; }
  .upload-mascot { width: 110px; }
  .upload-mascot img { border-radius: 16px; }
  .files-section { margin-top: 29px; }
  .section-head { align-items: start; }
  .section-title-group h2 { font-size: 19px; }
  .section-title-group p { max-width: 32ch; }
  .section-actions { gap: 5px; }
  .btn.small { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .btn .btn-ico { width: 14px; height: 14px; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
  .folder-card { padding: 0; }
  .folder-open { min-height: 116px; padding: 12px 9px 10px; }
  .file-item { gap: 9px; padding: 9px; }
  .file-name { font-size: 13px; }
.file-sub { font-size: 11px; }
  .file-actions { gap: 0; }
  .act-btn { width: 38px; height: 38px; }
  .login-screen { padding: 13px; }
  .login-art { min-height: 245px; }
  .login-art .mascot { width: min(63%, 210px); }
  .art-label { top: 13px; left: 13px; padding: 7px 10px; font-size: 11px; }
  .art-note { right: 12px; bottom: 12px; padding: 8px 10px; font-size: 11px; }
  .login-content { padding: 24px 18px 26px; }
  .login-content h1 { font-size: 28px; }
  .login-note { color: #65718b; }
  .modal-overlay { padding: 14px; }
  .modal-card { padding: 21px 18px 18px; }
}

@media (max-width: 370px) {
  .brand-sub { display: none; }
  .upload-zone { grid-template-columns: minmax(0, 1fr) 88px; padding-left: 14px; }
  .upload-title { font-size: 17px; }
  .upload-mascot { width: 88px; }
  .section-actions { flex-direction: column; align-items: stretch; }
  .section-actions .btn { justify-content: flex-start; }
}
