/* 暗房：深色为底，图片是唯一的主角 */
:root {
  --bg: #0a0c10;
  --surface: #12161c;
  --surface-2: #191e26;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #edeff3;
  --ink-2: #a2aab5;
  --ink-3: #6b7480;
  --accent: #6ee7d7;
  --accent-ink: #04211f;
  --accent-soft: rgba(110, 231, 215, .11);
  --danger: #f2777a;
  --danger-soft: rgba(242, 119, 122, .12);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .15s;
  --t-base: .22s;
  --t-panel: .26s;
}

html:not(.dark) {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --line: #e3e6eb;
  --line-2: #d0d6de;
  --ink: #12151a;
  --ink-2: #56606c;
  --ink-3: #8a929d;
  --accent: #0d7a72;
  --accent-ink: #ffffff;
  --accent-soft: rgba(13, 122, 114, .10);
  --danger: #c4423e;
  --danger-soft: rgba(196, 66, 62, .10);
}

* { box-sizing: border-box; border-color: var(--line); }
html { color-scheme: dark; }
html:not(.dark) { color-scheme: light; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 13.5px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.hidden { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ink); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn:disabled { opacity: .42; pointer-events: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); border-color: transparent; color: var(--accent-ink); }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); border-color: transparent; color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, white); border-color: transparent; color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-3);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

/* 表单（抽屉内用填充式） */
.field { display: block; margin-bottom: 15px; }
.field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field select, .field textarea, .input {
  width: 100%; height: 38px; padding: 0 12px;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  outline: none; font-size: 13.5px;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.field textarea { height: auto; min-height: 76px; padding: 10px 12px; line-height: 1.65; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--accent); background: var(--surface);
}
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }
.mini-select {
  height: 32px; padding: 0 10px; font-size: 12px;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: var(--radius-sm); outline: none;
}
.mini-select:focus { border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row .field { margin-bottom: 15px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* 登录：左视觉、右无卡片表单 */
.auth { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(400px, .8fr); min-height: 100vh; background: var(--bg); }
.auth-show {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 42px 52px 38px; background: #0a0c10; color: #e9edf1;
  border-right: 1px solid var(--line);
}
.auth-wall { position: absolute; inset: 0; pointer-events: none; }
.auth-wall::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 74% 28%, rgba(110, 231, 215, .12), transparent 46%),
              linear-gradient(to top, #0a0c10 8%, transparent 58%);
}
.ph {
  position: absolute; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(150deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.ph-1 {
  width: 33%; aspect-ratio: 4 / 3; left: 7%; top: 15%; transform: rotate(-4deg);
  background: linear-gradient(155deg, rgba(96, 128, 164, .17), rgba(18, 24, 34, .04));
}
.ph-2 {
  width: 25%; aspect-ratio: 3 / 4; left: 41%; top: 7%; transform: rotate(3deg);
  background: linear-gradient(200deg, rgba(122, 96, 150, .15), rgba(22, 20, 32, .04));
}
.ph-3 {
  width: 29%; aspect-ratio: 1 / 1; right: 5%; top: 24%; transform: rotate(-2deg);
  border-color: rgba(110, 231, 215, .22);
  background: linear-gradient(140deg, rgba(80, 190, 178, .16), rgba(16, 30, 32, .04));
  box-shadow: 0 0 70px rgba(110, 231, 215, .09), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.ph-4 {
  width: 21%; aspect-ratio: 4 / 5; left: 17%; bottom: 5%; transform: rotate(5deg);
  background: linear-gradient(170deg, rgba(150, 120, 90, .13), rgba(26, 22, 18, .04));
}
.ph-5 {
  width: 27%; aspect-ratio: 3 / 2; right: 11%; bottom: 9%; transform: rotate(-3deg);
  background: linear-gradient(190deg, rgba(90, 110, 150, .14), rgba(18, 22, 30, .04));
}
.auth-beam {
  position: absolute; left: -20%; top: 44%; width: 140%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 215, .45), transparent);
  transform: rotate(-17deg);
}
.auth-show-top { position: relative; display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; letter-spacing: .01em; color: #dfe5ea; }
.auth-show-top svg { width: 24px; height: 24px; color: #6ee7d7; }
.auth-show-copy { position: relative; margin-top: auto; padding-bottom: 26px; }
.auth-show-copy h1 {
  margin: 0 0 20px; font-size: clamp(38px, 4.6vw, 62px); line-height: 1.1;
  font-weight: 500; letter-spacing: -.045em;
}
.auth-show-copy p { margin: 0; max-width: 400px; font-size: 13.5px; line-height: 1.85; color: #97a1ac; }
.auth-show-foot { position: relative; font-size: 11.5px; color: #616b76; letter-spacing: .02em; }

.auth-side { display: grid; place-items: center; padding: 46px 40px; background: var(--bg); }
.auth-form { width: min(348px, 100%); }
.auth-form-head { margin-bottom: 34px; }
.auth-form-head h2 { margin: 0 0 7px; font-size: 30px; font-weight: 500; letter-spacing: -.04em; }
.auth-form-head p { margin: 0; font-size: 13px; color: var(--ink-2); }

.line-field { display: block; margin-bottom: 26px; }
.line-field > span { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; letter-spacing: .01em; }
.line-field input {
  width: 100%; height: 38px; padding: 0 0 8px; font-size: 15px;
  background: transparent; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; outline: none;
  transition: border-color var(--t-fast);
}
.line-field input::placeholder { color: var(--ink-3); font-size: 14px; }
.line-field input:focus { border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.auth-error {
  margin: 14px 0 0; padding: 9px 12px; font-size: 12.5px;
  color: var(--danger); background: var(--danger-soft);
  border-radius: var(--radius-sm); line-height: 1.5;
}
.auth-hint { margin: 16px 0 0; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.auth-doc { margin: 9px 0 0; text-align: center; font-size: 11.5px; }
.auth-doc a { color: var(--accent); }
.auth-doc a:hover { text-decoration: underline; text-underline-offset: 3px; }
a.icon-btn { color: var(--ink-3); }
.auth-advanced { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-advanced summary {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-3); cursor: pointer; list-style: none;
  transition: color var(--t-fast);
}
.auth-advanced summary:hover { color: var(--ink-2); }
.auth-advanced summary::-webkit-details-marker { display: none; }
.auth-advanced summary::after { content: "＋"; font-size: 12px; color: var(--ink-3); }
.auth-advanced[open] summary::after { content: "−"; }
.auth-advanced[open] .line-field:first-of-type { margin-top: 20px; }
.auth-advanced p { margin: 14px 0 18px; font-size: 11.5px; line-height: 1.75; color: var(--ink-3); }
.auth-advanced .btn { margin-top: 4px; }

/* 顶栏 */
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 60px; flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 22px;   background: var(--bg); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 21px; height: 21px; color: var(--accent); }
.search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px;
  flex: 0 1 380px; margin-left: 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.search:focus-within { border-color: var(--line-2); background: var(--surface-2); }
.search svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.search input { width: 100%; border: 0; background: transparent; outline: none; font-size: 12.5px; }
.search input::placeholder { color: var(--ink-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.account-btn {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 9px 0 4px;
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  transition: background-color var(--t-fast);
}
.account-btn:hover { background: var(--surface); }
.account-btn > span:first-child {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 11.5px; font-weight: 600;
}
.account-btn > span:last-child { font-size: 12.5px; color: var(--ink-2); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-wrap { position: relative; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: 204px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.account-menu-head { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.am-name { font-size: 12.5px; font-weight: 500; word-break: break-all; }
.am-id { margin-top: 2px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); word-break: break-all; }
.account-menu-item {
  display: flex; align-items: center; width: 100%; height: 32px; padding: 0 10px;
  border: 0; border-radius: 7px; background: transparent; color: var(--ink-2);
  font-size: 12.5px; text-align: left;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.account-menu-item:hover { background: var(--danger-soft); color: var(--danger); }

/* 侧栏：窄图标条 */
.shell { flex: 1; display: grid; grid-template-columns: 76px minmax(0, 1fr); min-height: 0; overflow: hidden; }
.rail {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  height: 100%; padding: 14px 8px; background: var(--bg);
  border-right: 1px solid var(--line);
  overflow-y: auto; overflow-x: hidden;
}
.rail-nav { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.rail-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 100%; height: 56px; border: 0; background: transparent;
  color: var(--ink-3); border-radius: 10px; font-size: 10.5px;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.rail-item svg { width: 19px; height: 19px; }
.rail-item:hover { background: var(--surface); color: var(--ink-2); }
.rail-item.active { background: var(--accent-soft); color: var(--accent); }

/* 主区 */
.stage {
  height: 100%; min-width: 0; padding: 20px 24px 72px;
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.stage::-webkit-scrollbar { width: 10px; }
.stage::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 5px;
  border: 3px solid transparent; background-clip: content-box;
}
.stage::-webkit-scrollbar-track { background: transparent; }
.stage-inner { max-width: 1420px; margin: 0 auto; }

.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.page-head-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-thumb { width: 40px; height: 40px; flex: none; border-radius: 9px; object-fit: cover; background: var(--surface-2); }
.page-head-text { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.page-title { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.035em; }
.page-meta { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 11.5px; color: var(--ink-3); }
.breadcrumb a { transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span[aria-current] { color: var(--ink-2); }

.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.segmented button {
  height: 26px; padding: 0 11px; border: 0; background: transparent; border-radius: 6px;
  font-size: 12px; color: var(--ink-3);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.segmented button:hover { color: var(--ink-2); }
.segmented button.active { background: var(--surface-2); color: var(--ink); }
.bulk-bar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 45; display: flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 28px); padding: 7px 9px 7px 16px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
}
.bulk-count { margin-right: 4px; }
.bulk-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* 图片墙（瀑布流） */
.grid { display: flex; flex-wrap: wrap; gap: 12px; }
.grid-albums { display: flex; flex-wrap: wrap; gap: 12px; }
/* 图片与相册卡片共用同一套尺寸，预览区统一 4:3 */
.tile {
  flex: 1 1 168px; max-width: 248px; min-width: 0;
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color var(--t-fast) var(--ease);
}
.tile:hover { border-color: var(--line-2); }
.tile.selected { border-color: var(--accent); }
.tile-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); line-height: 0; overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-check {
  position: absolute; top: 9px; left: 9px; width: 19px; height: 19px;
  display: grid; place-items: center; font-size: 10px; line-height: 1;
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 5px;
  background: rgba(0, 0, 0, .35); color: transparent; opacity: .55;
  transition: opacity var(--t-fast), background-color var(--t-fast);
}
.tile:hover .tile-check, .tile.selected .tile-check { opacity: 1; }
.tile.selected .tile-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile-actions {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: flex-end; gap: 5px;
  padding: 22px 9px 9px; opacity: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62));
  transition: opacity var(--t-fast) var(--ease);
}
.tile:hover .tile-actions, .tile:focus-within .tile-actions { opacity: 1; }
.tile-actions button {
  height: 26px; padding: 0 9px; border: 0; border-radius: 6px;
  background: rgba(255, 255, 255, .16); color: #f4f7f9; font-size: 11px;
  transition: background-color var(--t-fast);
}
.tile-actions button:hover { background: var(--accent); color: var(--accent-ink); }
.tile-body { padding: 10px 11px 12px; }
.tile-title { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.tile-meta { font-size: 10.5px; color: var(--ink-3); font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 相册徽章 */
.album-chip {
  max-width: 64%; padding: 2px 8px; border: 0; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background-color var(--t-fast);
}
.album-chip:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.album-chip.none { background: var(--surface-2); color: var(--ink-3); font-weight: 400; }

/* 相册卡 */
.album-card {
  flex: 1 1 168px; max-width: 248px; min-width: 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease);
}
.album-card:hover { border-color: var(--line-2); }
.album-cover { aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover.blank {
  display: grid; place-items: center;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
}
.album-cover.blank::after {
  content: ""; width: 24px; height: 24px; border: 1px solid var(--line-2);
  border-radius: 6px; transform: rotate(45deg);
}
.album-info { padding: 10px 11px 12px; }
.album-info h3 { margin: 0 0 4px; font-size: 13px; font-weight: 500; word-break: break-all; }
.album-info p { margin: 0; font-size: 11px; color: var(--ink-3); }

/* 列表视图 */
.list-view { border-top: 1px solid var(--line); }
.list-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(150px, 280px) auto;
  gap: 14px; align-items: center; padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--t-fast);
}
.list-row:hover { background: var(--surface); }
.list-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.list-main { min-width: 0; }
.list-title { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.list-link { display: flex; gap: 6px; }
.list-link input {
  flex: 1; min-width: 0; height: 30px; padding: 0 8px;
  font-family: var(--font-mono); font-size: 10.5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink-3); outline: none;
}
.list-actions { display: flex; gap: 4px; }
.list-actions button {
  height: 27px; padding: 0 9px; font-size: 11px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: var(--ink-3);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.list-actions button:hover { background: var(--surface-2); color: var(--ink); }

/* 空状态 */
.empty-state {
  padding: 76px 20px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius-lg);
  color: var(--ink-3); font-size: 12.5px;
}
.empty-state strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.empty-state .btn { margin-top: 20px; }
.load-more { display: flex; justify-content: center; margin-top: 28px; }

/* 抽屉（取代居中弹窗） */
.modal-root {
  position: fixed; inset: 0; z-index: 60;
  display: flex; justify-content: flex-end;
  background: rgba(0, 0, 0, .58);
  animation: fade-in .2s var(--ease) both;
}
.modal-root.is-closing { animation: fade-out .18s var(--ease) both; pointer-events: none; }
.modal {
  width: min(432px, 100%); height: 100%; display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line-2);
  box-shadow: -24px 0 70px rgba(0, 0, 0, .45);
  animation: drawer-in var(--t-panel) var(--ease) both;
}
.modal.is-closing { animation: drawer-out .18s var(--ease) both; }
.modal.wide { width: min(500px, 100%); }
.modal-head {
  flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 22px 22px 16px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.modal-head p { margin: 5px 0 0; font-size: 12px; color: var(--ink-3); }
.modal-close {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--ink-3);
  font-size: 19px; line-height: 1; transition: background-color var(--t-fast), color var(--t-fast);
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.modal-body { flex: 1; padding: 20px 22px; overflow-y: auto; }
.modal-foot {
  flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 22px; border-top: 1px solid var(--line);
}
.modal-foot .left { margin-right: auto; }

.dropzone {
  padding: 30px 16px; text-align: center; cursor: pointer;
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 24px; height: 24px; margin: 0 auto 10px; color: var(--accent); }
.dropzone strong { display: block; font-size: 13px; font-weight: 500; color: var(--ink); }
.dropzone span { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-3); }

.queue { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 160px; overflow-y: auto; }
.queue-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: var(--radius-sm); background: var(--surface-2); font-size: 11.5px;
}
.queue-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-state { flex: none; color: var(--ink-3); }
.queue-item.ok .queue-state { color: var(--accent); }
.queue-item.err .queue-state { color: var(--danger); }

.result-list { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.result-list h4 { margin: 0; font-size: 12.5px; font-weight: 500; }
.result-line { display: flex; gap: 6px; margin-bottom: 6px; }
.result-line input {
  flex: 1; min-width: 0; height: 32px; padding: 0 9px;
  font-family: var(--font-mono); font-size: 10.5px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 6px;
  color: var(--ink-2); outline: none;
}
.confirm-text { font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.confirm-text strong { color: var(--ink); font-weight: 500; }

/* 移动到相册 */
.move-hint { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2); }
.move-hint strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.move-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.move-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-align: left; transition: border-color var(--t-fast), background-color var(--t-fast);
}
.move-item:hover { background: var(--surface-2); }
.move-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.move-thumb {
  width: 38px; height: 38px; flex: none; border-radius: 6px; overflow: hidden;
  background: var(--surface-2);
}
.move-thumb img { width: 100%; height: 100%; object-fit: cover; }
.move-text { flex: 1; min-width: 0; }
.move-text strong { display: block; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move-text small { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-3); }
.move-check {
  width: 18px; height: 18px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%; font-size: 10px; color: transparent;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.move-item.selected .move-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* 灯箱 */
.lightbox-root {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; padding: 24px;
  background: rgba(4, 6, 8, .96);
  animation: fade-in .16s var(--ease) both;
}
.lightbox-root img { max-width: 88vw; max-height: 74vh; object-fit: contain; }
.lightbox-bar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #a9b3bd; }
.lightbox-bar button {
  height: 30px; padding: 0 12px; font-size: 11.5px;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 7px;
  background: transparent; color: #cbd3db;
  transition: background-color var(--t-fast);
}
.lightbox-bar button:hover { background: rgba(255, 255, 255, .1); }
.lightbox-link { max-width: 70vw; font-family: var(--font-mono); font-size: 10.5px; color: #6f7a85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 100;
  max-width: 78vw; padding: 10px 18px;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 12.5px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, 14px);
}
.toast.show { visibility: visible; animation: toast-in .3s var(--ease) both; }
.toast.error { border-color: var(--danger); color: var(--danger); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawer-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 1080px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); }
  .auth-show { padding: 34px 34px 30px; }
  .auth-show-copy h1 { font-size: clamp(32px, 4.4vw, 44px); }
  .stage { padding: 18px 20px 72px; }
  .grid, .grid-albums { gap: 10px; }
  .tile, .album-card { flex-basis: 168px; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-show { display: none; }
  .auth-side { min-height: 100vh; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 58px minmax(0, 1fr); }
  .rail {
    flex-direction: row; align-items: center; height: 58px;
    padding: 0 12px; border-right: 0; border-bottom: 1px solid var(--line);
    overflow-x: auto; overflow-y: hidden;
  }
  .rail-nav { flex-direction: row; width: auto; }
  .rail-item { width: 62px; height: 46px; }
  .topbar { gap: 10px; padding: 0 14px; }
  .search { display: none; }
  .account-btn > span:last-child { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .grid, .grid-albums { gap: 8px; }
  .tile, .album-card { flex-basis: 140px; }
  .list-row { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .list-row .list-link { display: none; }
  .page-title { font-size: 19px; }
}

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