/* ==========================================================================
   Glass Drive · iOS 26 液态玻璃设计系统
   - 设计令牌：颜色 / 圆角 / 阴影 / 模糊
   - 玻璃材质：多层半透明 + backdrop-filter + 内描边高光
   - 光晕背景：大尺寸 radial-gradient 光球，缓慢漂移
   - 深浅色自适应，prefers-reduced-motion 下关闭动效
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---- 结构色 */
  --bg: #eef1f8;
  --text: #0d1220;
  --text-2: #3b4257;
  --muted: #6d7490;
  --muted-2: #8b92a8;

  /* ---- 强调色（iOS 系统蓝） */
  --accent: #0a84ff;
  --accent-strong: #0060df;
  --accent-soft: rgba(10, 132, 255, 0.12);
  --violet: #8b5cf6;
  --pink: #f472b6;
  --teal: #14b8a6;
  --orange: #f97316;
  --green: #34c759;
  --red: #ff3b30;
  --yellow: #ffcc00;

  /* ---- 玻璃材质比例 */
  --glass-bg: rgba(255, 255, 255, 0.58);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-bg-subtle: rgba(255, 255, 255, 0.42);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-border-outer: rgba(15, 23, 42, 0.06);
  --glass-blur: 28px;
  --glass-hi: rgba(255, 255, 255, 0.7);

  /* ---- 圆角（iOS 连续曲率近似） */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-2xl: 34px;
  --r-pill: 999px;

  /* ---- 阴影 */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 12px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 2px 6px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.1);
  --shadow-lg: 0 8px 20px rgba(16, 24, 40, 0.08), 0 28px 64px rgba(16, 24, 40, 0.16);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.9);

  /* ---- 布局 */
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --ring: 0 0 0 4px rgba(10, 132, 255, 0.22);

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0e18;
    --text: #f2f5ff;
    --text-2: #c3cadb;
    --muted: #9aa3bb;
    --muted-2: #7d859c;

    --accent: #0a84ff;
    --accent-strong: #3d9bff;
    --accent-soft: rgba(10, 132, 255, 0.2);

    --glass-bg: rgba(28, 33, 48, 0.62);
    --glass-bg-strong: rgba(34, 40, 58, 0.82);
    --glass-bg-subtle: rgba(30, 35, 50, 0.45);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-outer: rgba(0, 0, 0, 0.4);
    --glass-hi: rgba(255, 255, 255, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.45), 0 28px 64px rgba(0, 0, 0, 0.6);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

/* ------------------------------------------------------------ 基础 */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.app-active, body.auth-active { overflow: hidden; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
:focus-visible { outline: none; box-shadow: var(--ring); }

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

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.orb-1 {
  width: 46vw; height: 46vw; min-width: 420px; min-height: 420px;
  top: -14vw; left: -8vw;
  background: radial-gradient(circle at 30% 30%, #7cc4ff, #3b82f6 45%, transparent 70%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.orb-2 {
  width: 40vw; height: 40vw; min-width: 380px; min-height: 380px;
  top: -10vw; right: -10vw;
  background: radial-gradient(circle at 60% 40%, #d8b4fe, #8b5cf6 45%, transparent 70%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.orb-3 {
  width: 44vw; height: 44vw; min-width: 400px; min-height: 400px;
  bottom: -18vw; left: 22vw;
  background: radial-gradient(circle at 50% 50%, #99f6e4, #14b8a6 45%, transparent 70%);
  animation: drift3 29s ease-in-out infinite alternate;
  opacity: 0.42;
}
.orb-4 {
  width: 30vw; height: 30vw; min-width: 300px; min-height: 300px;
  bottom: -8vw; right: 4vw;
  background: radial-gradient(circle at 40% 60%, #fdba74, #f472b6 50%, transparent 72%);
  animation: drift4 35s ease-in-out infinite alternate;
  opacity: 0.4;
}

@media (prefers-color-scheme: dark) {
  .orb { opacity: 0.4; filter: blur(90px); }
  .orb-1 { background: radial-gradient(circle at 30% 30%, #1d4ed8, #0b1a3a 55%, transparent 72%); }
  .orb-2 { background: radial-gradient(circle at 60% 40%, #6d28d9, #170d33 55%, transparent 72%); }
  .orb-3 { background: radial-gradient(circle at 50% 50%, #0f766e, #061e1c 55%, transparent 72%); opacity: 0.35; }
  .orb-4 { background: radial-gradient(circle at 40% 60%, #9d174d, #2a0716 55%, transparent 72%); opacity: 0.3; }
}

@keyframes drift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-7vw, 8vh, 0) scale(1.08); } }
@keyframes drift3 { to { transform: translate3d(6vw, -7vh, 0) scale(1.15); } }
@keyframes drift4 { to { transform: translate3d(-5vw, -5vh, 0) scale(1.1); } }

/* 磨砂颗粒感 */
.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ------------------------------------------------------------ 玻璃材质 */

.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border-outer);
  box-shadow: var(--shadow-md), var(--shadow-inset);
}

/* 顶部内描边高光：1px 光边 */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.25) 28%,
    rgba(255, 255, 255, 0) 52%,
    rgba(255, 255, 255, 0.35) 82%,
    rgba(255, 255, 255, 0.8) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.glass-subtle {
  background: var(--glass-bg-subtle);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--glass-border-outer);
  box-shadow: var(--shadow-inset);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-bg-strong); }
  .glass-subtle { background: var(--glass-bg-strong); }
}

/* ------------------------------------------------------------ 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--glass-bg-subtle);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), background 0.2s, box-shadow 0.2s, opacity 0.2s;
  will-change: transform;
}
.btn:hover { background: var(--glass-bg); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn.primary {
  background: linear-gradient(180deg, #33a3ff 0%, var(--accent) 45%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 6px 18px rgba(10, 132, 255, 0.34);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #4dafff 0%, #1a90ff 45%, #0068f0 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 10px 26px rgba(10, 132, 255, 0.42);
}
.btn.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--glass-bg-subtle); }
.btn.danger {
  background: rgba(255, 59, 48, 0.12);
  color: var(--red);
  border-color: rgba(255, 59, 48, 0.28);
}
.btn.danger:hover { background: rgba(255, 59, 48, 0.2); }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 13px; font-size: 13px; }
.btn.lg { padding: 13px 26px; font-size: 16px; border-radius: var(--r-pill); }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--glass-border-outer);
  border-radius: var(--r-pill);
  background: var(--glass-bg-subtle);
  color: var(--text-2);
  transition: background 0.18s, transform 0.18s var(--ease-out);
}
.icon-btn:hover { background: var(--glass-bg); color: var(--text); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.sm { width: 30px; height: 30px; font-size: 13px; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ 品牌 */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(140deg, #64d2ff, #0a84ff 55%, #8b5cf6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 6px 16px rgba(10, 132, 255, 0.36);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 18px; }
.brand-mark.lg svg { width: 32px; height: 32px; }
.brand-name { font-size: 17px; }

/* ==========================================================================
   首页
   ========================================================================== */

.landing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 26px 60px;
}

.site-nav {
  position: sticky;
  top: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px 10px 18px;
  border-radius: var(--r-pill);
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 10px;
  flex: 1;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--glass-bg-subtle); color: var(--text); }
.nav-actions { display: flex; gap: 8px; align-items: center; }

/* ---- Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 52px;
  align-items: center;
  padding: 74px 0 40px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 22px;
}
.dot-live {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0.05); }
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.grad-text {
  background: linear-gradient(100deg, #0a84ff 0%, #8b5cf6 45%, #f472b6 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions.center { justify-content: center; }

.hero-metrics {
  display: flex;
  gap: 34px;
  margin-top: 42px;
  list-style: none;
}
.hero-metrics li { display: flex; flex-direction: column; }
.hero-metrics strong { font-size: 24px; letter-spacing: -0.03em; }
.hero-metrics span { font-size: 13px; color: var(--muted); }

/* ---- Hero 预览窗口 */

.hero-preview {
  border-radius: var(--r-2xl);
  padding: 0;
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform 0.7s var(--ease-out);
}
.hero-preview:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg) translateY(-6px); }

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--glass-border-outer);
}
.tl-dot { width: 11px; height: 11px; border-radius: 50%; }
.tl-dot.red { background: #ff5f57; }
.tl-dot.yellow { background: #febc2e; }
.tl-dot.green { background: #28c840; }
.window-title {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.preview-body { display: flex; min-height: 300px; }
.preview-side {
  width: 152px;
  padding: 14px 12px;
  border-right: 1px solid var(--glass-border-outer);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}
.side-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-2);
}
.side-row.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-row .ic { font-size: 13px; }
.side-meter { margin-top: auto; padding: 10px; font-size: 11px; color: var(--muted); }
.meter-label { display: flex; justify-content: space-between; margin-bottom: 6px; }

.preview-main { flex: 1; padding: 14px; min-width: 0; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.crumb { font-size: 13px; font-weight: 650; }
.mini-btn {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, #33a3ff, #007aff);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.p-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 10px;
  border-radius: 14px;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-inset);
  min-width: 0;
}
.p-ic { font-size: 19px; line-height: 1; }
.p-name {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-meta { font-size: 10px; color: var(--muted); }

.preview-glow {
  position: absolute;
  inset: auto -30% -50% -30%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(10, 132, 255, 0.22), transparent 65%);
  pointer-events: none;
}

/* ---- 区块 */

.section { padding: 76px 0 12px; }
.section-head { text-align: center; margin-bottom: 40px; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 12px; }
.section-sub { color: var(--muted); font-size: 16px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 18px;
}
.card {
  padding: 26px 24px;
  border-radius: var(--r-xl);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
}
.card h3 { font-size: 17px; margin: 16px 0 8px; }
.card p { color: var(--text-2); font-size: 14.5px; line-height: 1.62; }
.card-ic {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  font-size: 21px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, var(--shadow-sm);
}
.grad-blue { background: linear-gradient(140deg, #bfe3ff, #7cc4ff); }
.grad-violet { background: linear-gradient(140deg, #e6d9ff, #c4b5fd); }
.grad-teal { background: linear-gradient(140deg, #c3f5ee, #7ee0d4); }
.grad-orange { background: linear-gradient(140deg, #ffe0c2, #fdba74); }
.grad-pink { background: linear-gradient(140deg, #ffd9e8, #f9a8d4); }

/* ---- 架构图 */

.arch {
  border-radius: var(--r-2xl);
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: center;
}
.arch-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 132px;
  padding: 18px 16px;
  border-radius: var(--r-lg);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.node-ic { font-size: 22px; }
.arch-node strong { font-size: 14.5px; }
.arch-node small { font-size: 11.5px; color: var(--muted); }
.arch-arrow { font-size: 20px; color: var(--muted-2); }

/* ---- 场景 */

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.scenario-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

/* ---- 技术栈 */

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  list-style: none;
}
.stack-list li {
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---- CTA */

.cta {
  margin-top: 84px;
  padding: 60px 32px;
  border-radius: var(--r-2xl);
  text-align: center;
}
.cta h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 10px; }
.cta p { color: var(--text-2); margin-bottom: 28px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 42px 6px 0;
  color: var(--muted);
  font-size: 13.5px;
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---- 入场动效 */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-reveal].revealed { opacity: 1; transform: none; }

/* ==========================================================================
   认证页
   ========================================================================== */

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.auth-card {
  width: min(430px, 100%);
  padding: 34px 32px 30px;
  border-radius: var(--r-2xl);
}
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 22px;
  padding: 6px 13px 6px 9px;
  border: none;
  border-radius: var(--r-pill);
  background: var(--glass-bg-subtle);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s;
}
.auth-back:hover { background: var(--glass-bg); }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .brand-mark { margin: 0 auto 16px; }
.auth-brand h1 { font-size: 26px; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 14.5px; }

.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-outer);
  margin-bottom: 22px;
}
.seg-btn {
  position: relative;
  z-index: 2;
  padding: 9px 0;
  border: none;
  background: none;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.25s;
}
.seg-btn[aria-selected="true"] { color: var(--text); }
.seg-thumb {
  position: absolute;
  z-index: 1;
  top: 4px; left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: var(--r-pill);
  background: var(--glass-bg-strong);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
  transition: transform 0.35s var(--ease-out);
}
.segmented[data-active="register"] .seg-thumb { transform: translateX(100%); }

.auth-form { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); padding-left: 4px; }
.field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border-outer);
  background: var(--glass-bg-subtle);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--glass-bg);
  box-shadow: var(--ring);
}
.field.invalid input { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.16); }

.form-error {
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.24);
  color: var(--red);
  font-size: 13.5px;
  font-weight: 550;
}

.auth-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ==========================================================================
   主界面（App）
   ========================================================================== */

.app { height: 100vh; height: 100dvh; }
.app-layout {
  display: flex;
  gap: 16px;
  height: 100%;
  padding: 16px;
}

/* ---- 侧边栏 */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: var(--sidebar-w);
  flex: none;
  padding: 18px 14px;
  border-radius: var(--r-2xl);
  overflow-y: auto;
}
.sidebar-head { padding: 0 4px 2px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border: none;
  border-radius: 13px;
  background: none;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 550;
  text-align: left;
  transition: background 0.18s, color 0.18s, transform 0.18s var(--ease-out);
}
.side-item:hover { background: var(--glass-bg-subtle); color: var(--text); }
.side-item:active { transform: scale(0.98); }
.side-item.active {
  background: var(--glass-bg-strong);
  color: var(--accent);
  font-weight: 650;
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.side-ic { font-size: 15px; }

.storage {
  margin-top: auto;
  padding: 14px;
  border-radius: var(--r-lg);
  font-size: 12.5px;
}
.storage-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-2);
  font-weight: 600;
  margin-bottom: 9px;
}
.meter {
  height: 7px;
  border-radius: var(--r-pill);
  background: rgba(120, 130, 160, 0.2);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #64d2ff, #0a84ff 60%, #8b5cf6);
  transition: width 0.5s var(--ease-out);
}
.meter.warn i { background: linear-gradient(90deg, #ffcc00, #ff9500); }
.meter.danger i { background: linear-gradient(90deg, #ff9500, #ff3b30); }
.storage-legend {
  list-style: none;
  margin-top: 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11.5px;
}
.storage-legend li { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border-outer);
  text-align: left;
  transition: background 0.18s;
}
.user-chip:hover { background: var(--glass-bg); }
.avatar {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, #64d2ff, #0a84ff 60%, #8b5cf6);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-meta strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-caret { color: var(--muted); font-size: 15px; }

/* ---- 内容区 */

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-xl);
  flex: none;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  max-width: 420px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  color: var(--muted);
  transition: box-shadow 0.2s, background 0.2s;
}
.search-field:focus-within {
  background: var(--glass-bg);
  box-shadow: var(--ring);
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
}
.search-field input::-webkit-search-cancel-button { cursor: pointer; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.view-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
}
.view-btn {
  display: grid;
  place-items: center;
  width: 32px; height: 30px;
  border: none;
  border-radius: var(--r-pill);
  background: none;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.view-btn.active { background: var(--glass-bg-strong); color: var(--accent); box-shadow: var(--shadow-sm); }

.content-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 2px 24px;
  border-radius: var(--r-2xl);
  scrollbar-width: thin;
}
.content-scroll::-webkit-scrollbar { width: 9px; }
.content-scroll::-webkit-scrollbar-thumb {
  background: rgba(130, 140, 170, 0.32);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 0 4px;
}
.breadcrumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; }
.crumb-item {
  padding: 5px 11px;
  border: none;
  border-radius: var(--r-pill);
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.18s;
}
.crumb-item:hover { background: var(--glass-bg-subtle); }
.crumb-item.current { color: var(--text); background: var(--glass-bg-subtle); }
.crumb-sep { color: var(--muted-2); font-size: 12px; }

.sort-field {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px 6px 13px;
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--muted);
}
.sort-field select {
  border: none;
  background: none;
  outline: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  padding: 2px 4px;
}

.selection-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
  font-size: 13.5px;
  font-weight: 600;
}
.selection-actions { display: flex; gap: 7px; margin-left: auto; flex-wrap: wrap; }

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

.file-area { min-height: 120px; }

.file-area[data-view="list"] .file-list { display: flex; flex-direction: column; gap: 3px; }

.file-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 104px 122px 188px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
  user-select: none;
}
.file-row:hover { background: var(--glass-bg-subtle); border-color: var(--glass-border); }
.file-row.selected {
  background: var(--accent-soft);
  border-color: rgba(10, 132, 255, 0.35);
}
.file-row .f-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 550;
}
.file-row .f-name span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-row .f-size,
.file-row .f-date {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.file-row .f-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.16s;
}
.file-row:hover .f-actions,
.file-row:focus-within .f-actions { opacity: 1; }

.f-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  font-size: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, var(--shadow-sm);
}
.f-icon.folder { background: linear-gradient(145deg, #ffe9b8, #ffd27a); }
.f-icon.image { background: linear-gradient(145deg, #d6f5e3, #9ae6b4); }
.f-icon.video { background: linear-gradient(145deg, #e7d9ff, #c4b5fd); }
.f-icon.audio { background: linear-gradient(145deg, #ffe0ec, #f9a8d4); }
.f-icon.pdf { background: linear-gradient(145deg, #ffdcd6, #ffaea1); }
.f-icon.text { background: linear-gradient(145deg, #d9ecff, #a8d3ff); }
.f-icon.other { background: linear-gradient(145deg, #e6eaf2, #c9d2e3); }

.star-btn {
  border: none;
  background: none;
  padding: 4px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.16s, transform 0.16s;
}
.file-row:hover .star-btn { opacity: 0.7; }
.star-btn.on { opacity: 1 !important; }
.star-btn:active { transform: scale(0.86); }

/* 网格视图 */
.file-area[data-view="grid"] .file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}
.file-area[data-view="grid"] .file-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--glass-bg-subtle);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-inset);
  position: relative;
}
.file-area[data-view="grid"] .file-row:hover {
  background: var(--glass-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-inset);
}
.file-area[data-view="grid"] .file-row .f-icon { width: 46px; height: 46px; font-size: 23px; border-radius: 13px; }
.file-area[data-view="grid"] .file-row .f-name .name-text {
  font-size: 13.5px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.file-area[data-view="grid"] .file-row .f-size { font-size: 12px; }
.file-area[data-view="grid"] .file-row .f-date { display: none; }
.file-area[data-view="grid"] .file-row .f-actions {
  position: absolute;
  top: 8px; right: 8px;
  opacity: 0;
}
.file-area[data-view="grid"] .file-row:hover .f-actions { opacity: 1; }
.file-area[data-view="grid"] .f-name { flex-direction: column; align-items: flex-start; gap: 6px; }

/* 空状态 */
.empty-state { text-align: center; padding: 68px 20px; }
.empty-illu {
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  margin: 0 auto 20px;
  border-radius: var(--r-xl);
  color: var(--accent);
}
.empty-state h3 { font-size: 18px; margin-bottom: 7px; }
.empty-state p { color: var(--muted); font-size: 14.5px; }

/* 列表表头 */
.list-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 104px 122px 188px;
  gap: 12px;
  padding: 6px 14px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---- 上传队列 */

.upload-dock {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: min(364px, calc(100vw - 40px));
  border-radius: var(--r-xl);
  z-index: 60;
  overflow: hidden;
}
.dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--glass-border-outer);
  font-size: 14px;
}
.dock-list { list-style: none; max-height: 280px; overflow-y: auto; }
.dock-item { padding: 11px 16px; border-bottom: 1px solid var(--glass-border-outer); }
.dock-item:last-child { border-bottom: none; }
.dock-row { display: flex; align-items: center; gap: 9px; font-size: 13px; margin-bottom: 7px; }
.dock-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.dock-status { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dock-status.error { color: var(--red); }
.dock-status.done { color: var(--green); }

/* ---- 拖拽覆盖层 */

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(10, 132, 255, 0.08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.drop-inner {
  padding: 40px 64px;
  border-radius: var(--r-2xl);
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  border: 2px dashed rgba(10, 132, 255, 0.5);
}

/* ==========================================================================
   浮层：Sheet / Toast / 菜单
   ========================================================================== */

.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 18, 32, 0.28);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.24s var(--ease-out);
}
.sheet {
  position: fixed;
  z-index: 101;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px));
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-2xl);
  animation: sheetIn 0.34s var(--ease-out);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--glass-border-outer);
}
.sheet-head h2 { font-size: 18px; }
.sheet-body { padding: 20px 22px; overflow-y: auto; }
.sheet-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px 20px;
}
.sheet-foot:empty { display: none; }

.sheet-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.sheet-field:last-child { margin-bottom: 0; }
.sheet-field > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.sheet-field input[type="text"],
.sheet-field input[type="password"],
.sheet-field input[type="number"],
.sheet-field select {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border-outer);
  background: var(--glass-bg-subtle);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sheet-field input:focus,
.sheet-field select:focus { border-color: var(--accent); box-shadow: var(--ring); }
.sheet-hint { font-size: 12.5px; color: var(--muted); }

/* 预览内容 */
.preview-stage {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 8px;
  border-radius: var(--r-lg);
  background: var(--glass-bg-subtle);
  overflow: auto;
}
.preview-stage img,
.preview-stage video {
  max-width: 100%;
  max-height: 56vh;
  border-radius: var(--r-md);
  display: block;
}
.preview-stage iframe {
  width: 100%;
  height: 56vh;
  border: none;
  border-radius: var(--r-md);
  background: #fff;
}
.preview-stage pre {
  width: 100%;
  max-height: 56vh;
  overflow: auto;
  padding: 16px;
  border-radius: var(--r-md);
  background: rgba(12, 18, 32, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (prefers-color-scheme: dark) {
  .preview-stage pre { background: rgba(0, 0, 0, 0.34); }
}

/* 上下文菜单 */
.ctx-menu {
  position: fixed;
  z-index: 120;
  min-width: 184px;
  padding: 6px;
  border-radius: var(--r-md);
  animation: ctxIn 0.16s var(--ease-out);
}
@keyframes ctxIn { from { opacity: 0; transform: scale(0.96); } }
.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  text-align: left;
  transition: background 0.14s;
}
.ctx-item:hover { background: var(--accent-soft); }
.ctx-item.danger { color: var(--red); }
.ctx-item.danger:hover { background: rgba(255, 59, 48, 0.12); }
.ctx-sep { height: 1px; margin: 5px 8px; background: var(--glass-border-outer); }

/* Toast */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 11px 20px;
  border-radius: var(--r-pill);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  font-size: 13.5px;
  font-weight: 600;
  animation: toastIn 0.3s var(--ease-out);
  max-width: 86vw;
}
.toast.error { color: var(--red); }
.toast.ok { color: var(--green); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
}

/* ==========================================================================
   分享页
   ========================================================================== */

.share-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.share-card {
  width: min(560px, 100%);
  padding: 34px 32px 26px;
  border-radius: var(--r-2xl);
}
.share-head { text-align: center; margin-bottom: 24px; }
.share-head .brand-mark { margin: 0 auto 15px; }
.share-head h1 { font-size: 23px; margin-bottom: 6px; }
.share-head p { color: var(--muted); font-size: 14px; }
.share-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.share-file {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: var(--r-lg);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-inset);
}
.share-file .f-icon { width: 46px; height: 46px; font-size: 22px; }
.share-file-meta { min-width: 0; flex: 1; }
.share-file-meta strong {
  display: block;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-file-meta small { color: var(--muted); font-size: 12.5px; }
.share-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.share-list { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 3px; }
.share-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: background 0.16s;
}
.share-list li:hover { background: var(--glass-bg-subtle); }
.share-list .s-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-list .s-size { font-size: 12.5px; color: var(--muted); }

/* 分享列表页表格 */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--glass-border-outer);
  white-space: nowrap;
}
.data-table td {
  padding: 12px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--glass-border-outer);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.data-table .row-actions { display: flex; gap: 5px; justify-content: flex-end; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.warn { background: rgba(255, 149, 0, 0.14); color: #c26a00; }
.badge.danger { background: rgba(255, 59, 48, 0.14); color: var(--red); }
.badge.ok { background: rgba(52, 199, 89, 0.16); color: #1e8a3c; }
@media (prefers-color-scheme: dark) {
  .badge.warn { color: #ffb340; }
  .badge.ok { color: #4ade80; }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-inset);
}
.stat-card span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-card strong { display: block; font-size: 26px; letter-spacing: -0.03em; margin-top: 4px; }

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1080px) {
  .hero { gap: 34px; }
  .preview-side { width: 128px; }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 46px;
    text-align: left;
  }
  .hero-preview { transform: none; }
  .hero-preview:hover { transform: translateY(-4px); }

  .app-layout { padding: 10px; gap: 10px; }
  .sidebar {
    position: fixed;
    left: 10px;
    top: 10px;
    bottom: 10px;
    z-index: 80;
    transform: translateX(calc(-100% - 20px));
    transition: transform 0.36s var(--ease-out);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .only-mobile { display: inline-flex !important; }
  .file-row { grid-template-columns: 38px minmax(0, 1fr) 84px 150px; }
  .file-row .f-date { display: none; }
  .list-head { display: none; }
}

@media (min-width: 901px) {
  .only-mobile { display: none !important; }
}

@media (max-width: 640px) {
  .landing { padding: 14px 16px 40px; }
  .site-nav { top: 8px; padding: 8px 10px 8px 14px; }
  .brand-name { display: none; }
  .site-nav .brand-name { display: inline; }
  .nav-actions .btn.ghost { display: none; }
  .hero-metrics { gap: 22px; }
  .section { padding: 52px 0 8px; }
  .arch { padding: 26px 14px; }
  .arch-arrow { display: none; }
  .arch-row { gap: 10px; }
  .arch-node { min-width: 0; flex: 1; padding: 14px 10px; }
  .cta { padding: 38px 20px; }
  .auth-card, .share-card { padding: 26px 20px; }
  .file-row { grid-template-columns: 34px minmax(0, 1fr) 96px; gap: 9px; padding: 8px 10px; }
  .file-row .f-size { display: none; }
  .selection-actions { width: 100%; margin-left: 0; }
  .upload-dock { right: 10px; left: 10px; bottom: 10px; width: auto; }
  .content-scroll { padding-bottom: 90px; }
  .sheet { width: calc(100vw - 20px); max-height: 90vh; }
}

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .orb { animation: none; }
}
