:root {
  --paper: #f6f2e9;
  --paper-2: #fbf8f1;
  --paper-3: #efe9dc;
  --ink: #17140f;
  --ink-2: #2c271f;
  --muted: #7d7466;
  --muted-2: #a79d8d;
  --line: #e2dacb;
  --line-2: #d3c9b7;
  --accent: #ff5c2b;            /* 默认橙；主题由 assets/js/theme.js 运行时覆盖 */
  --accent-dark: #e64718;
  --accent-soft: #ffe0d2;
  --accent-on: #fff;            /* 主色上的文字/图标色（深色主色为白，亮色主色自动转墨） */
  --accent-rgb: 255,92,43;      /* 供 rgba(var(--accent-rgb), .x) 使用 */
  --lime: #d9f07c;
  --lime-dark: #b9d24e;
  --sage: #1e3a2c;
  --blue: #bfe3f2;
  --white: #fffdf8;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-xl: 34px;
  --shadow-s: 0 2px 10px rgba(32, 24, 12, 0.06);
  --shadow-m: 0 14px 40px rgba(32, 24, 12, 0.1);
  --shadow-l: 0 30px 80px rgba(32, 24, 12, 0.16);
  --font: "SF Pro SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-latin: "Helvetica Neue", "Arial", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--accent-on); }

.container {
  width: min(1280px, calc(100% - 88px));
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--accent-on); box-shadow: 0 10px 26px rgba(var(--accent-rgb), 0.26); }
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 14px 32px rgba(var(--accent-rgb), 0.32); }
.btn-ink { background: var(--ink); color: var(--paper-2); }
.btn-ink:hover { background: #2c271f; }
.btn-ghost { border: 1px solid var(--line-2); background: transparent; }
.btn-ghost:hover { background: var(--white); border-color: var(--ink); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #e5f79a; }
.btn-sm { height: 38px; padding: 0 18px; font-size: 13px; }
.btn-lg { height: 58px; padding: 0 34px; font-size: 15px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 11px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
}
.tag-accent { background: var(--accent-soft); border-color: rgba(var(--accent-rgb), 0.25); color: var(--accent-dark); }
.tag-lime { background: var(--lime); border-color: transparent; }
.tag-dark { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.logo-img { display: block; width: auto; height: 34px; }
.footer-brand .logo-img { height: 56px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 242, 233, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 218, 203, 0.7);
}
.site-header .container {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a {
  position: relative;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-2);
  padding: 6px 0;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.site-nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-link { font-size: 13px; font-weight: 550; color: var(--muted); }
.header-link:hover { color: var(--ink); }
a.header-link { text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit; }

.site-footer {
  background: var(--ink);
  color: var(--paper-2);
  padding: 70px 0 0;
  margin-top: 100px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 50px;
  padding-bottom: 60px;
}
.footer-brand p {
  margin-top: 22px;
  max-width: 300px;
  color: rgba(255, 253, 248, 0.55);
  font-size: 13px;
  line-height: 1.8;
}
.footer-col h4 {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  color: rgba(255, 253, 248, 0.4);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col a, .footer-col span {
  display: block;
  font-size: 13px;
  color: rgba(255, 253, 248, 0.78);
  margin-bottom: 12px;
}
.footer-col a:hover { color: var(--lime); }
.footer-sub {
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: var(--radius-m);
  padding: 22px;
}
.footer-sub p { font-size: 13px; color: rgba(255, 253, 248, 0.6); margin-bottom: 16px; }
.footer-sub .field { display: flex; gap: 8px; }
.footer-sub input {
  flex: 1;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  background: rgba(255, 253, 248, 0.06);
  color: var(--paper-2);
  padding: 0 16px;
  font-size: 12px;
  outline: none;
}
.footer-sub input::placeholder { color: rgba(255, 253, 248, 0.3); }
.footer-sub button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 253, 248, 0.12);
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(255, 253, 248, 0.4);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom a:hover { color: var(--lime); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper-2);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: var(--shadow-l);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); flex: none; }

.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.fade-up.in { opacity: 1; transform: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfc5b4; border-radius: 99px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #b3a794; }

@media (max-width: 1024px) {
  .container { width: calc(100% - 48px); }
  .site-nav { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .header-actions .header-link { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; justify-content: center; gap: 10px; height: auto; padding: 24px 0; }
  .footer-bottom-links { gap: 16px; }
  .site-footer { margin-top: 60px; padding-top: 50px; }
}

/* AI 设计师 Agent 聊天窗 */
#plAgentFab {
  position: fixed; right: 26px; bottom: 30px; z-index: 70;
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #17140f, #3a332a); color: #fffdf8;
  border-radius: 999px; padding: 12px 20px; font-size: 13.5px; font-weight: 700;
  box-shadow: 0 14px 34px rgba(23,20,15,0.32); transition: transform 0.15s;
}
#plAgentFab:hover { transform: translateY(-2px); }
.pl-agent-panel {
  position: fixed; right: 26px; bottom: 88px; z-index: 70; width: 400px; max-width: calc(100vw - 40px);
  background: #fffdf8; border: 1px solid #e2dacb; border-radius: 16px;
  box-shadow: 0 30px 70px rgba(23,20,15,0.22); display: flex; flex-direction: column;
  max-height: min(78vh, 720px); overflow: hidden;
}
.pl-agent-panel[hidden] { display: none; }
.pl-agent-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid #efe9dc; background: #fffdf8;
}
.pl-agent-head b { font-size: 14.5px; display: block; }
.pl-agent-head small { font-size: 10.5px; color: #a79d8d; display: block; margin-top: 2px; }
.pl-agent-quota { font-size: 10.5px; color: #7d7466; background: #f6f2e9; border-radius: 999px; padding: 3px 9px; }
.pl-agent-close { margin-left: auto; border: 0; background: none; cursor: pointer; color: #a79d8d; font-size: 14px; }
.pl-agent-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.pl-agent-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.65; }
.pl-agent-msg.ai { background: #f6f2e9; color: #2c271f; align-self: flex-start; border-bottom-left-radius: 4px; }
.pl-agent-msg.user { background: var(--accent); color: var(--accent-on); align-self: flex-end; border-bottom-right-radius: 4px; }
.pl-agent-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: plAgentBlink 1s infinite; }
@keyframes plAgentBlink { 50% { opacity: 0.25; } }
.pl-agent-preview { padding: 0 16px 8px; }
.pl-agent-preview[hidden] { display: none; }
.pl-agent-faces { display: flex; gap: 10px; justify-content: center; }
.pl-agent-face { position: relative; width: 46%; border-radius: 10px; border: 1px solid #efe9dc; background: #fff; overflow: hidden; }
.pl-agent-face svg { width: 100%; height: auto; display: block; }
.pl-agent-face i { position: absolute; left: 8px; bottom: 6px; font-style: normal; font-size: 10px; color: #a79d8d; background: rgba(255,253,248,.8); border-radius: 6px; padding: 1px 6px; }
.pl-agent-boxfaces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pl-agent-boxface { position: relative; border-radius: 8px; border: 1px solid #efe9dc; height: 64px; padding: 6px; overflow: hidden; }
.pl-agent-boxface i { font-style: normal; font-size: 9.5px; color: #a79d8d; display: block; }
.pl-agent-boxface b { font-size: 10.5px; color: #2c271f; line-height: 1.4; font-weight: 600; display: block; margin-top: 3px; }
.pl-agent-state { padding: 0 16px 10px; }
.pl-agent-state[hidden] { display: none; }
.pl-agent-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-agent-chips span { font-size: 10.5px; color: #2c271f; background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; }
.pl-agent-go { display: block; text-align: center; margin-top: 8px; background: #17140f; color: #fffdf8; border-radius: 10px; padding: 9px; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.pl-agent-go:hover { background: var(--accent); }
.pl-agent-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #efe9dc; }
.pl-agent-input textarea {
  flex: 1; border: 1px solid #e2dacb; border-radius: 10px; padding: 9px; font-size: 12.5px;
  resize: none; font-family: inherit; background: #fff; color: #2c271f;
}
.pl-agent-send { border: 0; background: var(--accent); color: var(--accent-on); border-radius: 10px; padding: 0 16px; cursor: pointer; font-weight: 700; font-size: 13px; font-family: inherit; }
.pl-agent-send[disabled] { opacity: 0.55; }
.pl-agent-step { font-size: 11.5px; color: #4f6b2f; padding: 1px 0; }
.pl-agent-step.pending { color: #a79d8d; }

/* Agent 聊天窗 · 盒 3D 预览 */
.pl-agent-3d {
  position: relative; height: 200px; display: grid; place-items: center;
  perspective: 640px; cursor: grab; user-select: none; touch-action: none;
  border: 1px solid #efe9dc; border-radius: 12px; background: radial-gradient(circle at 50% 30%, #fffdf8, #f6f2e9);
  overflow: hidden; outline: none;
}
.pl-agent-3d:active { cursor: grabbing; }
.pl-agent-3d-inner { position: relative; width: 0; height: 0; transform-style: preserve-3d; transition: transform 0.05s linear; }
.pl-agent-3d-face {
  position: absolute; left: 0; top: 0; transform-style: preserve-3d;
  backface-visibility: hidden; border: 1px solid rgba(43,38,32,0.16);
  border-radius: 2px; overflow: hidden;
}
.pv-text {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: Georgia, "PingFang SC", serif; line-height: 1.3;
}
.pv-logo { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.pv-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pl-agent-3d-hint {
  position: absolute; bottom: 6px; right: 10px; font-size: 10px; color: #a79d8d;
  background: rgba(255,253,248,.85); border-radius: 6px; padding: 2px 8px; pointer-events: none;
}

/* AI 设计师图标（SVG 星芒，替代 emoji） */
#plAgentFab svg { width: 18px; height: 18px; flex: none; }
#plAgentFab span { line-height: 1; }
.pl-agent-head b svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
