/* 云署 deploy-worker 样式 · 黑客风主题（2026-12-05 黑底绿字）
 * 在深色视觉重构（2026-12-04）与质感重构（2026-12-04）之上，只换主题与质感，
 * 不动布局、结构、功能、内容。
 *
 * 品牌色板（黑底绿字）：
 * - 基底纯黑 #000000，近黑 #050505；主绿矩阵绿 #00FF41，次绿 #00C853，亮绿 #00E676
 * - 主文本 #00FF41（黑底对比度 15.4:1），次级 #00A651（6.6:1，WCAG AA 过）；
 *   亮绿底上的文字用 --on-accent #001100（#00FF41 上对比度 14.2:1）
 * - 语义色保留：危险红 #f87171、警告琥珀 #fbbf24、星标 #f59e0b（黑底均过 AA）
 * - 渐变仅限按钮与重要标签，135°；圆角外层 16px / 内层 12px；4pt 间距网格
 * - 终端质感：body 极淡扫描线（repeating-linear-gradient，透明度 0.016）+ 绿光晕，
 *   克制使用，不做脏做花；标签 / 徽章 / 数字用 JetBrains Mono 等宽字体
 * 排版：英文 Inter / 中文 Noto Sans SC / 代码 JetBrains Mono（layout.ts 外链引入）
 * 字号：H1 48–56 / H2 36–40 / H3 24–28 / Body 16 / Caption 14，行高 1.6
 * 动效：只用 transform / opacity；移动端简化动效；触控目标 ≥44px
 * 断点：1024 / 768 / 480（覆盖 390px 手机）；表单字号 16px 防 iOS 聚焦放大
 * LOGO（static/img/logo.svg，内嵌 PNG）本身不动，黑底上靠 .brand-logo / .logo-halo 的绿光晕展示
 *
 * 质感规则（黑客风，全部以 :root token 为准，后续只允许引用这些变量）：
 * - 边界由明暗差 + 背景色差 + 阴影承担；border 只作 rgba(0,255,65,.12) 级绿收边，
 *   不得作为主要分隔手段。
 * - 阴影用带绿调的深色 rgba(0,18,0,α)；每档均为四层叠加
 *   （inset 顶部绿高光 + 1~2px 接触阴影 + 中层扩散 + 大范围环境阴影）。
 * - 表面禁止纯色平涂：卡片/面板用 0.5%~2% 明度差的极轻线性渐变（--surface-gradient-*）。
 * - 灰阶 8 档全部带绿调色相（绿 #00FF41 系），不用 #eee / #ccc 类中性灰。
 * - 交互至少两个维度：位置（translateY/scale）+ 光影（阴影收紧/扩散或高光位移），不只换颜色。
 * - 标题字重 600，正文 400，不滥用 700。
 * - 对比度：绿色正文与次级文字在黑色底上须过 WCAG AA（4.5:1）；量对比度时按真实合成值算，
 *   半透明色先和底色合成再算，不要把半透明层当不透明直接算。
 */
:root {
  /* 绿阶 8 档（带绿调；数字越大越深；--gray-100 为最亮正文绿） */
  --gray-100: #00ff41;
  --gray-200: #33e05c;
  --gray-300: #00a651;
  --gray-400: #008f3e;
  --gray-500: #0d1a0d;
  --gray-600: #081208;
  --gray-700: #050a05;
  --gray-800: #000000;
  --bg: var(--gray-800);
  --bg-deep: #050505;
  --bg-soft: var(--gray-700);
  --surface: rgba(0, 255, 65, .04);
  --surface-solid: #060a06;
  --surface-strong: rgba(0, 255, 65, .07);
  /* 表面渐变：0.5%~2% 明度差，替代纯色平涂 */
  --surface-gradient: linear-gradient(180deg, hsl(130 40% 7%), hsl(130 35% 5%));
  --surface-gradient-strong: linear-gradient(180deg, hsl(130 40% 9%), hsl(130 35% 6%));
  --surface-gradient-deep: linear-gradient(180deg, hsl(130 45% 6%), hsl(130 40% 4%));
  /* 收边：仅作 0.12 级绿 hairline，不承担分隔 */
  --border: rgba(0, 255, 65, .12);
  --border-soft: rgba(0, 255, 65, .07);
  --border-highlight: rgba(0, 255, 65, .5);
  /* 悬停时的强调收边（仅作点缀，主反馈由位移 + 阴影承担） */
  --border-accent: rgba(0, 255, 65, .3);
  --brand: #00c853;
  --brand-dark: #00913f;
  --cyan: #00ff41;
  --violet: #00e676;
  --ink: var(--gray-100);
  --text: var(--gray-100);
  --muted: var(--gray-300);
  /* 亮绿底上的文字（按钮 / 徽章等）：近黑绿，#00FF41 上对比度 14.2:1 */
  --on-accent: #001100;
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, .12);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, .12);
  --success: #00e676;
  --success-bg: rgba(0, 230, 118, .12);
  --amber: #f59e0b;
  /* 圆角 4 档：外层 16 / 内层 12 / 小 8 / 大 24 */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-lg: 24px;
  /* 间距 6 档（4pt 网格） */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  /* 阴影 4 档：inset 顶部绿高光 + 接触阴影 + 中层扩散 + 环境阴影（带绿调深色） */
  --shadow-sm: inset 0 1px 0 rgba(0, 255, 65, .06), 0 1px 2px rgba(0, 18, 0, .55), 0 2px 6px rgba(0, 18, 0, .35), 0 8px 16px rgba(0, 18, 0, .25);
  --shadow-md: inset 0 1px 0 rgba(0, 255, 65, .07), 0 1px 2px rgba(0, 18, 0, .5), 0 6px 16px rgba(0, 18, 0, .4), 0 16px 32px rgba(0, 18, 0, .3);
  --shadow-lg: inset 0 1px 0 rgba(0, 255, 65, .08), 0 2px 4px rgba(0, 18, 0, .5), 0 12px 28px rgba(0, 18, 0, .45), 0 28px 56px rgba(0, 18, 0, .35);
  --shadow-xl: inset 0 1px 0 rgba(0, 255, 65, .09), 0 2px 6px rgba(0, 18, 0, .55), 0 20px 44px rgba(0, 18, 0, .5), 0 40px 80px rgba(0, 18, 0, .4);
  /* 品牌光晕：顶部 inset 绿高光 + 底部 1px 暗边 + 品牌绿扩散 + 环境阴影 */
  --shadow-glow: inset 0 1px 0 rgba(0, 255, 65, .22), inset 0 -1px 0 rgba(0, 18, 0, .35), 0 1px 2px rgba(0, 18, 0, .5), 0 8px 24px rgba(0, 255, 65, .35), 0 16px 40px rgba(0, 18, 0, .35);
  --shadow-glow-lg: inset 0 1px 0 rgba(0, 255, 65, .22), inset 0 -1px 0 rgba(0, 18, 0, .35), 0 2px 4px rgba(0, 18, 0, .5), 0 12px 32px rgba(0, 255, 65, .42), 0 24px 48px rgba(0, 18, 0, .35);
  /* 焦点光环（box-shadow，不用 outline）与输入框聚焦内环 */
  --ring: 0 0 0 3px rgba(0, 255, 65, .3), 0 0 0 5px rgba(0, 255, 65, .12);
  --ring-inset: inset 0 1px 1px rgba(0, 18, 0, .3), 0 0 0 3px rgba(0, 255, 65, .2);
  /* 缓动 2 条 + 时长 3 档 */
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --ease-out: var(--ease-out-expo);
  --dur-micro: 120ms;
  --dur: 240ms;
  --dur-lg: 320ms;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    repeating-linear-gradient(0deg, rgba(0, 255, 65, .016) 0 1px, transparent 1px 3px),
    radial-gradient(900px 480px at 85% -10%, rgba(0, 255, 65, .09), transparent 60%),
    radial-gradient(800px 420px at -10% 0%, rgba(0, 200, 80, .08), transparent 60%),
    var(--bg);
  background-color: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  min-height: 100vh;
}
a { color: var(--cyan); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; text-shadow: 0 0 12px rgba(0, 255, 65, .45); }
/* 焦点反馈统一用 box-shadow 光环，禁用 outline（输入框另有自己的聚焦内环 + 外圈光环）。 */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
button:focus-visible, .btn:focus-visible { box-shadow: var(--shadow-glow), var(--ring); }
.btn-ghost:focus-visible { box-shadow: var(--ring); }
::selection { background: rgba(0, 255, 65, .35); color: var(--on-accent); }

/* 滚动条：黑底绿轨，与黑客主题一致（Firefox + WebKit） */
* { scrollbar-width: thin; scrollbar-color: rgba(0, 255, 65, .35) #000000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 65, .3); border-radius: 6px; border: 2px solid #000000; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 65, .55); }
::-webkit-scrollbar-corner { background: #000000; }
img { max-width: 100%; height: auto; }
h1 { font-size: clamp(40px, 5vw, 56px); line-height: 1.25; margin: 0 0 16px; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: clamp(30px, 3.5vw, 40px); line-height: 1.3; margin: 0 0 12px; color: var(--ink); font-weight: 600; }
h3 { font-size: clamp(22px, 2.5vw, 28px); line-height: 1.35; margin: 0 0 8px; color: var(--ink); font-weight: 600; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; }
code, .order-no { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
/* 黑客风：标签 / 徽章 / 数字 / 价格用等宽字体（JetBrains Mono） */
.badge, .badge-access, .status-badge, .type-pills a, .tabs a, .field-label,
.stats strong, .stat-strip strong, .demand-card__price, .rail-price,
.detail-actionbar__amount, .pay-modal__amount, .plan-price { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
code { background: var(--surface-strong); border: 1px solid var(--border-soft); border-radius: var(--radius-xs); padding: 4px 8px; font-size: .875em; }
button, input, select, textarea { font: inherit; color: inherit; }
select option { background: var(--bg-deep); color: var(--text); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--on-accent); padding: 12px 16px; border-radius: 0 0 var(--radius-xs) 0; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---- LOGO：图本身不动，浅色圆角底 + 光晕，适配深色底 ---- */
.brand-logo { width: 32px; height: 32px; display: block; border-radius: 50%; background: rgba(0, 255, 65, .06); padding: 4px; box-shadow: 0 0 0 1px rgba(0, 255, 65, .08), 0 0 20px rgba(0, 200, 80, .35); }
.logo-halo img { border-radius: var(--radius-sm); background: rgba(0, 255, 65, .05); padding: 8px; box-shadow: 0 0 0 1px rgba(0, 255, 65, .08), 0 0 36px rgba(0, 255, 65, .22); }

/* ---- 线性图标：2px 描边，悬停填充 + 微缩放 ---- */
.icon-line { width: 22px; height: 22px; flex-shrink: 0; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-micro) ease, fill var(--dur-micro) ease; }
a:hover .icon-line, button:hover .icon-line, .feature-card:hover .icon-line { fill: currentColor; transform: scale(1.08); }

/* ---- 图片统一色调：暗色叠加 + 色彩滤镜 ---- */
.media-tone, .delivery-logo { filter: saturate(.92) contrast(1.04) brightness(.96); }
.media-frame { position: relative; overflow: hidden; border-radius: var(--radius); }
.media-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55)); pointer-events: none; }

/* ---- 入场动效钩子（纯 CSS，transform / opacity；动效一路可用 GSAP 接管） ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp var(--dur-lg) var(--ease-out-expo) backwards; }
.fade-up--delay-1 { animation-delay: .08s; }
.fade-up--delay-2 { animation-delay: .16s; }
.fade-up--delay-3 { animation-delay: .24s; }
.demand-wall .demand-card:nth-child(2) { animation-delay: .06s; }
.demand-wall .demand-card:nth-child(3) { animation-delay: .12s; }
.demand-wall .demand-card:nth-child(4) { animation-delay: .18s; }
.stats > div:nth-child(2) { animation-delay: .05s; }
.stats > div:nth-child(3) { animation-delay: .1s; }
.stats > div:nth-child(4) { animation-delay: .15s; }

/* ---- 骨架屏（opacity 脉冲；动效一路挂数据时用 .skeleton 占位） ---- */
@keyframes skeletonPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.skeleton { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: rgba(0, 255, 65, .06); color: transparent !important; min-height: 20px; pointer-events: none; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 30%, rgba(0, 255, 65, .09) 50%, transparent 70%); animation: skeletonPulse 1.4s ease-in-out infinite; }

/* ---- 页眉 / 品牌 / 导航（透明底 → 滚动后毛玻璃，class 由内联滚动监听切换） ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: transparent; border-bottom: 1px solid transparent; transition: background-color var(--dur) ease, border-color var(--dur) ease, backdrop-filter var(--dur) ease; }
.site-header--scrolled { background: rgba(0, 6, 0, .78); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-bottom-color: var(--border); box-shadow: var(--shadow-md); }
.header-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; color: var(--text); line-height: 1; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.main-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.main-nav a { color: var(--text); font-size: 15px; padding: 12px; border-radius: var(--radius-sm); min-height: 44px; display: inline-flex; align-items: center; transition: background-color var(--dur) ease, color var(--dur) ease, transform var(--dur) var(--ease-out-expo); }
.main-nav a:hover { background: rgba(0, 255, 65, .08); text-decoration: none; color: var(--cyan); transform: translateY(-1px); }
.nav-user { color: var(--muted); font-size: 14px; padding: 12px 4px; }
.nav-toggle { display: none; margin-left: auto; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid rgba(0, 255, 65, .25); border-radius: var(--radius-sm); background: transparent; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }

main.wrap { padding-top: 48px; padding-bottom: 96px; }
main.wrap > section:last-child { margin-bottom: 0; }
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--muted); font-size: 14px; background: rgba(0, 6, 0, .6); }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--cyan); }

/* ---- 通用：次要文字 / 徽章 / 空态 / 提示 ---- */
.muted { color: var(--muted); font-size: 14px; }
.meta { color: var(--muted); font-size: 14px; margin: 4px 0; }
.badge { display: inline-block; font-size: 12px; line-height: 1.5; padding: 4px 12px; border-radius: 999px; background: var(--surface-gradient-deep); color: var(--text); vertical-align: middle; white-space: nowrap; border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); }
.badge-refund { background: var(--danger-bg); color: var(--danger); border-color: rgba(248, 113, 113, .3); }
.badge-private { background: linear-gradient(135deg, var(--violet), var(--brand)); color: var(--on-accent); border-color: transparent; }
.empty { color: var(--muted); background: var(--surface-gradient-deep); border: 1px dashed rgba(0, 255, 65, .2); border-radius: var(--radius); padding: 32px 16px; text-align: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }
.form-error { color: var(--danger); background: var(--danger-bg); border: 1px solid rgba(248, 113, 113, .3); padding: 12px 16px; border-radius: var(--radius-sm); }
.notice { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(251, 191, 36, .3); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.refund-line { color: var(--danger); }
.stars { color: var(--amber); letter-spacing: 1px; white-space: nowrap; }

/* ---- 错误微震动（.field-error 由服务端在出错时加到表单/错误条上） ---- */
@keyframes fieldShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.field-error { animation: fieldShake var(--dur-lg) ease; }
.field.field-error input, .field.field-error textarea { border-bottom-color: var(--danger); }
.field.field-error .field-label { color: var(--danger); }

/* ---- 按钮：实色填充 + 顶部 inset 高光 + 底部 1px 暗边 + 分层外阴影 ----
 * 交互两个维度：hover 上浮 1px 且阴影扩散；active 下沉 1px + scale(.98) 且阴影收紧。
 * focus-visible 用 box-shadow 光环；disabled 与 loading 均为独立态。 */
button { min-height: 44px; padding: 12px 24px; border: 0; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--brand), var(--cyan)); color: var(--on-accent); cursor: pointer; font-size: 16px; font-weight: 600; line-height: 1.4; box-shadow: var(--shadow-glow); transition: transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo), filter var(--dur) ease; }
button:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: var(--shadow-glow-lg); }
button:active { transform: translateY(1px) scale(.98); box-shadow: inset 0 1px 0 rgba(0, 255, 65, .18), inset 0 -1px 0 rgba(0, 18, 0, .35), 0 1px 2px rgba(0, 18, 0, .5), 0 4px 12px rgba(0, 200, 80, .3); }
button:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: saturate(.6); box-shadow: var(--shadow-sm); }
button.is-loading, .btn.is-loading { pointer-events: none; color: transparent; position: relative; }
button.is-loading::after, .btn.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid rgba(0, 17, 0, .35); border-top-color: var(--on-accent); border-radius: 50%; animation: btnSpin .7s linear infinite; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 28px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--brand), var(--cyan)); color: var(--on-accent); font-size: 16px; font-weight: 600; line-height: 1.4; box-shadow: var(--shadow-glow); transition: transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo), filter var(--dur) ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); text-decoration: none; box-shadow: var(--shadow-glow-lg); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: inset 0 1px 0 rgba(0, 255, 65, .18), inset 0 -1px 0 rgba(0, 18, 0, .35), 0 1px 2px rgba(0, 18, 0, .5), 0 4px 12px rgba(0, 200, 80, .3); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-ghost { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, rgba(0, 255, 65, .06), rgba(0, 255, 65, .02)); color: var(--cyan); border: 1px solid rgba(0, 255, 65, .35); box-shadow: inset 0 1px 0 rgba(0, 255, 65, .06), 0 1px 2px rgba(0, 18, 0, .4), 0 4px 12px rgba(0, 18, 0, .25); }
.btn-ghost::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, rgba(0, 200, 80, .22), rgba(0, 255, 65, .22)); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-lg) var(--ease-out-expo); }
.btn-ghost:hover::before { transform: scaleX(1); }
.btn-ghost:hover { color: var(--text); filter: none; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(0, 255, 65, .08), 0 1px 2px rgba(0, 18, 0, .4), 0 8px 20px rgba(0, 255, 65, .22), 0 12px 28px rgba(0, 18, 0, .3); }
.btn-ghost:active { transform: translateY(1px) scale(.98); box-shadow: inset 0 1px 0 rgba(0, 255, 65, .05), 0 1px 2px rgba(0, 18, 0, .45); }
.btn-magnetic { will-change: transform; }

/* ---- 首页 Hero：非对称网格，左文右图；右图区为实时动态墙（方案 B，2026-12-04） ---- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; background: var(--surface-gradient-strong); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px 40px; margin-bottom: calc(var(--space-8) * 2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-md); overflow: hidden; position: relative; }
.hero-copy h1 { font-size: clamp(44px, 6vw, 56px); margin-bottom: 16px; }
.hero-copy h1 .hero-accent { color: var(--cyan); text-shadow: 0 0 24px rgba(0, 255, 65, .35); }
.hero p { color: var(--muted); max-width: 560px; font-size: 17px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 0; }
.hero-visual { position: relative; border-radius: var(--radius); min-width: 0; }

/* ---- Hero 实时墙：最新需求卡 + 最近动态，全部真实数据 ---- */
.hero-live { display: flex; flex-direction: column; gap: 12px; background: var(--surface-gradient-deep); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.hero-live__head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(0, 230, 118, .5); animation: livePulse 2s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, .45); } 70% { box-shadow: 0 0 0 7px rgba(0, 230, 118, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); } }
.hero-live__hint { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }
.hero-live__cards { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-live__cards li { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo), border-color var(--dur) ease; }
.hero-live__cards li:hover { transform: translateY(-2px); border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.hero-live__cards li a { display: block; color: var(--ink); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.hero-live__cards li a:hover { color: var(--cyan); text-decoration: none; }
.hero-live__cards li span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.hero-live__feed { list-style: none; padding: 12px 0 0; margin: 0; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 12px; }
.hero-live__feed li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; min-width: 0; }
.hero-live__feed .feed-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--cyan); }
.hero-live__feed .feed-dot--payment_success { background: var(--success); }
.hero-live__feed .feed-dot--delivery_accepted { background: var(--success); }
.hero-live__feed .feed-dot--delivery_rejected { background: var(--danger); }
.hero-live__feed .feed-dot--quote_created, .hero-live__feed .feed-dot--quote_updated { background: var(--brand); }
.hero-live__feed .feed-dot--review_created { background: var(--warn); }
.hero-live__feed .feed-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.hero-live__feed .feed-text a { color: var(--ink); }
.hero-live__feed time { flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.hero-live__empty { color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---- 统计：玻璃卡片，关键数据 Semi-Bold；仪表盘 6 卡固定 3 列两行，不留孤卡 ---- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin: 0 0 calc(var(--space-8) * 2); }
.stats > div { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; min-width: 0; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo), border-color var(--dur) ease; animation: fadeUp var(--dur-lg) var(--ease-out-expo) backwards; }
.stats > div:hover { transform: translateY(-4px); border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.stats strong { display: block; font-size: 28px; line-height: 1.25; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.stats span { color: var(--muted); font-size: 14px; line-height: 1.4; display: block; margin-top: 4px; }

/* ---- 首页统计：细条（参考服务集市的信任条），不占卡片空间；比较基准只注一次 ---- */
.stat-strip { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; margin: 0 0 calc(var(--space-8) + var(--space-4)); padding: 0 2px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.stat-strip__asof { font-size: 12px; }
.stat-strip strong { color: var(--ink); font-weight: 600; font-size: 15px; margin-right: 4px; font-variant-numeric: tabular-nums; }

/* ---- 筛选：紧凑工具条（类型胶囊 + 单行控件），首页专用 ---- */
.filters.filters--home { background: transparent; border: 0; padding: 0; margin-bottom: var(--space-4); -webkit-backdrop-filter: none; backdrop-filter: none; }
.type-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.type-pills a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 16px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 13px; background: var(--surface-gradient-deep); box-shadow: var(--shadow-sm); transition: color var(--dur) ease, border-color var(--dur) ease, background var(--dur) ease, transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo); }
.type-pills a:hover { color: var(--ink); border-color: var(--border-accent); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.type-pills a.active { background: linear-gradient(135deg, var(--brand), var(--cyan)); border-color: transparent; color: var(--on-accent); box-shadow: var(--shadow-glow); }
.filters.filters--home form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.filters.filters--home select, .filters.filters--home input { flex: 0 1 auto; min-width: 0; min-height: 36px; padding: 8px 12px; border: 1px solid rgba(0, 255, 65, .16); border-radius: var(--radius-sm); background: var(--surface-gradient-deep); font-size: 14px; color: var(--text); box-shadow: inset 0 1px 2px rgba(0, 18, 0, .5), inset 0 0 0 1px rgba(0, 255, 65, .02); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.filters.filters--home select:focus, .filters.filters--home input:focus { border-color: var(--cyan); outline: none; box-shadow: var(--ring-inset); }
.filters.filters--home select[name="status"] { flex-basis: 128px; }
.filters.filters--home input[name="min_price"], .filters.filters--home input[name="max_price"] { flex-basis: 96px; }
.filters.filters--home input[name="q"] { flex: 1 1 160px; }
.filters.filters--home .price-sep { color: var(--muted); font-size: 13px; }
.filters.filters--home button { min-height: 36px; padding: 8px 16px; font-size: 14px; }

/* ---- 筛选 ---- */
.filters { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 32px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); }
/* 管理后台的筛选表单本身就是 .filters：横排 + 间距，否则 select 与按钮会贴在一起。 */
.admin .filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.admin .filters select { flex: 1 1 auto; min-width: 0; }
.admin .filters button { flex: 0 0 auto; }
.filters form { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.filters select, .filters input { flex: 1 1 140px; min-width: 0; min-height: 44px; padding: 12px; border: 1px solid rgba(0, 255, 65, .16); border-radius: var(--radius-sm); background: var(--surface-gradient-deep); font-size: 16px; color: var(--text); box-shadow: inset 0 1px 2px rgba(0, 18, 0, .5), inset 0 0 0 1px rgba(0, 255, 65, .02); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.filters select:focus, .filters input:focus { border-color: var(--cyan); outline: none; box-shadow: var(--ring-inset); }

/* ---- 需求墙 / 卡片：hover 上浮 8px + 投影加深 + 边框高亮 ---- */
.demand-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4); margin-bottom: calc(var(--space-8) + var(--space-4)); }
.demand-card { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; min-width: 0; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo), border-color var(--dur) ease; animation: fadeUp var(--dur-lg) var(--ease-out-expo) backwards; }
.demand-card:hover { transform: translateY(-8px); border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.demand-card h3 { font-size: 19px; overflow-wrap: anywhere; }
.demand-card h3 a { color: var(--ink); }
.demand-card h3 a:hover { color: var(--cyan); text-decoration: none; }
/* 卡片里最醒目的值是报价（18px / 600 / 正文色）；发布者退成 muted，只留链接。 */
.demand-card__price { font-size: 18px; font-weight: 600; color: var(--ink); margin: var(--space-2) 0; }
.demand-card__author a { color: var(--muted); }
.demand-card__author a:hover { color: var(--text); }
.reviews { list-style: none; padding: 0; }
.reviews li { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; overflow-wrap: anywhere; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo), border-color var(--dur) ease; }
.reviews li:hover { transform: translateY(-4px); border-color: var(--border-accent); box-shadow: var(--shadow-md); }

/* ---- 表单页（登录 / 注册 / 发布 / 管理）：底部线条 + 浮动标签 ---- */
.auth-form, .publish-form { max-width: 560px; background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin: 0 auto; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); }
.auth-logo, .about-logo, .maintenance-logo { text-align: center; margin: 0 0 16px; }
.auth-logo img, .about-logo img, .maintenance-logo img { display: inline-block; }
.auth-form h1, .publish-form h1 { text-align: center; font-size: clamp(30px, 4vw, 40px); }
.auth-form > p:last-child, .publish-form > p:last-child { text-align: center; }

/* 浮动标签字段：label 包裹 input + span.field-label，placeholder=" " 触发 :placeholder-shown。
 * 注意：.field 规则的优先级必须高于下面 .auth-form/.publish-form 的通用 input 规则
 * （两者同为 0,1,1 时后者胜出，曾把 padding-top 从 24px 压成 10px，导致浮动标签
 * 与输入文字重叠），所以这里用 .auth-form/.publish-form 前缀把优先级提到 0,2,1。 */
.field { position: relative; display: block; margin-bottom: 24px; font-size: 15px; }
.auth-form .field > input, .publish-form .field > input, .auth-form .field > textarea, .publish-form .field > textarea { display: block; width: 100%; margin-top: 0; min-height: 44px; padding: 24px 2px 8px; border: 0; border-bottom: 1px solid rgba(0, 255, 65, .2); border-radius: 0; font-size: 16px; background: transparent; color: var(--text); box-shadow: inset 0 -3px 6px -3px rgba(0, 18, 0, .7); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.auth-form .field > textarea, .publish-form .field > textarea { min-height: 120px; resize: vertical; }
.auth-form .field > input:focus, .publish-form .field > input:focus, .auth-form .field > textarea:focus, .publish-form .field > textarea:focus { outline: none; border-bottom-color: var(--cyan); box-shadow: inset 0 -1px 2px -1px rgba(0, 18, 0, .4), 0 1px 0 0 var(--cyan), 0 8px 18px -8px rgba(0, 255, 65, .45); }
.field-label { position: absolute; left: 2px; top: 20px; color: var(--muted); font-size: 16px; pointer-events: none; transform-origin: left top; transition: transform var(--dur) var(--ease-out-expo), color var(--dur) ease, font-size var(--dur) ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.field > input:focus + .field-label, .field > input:not(:placeholder-shown) + .field-label,
.field > textarea:focus + .field-label, .field > textarea:not(:placeholder-shown) + .field-label { transform: translateY(-18px) scale(.85); color: var(--cyan); }
.hint { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
/* 静态标签字段（select / radio 组）：标签在上，控件底部线条 */
.field--static > select, .field--static > input { display: block; width: 100%; margin-top: 8px; min-height: 44px; padding: 12px 2px; border: 0; border-bottom: 1px solid rgba(0, 255, 65, .2); border-radius: 0; font-size: 16px; background: transparent; color: var(--text); box-shadow: inset 0 -3px 6px -3px rgba(0, 18, 0, .7); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.field--static > select:focus, .field--static > input:focus { outline: none; border-bottom-color: var(--cyan); box-shadow: inset 0 -1px 2px -1px rgba(0, 18, 0, .4), 0 1px 0 0 var(--cyan), 0 8px 18px -8px rgba(0, 255, 65, .45); }
.auth-form label, .publish-form label { display: block; margin-bottom: 16px; font-size: 15px; }
.auth-form label.field, .publish-form label.field { margin-bottom: 24px; }
.auth-form input, .publish-form input, .publish-form textarea, .publish-form select { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 12px 2px; border: 0; border-bottom: 1px solid rgba(0, 255, 65, .2); border-radius: 0; font-size: 16px; background: transparent; color: var(--text); box-shadow: inset 0 -3px 6px -3px rgba(0, 18, 0, .7); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.auth-form input:focus, .publish-form input:focus, .publish-form textarea:focus, .publish-form select:focus { outline: none; border-bottom-color: var(--cyan); box-shadow: inset 0 -1px 2px -1px rgba(0, 18, 0, .4), 0 1px 0 0 var(--cyan), 0 8px 18px -8px rgba(0, 255, 65, .45); }
.publish-form textarea { min-height: 96px; resize: vertical; }
.publish-form fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0 0 20px; padding: 16px; background: rgba(0, 255, 65, .02); }
.publish-form fieldset legend { font-size: 14px; font-weight: 600; padding: 0 8px; color: var(--text); }
.publish-form label.radio { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; }
.publish-form label.radio input { width: auto; min-height: 0; accent-color: var(--brand); }
.publish-form label.inline select { width: auto; display: inline-block; }
.auth-form button, .publish-form button { width: 100%; margin-top: 8px; }

/* ---- 需求详情页 ---- */
.demand-detail > h1 { overflow-wrap: anywhere; }
.demand-detail section { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-6); margin-bottom: calc(var(--space-8) + var(--space-4)); min-width: 0; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); animation: fadeUp var(--dur-lg) var(--ease-out-expo) backwards; }
.demand-detail section h2 { font-size: clamp(24px, 3vw, 32px); padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); margin-bottom: 16px; }
.demand-detail section ul { list-style: none; padding: 0; }
.demand-detail section ul li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); overflow-wrap: anywhere; }
.demand-detail section ul li:last-child { border-bottom: 0; }
/* 报价单里最醒目的值是总价（18px / 600 / 正文色）。 */
.demand-detail .quote-total { font-size: 18px; font-weight: 600; color: var(--ink); }
.demand-detail section ol { padding-left: 20px; }
.demand-detail form { margin-top: 16px; }
.demand-detail form label { display: block; margin-bottom: 12px; font-size: 15px; }
.demand-detail form input, .demand-detail form textarea, .demand-detail form select { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 12px 2px; border: 0; border-bottom: 1px solid rgba(0, 255, 65, .2); border-radius: 0; font-size: 16px; background: transparent; color: var(--text); box-shadow: inset 0 -3px 6px -3px rgba(0, 18, 0, .7); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.demand-detail form input:focus, .demand-detail form textarea:focus, .demand-detail form select:focus { outline: none; border-bottom-color: var(--cyan); box-shadow: inset 0 -1px 2px -1px rgba(0, 18, 0, .4), 0 1px 0 0 var(--cyan), 0 8px 18px -8px rgba(0, 255, 65, .45); }
.demand-detail form textarea { min-height: 88px; resize: vertical; }
.demand-detail label.inline select { width: auto; display: inline-block; }
.demand-detail details { margin-top: 16px; }
.demand-detail summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--cyan); }
.delivery { border-top: 1px solid var(--border-soft); padding-top: 20px; margin-top: 20px; }
.delivery:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.delivery h3 { overflow-wrap: anywhere; }
.delivery-logo { max-width: 200px; display: block; margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-gradient-deep); padding: 4px; }
.timeline { padding-left: 20px; border-left: 2px solid rgba(0, 255, 65, .35); margin-left: 4px; }
.timeline li { margin-bottom: 16px; overflow-wrap: anywhere; }

/* ---- 静态页 / 关于页特性卡 / 用户主页 / 我的需求 ---- */
.static-page { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; overflow-wrap: anywhere; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); }
.static-page h1 { font-size: clamp(36px, 5vw, 48px); }
.about-lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 32px; text-align: center; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: 32px; }
.feature-card { background: var(--surface-gradient-deep); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo), border-color var(--dur) ease; }
.feature-card:hover { transform: translateY(-8px); border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.feature-card .icon-line { color: var(--cyan); margin-bottom: 12px; }
.feature-card h3 { font-size: 19px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 15px; margin: 0; }
.user-profile h1 { overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 24px 0; overflow-x: auto; overflow-y: hidden; }
.tabs a { padding: 12px 16px; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--dur) ease, border-color var(--dur) ease, transform var(--dur) var(--ease-out-expo); }
.tabs a:hover { color: var(--text); text-decoration: none; transform: translateY(-1px); }
.tabs a.active { color: var(--cyan); border-bottom: 2px solid var(--cyan); font-weight: 600; }
.my-demands { list-style: none; padding: 0; }
.my-demands li { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; overflow-wrap: anywhere; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out-expo), box-shadow var(--dur) var(--ease-out-expo), border-color var(--dur) ease; }
.my-demands li:hover { transform: translateY(-4px); border-color: var(--border-accent); box-shadow: var(--shadow-md); }
.my-demands .visibility-form { margin-top: 10px; }

/* ---- 支付页（易支付三通道，图标-only） ---- */
.pay-page { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); }
.pay-page h1 { margin-top: 0; }
.pay-order-summary { list-style: none; padding: 0; }
.pay-order-summary li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); overflow-wrap: anywhere; }
.deposit-notice { background: var(--warn-bg); border: 1px solid rgba(251, 191, 36, .4); color: var(--warn); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; }
.pay-warning { background: var(--warn-bg); border: 1px solid rgba(251, 191, 36, .4); color: var(--warn); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; }
.pay-saved { background: var(--success-bg); border: 1px solid rgba(0, 230, 118, .4); color: var(--success); border-radius: var(--radius-sm); padding: 12px 16px; }
.pay-methods { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.pay-method-form { margin: 0; }
.pay-method { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; line-height: 0; min-width: 88px; min-height: 88px; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out-expo), border-color var(--dur) ease, box-shadow var(--dur) var(--ease-out-expo); }
.pay-method:hover { border-color: var(--border-accent); background: var(--surface-gradient-strong); transform: translateY(-4px); box-shadow: var(--shadow-md); filter: none; }
.pay-method:active { transform: translateY(1px) scale(.98); box-shadow: var(--shadow-sm); }
.pay-method img { width: 56px; height: 56px; display: block; }
.pay-method-icon { width: 22px; height: 22px; vertical-align: middle; }
a .pay-method-icon { cursor: pointer; }

/* ---- 支付弹窗（详情页接受报价后，当前页弹出） ----
 * 四层阴影 + 渐变面；遮罩 rgba(20,20,25,.35) + blur(8px) saturate(120%)；
 * 入场：卡片 translateY(8px) scale(.96) → 原状，240ms ease-out-expo；
 * 遮罩单独 180ms ease-in-out；卡片内容依次 stagger 30ms（fill 用 backwards，
 * 动画结束后恢复自然样式，不阻塞 hover 的 transform）。 */
.pay-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pay-modal[hidden] { display: none; }
.pay-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 8, 0, .55); -webkit-backdrop-filter: blur(8px) saturate(120%); backdrop-filter: blur(8px) saturate(120%); }
.pay-modal__card { position: relative; width: min(440px, 100%); background: var(--surface-gradient-strong); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-xl); }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalItemIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.pay-modal:not([hidden]) .pay-modal__backdrop { animation: backdropIn 180ms var(--ease-in-out) backwards; }
.pay-modal:not([hidden]) .pay-modal__card { animation: modalIn var(--dur) var(--ease-out-expo) backwards; }
.pay-modal:not([hidden]) .pay-modal__card > * { animation: modalItemIn var(--dur) var(--ease-out-expo) backwards; }
.pay-modal:not([hidden]) .pay-modal__card > *:nth-child(2) { animation-delay: 30ms; }
.pay-modal:not([hidden]) .pay-modal__card > *:nth-child(3) { animation-delay: 60ms; }
.pay-modal:not([hidden]) .pay-modal__card > *:nth-child(4) { animation-delay: 90ms; }
.pay-modal:not([hidden]) .pay-modal__card > *:nth-child(5) { animation-delay: 120ms; }
.pay-modal:not([hidden]) .pay-modal__card > *:nth-child(n+6) { animation-delay: 150ms; }
.pay-modal__card h2 { margin: 0 0 12px; padding-right: 32px; }
/* 注意：motion.css 里 button:not(.btn-ghost) { position: relative }（0,1,1）会盖掉
 * 单类名的 position: absolute，所以这里用 .pay-modal__card 前缀把优先级提到 0,2,0。 */
.pay-modal__card .pay-modal__close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); background: transparent; border: 1px solid transparent; box-shadow: none; cursor: pointer; transition: transform var(--dur) var(--ease-out-expo), color var(--dur) ease, background-color var(--dur) ease, border-color var(--dur) ease, box-shadow var(--dur) ease; }
.pay-modal__card .pay-modal__close:hover { color: var(--text); border-color: var(--border); background: var(--surface); transform: scale(1.08); box-shadow: var(--shadow-sm); }
.pay-modal__amount { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.pay-modal__methods { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.pay-modal__method { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; line-height: 0; min-width: 88px; min-height: 88px; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease-out-expo), border-color var(--dur) ease, box-shadow var(--dur) var(--ease-out-expo); }
.pay-modal__method:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pay-modal__method:active { transform: translateY(1px) scale(.98); box-shadow: var(--shadow-sm); }
.pay-modal__method.is-selected { border-color: var(--cyan); box-shadow: inset 0 1px 0 rgba(0, 255, 65, .06), 0 0 0 3px rgba(0, 255, 65, .18), 0 4px 12px rgba(0, 18, 0, .35); }
.pay-modal__method img { width: 56px; height: 56px; display: block; }
.pay-modal__card form { margin: 0; }
/* 弹窗里只有一个动作：确认支付全宽。 */
.pay-modal__card #pay-modal-confirm { width: 100%; }
.pay-modal__card .muted { font-size: 14px; }

/* ---- 页脚自定义（富文本 + 社交媒体图标） ---- */
.footer-custom p { margin: 0 0 8px; }
.footer-custom ul, .footer-custom ol { margin: 0 0 8px; padding-left: 20px; }
.footer-custom a { text-decoration: underline; }
.footer-socials { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 16px; }
.footer-socials a { line-height: 0; opacity: .85; transition: opacity var(--dur-micro) ease, transform var(--dur) var(--ease-out-expo); }
.footer-socials a:hover { opacity: 1; transform: translateY(-2px); }
.footer-socials img { width: 22px; height: 22px; display: block; }

/* ---- 右侧悬浮客服组 ---- */
.floating-service { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 55; display: flex; flex-direction: column; gap: 12px; }
.floating-service__btn { width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-gradient-strong); border: 1px solid var(--border); box-shadow: var(--shadow-md); cursor: pointer; line-height: 0; transition: transform var(--dur) var(--ease-out-expo), border-color var(--dur) ease, box-shadow var(--dur) var(--ease-out-expo); }
.floating-service__btn:hover { transform: translateY(-2px) scale(1.05); border-color: var(--cyan); box-shadow: var(--shadow-lg); }
.floating-service__btn:active { transform: translateY(1px) scale(.98); box-shadow: var(--shadow-sm); }
.floating-service__btn img { width: 24px; height: 24px; display: block; }
/* 在线客服内嵌面板 */
.livechat-panel { position: fixed; right: 76px; top: 50%; transform: translateY(-50%); z-index: 56; width: min(360px, calc(100vw - 100px)); height: min(520px, calc(100vh - 40px)); background: var(--surface-gradient-strong); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xl); display: flex; flex-direction: column; overflow: hidden; }
.livechat-panel[hidden] { display: none; }
.livechat-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); font-weight: 600; }
.livechat-panel__head a { font-size: 13px; font-weight: 400; }
.livechat-panel__close { width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--muted); background: transparent; border: 1px solid transparent; box-shadow: none; cursor: pointer; transition: transform var(--dur) var(--ease-out-expo), color var(--dur) ease, border-color var(--dur) ease, box-shadow var(--dur) ease; }
.livechat-panel__close:hover { color: var(--text); border-color: var(--border); transform: scale(1.08); box-shadow: var(--shadow-sm); }
.livechat-panel iframe { flex: 1; width: 100%; border: 0; background: #fff; }
/* 微信二维码弹窗（复用 .pay-modal） */
.wechat-qr-card { text-align: center; }
.wechat-qr-card h2 { padding-right: 0; }
.wechat-qr-img { width: 220px; height: 220px; display: block; margin: 12px auto 4px; background: #fff; padding: 8px; border-radius: var(--radius-sm); }

/* ---- 管理后台：富文本编辑器与社交媒体行 ---- */
.rich-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rich-toolbar button { min-height: 36px; padding: 8px 12px; font-size: 14px; background: var(--surface-gradient-deep); border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: var(--text); }
.rich-toolbar button:hover { border-color: var(--border-accent); transform: translateY(-1px); filter: none; box-shadow: var(--shadow-md); }
.rich-toolbar button:active { transform: translateY(1px) scale(.98); box-shadow: var(--shadow-sm); }
.rich-editor { min-height: 120px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-gradient-deep); outline: none; box-shadow: inset 0 1px 2px rgba(0, 18, 0, .5), inset 0 0 0 1px rgba(0, 255, 65, .02); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.rich-editor:focus { border-color: var(--cyan); box-shadow: var(--ring-inset); }
.rich-editor p { margin: 0 0 8px; }
.social-rows { display: grid; gap: 8px; }
/* 注意：.admin-form label（0,1,1）会盖掉单类名 display:grid，这里必须带 label 前缀。 */
.admin-form label.social-row { display: grid; grid-template-columns: 22px 90px 1fr; gap: 12px; align-items: center; margin-bottom: 0; }
.social-row img { width: 22px; height: 22px; }
.social-row span { font-size: 14px; }
.qr-preview { margin: 8px 0; border-radius: var(--radius-xs); background: #fff; padding: 4px; }
.pay-done { background: var(--success-bg); border: 1px solid rgba(0, 230, 118, .4); border-radius: var(--radius-sm); padding: 12px 16px; color: var(--success); }
.pay-order-list h3 { margin: 20px 0 8px; font-size: 19px; }
.order-list { list-style: none; padding: 0; }
.order-list li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.order-no { font-size: 13px; overflow-wrap: anywhere; color: var(--muted); }
.order-amount { font-weight: 600; white-space: nowrap; }
.order-status { color: var(--muted); font-size: 14px; }

/* ---- 管理后台 ---- */
.admin-form, .admin-card { max-width: 720px; background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-6); margin-bottom: calc(var(--space-8) + var(--space-4)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); animation: fadeUp var(--dur-lg) var(--ease-out-expo) backwards; }
.admin-card { max-width: none; }
.admin-form label, .admin-card label { display: block; margin-bottom: 16px; font-size: 15px; }
.admin-form input, .admin-form textarea, .admin-form select,
.admin-card input, .admin-card textarea, .admin-card select { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 12px 2px; border: 0; border-bottom: 1px solid rgba(0, 255, 65, .2); border-radius: 0; font-size: 16px; background: transparent; color: var(--text); box-shadow: inset 0 -3px 6px -3px rgba(0, 18, 0, .7); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus,
.admin-card input:focus, .admin-card textarea:focus, .admin-card select:focus { outline: none; border-bottom-color: var(--cyan); box-shadow: inset 0 -1px 2px -1px rgba(0, 18, 0, .4), 0 1px 0 0 var(--cyan), 0 8px 18px -8px rgba(0, 255, 65, .45); }
.admin-form textarea, .admin-card textarea { min-height: 88px; resize: vertical; }
.admin-form fieldset, .admin-card fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0 0 20px; padding: 16px; background: rgba(0, 255, 65, .02); }
.admin-form fieldset legend { font-size: 14px; font-weight: 600; padding: 0 8px; }
.admin-form label.radio { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; }
.admin-form label.radio input { width: auto; min-height: 0; accent-color: var(--brand); }
.admin-form label.inline select { width: auto; display: inline-block; }
.admin-card ul { list-style: none; padding: 0; }
.admin-card ul li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); overflow-wrap: anywhere; }
.admin-card ul li:last-child { border-bottom: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-solid); box-shadow: inset -16px 0 16px -16px rgba(0, 18, 0, .65); }
.admin-table { width: 100%; min-width: 720px; border-collapse: collapse; background: transparent; font-size: 14px; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--border); padding: 12px 16px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.admin-table th { background: rgba(0, 255, 65, .04); white-space: nowrap; color: var(--muted); font-weight: 600; }
.admin-table tr { transition: background-color var(--dur-micro) ease; }
.admin-table tbody tr:hover { background: rgba(0, 255, 65, .03); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin .filters { margin-bottom: 24px; }
.admin h1 { overflow-wrap: anywhere; }
.admin-dashboard .stats { margin-bottom: calc(var(--space-8) + var(--space-4)); }
/* 仪表盘“最新需求”：标题 | 状态 | 日期三列，与后台表格左对齐一致。 */
.admin-recent li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-2) var(--space-4); align-items: baseline; }
.admin-recent__title { overflow-wrap: anywhere; min-width: 0; }
.admin-recent__status, .admin-recent__date { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ---- 维护页 ---- */
.maintenance h1 { text-align: center; }
.maintenance p { text-align: center; }

/* ---- 需求墙两栏 + 详情操作轨（B 轮：侧边栏与移动端排版） ---- */
/* B1 需求墙：主栏 1fr + 300px 右侧边栏；边栏三样全部取自现有数据/文案，不新编内容。 */
.wall-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-6); align-items: start; }
.wall-main { min-width: 0; }
.wall-main .demand-wall { margin-bottom: 0; }
.wall-publish { display: none; }
.wall-sidebar { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.sidebar-card { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.sidebar-card h2 { font-size: 18px; margin-bottom: 12px; }
.sidebar-card > p:last-child { margin-bottom: 0; }
.sidebar-types { list-style: none; padding: 0; margin: 0; }
.sidebar-types li { border-bottom: 1px solid var(--border-soft); }
.sidebar-types li:last-child { border-bottom: 0; }
.sidebar-types a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 2px; color: var(--text); font-size: 15px; }
.sidebar-types a:hover { color: var(--cyan); text-decoration: none; }
.sidebar-types a.active { color: var(--cyan); font-weight: 600; }
.sidebar-types a span { color: var(--muted); font-size: 13px; }
.sidebar-cta p { margin-bottom: 16px; }
.sidebar-cta .btn { width: 100%; }
.sidebar-how { padding-left: 20px; margin: 0 0 12px; }
.sidebar-how li { padding: 4px 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* B2 详情页：主栏 + 300px 右侧操作轨（sticky，滚动时一直可见）。 */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-6); align-items: start; }
.detail-rail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.rail-card { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.rail-card h2 { font-size: 18px; margin-bottom: 12px; }
.rail-card > p:last-child { margin-bottom: 0; }
.rail-price { font-size: 22px; font-weight: 600; color: var(--cyan); margin: 0 0 12px; }
.rail-card ul { list-style: none; padding: 0; margin: 0 0 16px; }
.rail-card ul li { padding: 6px 0; border-bottom: 1px solid var(--border-soft); font-size: 15px; overflow-wrap: anywhere; }
.rail-card ul li:last-child { border-bottom: 0; }
.rail-card .btn { width: 100%; }
.rail-author__row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rail-author__row a { font-weight: 600; overflow-wrap: anywhere; }
.rail-avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--cyan)); color: var(--on-accent); font-size: 18px; font-weight: 600; flex: none; }
/* 状态徽章用语义色（只在操作轨的状态卡用）：待处理 warn、进行中 info、已完成 success。 */
.status-badge { display: inline-block; font-size: 13px; font-weight: 600; line-height: 1.5; padding: 4px 12px; border-radius: 999px; border: 1px solid; }
.status-badge--warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(251, 191, 36, .3); }
.status-badge--info { color: var(--cyan); background: rgba(0, 255, 65, .1); border-color: rgba(0, 255, 65, .3); }
.status-badge--success { color: var(--success); background: var(--success-bg); border-color: rgba(0, 230, 118, .3); }
/* B3 移动端底部操作条：桌面隐藏，≤1024px 显示（见响应式一节）。 */
.detail-actionbar { display: none; }

/* A 轮分类管理页：行内编辑的输入框（.admin-table 本身没有输入样式，补上深色表单样式）。 */
.admin-table input[type="text"], .admin-table input[type="number"] { width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px; border: 1px solid rgba(0, 255, 65, .16); border-radius: var(--radius-xs); background: var(--surface-gradient-deep); font-size: 14px; color: var(--text); }
.admin-table input[type="text"]:focus, .admin-table input[type="number"]:focus { outline: none; border-color: var(--cyan); }

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 40px 28px; }
  /* B1/B2：两栏改上下堆叠，边栏叠到主栏下方；操作轨取消 sticky。 */
  .wall-layout, .detail-layout { grid-template-columns: 1fr; }
  .detail-rail { position: static; }
  /* B3：列表页墙顶全宽“发布需求”按钮。 */
  .wall-publish { display: inline-flex; width: 100%; margin-bottom: var(--space-4); }
  /* B3：详情页底部操作条（sticky 贴底，滑到页脚时随主栏收起，不遮页脚）；
   * 移动端只留这一处接受/支付按钮，操作轨与报价单里的按钮隐藏，避免重复。 */
  .detail-actionbar { position: sticky; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin: 0 -16px; background: var(--surface-solid); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(0, 18, 0, .5); }
  .detail-actionbar .btn { min-height: 44px; padding: 10px 20px; flex: none; }
  .detail-actionbar__amount { font-size: 15px; font-weight: 600; color: var(--cyan); overflow-wrap: anywhere; min-width: 0; }
  .detail-rail__accept, .demand-detail #accept-quote-form { display: none; }
}
@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .hero { padding: 32px 20px; margin-bottom: 48px; }
  .hero-copy h1 { font-size: 38px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 48px; }
  .demand-wall { gap: 16px; margin-bottom: 48px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin-left: 0; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
  @keyframes navDrop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
  .main-nav.nav-open { display: flex; animation: navDrop var(--dur-lg) var(--ease-out-expo) backwards; }
  .main-nav a, .nav-user { min-height: 44px; padding: 12px 4px; border-bottom: 1px solid var(--border-soft); }
  .main-nav a:last-child { border-bottom: 0; }
  .demand-detail section, .admin-form, .admin-card, .pay-page, .static-page { padding: 20px; }
  .auth-form, .publish-form { padding: 24px 20px; }
  main.wrap { padding-top: 32px; padding-bottom: 64px; }
  /* 管理后台表格在平板/手机上收窄并藏次要列，减少横向滑动距离。 */
  .admin-table { min-width: 600px; }
  .admin-table th, .admin-table td { padding: 12px; }
  .admin-table .col-visibility, .admin-table .col-outcome, .admin-table .col-recipient { display: none; }
  /* B3 详情页移动端字体层级：标题 22–24px、段标题 17–18px、正文 15px、辅助 13px；
   * 段标题前 3px 强调色条；价格用强调色（.rail-price / .detail-actionbar__amount），
   * 状态徽章用语义色（.status-badge）。 */
  .demand-detail > h1 { font-size: 23px; line-height: 1.35; }
  .demand-detail section { padding: 16px; margin-bottom: 24px; font-size: 15px; }
  .demand-detail section h2 { font-size: 17px; padding-bottom: 8px; margin-bottom: 12px; }
  .demand-detail section h2::before { content: ''; display: inline-block; width: 3px; height: 1em; margin-right: 8px; vertical-align: -.1em; background: var(--cyan); border-radius: 2px; }
  .demand-detail .meta, .demand-detail .muted { font-size: 13px; }
  .sidebar-card h2, .rail-card h2 { font-size: 17px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  main.wrap { padding-top: 24px; padding-bottom: 48px; }
  .hero { padding: 28px 16px; margin-bottom: 40px; }
  .hero-copy h1 { font-size: 34px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 40px; }
  .stats > div { padding: 16px; }
  .stats strong { font-size: 22px; }
  .filters select, .filters input { flex: 1 1 100%; }
  .filters button { flex: 1 1 100%; }
  /* 首页工具条在手机上仍保持紧凑：两列控件，字号 16px 防 iOS 聚焦放大 */
  .filters.filters--home select, .filters.filters--home input { flex: 1 1 40%; font-size: 16px; }
  .filters.filters--home input[name="q"] { flex: 1 1 100%; }
  .filters.filters--home button { flex: 0 0 auto; }
  .hero-actions .btn { flex: 1 1 100%; }
  /* 仪表盘“最新需求”在手机上上下堆叠：标题一行，状态、日期各一行。 */
  .admin-recent li { grid-template-columns: 1fr; gap: var(--space-1); }
  .demand-wall { grid-template-columns: 1fr; margin-bottom: 40px; }
  .pay-methods { gap: 12px; }
  .pay-method { min-width: 80px; min-height: 80px; }
  .pay-method img { width: 48px; height: 48px; }
  .order-list li { gap: 8px; }
  .floating-service { right: 10px; }
  .floating-service__btn { width: 42px; height: 42px; }
  .livechat-panel { right: 60px; width: min(360px, calc(100vw - 84px)); }
  /* 社交媒体行在手机上改上下堆叠：图标+名称一行，输入框独占一行，方便粘贴长链接。 */
  .admin-form label.social-row { display: block; }
  .social-row input { margin-top: 6px; }
}

/* ---- 移动端简化动效 + 减弱动效偏好 ---- */
@media (max-width: 768px) {
  .fade-up, .demand-card, .stats > div, .admin-card, .admin-form, .demand-detail section { animation-duration: var(--dur-lg); }
  .demand-card:hover, .stats > div:hover, .feature-card:hover, .reviews li:hover, .my-demands li:hover { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---- CMS 第一期：文章 / 付费墙 / 会员（沿用现有 tokens，不另起配色） ---- */
.home-articles { margin: 40px 0 8px; }
.home-articles__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.home-articles__head h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.article-card { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.article-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 12px; }
.article-card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; }
.article-card__excerpt { color: var(--muted); font-size: 14px; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card__price { font-weight: 600; color: var(--text); }
.badge-access { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-access--public { background: var(--success-bg); color: var(--success); }
.badge-access--paid { background: var(--warn-bg); color: var(--warn); }
.badge-access--vip { background: rgba(0, 255, 65, .16); color: #7cff9b; border: 1px solid rgba(0, 255, 65, .4); }
.articles-page .filters { margin-bottom: 16px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 24px 0; flex-wrap: wrap; }
.article-detail { max-width: 820px; margin: 0 auto; }
.article-detail h1 { font-size: clamp(28px, 4vw, 40px); }
.article-cover { width: 100%; border-radius: var(--radius); margin: 16px 0; }
.article-excerpt { color: var(--muted); font-size: 17px; border-left: 3px solid var(--border-accent); padding-left: 12px; }
.article-tags a { display: inline-block; margin: 0 8px 8px 0; padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; }
.article-content { font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.article-content h2 { font-size: 24px; margin: 28px 0 12px; }
.article-content h3 { font-size: 20px; margin: 24px 0 10px; }
.article-content img, .article-content video { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.article-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.article-content pre { background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.article-content pre code { font-family: "JetBrains Mono", ui-monospace, monospace; }
.article-content code { font-family: "JetBrains Mono", ui-monospace, monospace; background: var(--surface-strong); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.article-content pre code { background: transparent; padding: 0; }
.article-content blockquote { border-left: 3px solid var(--border-accent); margin: 16px 0; padding: 4px 16px; color: var(--muted); }
.article-content--trial { opacity: .92; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 16px 0; }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }
.paywall { background: var(--surface-gradient-strong); border: 1px solid var(--border-accent); border-radius: var(--radius); padding: 24px; margin: 28px 0; text-align: center; }
.paywall h2 { margin-top: 0; }
.paywall .pay-methods { justify-content: center; }
/* 富文本编辑器（暗色主题，沿用云署 tokens） */
.article-form { max-width: 860px; margin: 0 auto; }
.article-form label { display: block; margin-bottom: 16px; font-size: 15px; }
.article-form input, .article-form select, .article-form textarea { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 16px; background: var(--surface-solid); color: var(--text); }
/* hidden 的 file input 不能被上面的 display:block 盖掉，否则会露出原生文件选择框。 */
.article-form input[hidden] { display: none; }
.article-form textarea { min-height: 80px; resize: vertical; }
.form-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.form-row > label { flex: 1 1 200px; }
.form-row__btn { padding-bottom: 16px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface-solid); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-xs) var(--radius-xs) 0 0; padding: 8px; }
.editor-toolbar button, .editor-toolbar select { min-height: 36px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface); color: var(--text); font-size: 14px; cursor: pointer; }
.editor-toolbar button:hover { border-color: var(--border-accent); }
.editor-toolbar .color-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.editor-toolbar .color-btn input { width: 36px; height: 28px; padding: 0; border: 0; background: transparent; }
.editor-area { min-height: 360px; padding: 16px; border: 1px solid var(--border); border-radius: 0 0 var(--radius-xs) var(--radius-xs); background: var(--bg-deep); color: var(--text); font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.editor-area:focus { outline: none; box-shadow: var(--ring-inset); }
.editor-area img, .editor-area video { max-width: 100%; height: auto; }
.editor-area table { border-collapse: collapse; width: 100%; }
.editor-area th, .editor-area td { border: 1px solid var(--border); padding: 6px 10px; }
.editor-area pre { background: var(--bg-soft); padding: 12px; overflow-x: auto; border-radius: var(--radius-xs); }
/* 会员页 */
.membership-page { max-width: 860px; margin: 0 auto; }
.membership-status { background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card { background: var(--surface-gradient-strong); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.plan-card h3 { margin-top: 0; }
.plan-price { font-size: 28px; font-weight: 700; }
.plan-price span { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan-card ul { padding-left: 20px; color: var(--muted); }
.plan-card .pay-methods { justify-content: flex-start; }
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .article-grid, .plan-grid { grid-template-columns: 1fr; }
  .home-articles__head { flex-wrap: wrap; }
  .article-content { font-size: 16px; }
}

/* 电子书 / 课程（CMS 第二期） */
.ebook-detail { max-width: 820px; margin: 0 auto; }
.ebook-detail h1 { font-size: clamp(26px, 4vw, 36px); }
.toc { margin: 16px 0; }
.toc ul { list-style: none; margin: 0; padding-left: 0; }
.toc ul ul { padding-left: 20px; border-left: 2px solid var(--border); margin: 4px 0 4px 6px; }
.toc li { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc-current > a { font-weight: 700; color: var(--text); }
.badge-preview { background: var(--surface-strong); border: 1px solid var(--border-accent); color: var(--text); font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.attachment-list li { margin: 8px 0; overflow-wrap: anywhere; }
.link-btn { background: none; border: 0; padding: 0; margin: 0 4px; color: var(--brand, #00c853); cursor: pointer; font-size: 14px; text-decoration: underline; }
.link-btn--danger { color: #d64545; }
/* 阅读页：左侧章节树 + 右侧内容区 + 顶部进度条 */
.reader { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.reader-toc-toggle { display: none; }
.reader-toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; background: var(--surface-gradient); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.reader-toc__book { font-weight: 700; margin: 0 0 12px; overflow-wrap: anywhere; }
.reader-main { min-width: 0; }
.reader-progress { height: 6px; background: var(--surface-strong); border-radius: 999px; overflow: hidden; }
.reader-progress span { display: block; height: 100%; background: var(--brand, #00c853); }
.reader-progress__text { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.reader-article h1 { font-size: clamp(24px, 4vw, 34px); }
.reader-nav { display: flex; justify-content: space-between; gap: 16px; margin: 32px 0; flex-wrap: wrap; }
.reader-nav a { overflow-wrap: anywhere; }
.reader-tools { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 8px; }
.reader-exercises { margin: 28px 0; }
.exercise { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 12px; background: var(--surface-gradient); }
.exercise summary { cursor: pointer; font-weight: 600; }
.note-list { list-style: none; padding: 0; }
.note-list li { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 12px; overflow-wrap: anywhere; }
.note-form textarea { display: block; width: 100%; min-height: 80px; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 16px; background: var(--surface-solid); color: var(--text); resize: vertical; }
@media (max-width: 900px) {
  .reader { grid-template-columns: minmax(0, 1fr); }
  .reader-toc-toggle { display: inline-block; margin-bottom: 12px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-solid); color: var(--text); font-size: 15px; cursor: pointer; }
  .reader-toc { display: none; position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: min(320px, 86vw); max-height: none; border-radius: 0; box-shadow: var(--shadow-sm); overflow-y: auto; }
  .reader-toc--open { display: block; }
}

/* API 密钥 TAB：一次性密钥横幅 + 提示词文本框（复用 .btn/.card 风格） */
.key-banner { background: var(--surface-gradient); border: 1px solid var(--border-accent); border-radius: var(--radius); padding: 16px; margin: 16px 0; box-shadow: var(--shadow-sm); }
.key-value { overflow-wrap: anywhere; }
.key-value code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 15px; background: var(--surface-strong); padding: 8px 12px; border-radius: var(--radius-xs); display: inline-block; }
.key-warning { color: var(--warn); font-size: 14px; }
.prompt-box { display: block; width: 100%; min-height: 320px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-solid); color: var(--text); font-size: 14px; line-height: 1.6; resize: vertical; }
.apikey-form input[type="text"] { width: min(420px, 100%); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-solid); color: var(--text); font-size: 16px; }
.apikey-form label { display: block; margin: 8px 0; }
/* 接口文档页：表格与代码块 */
.api-docs table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.api-docs th, .api-docs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.api-docs th { color: var(--muted); font-size: 13px; }
.api-docs pre { background: var(--surface-strong); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
