/* 苹果官网式视觉：大字号排版、毛玻璃吸顶导航、大留白、克制的动效 */

:root {
  --bg: #fbfbfd;
  --bg-elevated: #ffffff;
  --bg-sunken: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-ink: #ffffff;
  --danger: #e0342b;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(0, 0, 0, 0.18);
  --card-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.06), 0 20px 40px -20px rgba(0, 0, 0, 0.28);
  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h: 52px;
  --inset-top: env(safe-area-inset-top, 0px);
  --inset-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --bg-sunken: #0a0a0a;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #86868b;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #2997ff;
    --accent-hover: #47a5ff;
    --accent-ink: #ffffff;
    --nav-bg: rgba(0, 0, 0, 0.66);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
    --card-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.6), 0 24px 48px -24px rgba(0, 0, 0, 0.9);
  }
}

* { box-sizing: border-box; }

/* 组件用了 display:flex，会覆盖浏览器对 [hidden] 的默认 display:none，这里统一压住 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

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

/* ---------------------------------------------------------------- 吸顶导航 */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-top: var(--inset-top);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: none;
}

.brand-mark { width: 22px; height: 22px; fill: var(--accent); stroke: none; }

.search {
  flex: 1 1 auto;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.12);
  color: var(--ink-2);
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search:focus-within {
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
  color: var(--ink);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }

.search-clear {
  display: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink-3);
  cursor: pointer;
}
.search-clear svg { width: 14px; height: 14px; }
.search.has-value .search-clear { display: inline-flex; }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: rgba(120, 120, 128, 0.14);
  color: var(--ink);
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
  white-space: nowrap;
}

.btn:hover { background: rgba(120, 120, 128, 0.2); }
.btn:active { transform: scale(0.97); }
.btn svg.icon { width: 16px; height: 16px; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: rgba(120, 120, 128, 0.16); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: rgba(0, 113, 227, 0.1); }
.btn-lg { height: 44px; padding: 0 24px; font-size: 16px; border-radius: 999px; }

.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.14);
}

.segmented button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.segmented button.is-on { background: var(--bg-elevated); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover { background: rgba(120, 120, 128, 0.16); color: var(--ink); }
.icon-btn-plain { color: inherit; }

/* ---------------------------------------------------------------- 主体 */

.main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px 60px; }

.hero { padding: clamp(48px, 9vw, 96px) 0 clamp(32px, 5vw, 56px); text-align: center; }

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-weight: 600;
}

.hero-sub {
  margin: 0 auto;
  max-width: 34ch;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

.hero-hint { margin: 18px 0 0; font-size: 13px; color: var(--ink-3); }

.browser { margin-top: 8px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 18px;
}

.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; font-size: 14px; }

.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 8px;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.crumbs a:hover { background: rgba(120, 120, 128, 0.14); color: var(--ink); }
.crumbs a:last-child { color: var(--ink); font-weight: 500; }
.crumbs .sep { color: var(--ink-3); display: inline-flex; }
.crumbs .sep svg { width: 14px; height: 14px; }

.toolbar-actions { margin-left: auto; display: flex; gap: 6px; }

.tool {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.tool:hover { background: rgba(120, 120, 128, 0.14); color: var(--ink); }

.results { display: block; }
.results.is-list { display: flex; flex-direction: column; max-width: 1000px; }
.results.is-list .row { border-bottom: 1px solid var(--line); border-radius: 0; }
.results.is-list .row:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- 网格卡片 */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease), border-color 0.2s var(--ease);
}

.card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.card:active { transform: scale(0.99); }

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-sunken);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}
.card:hover .thumb img { transform: scale(1.04); }

.thumb .glyph { width: 44px; height: 44px; stroke-width: 1.3; }
.glyph-folder { fill: var(--accent); stroke: none; opacity: 0.92; }
.glyph-media { stroke: var(--ink-3); }
svg.icon.glyph-folder { fill: var(--accent); stroke: none; }
svg.icon.glyph-media { stroke: var(--ink-3); fill: none; }

.card-body { padding: 10px 12px 12px; }

.card-name {
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.card-meta { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }

.card-more {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s var(--ease);
}
.card:hover .card-more, .card-more:focus-visible { opacity: 1; }
.card-more svg.icon { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- 列表行 */

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.row:hover { background: rgba(120, 120, 128, 0.1); }

.row-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex: none; }
.row-icon .icon { width: 22px; height: 22px; stroke-width: 1.5; }
.row-icon img { width: 30px; height: 30px; object-fit: cover; border-radius: 7px; }

.row-name { flex: 1 1 auto; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-size, .row-time { flex: none; font-size: 12.5px; color: var(--ink-3); }
.row-size { width: 92px; text-align: right; }
.row-time { width: 108px; text-align: right; }
.row-more {
  width: 30px; height: 30px; flex: none;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  opacity: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.row:hover .row-more, .row-more:focus-visible { opacity: 1; }
.row-more:hover { background: rgba(120, 120, 128, 0.2); }

/* ---------------------------------------------------------------- 空状态 */

.empty { text-align: center; padding: 72px 20px 90px; color: var(--ink-2); }
.empty-mark { width: 56px; height: 56px; fill: var(--line-strong); stroke: none; }
.empty h2 { margin: 18px 0 6px; font-size: 20px; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.empty p { margin: 0; font-size: 14px; }

.foot { padding: 0 22px calc(24px + var(--inset-bottom)); text-align: center; font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- 拖拽上传 */

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade 0.16s var(--ease);
}

.drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 56px;
  border-radius: 28px;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 17px;
  transform: scale(0.98);
  animation: pop 0.24s var(--ease-spring) forwards;
}
.drop-card strong { font-size: 19px; font-weight: 600; }
.drop-card span { font-size: 13px; opacity: 0.8; }
.drop-icon { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { to { transform: scale(1) } }

/* ---------------------------------------------------------------- 上传进度 */

.uploads {
  position: fixed;
  right: 18px;
  bottom: calc(18px + var(--inset-bottom));
  z-index: 70;
  width: min(320px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  animation: rise 0.28s var(--ease-spring);
}

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

.upload-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.upload-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-pct { color: var(--ink-3); font-variant-numeric: tabular-nums; }

.upload-bar { margin-top: 8px; height: 4px; border-radius: 999px; background: rgba(120, 120, 128, 0.24); overflow: hidden; }
.upload-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width 0.2s var(--ease); }
.upload-item.is-done .upload-bar i { background: #34c759; }
.upload-item.is-error .upload-bar i { background: var(--danger); }

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

.preview {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  color: #f5f5f7;
  animation: fade 0.2s var(--ease);
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(10px + var(--inset-top)) 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.preview-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.preview-title strong { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-title span { font-size: 12px; color: rgba(245, 245, 247, 0.6); }
.preview-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.preview-actions .btn { color: #f5f5f7; }
.preview-actions .btn-quiet:hover { background: rgba(255, 255, 255, 0.14); }
.preview-actions .icon-btn { color: #f5f5f7; }
.preview-actions .icon-btn:hover { background: rgba(255, 255, 255, 0.14); }

.preview-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}

.preview-stage img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.preview-stage video { max-width: 100%; max-height: 100%; border-radius: 10px; background: #000; }
.preview-stage audio { width: min(480px, 90vw); }
.preview-stage iframe { width: min(920px, 100%); height: 100%; border: 0; border-radius: 12px; background: #fff; }
.preview-stage pre {
  margin: 0;
  width: min(920px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-stage .markdown {
  width: min(760px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 28px 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
  line-height: 1.7;
}
.preview-stage .markdown h1, .preview-stage .markdown h2, .preview-stage .markdown h3 { line-height: 1.3; margin: 1.2em 0 0.5em; }
.preview-stage .markdown h1 { font-size: 26px; }
.preview-stage .markdown h2 { font-size: 21px; }
.preview-stage .markdown h3 { font-size: 17px; }
.preview-stage .markdown code { font-family: "SF Mono", ui-monospace, Menlo, monospace; background: rgba(255, 255, 255, 0.12); padding: 1px 5px; border-radius: 5px; font-size: 0.9em; }
.preview-stage .markdown pre { background: rgba(0, 0, 0, 0.35); padding: 14px; border-radius: 10px; overflow: auto; }
.preview-stage .markdown pre code { background: none; padding: 0; }
.preview-stage .markdown a { color: #6fb3ff; }
.preview-stage .markdown blockquote { margin: 1em 0; padding-left: 14px; border-left: 3px solid rgba(255, 255, 255, 0.25); color: rgba(245, 245, 247, 0.75); }

.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease);
}
.preview-nav:hover { background: rgba(255, 255, 255, 0.22); }
.preview-nav.prev { left: 16px; }
.preview-nav.next { right: 16px; }
.preview-nav.prev svg { transform: rotate(180deg); }

/* ---------------------------------------------------------------- 右键菜单 / 账户菜单 */

.ctxmenu, .menu {
  position: fixed;
  z-index: 110;
  min-width: 180px;
  padding: 6px;
  border-radius: 14px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.45);
  animation: pop 0.16s var(--ease-spring);
}

.ctxmenu button, .menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s var(--ease);
}
.ctxmenu button:hover, .menu button:hover { background: rgba(120, 120, 128, 0.18); }
.ctxmenu button.danger { color: var(--danger); }
.ctxmenu svg.icon, .menu svg.icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- 弹窗 / 登录 / toast */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade 0.16s var(--ease);
}

.modal-card {
  width: min(400px, 100%);
  padding: 24px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  animation: pop 0.22s var(--ease-spring);
}
.modal-card h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.modal-text { margin: 0 0 14px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.modal-card input {
  width: 100%;
  height: 42px;
  margin-top: 10px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: 0;
}
.modal-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.login {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1000px 600px at 50% -10%, rgba(0, 113, 227, 0.16), transparent 70%),
    var(--bg);
}

.login-card {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 32px 36px;
  border-radius: 26px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow-hover);
  animation: rise 0.4s var(--ease-spring);
}
.login-mark { width: 52px; height: 52px; fill: var(--accent); stroke: none; }
.login-card h1 { margin: 6px 0 0; font-size: 26px; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }
.login-card input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: 0;
  text-align: center;
  letter-spacing: 0.04em;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16); }
.login-card .btn-lg { width: 100%; margin-top: 6px; }
.login-error { min-height: 18px; font-size: 13px; color: var(--danger); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--inset-bottom));
  transform: translateX(-50%) translateY(8px);
  z-index: 140;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
  font-size: 13.5px;
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease-spring);
  pointer-events: none;
  max-width: calc(100vw - 40px);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

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

@media (max-width: 820px) {
  .nav-inner { gap: 12px; padding: 0 16px; }
  .search { max-width: none; }
  .brand span { display: none; }
  .main { padding: 0 16px 48px; }
  .row-size { display: none; }
  .row-time { width: 84px; }
}

@media (max-width: 560px) {
  :root { --nav-h: 50px; }
  .nav-inner { gap: 10px; }
  .search { height: 32px; }
  .btn-upload span { display: none; }
  .btn-upload { padding: 0 12px; }
  .segmented { display: none; }
  .hero { padding: 36px 0 28px; }
  .hero-actions .btn-lg { flex: 1 1 auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { border-radius: 18px; }
  .card-more { opacity: 1; background: rgba(0, 0, 0, 0.34); }
  .row { height: 60px; gap: 12px; }
  .row-time { display: none; }
  .row-more { opacity: 1; }
  .preview-stage { padding: 12px; }
  .preview-nav { display: none; }
  .preview-bar { padding: calc(8px + var(--inset-top)) 12px 8px; }
  .preview-actions .btn span { display: none; }
  .preview-actions .btn { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
