/* ============================================================
   橙子手绘图生成器 · PC/移动 网站原型
   设计系统 1:1 对齐参考站（shouhuitu.com）真实 token
   色值为参考站 shadcn/Tailwind 变量原值，尺度取 Tailwind 标准档
   ============================================================ */
:root {
  /* —— 参考站 HSL 变量原值 —— */
  --background: 30 20% 94%;
  --foreground: 25 30% 25%;
  --card: 30 25% 96%;
  --card-foreground: 25 30% 25%;
  --primary: 25 35% 55%;
  --primary-foreground: 30 20% 98%;
  --secondary: 30 20% 88%;
  --muted: 30 20% 90%;
  --muted-foreground: 25 20% 45%;
  --accent: 25 30% 75%;
  --accent-foreground: 25 30% 25%;
  --destructive: 0 84% 60%;
  --border: 30 15% 85%;
  --input: 30 15% 85%;
  --ring: 25 35% 55%;
  --radius: 0.5rem;

  /* —— Tailwind 补充色 —— */
  --amber-50: #fffbeb;
  --amber-200: #fde68a;
  --amber-600: #d97706;
  --amber-800: #92400e;
  --yellow-500: #eab308;
  --green-600: #16a34a;

  /* —— 投影（Tailwind 原值） —— */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875em;
  background: hsl(var(--muted)); border-radius: 4px; padding: 1px 6px; }
::selection { background: hsl(var(--accent)); }

/* 容器：参考站 max-w-7xl + px-4 sm:px-6 lg:px-8 */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 640px) { .container { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .container { padding-left: 32px; padding-right: 32px; } }

/* ---------- 顶部导航（sticky h-16） ---------- */
.site-header {
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  position: sticky; top: 0; z-index: 50;
}
.nav { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 32px; width: auto; }
.brand span { margin-left: 8px; font-size: 20px; font-weight: 700; color: hsl(var(--primary)); letter-spacing: .2px; }
.nav-desktop { display: none; align-items: center; gap: 0; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-link {
  padding: 8px 12px; font-size: 14px; font-weight: 500; border-radius: 6px;
  color: hsl(var(--foreground)); transition: all .3s;
}
.nav-link:hover { color: hsl(var(--primary)); background: hsl(var(--accent)); }
.nav-link.active { color: hsl(var(--primary)); background: hsl(var(--accent)); }
.nav-auth { display: flex; align-items: center; gap: 8px; margin-left: 16px; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; background: transparent; border-radius: 6px;
  cursor: pointer; color: hsl(var(--foreground));
}
.nav-toggle:hover { background: hsl(var(--accent)); }
@media (min-width: 768px) { .nav-toggle { display: none; } }
.hamburger, .hamburger::before, .hamburger::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.hamburger::before, .hamburger::after { content: ""; position: absolute; left: 0; }
.hamburger::before { top: -6px; } .hamburger::after { top: 6px; }

/* 移动端抽屉 */
.drawer-mask { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .5); opacity: 0;
  visibility: hidden; transition: opacity .25s, visibility .25s; }
.drawer-mask.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 256px; max-width: 84vw; z-index: 61;
  background: hsl(var(--card)); border-left: 1px solid hsl(var(--border));
  padding: 20px 16px; transform: translateX(100%); transition: transform .28s ease;
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer .d-close { align-self: flex-end; width: 40px; height: 40px; border: none; background: transparent;
  font-size: 22px; color: hsl(var(--muted-foreground)); cursor: pointer; border-radius: 6px; }
.drawer a.d-link { padding: 10px 12px; font-size: 16px; font-weight: 500; border-radius: 6px; }
.drawer a.d-link.active { color: hsl(var(--primary)); background: hsl(var(--accent)); }
.drawer .d-auth { display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
  padding-top: 16px; border-top: 1px solid hsl(var(--border)); }

/* ---------- 按钮（shadcn 规格） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 8px 16px; border-radius: 6px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / .9); }
.btn-outline { background: hsl(var(--background)); border-color: hsl(var(--input)); color: hsl(var(--foreground)); }
.btn-outline:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }
.btn-secondary:hover { background: hsl(var(--secondary) / .8); }
.btn-lg { height: 44px; padding: 8px 32px; font-size: 15px; }
.btn-sm { height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-loading { position: relative; }

/* 旋转指示器 */
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid hsl(var(--border)); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; font-weight: 600; line-height: 1.4;
  background: hsl(var(--card)); color: hsl(var(--foreground)); transition: all .2s;
}
.badge-link { cursor: pointer; }
.badge-link:hover { border-color: hsl(var(--primary)); }
.badge-solid { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: transparent; }
.badge-amber { background: var(--amber-50); border-color: var(--amber-200); color: var(--amber-800); }

/* ---------- 卡片（shadcn card: rounded-xl border shadow） ---------- */
.card {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: 12px; box-shadow: var(--shadow-sm);
}
.card-lg-shadow { box-shadow: var(--shadow-lg); }
.card-head { padding: 24px 24px 0; }
.card-body { padding: 24px; }
.card-title { font-size: 20px; font-weight: 600; line-height: 1.3; display: flex; align-items: center; gap: 8px; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---------- 首页 Hero（text-center mb-12 / text-4xl / text-lg） ---------- */
.page { padding-top: 32px; padding-bottom: 8px; }
.hero { text-align: center; margin-bottom: 32px; }
.hero h1 { font-size: 28px; line-height: 1.25; font-weight: 700; margin-bottom: 12px; }
@media (min-width: 768px) { .hero h1 { font-size: 36px; margin-bottom: 16px; } }
.hero .sub { font-size: 16px; color: hsl(var(--muted-foreground)); }
@media (min-width: 768px) { .hero .sub { font-size: 18px; } }
.hero-status { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; }
.hero-status .hint { font-size: 12px; color: hsl(var(--muted-foreground)); }

/* ---------- 示例区（max-w-5xl + grid-cols-3 + shadow-md） ---------- */
.samples { max-width: 1024px; margin: 0 auto 32px; }
.samples-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 768px) { .samples-grid { gap: 16px; } }
.sample-item { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-md); background: hsl(var(--muted));
  cursor: pointer; transition: transform .2s, box-shadow .2s; }
.sample-item:hover { box-shadow: var(--shadow-lg); transform: scale(1.02); }
.sample-item img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 16/9; }
.samples-cap { font-size: 14px; color: hsl(var(--muted-foreground)); margin-top: 12px; text-align: center; }

/* ---------- 公告跑马灯（bg-amber-50 / w-1/2） ---------- */
.notice-row { display: flex; justify-content: center; margin-bottom: 24px; }
.notice {
  display: flex; align-items: center; gap: 12px; overflow: hidden;
  background: var(--amber-50); border: 1px solid var(--amber-200); border-radius: 8px;
  padding: 10px 16px; width: 100%; min-width: 0;
}
@media (min-width: 768px) { .notice { width: 50%; min-width: 280px; } }
.notice .n-ico { font-size: 16px; flex: 0 0 auto; }
.notice-viewport { flex: 1; min-width: 0; overflow: hidden; }
.notice-track { display: inline-flex; white-space: nowrap; animation: marquee 20s linear infinite;
  font-size: 14px; font-weight: 500; color: var(--amber-800); }
.notice:hover .notice-track { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translate(0%); } 100% { transform: translate(-50%); } }

/* ---------- 工作区（grid-cols-1 xl:grid-cols-2 gap-8） ---------- */
.workspace { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 48px; }
@media (min-width: 1280px) { .workspace { grid-template-columns: 1fr 1fr; } }

textarea#inputText {
  width: 100%; min-height: 250px; resize: none; margin-bottom: 16px;
  border: 1px solid hsl(var(--input)); border-radius: 6px; background: hsl(var(--background));
  padding: 12px 14px; font-family: inherit; font-size: 15px; line-height: 1.6;
  color: hsl(var(--foreground)); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea#inputText:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px hsl(var(--ring) / .18); }
textarea#inputText::placeholder { color: hsl(var(--muted-foreground)); }

.field-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.select, .input {
  width: 100%; height: 40px; padding: 8px 12px;
  border: 1px solid hsl(var(--input)); border-radius: 6px; background: hsl(var(--background));
  font-family: inherit; font-size: 14px; color: hsl(var(--foreground)); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.select:focus, .input:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px hsl(var(--ring) / .18); }
.actions-col { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.uploaded-name { font-size: 14px; color: hsl(var(--muted-foreground)); text-align: center; }
.parse-preview { font-size: 13px; color: hsl(var(--muted-foreground)); background: hsl(var(--muted));
  border-radius: 6px; padding: 10px 12px; line-height: 1.6; }
.progress-track { width: 100%; height: 8px; border-radius: 999px; background: hsl(var(--secondary)); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: hsl(var(--primary)); border-radius: 999px; transition: width .6s ease; }
.progress-note { font-size: 14px; text-align: center; color: hsl(var(--muted-foreground)); margin-top: 8px; }

/* 使用说明 */
.guide { display: flex; flex-direction: column; gap: 16px; font-size: 14px; color: hsl(var(--muted-foreground)); }
.guide h3 { font-size: 14px; font-weight: 600; color: hsl(var(--foreground)); margin-bottom: 8px; }
.guide ul { list-style: disc; list-style-position: inside; margin-left: 8px; }
.guide li { margin-bottom: 4px; }
.guide a.inline-link { color: hsl(var(--primary)); font-weight: 500; cursor: pointer; }
.guide a.inline-link:hover { text-decoration: underline; }

/* ---------- 生成结果（grid 1 / md:2 / xl:3 gap-6） ---------- */
.results { margin-bottom: 48px; }
.results h2 { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.results .r-tip { text-align: center; font-size: 14px; color: hsl(var(--muted-foreground)); margin-bottom: 24px; }
.results-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .results-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .results-grid { grid-template-columns: repeat(3, 1fr); } }
.result-card { overflow: hidden; box-shadow: var(--shadow-lg); transition: box-shadow .2s; }
.result-card:hover { box-shadow: var(--shadow-xl); }
.result-frame { position: relative; background: hsl(var(--muted)); display: flex; align-items: center; justify-content: center; overflow: hidden; width: 100%; }
.result-frame img { width: 100%; height: 100%; object-fit: contain; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-9-16 { aspect-ratio: 9 / 16; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-badge { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 4px;
  background: rgb(0 0 0 / .5); color: #fff; font-size: 10px; backdrop-filter: blur(4px); }
.ai-badge { position: absolute; left: 8px; top: 8px; padding: 2px 10px; border-radius: 999px;
  background: rgb(255 255 255 / .86); color: hsl(var(--foreground)); font-size: 11px; font-weight: 700; }
.watermark-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.watermark-layer span { position: absolute; color: rgb(120 90 50 / .28); font-weight: 800; font-size: 22px;
  white-space: nowrap; transform: rotate(-22deg); letter-spacing: 2px; }
.result-actions { padding: 12px; }

/* ---------- 页脚（mt-16 pt-8 pb-6 border-t） ---------- */
.site-footer { margin-top: 64px; padding: 32px 0 24px; border-top: 1px solid hsl(var(--border)); }
.site-footer .f-inner { text-align: center; font-size: 14px; color: hsl(var(--muted-foreground));
  display: flex; flex-direction: column; gap: 4px; }
.site-footer a:hover { text-decoration: underline; color: hsl(var(--primary)); }
.site-footer .f-brand { color: hsl(var(--primary)); }

/* ---------- 列表页头（使用技巧 / 历史记录） ---------- */
.page-head { border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .3); }
.page-head .inner { padding: 40px 0; text-align: center; max-width: 896px; margin: 0 auto; }
.page-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: hsl(var(--primary));
  font-size: 14px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; }
.page-head h1 { font-size: 30px; font-weight: 700; line-height: 1.2; }
@media (min-width: 768px) { .page-head h1 { font-size: 36px; } }
.page-head p { margin-top: 12px; color: hsl(var(--muted-foreground)); max-width: 576px; margin-left: auto; margin-right: auto; }

.section-gap { padding-top: 40px; }

/* ---------- 文章页 ---------- */
.article { max-width: 768px; margin: 0 auto; padding: 40px 0; }
.article h1 { font-size: 26px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
@media (min-width: 768px) { .article h1 { font-size: 32px; } }
.article .meta { color: hsl(var(--muted-foreground)); font-size: 14px; margin-bottom: 24px; }
.article h2 { font-size: 22px; font-weight: 700; margin: 32px 0 12px; }
.article h3 { font-size: 17px; font-weight: 600; margin: 20px 0 8px; }
.article p, .article li { color: hsl(var(--muted-foreground)); font-size: 16px; line-height: 1.75; }
.article p { margin: 10px 0; }
.article ul, .article ol { padding-left: 22px; margin: 10px 0; }
.article li { margin: 6px 0; }
.article strong, .article b { color: hsl(var(--foreground)); }
.article blockquote { border-left: 4px solid hsl(var(--primary)); background: hsl(var(--muted) / .6);
  padding: 12px 18px; border-radius: 6px; margin: 16px 0; }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article th, .article td { border: 1px solid hsl(var(--border)); padding: 10px 12px; text-align: left; }
.article th { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.article .toc { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 8px; padding: 16px 20px; margin: 20px 0; }
.article .toc b { display: block; margin-bottom: 8px; color: hsl(var(--foreground)); }
.article .toc a { display: block; color: hsl(var(--muted-foreground)); font-size: 14px; padding: 3px 0; }
.article .toc a:hover { color: hsl(var(--primary)); }
.article .toc a::before { content: "• "; color: hsl(var(--primary)); }

/* ---------- 邀请码 / 套餐 ---------- */
.invite-card { max-width: 672px; margin: 0 auto; text-align: center; }
.invite-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.invite-card .sub { color: hsl(var(--muted-foreground)); font-size: 14px; margin-bottom: 20px; }
.scan-box { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr { width: 168px; height: 168px; border: 1px solid hsl(var(--border)); border-radius: 8px; background: #fff;
  display: flex; align-items: center; justify-content: center; padding: 8px; }
.qr img, .qr svg { width: 100%; height: 100%; }
.wx-id { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  background: hsl(var(--muted)); border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.wx-id .label { font-size: 14px; color: hsl(var(--muted-foreground)); }
.wx-id .value { font-size: 18px; font-weight: 700; letter-spacing: 1px; color: hsl(var(--foreground)); }
.invite-input-row { display: flex; gap: 8px; margin-top: 20px; }
.invite-input-row .input { flex: 1; text-align: center; letter-spacing: 2px; font-weight: 600; text-transform: uppercase; }
.steps-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 13px;
  color: hsl(var(--muted-foreground)); margin-top: 16px; }
.steps-row span { background: hsl(var(--muted)); border-radius: 999px; padding: 4px 14px; }

.tiers { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
@media (min-width: 768px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.tier { position: relative; padding: 28px 24px 24px; text-align: center; transition: box-shadow .2s, transform .2s; }
.tier:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.tier.hot { border-color: hsl(var(--primary)); box-shadow: var(--shadow-lg); }
.tier .t-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-size: 12px; font-weight: 700;
  padding: 3px 16px; border-radius: 999px; white-space: nowrap; }
.tier .t-name { font-size: 18px; font-weight: 700; }
.tier .t-price { font-size: 34px; font-weight: 800; color: hsl(var(--primary)); margin: 10px 0 2px; }
.tier .t-price small { font-size: 14px; font-weight: 600; color: hsl(var(--muted-foreground)); }
.tier .t-count { font-size: 14px; color: hsl(var(--muted-foreground)); margin-bottom: 16px; }
.tier ul { list-style: none; text-align: left; margin: 0 0 20px; }
.tier li { padding: 8px 0; font-size: 14px; color: hsl(var(--muted-foreground)); border-bottom: 1px solid hsl(var(--border)); }
.tier li:last-child { border-bottom: none; }
.tier li::before { content: "✓ "; color: var(--green-600); font-weight: 800; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap { max-width: 448px; margin: 0 auto; padding: 40px 0 60px; }
.auth-tabs { display: flex; gap: 4px; background: hsl(var(--muted)); padding: 4px; border-radius: 8px; margin-bottom: 24px; }
.auth-tabs button { flex: 1; height: 36px; border: none; background: transparent; border-radius: 6px;
  font-size: 14px; font-weight: 600; color: hsl(var(--muted-foreground)); cursor: pointer; transition: all .18s; }
.auth-tabs button.active { background: hsl(var(--card)); color: hsl(var(--foreground)); box-shadow: var(--shadow-sm); }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.auth-note { background: hsl(var(--muted)); border-radius: 6px; font-size: 13px;
  color: hsl(var(--muted-foreground)); padding: 10px 12px; margin-bottom: 16px; line-height: 1.6; }
.auth-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px;
  color: hsl(var(--muted-foreground)); margin: 12px 0 16px; }
.auth-agree a { color: hsl(var(--primary)); }
.auth-foot { text-align: center; font-size: 13px; color: hsl(var(--muted-foreground)); margin-top: 16px; line-height: 1.9; }
.auth-foot a { color: hsl(var(--primary)); font-weight: 500; }

/* ---------- 历史记录 ---------- */
.history-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px) { .history-layout { grid-template-columns: 1fr 2fr; } }
.history-list { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .history-list { max-height: 640px; overflow-y: auto; padding-right: 4px; } }
.history-item { display: flex; gap: 12px; padding: 10px; border-radius: 8px; border: 1px solid hsl(var(--border));
  background: hsl(var(--card)); cursor: pointer; align-items: center; transition: all .18s; }
.history-item:hover, .history-item.active { border-color: hsl(var(--primary)); background: hsl(var(--accent) / .4); }
.history-item img { width: 88px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: hsl(var(--muted)); }
.history-item b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item span { font-size: 12px; color: hsl(var(--muted-foreground)); }
.empty-state { text-align: center; padding: 64px 20px; color: hsl(var(--muted-foreground)); }
.empty-state .big { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { color: hsl(var(--foreground)); font-size: 18px; margin-bottom: 8px; }

/* ---------- 示例图集 ---------- */
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item { border-radius: 8px; overflow: hidden; cursor: zoom-in; background: hsl(var(--card));
  border: 1px solid hsl(var(--border)); box-shadow: var(--shadow-md); transition: all .2s; }
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.gallery-item img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.gallery-item .cap { padding: 12px 14px; font-size: 14px; font-weight: 500; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgb(20 14 8 / .8); display: none;
  align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 84vh; border-radius: 8px; background: #fff; }
.lightbox .close { position: absolute; right: 20px; top: 14px; font-size: 32px; color: #fff; cursor: pointer; line-height: 1; }

/* ---------- 弹层 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 80; background: rgb(0 0 0 / .5); display: none;
  align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; }
.modal-mask.open { display: flex; }
.modal { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 12px;
  width: 100%; max-width: 512px; padding: 24px; box-shadow: var(--shadow-xl); position: relative;
  animation: pop .2s ease; margin: auto; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.modal p { font-size: 14px; color: hsl(var(--muted-foreground)); margin-bottom: 16px; line-height: 1.7; }
.modal .m-close { position: absolute; right: 12px; top: 10px; width: 32px; height: 32px; border: none;
  background: transparent; font-size: 20px; color: hsl(var(--muted-foreground)); cursor: pointer; border-radius: 6px; }
.modal .m-close:hover { background: hsl(var(--muted)); }
.modal .m-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal .m-actions .btn { flex: 1; }
.modal .wx-big { font-size: 20px; font-weight: 800; letter-spacing: 1px; text-align: center;
  background: hsl(var(--muted)); border-radius: 8px; padding: 12px; margin: 4px 0 16px; }
.modal .m-note { font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 12px; }

#toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(16px);
  max-width: calc(100vw - 32px); background: hsl(var(--foreground)); color: hsl(var(--background));
  padding: 10px 20px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: all .28s; z-index: 100; box-shadow: var(--shadow-xl); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 原型演示角标 ---------- */
.demo-ribbon { position: fixed; right: -34px; top: 74px; z-index: 40;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  padding: 5px 40px; transform: rotate(45deg); opacity: .92; pointer-events: none; }

/* ---------- 技术方案页（内部用，不上站） ---------- */
.arch-flow { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.arch-node { flex: 1 1 140px; background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: 8px; padding: 14px; text-align: center; }
.arch-node b { display: block; font-size: 14px; margin-bottom: 4px; }
.arch-node span { font-size: 12px; color: hsl(var(--muted-foreground)); }
.arch-node.new { border-color: var(--amber-200); background: var(--amber-50); }
.arch-node.reuse { border-color: #bbf7d0; background: #f0fdf4; }
.arch-arrow { flex: 0 0 30px; display: flex; align-items: center; justify-content: center;
  color: hsl(var(--primary)); font-size: 18px; font-weight: 800; }
@media (max-width: 767px) { .arch-arrow { display: none; } }
.arch-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: hsl(var(--muted-foreground)); margin-top: 8px; }
.arch-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
table.data { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
table.data th, table.data td { border: 1px solid hsl(var(--border)); padding: 10px 12px; text-align: left; vertical-align: top; }
table.data th { background: hsl(var(--muted)); white-space: nowrap; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; }
.pill.ok { background: #f0fdf4; color: #15803d; }
.pill.warn { background: var(--amber-50); color: var(--amber-800); }
.check-list { list-style: none; }
.check-list li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid hsl(var(--border)); font-size: 15px; }
.check-list li::before { content: "☑"; position: absolute; left: 2px; top: 10px; color: var(--green-600); font-size: 17px; }
.check-list li b { display: block; }
.check-list li span { color: hsl(var(--muted-foreground)); font-size: 14px; }

/* ---------- 移动端细节 ---------- */
@media (max-width: 767px) {
  .page { padding-top: 20px; }
  .hero { margin-bottom: 24px; }
  .workspace { gap: 20px; margin-bottom: 32px; }
  .card-body, .card-head { padding: 18px; }
  .samples-grid { gap: 8px; }
  .samples-cap { font-size: 13px; }
  textarea#inputText { min-height: 190px; }
  .site-footer { margin-top: 40px; }
  .page-head .inner { padding: 28px 0; }
  .results h2 { font-size: 20px; }
  .demo-ribbon { display: none; }
  /* 移动端点击目标加大 */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .nav-link { padding: 10px 12px; }
}

/* ============================================================
   正式版补充样式（登录态徽标 / 字数统计 / 水印提示）
   ============================================================ */

/* 导航中的剩余次数徽标 */
.nav-quota {
  display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: hsl(var(--accent) / .35); color: hsl(var(--foreground));
  white-space: nowrap;
}
.nav-quota.vip { background: var(--amber-50); border: 1px solid var(--amber-200); color: var(--amber-800); }

/* 输入框字数统计行 */
.field-tip {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; font-size: 12.5px; color: hsl(var(--muted-foreground));
}
.field-tip a { color: hsl(var(--primary)); cursor: pointer; }
.field-tip a:hover { text-decoration: underline; }

/* 免费版结果卡内的水印提示条 */
.watermark-tip {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 10px; font-size: 12px; text-align: center;
  color: #fff; background: rgb(0 0 0 / .45);
}
.watermark-tip .js-invite2 { color: hsl(45 90% 70%); }

/* 结果图加载占位 */
.result-frame img { background: hsl(var(--muted)); }

/* 移动端导航徽标收窄 */
@media (max-width: 767px) {
  .nav-quota { font-size: 12px; padding: 0 8px; }
}

/* ============================================================
   管理后台（admin.html 专用）
   ============================================================ */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 18px 20px;
}
.stat-num { font-size: 28px; font-weight: 700; color: hsl(var(--foreground)); line-height: 1.2; }
.stat-label { font-size: 13px; color: hsl(var(--muted-foreground)); margin-top: 4px; }
.stat-sub { font-size: 12px; color: hsl(var(--primary)); margin-top: 2px; }

.admin-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.check-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; font-size: 14px; cursor: pointer;
}
.check-row input { width: 16px; height: 16px; accent-color: hsl(var(--primary)); }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid hsl(var(--border)); white-space: nowrap;
}
.admin-table th { font-weight: 600; color: hsl(var(--muted-foreground)); font-size: 12.5px; }
.admin-table .mono { font-family: Consolas, Menlo, monospace; letter-spacing: .3px; }
.admin-table .row-used { color: hsl(var(--muted-foreground)); }
.admin-table .row-used .mono { text-decoration: line-through; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }

@media (max-width: 767px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-2col { grid-template-columns: 1fr; }
  .admin-table { font-size: 12.5px; }
}

/* 登录/注册 tab：激活态加强对比（威哥反馈两个颜色一样） */
.auth-tabs button.active {
  background: hsl(var(--card));
  color: hsl(var(--primary));
  box-shadow: 0 1px 3px rgb(0 0 0 / .12), 0 0 0 1px hsl(var(--border));
}

/* 管理后台 Tab（生成邀请码 / API 配置） */
.admin-tabs {
  display: flex; gap: 4px;
  background: hsl(var(--muted));
  padding: 4px; border-radius: 10px;
  max-width: 420px;
}
.admin-tabs button {
  flex: 1; height: 40px;
  border: none; background: transparent; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; cursor: pointer;
  color: hsl(var(--muted-foreground));
  transition: background .15s, color .15s;
}
.admin-tabs button:hover { color: hsl(var(--foreground)); }
.admin-tabs button.active {
  background: hsl(var(--card));
  color: hsl(var(--primary));
  font-weight: 600;
  box-shadow: 0 1px 3px rgb(0 0 0 / .12), 0 0 0 1px hsl(var(--border));
}
