/* =========================================================
   设计变量
   墨色 #0d0c22 做主色和主按钮，玫红 #ea4c89 只用在强调（验证码、搜索按钮、选中图标）
   ========================================================= */
:root {
  --bg: #f3f3f6;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --fill: #f2f2f5;
  --hover: rgba(13, 12, 34, 0.045);
  --border: #ebebf0;
  --border-strong: #dcdce3;
  --text: #0d0c22;
  --text-2: #55536a;
  --text-3: #9a99ab;
  --ink: #0d0c22;
  --ink-hover: #2a2944;
  --on-ink: #ffffff;
  --accent: #ea4c89;
  --accent-hover: #d93b78;
  --accent-soft: #fdeef4;
  --accent-text: #c22d6a;
  --ok: #0f8a52;
  --ok-soft: #e4f5ec;
  --warn: #a35c00;
  --warn-soft: #fdf2df;
  --err: #d02f4e;
  --err-soft: #fdecef;
  --ring: 0 0 0 4px rgba(234, 76, 137, 0.14);
  --shadow-xs: 0 1px 2px rgba(13, 12, 34, 0.05);
  --shadow-sm: 0 1px 2px rgba(13, 12, 34, 0.04), 0 3px 8px rgba(13, 12, 34, 0.05);
  --shadow-md: 0 18px 44px rgba(13, 12, 34, 0.12), 0 3px 10px rgba(13, 12, 34, 0.06);
  /* 头像配色：hsl(var(--h) …) */
  --av-s: 78%;
  --av-l: 93%;
  --av-fg-s: 48%;
  --av-fg-l: 34%;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --pill: 999px;
  --sidebar-w: 248px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #09090c;
  --surface: #131318;
  --surface-2: #17171d;
  --fill: #1e1e26;
  --hover: rgba(255, 255, 255, 0.05);
  --border: #25252e;
  --border-strong: #35353f;
  --text: #f2f1f6;
  --text-2: #acabbd;
  --text-3: #71708a;
  --ink: #f2f1f6;
  --ink-hover: #ffffff;
  --on-ink: #0d0c22;
  --accent: #f0609b;
  --accent-hover: #f57bad;
  --accent-soft: rgba(240, 96, 155, 0.14);
  --accent-text: #ff8fbe;
  --ok: #4cc98c;
  --ok-soft: rgba(76, 201, 140, 0.13);
  --warn: #e6a64a;
  --warn-soft: rgba(230, 166, 74, 0.13);
  --err: #ff6f88;
  --err-soft: rgba(255, 111, 136, 0.13);
  --ring: 0 0 0 4px rgba(240, 96, 155, 0.22);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.55), 0 3px 10px rgba(0, 0, 0, 0.35);
  --av-s: 32%;
  --av-l: 21%;
  --av-fg-s: 75%;
  --av-fg-l: 76%;
  color-scheme: dark;
}

/* =========================================================
   基础
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--fill);
  color: var(--text-2);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ico { flex: none; display: block; }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }

/* =========================================================
   外壳：浅灰底 + 侧边栏 + 悬浮内容面板
   ========================================================= */
.app { display: flex; height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 18px 12px 14px;
  background: var(--bg);
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.015em;
}
.brand-logo { display: block; flex: none; width: auto; height: 30px; }
.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
.brand-name {
  padding-left: 10px;
  border-left: 1px solid var(--border-strong);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 18px;
}

.sb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--text-3);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sb-search:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--ring); }
.sb-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
}
.sb-search input::-webkit-search-cancel-button { display: none; }
.sb-search kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: 600 11px/1 var(--mono);
  color: var(--text-3);
}

.nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 4px; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-label { padding: 0 10px 6px; font-size: 11.5px; font-weight: 650; color: var(--text-3); letter-spacing: 0.03em; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r);
  color: var(--text-2);
  font-weight: 560;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.nav-link .ico { color: var(--text-3); transition: color 0.15s; }
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.nav-link.is-active .ico { color: var(--accent); }
.nav-link.is-soon { cursor: default; opacity: 0.55; }
.nav-link.is-soon:hover { background: none; color: var(--text-2); }
.nav-soon { margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: var(--pill); background: var(--fill); color: var(--text-3); }
.nav-empty { padding: 8px 10px; font-size: 13px; color: var(--text-3); }

.sb-foot { display: flex; flex-direction: column; gap: 12px; padding: 12px 6px 0; border-top: 1px solid var(--border); }
.theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: var(--pill); background: var(--fill); }
.theme-seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.15s, color 0.15s;
}
.theme-seg button:hover { color: var(--text); }
.theme-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.sb-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.sb-note a { margin-left: 4px; color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.sb-note a:hover { color: var(--text); }

.main { flex: 1; min-width: 0; height: 100vh; padding: 12px 12px 12px 0; }
.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
}
.topbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}
.tb-titles { flex: 1; min-width: 0; }
.tb-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tb-group { font-size: 13px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.tb-group:not(:empty)::after { content: "/"; margin-left: 8px; color: var(--border-strong); }
.tb-line h1 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.3; white-space: nowrap; }
.tb-desc { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .menu-btn { display: none; }
.app.is-home .topbar { display: none; }

.view { position: relative; flex: 1; min-height: 0; overflow: auto; outline: none; }
.view-loading { display: grid; place-items: center; height: 100%; min-height: 240px; }
/* 每个页面的挂载容器：撑满内容区，让多栏工具的内部滚动区域有确定高度 */
.view-page { height: 100%; }

.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(9, 9, 12, 0.4); }

/* =========================================================
   通用组件
   ========================================================= */
/* 多栏工具共用：栏头、计数徽标、可滚动区域 */
.col-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--border);
}
.col-title { display: flex; align-items: center; gap: 8px; }
.col-title h2 { margin: 0; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--pill);
  background: var(--fill);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.col-actions { display: flex; align-items: center; gap: 4px; }
.col-scroll { flex: 1; min-height: 0; overflow: auto; }
.ico.flip { transform: rotate(180deg); }

/* 普通工具页的内容容器（内容区本身没有内边距，三栏类工具可以铺满） */
.page { max-width: 1080px; padding: 28px 32px 48px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 750; }
.card-body { padding: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.12s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; gap: 6px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--text-2);
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.icon-btn.sm { width: 30px; height: 30px; }

.input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid transparent;
  border-radius: var(--r);
  background: var(--fill);
  color: var(--text);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.input:hover { border-color: var(--border-strong); }
.input:focus { outline: none; background: var(--surface); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--ring); }
.input::placeholder { color: var(--text-3); }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.55; }
select.input {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a99ab' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  cursor: pointer;
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 12px; font-weight: 650; color: var(--text-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
.chip.sm { height: 28px; padding: 0 11px; font-size: 12.5px; }
.chip-count { font-size: 11.5px; font-variant-numeric: tabular-nums; opacity: 0.65; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--pill);
  background: var(--fill);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.pill-accent { background: var(--accent-soft); color: var(--accent-text); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-err { background: var(--err-soft); color: var(--err); }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; user-select: none; white-space: nowrap; }
.switch input {
  appearance: none;
  position: relative;
  width: 32px;
  height: 18px;
  margin: 0;
  border-radius: var(--pill);
  background: var(--border-strong);
  cursor: pointer;
  transition: background-color 0.2s;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s var(--ease);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }

.avatar {
  --h: 220;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: hsl(var(--h) var(--av-s) var(--av-l));
  color: hsl(var(--h) var(--av-fg-s) var(--av-fg-l));
  font-size: 14px;
  font-weight: 750;
}
.avatar.sm { width: 30px; height: 30px; font-size: 12.5px; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner.sm { width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  min-height: 260px;
  padding: 32px 24px;
  text-align: center;
  color: var(--text-3);
}
.empty p { margin: 0; max-width: 320px; font-size: 13.5px; }
.empty strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 15px; font-weight: 700; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--fill);
  color: var(--text-3);
}

.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--err) 88%, #000); border-color: transparent; }
.btn.ghost.danger { background: transparent; border-color: transparent; color: var(--err); }
.btn.ghost.danger:hover { background: var(--err-soft); }

/* 拖放区：容器拖入文件时加 .is-dragover */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.15s, background-color 0.15s;
}
.is-dragover .dropzone, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }

/* 弹出菜单 */
.popover {
  position: absolute;
  z-index: 40;
  min-width: 260px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.popover-sep { height: 1px; margin: 12px -14px; background: var(--border); }

/* 模态框 */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 9, 12, 0.42);
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-scrim.is-open { opacity: 1; }
.modal {
  display: flex;
  flex-direction: column;
  width: min(var(--modal-w, 640px), 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.25s var(--ease);
}
.modal-scrim.is-open .modal { transform: none; }
.modal-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 12px 24px; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
.modal-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 24px 20px; }
.modal-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.modal-text { margin: 0; color: var(--text-2); line-height: 1.65; }

/* 提示 */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 10px 18px 10px 14px;
  border-radius: var(--pill);
  background: #0d0c22;
  color: #f4f3f8;
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  font-weight: 550;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
:root[data-theme="dark"] .toast { background: #2a2a35; }
.toast.in { opacity: 1; transform: none; }
.toast-ok .ico { color: #5fd49a; }
.toast-error .ico { color: #ff8a9c; }
.toast-info .ico { color: #ff8fbe; }

/* 服务器写入的简介：只在浏览器不运行脚本时显示（给搜索引擎和无脚本访问） */
.noscript { max-width: 720px; padding: 40px 32px; }
.noscript h1 { margin: 0 0 12px; font-size: 26px; }
.noscript p { color: var(--text-2); line-height: 1.7; }
.noscript ul { padding-left: 20px; line-height: 2; }
.noscript a { color: var(--accent-text); }

/* 说明类页面（隐私说明等） */
.prose { max-width: 760px; padding: 36px 40px 64px; color: var(--text-2); font-size: 14.5px; line-height: 1.8; }
.prose h2 { margin: 32px 0 10px; color: var(--text); font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
.prose h2:first-of-type { margin-top: 8px; }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 10px; padding-left: 20px; }
.prose li + li { margin-top: 4px; }
.prose strong { color: var(--text); }
.prose .prose-meta { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }
.prose .lead { padding: 14px 16px; border-radius: var(--r); background: var(--ok-soft); color: var(--text); }

/* =========================================================
   首页：工具画廊
   ========================================================= */
.home { max-width: 1320px; margin: 0 auto; padding: 56px clamp(20px, 4vw, 56px) 72px; }
.hero { max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-2);
}
.eyebrow .ico { color: var(--accent); }
.hero h1 { margin: 18px 0 14px; font-size: clamp(32px, 4.4vw, 52px); font-weight: 750; line-height: 1.14; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin: 0; max-width: 560px; font-size: 16px; line-height: 1.65; color: var(--text-2); }
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 620px;
  height: 56px;
  margin-top: 28px;
  padding: 0 8px 0 22px;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  background: var(--fill);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.hero-search:focus-within { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--ring); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--text); }
.hero-search input::placeholder { color: var(--text-3); }
.hero-search input::-webkit-search-cancel-button { display: none; }
.hero-search-btn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; }

.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 44px 0 24px; }
.filter-count { font-size: 13px; color: var(--text-3); }

.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 36px 28px; }
.shot { display: flex; flex-direction: column; gap: 10px; min-width: 0; color: var(--text); }
.shot-thumb {
  --tone: 220;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r);
  background:
    radial-gradient(90% 80% at 15% 10%, hsl(var(--tone) 95% 97%), transparent 60%),
    linear-gradient(160deg, hsl(var(--tone) 85% 93%), hsl(var(--tone) 70% 85%));
}
:root[data-theme="dark"] .shot-thumb {
  background:
    radial-gradient(90% 80% at 15% 10%, hsl(var(--tone) 40% 24%), transparent 60%),
    linear-gradient(160deg, hsl(var(--tone) 30% 17%), hsl(var(--tone) 35% 11%));
}
.mock {
  width: 70%;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 20px 44px hsl(var(--tone) 50% 25% / 0.18), 0 2px 6px rgba(13, 12, 34, 0.06);
  transform: translateY(8px) rotate(-2.5deg);
  transition: transform 0.45s var(--ease);
}
.shot:hover .mock, .shot:focus-visible .mock { transform: translateY(0) rotate(0) scale(1.03); }
.mock-bar { display: flex; gap: 5px; padding: 9px 11px; border-bottom: 1px solid var(--border); }
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.mock-body { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 16px; }
.mock-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: hsl(var(--tone) 85% 94%);
  color: hsl(var(--tone) 60% 42%);
}
:root[data-theme="dark"] .mock-icon { background: hsl(var(--tone) 35% 24%); color: hsl(var(--tone) 80% 78%); }
.mock-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; padding-top: 3px; }
.mock-lines b { display: block; height: 7px; border-radius: 4px; background: var(--fill); }
.mock-lines b:first-child { width: 62%; background: var(--border-strong); }
.mock-lines b:nth-child(2) { width: 90%; }
.mock-lines b.code { width: 46%; height: 16px; border-radius: var(--pill); background: var(--accent-soft); }
.shot-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 44px 16px 14px;
  background: linear-gradient(to top, rgba(13, 12, 34, 0.6), transparent);
  color: #fff;
  font-weight: 650;
  opacity: 0;
  transition: opacity 0.25s;
}
.shot:hover .shot-overlay, .shot:focus-visible .shot-overlay { opacity: 1; }
.shot.is-soon { cursor: default; }
.shot.is-soon .shot-thumb { filter: saturate(0.35); }
.shot.is-soon .mock { transform: rotate(-2.5deg) translateY(8px); }
.shot-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.shot-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: hsl(var(--tone) 85% 93%);
  color: hsl(var(--tone) 60% 40%);
}
:root[data-theme="dark"] .shot-avatar { background: hsl(var(--tone) 35% 24%); color: hsl(var(--tone) 80% 78%); }
.shot-name { min-width: 0; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-status { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.shot-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.shot.is-soon .shot-status::before { background: var(--border-strong); }
.shot-desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 900px) {
  .app { display: block; height: auto; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 86vw);
    height: auto;
    box-shadow: var(--shadow-md);
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
  }
  .sidebar.is-open { transform: none; }
  .main { height: auto; padding: 0; }
  .panel { height: auto; min-height: 100vh; overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 60px;
    padding: 10px 16px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
  }
  .app.is-home .topbar { display: flex; }
  .topbar .menu-btn { display: inline-grid; margin-left: -6px; }
  .view { overflow: visible; }
  .page { padding: 20px 16px 40px; }
  .prose { padding: 24px 16px 48px; }
  .home { padding: 28px 16px 48px; }
  .filter-row { margin-top: 32px; }
}

@media (max-width: 520px) {
  .modal-scrim { place-items: end center; padding: 0; }
  .modal { max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .tb-group { display: none; }
  .hero-search { height: 50px; padding-left: 18px; }
  .hero-search-btn { width: 36px; height: 36px; }
}

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

.theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }
