/* ==========================================================================
   ImageFree · 全站设计系统
   风格：简约、大气、克制的高级感（浅色主题）
   ========================================================================== */

:root {
  /* 中性色阶 */
  --ink-900: #0b0b0f;
  --ink-800: #16161c;
  --ink-700: #2a2a33;
  --ink-600: #4a4a57;
  --ink-500: #6e6e7e;
  --ink-400: #9a9aa8;
  --ink-300: #c7c7d1;
  --ink-200: #e4e4ea;
  --ink-100: #f0f0f4;
  --ink-050: #f7f7fa;
  --white: #ffffff;

  /* 品牌色 */
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-light: #eef2ff;
  --brand-border: #dfe2fd;
  --accent: #7c3aed;

  /* 语义色 */
  --success: #0f9960;
  --success-bg: #eaf7f0;
  --warn: #b45309;
  --warn-bg: #fef6e7;
  --danger: #d93a3a;
  --danger-bg: #fdeeee;

  /* 排版 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  /* 阴影 */
  --sh-xs: 0 1px 2px rgba(16, 16, 24, 0.04);
  --sh-sm: 0 2px 8px rgba(16, 16, 24, 0.05);
  --sh-md: 0 8px 24px rgba(16, 16, 24, 0.07);
  --sh-lg: 0 20px 50px -12px rgba(16, 16, 24, 0.14);
  --sh-brand: 0 10px 30px -8px rgba(79, 70, 229, 0.38);

  --maxw: 1160px;
  --nav-h: 66px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.25;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

::selection {
  background: var(--brand);
  color: #fff;
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-200);
  border-radius: 10px;
  border: 3px solid var(--white);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

/* ---------- 布局 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 104px 0;
}

.section--tight { padding: 72px 0; }

.section--alt {
  background: var(--ink-050);
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
}

.section--brand {
  background: linear-gradient(180deg, #f4f3ff 0%, #ffffff 70%);
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
}

.iso__head { max-width: 780px; margin: 0 auto 40px; text-align: center; }
.iso__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.iso__item {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  text-align: left;
  transition: all 0.2s ease;
}
.iso__item:hover { border-color: var(--brand); box-shadow: var(--sh-sm); transform: translateY(-2px); }
.iso__ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand);
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.iso__ico svg { width: 23px; height: 23px; }
.iso__item h3 { font-size: 16.5px; font-weight: 650; margin-bottom: 8px; color: var(--ink-900); }
.iso__item p { font-size: 13.5px; color: var(--ink-500); line-height: 1.78; }

.sec-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.sec-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  padding: 5px 14px;
  border-radius: var(--r-full);
  margin-bottom: 18px;
}

.sec-title {
  font-size: clamp(28px, 3.6vw, 40px);
  margin-bottom: 16px;
}

.sec-desc {
  font-size: 17px;
  color: var(--ink-500);
  line-height: 1.8;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(16, 16, 24, 0.06);
}

.nav__inner {
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  flex-shrink: 0;
}

.logo__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  display: grid;
  place-items: center;
  box-shadow: var(--sh-brand);
}

.logo__mark svg { width: 17px; height: 17px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav__link {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-600);
  transition: all 0.18s ease;
}

.nav__link:hover {
  color: var(--ink-900);
  background: var(--ink-100);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav__toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink-200);
  background: #fff;
  border-radius: var(--r-sm);
  place-items: center;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn--primary {
  background: var(--ink-900);
  color: #fff;
  box-shadow: var(--sh-sm);
}

.btn--primary:hover {
  background: var(--ink-800);
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}

.btn--primary:active { transform: translateY(0); }

.btn--brand {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.btn--brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -8px rgba(79, 70, 229, 0.5);
}

.btn--brand:active { transform: translateY(0); }

.btn--ghost {
  background: #fff;
  color: var(--ink-700);
  border-color: var(--ink-200);
}

.btn--ghost:hover {
  border-color: var(--ink-300);
  background: var(--ink-050);
}

.btn--soft {
  background: var(--ink-100);
  color: var(--ink-700);
}

.btn--soft:hover { background: var(--ink-200); }

.btn--lg {
  padding: 15px 30px;
  font-size: 16px;
  border-radius: var(--r-lg);
}

.btn--sm {
  padding: 7px 13px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.btn--block { width: 100%; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 92px 0 84px;
  overflow: hidden;
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(124, 58, 237, 0.09) 0%, transparent 70%),
    radial-gradient(45% 40% at 82% 18%, rgba(79, 70, 229, 0.08) 0%, transparent 70%),
    radial-gradient(40% 35% at 15% 22%, rgba(14, 165, 233, 0.07) 0%, transparent 70%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 16, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 24, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 6px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--ink-200);
  box-shadow: var(--sh-xs);
  font-size: 13.5px;
  color: var(--ink-600);
  margin-bottom: 26px;
}

.hero__badge b {
  background: var(--ink-900);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-full);
  letter-spacing: 0.02em;
}

.hero__title {
  font-size: clamp(36px, 6.2vw, 66px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}

.hero__title .grad {
  background: linear-gradient(100deg, var(--brand) 10%, var(--accent) 55%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--ink-500);
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 34px;
}

.hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero__note {
  font-size: 13.5px;
  color: var(--ink-400);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero__note span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero__note svg { width: 15px; height: 15px; color: var(--success); }

/* Hero 预览窗 */
.preview {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 62px auto 0;
  border-radius: var(--r-xl);
  background: #fff;
  border: 1px solid var(--ink-200);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}

.preview__bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--ink-050);
  border-bottom: 1px solid var(--ink-100);
}

.preview__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink-200);
}

.preview__url {
  margin-left: 12px;
  font-size: 12.5px;
  color: var(--ink-400);
  font-family: var(--mono);
}

.preview__body {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 330px;
}

.preview__side {
  border-right: 1px solid var(--ink-100);
  padding: 20px;
  background: #fdfdfe;
}

.skel {
  border-radius: 7px;
  background: linear-gradient(90deg, var(--ink-100) 25%, var(--ink-050) 50%, var(--ink-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 2.4s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.preview__main {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-content: start;
}

.preview__tile {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ink-100);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.stat {
  background: #fff;
  padding: 30px 22px;
  text-align: center;
}

.stat__num {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  line-height: 1.2;
}

.stat__label {
  font-size: 13.5px;
  color: var(--ink-500);
  margin-top: 4px;
}

/* ---------- 特性网格 ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: 30px;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: var(--ink-300);
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--brand-light);
  color: var(--brand);
  margin-bottom: 18px;
}

.card__icon svg { width: 21px; height: 21px; }

.card__title {
  font-size: 17.5px;
  font-weight: 650;
  margin-bottom: 9px;
}

.card__desc {
  font-size: 14.5px;
  color: var(--ink-500);
  line-height: 1.75;
}

/* ---------- 步骤 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 26px;
}

.step__num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink-900);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step__line {
  position: absolute;
  top: 45px;
  left: 48px;
  right: -26px;
  height: 1px;
  background: linear-gradient(90deg, var(--ink-200), transparent);
}

.step:last-child .step__line { display: none; }

.step__title {
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 8px;
}

.step__desc {
  font-size: 14.5px;
  color: var(--ink-500);
  line-height: 1.75;
}

/* ---------- 平台列表 ---------- */
.plat {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  transition: all 0.2s ease;
}

.plat:hover {
  border-color: var(--brand-border);
  box-shadow: var(--sh-sm);
}

.plat__logo {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.plat__name {
  font-size: 16px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plat__desc {
  font-size: 14px;
  color: var(--ink-500);
  margin-top: 5px;
  line-height: 1.7;
}

.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-full);
  letter-spacing: 0.01em;
}

.tag--free { background: var(--success-bg); color: var(--success); }
.tag--mark { background: var(--warn-bg); color: var(--warn); }
.tag--clean { background: var(--brand-light); color: var(--brand); }
.tag--gray { background: var(--ink-100); color: var(--ink-500); }

/* ---------- FAQ ---------- */
.faq {
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid var(--ink-200);
}

.faq__item {
  border-bottom: 1px solid var(--ink-200);
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  background: none;
  border: none;
  text-align: left;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink-900);
  transition: color 0.18s ease;
}

.faq__q:hover { color: var(--brand); }

.faq__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--ink-400);
  transition: transform 0.26s ease;
}

.faq__item.open .faq__icon { transform: rotate(45deg); }

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
}

.faq__a-inner {
  padding: 0 4px 24px;
  font-size: 15px;
  color: var(--ink-500);
  line-height: 1.85;
}

.faq__a-inner code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--ink-100);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--ink-700);
}

/* ---------- CTA 区块 ---------- */
.cta {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--ink-900);
  padding: 72px 40px;
  text-align: center;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(124, 58, 237, 0.38) 0%, transparent 70%),
    radial-gradient(40% 50% at 85% 100%, rgba(79, 70, 229, 0.32) 0%, transparent 70%);
}

.cta > * { position: relative; z-index: 1; }

.cta__title {
  font-size: clamp(26px, 3.4vw, 38px);
  color: #fff;
  margin-bottom: 14px;
}

.cta__desc {
  font-size: 16.5px;
  color: rgba(255, 255, 255, 0.66);
  max-width: 520px;
  margin: 0 auto 30px;
  line-height: 1.8;
}

.btn--white {
  background: #fff;
  color: var(--ink-900);
}

.btn--white:hover {
  background: var(--ink-050);
  transform: translateY(-1px);
}

.btn--outline-w {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--outline-w:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
}

/* ---------- 提示条 ---------- */
.notice {
  display: flex;
  gap: 13px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.75;
  border: 1px solid;
}

.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

.notice--warn {
  background: var(--warn-bg);
  border-color: #f5e0b8;
  color: #7c4a06;
}

.notice--info {
  background: var(--brand-light);
  border-color: var(--brand-border);
  color: #3730a3;
}

.notice--ok {
  background: var(--success-bg);
  border-color: #c3e8d5;
  color: #0b6b45;
}

.notice b { font-weight: 650; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--ink-100);
  background: var(--ink-050);
  padding: 56px 0 34px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}

.footer__brand-desc {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.8;
  margin-top: 14px;
  max-width: 300px;
}

.footer__col h5 {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-900);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.footer__col li { margin-bottom: 9px; }

.footer__col a {
  font-size: 14px;
  color: var(--ink-500);
  transition: color 0.16s ease;
}

.footer__col a:hover { color: var(--brand); }

.footer__bot {
  border-top: 1px solid var(--ink-200);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-400);
}

/* ==========================================================================
   工作台（app.html）
   ========================================================================== */

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

.auth-screen__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 45% at 50% 0%, rgba(124, 58, 237, 0.1) 0%, transparent 70%),
    radial-gradient(40% 40% at 12% 85%, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-xl);
  padding: 38px 34px;
  box-shadow: var(--sh-lg);
}

.auth-card__head {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card__title {
  font-size: 23px;
  margin: 16px 0 8px;
}

.auth-card__sub {
  font-size: 14.5px;
  color: var(--ink-500);
  line-height: 1.7;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--ink-100);
  border-radius: var(--r-md);
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-500);
  transition: all 0.18s ease;
}

.tab.active {
  background: #fff;
  color: var(--ink-900);
  box-shadow: var(--sh-xs);
}

.field { margin-bottom: 17px; }

.field__label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 7px;
}

.field__hint {
  font-size: 12.5px;
  color: var(--ink-400);
  margin-top: 6px;
  line-height: 1.6;
}

.field__hint a { color: var(--brand); font-weight: 500; }
.field__hint a:hover { text-decoration: underline; }

.input,
.textarea,
.select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink-900);
  font-size: 14.5px;
  transition: all 0.18s ease;
  outline: none;
}

.input::placeholder,
.textarea::placeholder { color: var(--ink-300); }

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(79, 70, 229, 0.11);
}

.textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.7;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e6e7e' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.input-group { position: relative; }

.input-group .input { padding-right: 46px; }

.input-group__btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--ink-400);
  transition: all 0.16s ease;
}

.input-group__btn:hover { background: var(--ink-100); color: var(--ink-700); }
.input-group__btn svg { width: 17px; height: 17px; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-600);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

.form-msg {
  font-size: 13.5px;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  margin-bottom: 15px;
  display: none;
  line-height: 1.6;
}

.form-msg.show { display: block; }
.form-msg--err { background: var(--danger-bg); color: #a52424; }
.form-msg--ok { background: var(--success-bg); color: #0b6b45; }

/* ---------- 工作台布局 ---------- */
.app { display: none; }
.app.show { display: block; }

.app-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 60px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--ink-100);
}

.app-bar__inner {
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-bar__spacer { flex: 1; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--r-full);
  border: 1px solid var(--ink-200);
  background: #fff;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-700);
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 60px);
}

.panel {
  border-right: 1px solid var(--ink-100);
  padding: 20px 18px 42px;
  background: #fdfdfe;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
}

.panel__group { margin-bottom: 14px; }
.panel__group--tight { margin-bottom: 12px; }

.panel__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-400);
  margin-bottom: 7px;
}

.panel__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel__opt { font-weight: 500; font-size: 11px; color: var(--ink-300); letter-spacing: 0; }
.provider-hint { margin-bottom: 16px; }

.select--sm,
.input--sm { padding: 9px 11px; font-size: 13.5px; }
.select--sm { padding-right: 34px; }

.stage {
  padding: 26px 30px 60px;
  background: var(--white);
}

/* 尺寸选择 */
.size-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.size-opt {
  border: 1px solid var(--ink-200);
  background: #fff;
  border-radius: var(--r-sm);
  padding: 9px 4px;
  text-align: center;
  transition: all 0.16s ease;
}

.size-opt:hover { border-color: var(--ink-300); }

.size-opt.active {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.09);
}

.size-opt__box {
  margin: 0 auto 6px;
  border: 1.6px solid var(--ink-400);
  border-radius: 3px;
  width: 22px;
  height: 22px;
}

.size-opt.active .size-opt__box { border-color: var(--brand); }

.size-opt__txt {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-600);
  line-height: 1.3;
}

.size-opt.active .size-opt__txt { color: var(--brand-dark); }

/* 自定义尺寸输入 */
.custom-size { margin-top: 12px; }
.custom-size__row { display: flex; align-items: center; gap: 8px; }
.input--mini {
  width: 92px;
  padding: 9px 10px;
  font-size: 15px;
  text-align: center;
}
.custom-size__x { font-size: 17px; color: var(--ink-500); font-weight: 600; }
.custom-size__px { font-size: 13px; color: var(--ink-400); }
.custom-size .field__hint { margin-top: 8px; }

/* 提示词灵感 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.chip {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: var(--r-full);
  border: 1px solid var(--ink-200);
  background: #fff;
  color: var(--ink-600);
  transition: all 0.16s ease;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

/* 结果区 */
.stage__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.stage__title {
  font-size: 19px;
  font-weight: 650;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.shot {
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  transition: all 0.22s ease;
}

.shot:hover {
  box-shadow: var(--sh-md);
  border-color: var(--ink-300);
}

.shot__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--ink-100);
  display: block;
  cursor: zoom-in;
}

.shot__meta {
  padding: 12px 14px;
  border-top: 1px solid var(--ink-100);
}

.shot__prompt {
  font-size: 12.5px;
  color: var(--ink-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 9px;
  min-height: 40px;
}

.shot__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shot__tag {
  font-size: 11px;
  color: var(--ink-400);
  font-family: var(--mono);
}

.shot__acts { display: flex; gap: 5px; }

.icon-btn {
  width: 29px;
  height: 29px;
  border-radius: 7px;
  border: 1px solid var(--ink-200);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink-500);
  transition: all 0.16s ease;
}

.icon-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

.icon-btn svg { width: 14px; height: 14px; }

/* 参考图（基于已有图改） */
.ref-slot {
  position: relative;
  border: 1.5px dashed var(--ink-200);
  border-radius: var(--r-lg);
  background: var(--ink-050);
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.ref-slot:hover { border-color: var(--brand-border); background: var(--brand-light); }

.ref-slot__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 18px 14px; color: var(--ink-400); font-size: 13px;
}

.ref-slot__filled {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px;
}
.ref-slot__filled .ref-slot__thumb { cursor: pointer; }

.ref-slot__thumb {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
}

.ref-slot__ctrls { flex: 1; min-width: 0; }
.ref-slot__row label {
  display: block; font-size: 12.5px; color: var(--ink-700);
  margin-bottom: 5px; font-weight: 500;
}
.ref-slot__row label span {
  color: var(--brand); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ref-strength {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 4px;
  background: var(--ink-200);
  border-radius: 2px;
  outline: none;
}
.ref-strength::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px;
  background: var(--brand);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(79,70,229,.4);
}
.ref-strength::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--brand);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.ref-slot__hint {
  font-size: 11.5px; color: var(--ink-400); margin-top: 6px; line-height: 1.4;
}
.ref-slot__remove { flex-shrink: 0; }

.js-remix:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand); }

/* 空态 / 加载态 */
.empty {
  border: 1.5px dashed var(--ink-200);
  border-radius: var(--r-xl);
  padding: 76px 30px;
  text-align: center;
  background: #fdfdfe;
}

.empty__icon {
  width: 58px;
  height: 58px;
  border-radius: var(--r-lg);
  background: var(--ink-100);
  color: var(--ink-400);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}

.empty__icon svg { width: 26px; height: 26px; }

.empty__title {
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 8px;
}

.empty__desc {
  font-size: 14.5px;
  color: var(--ink-500);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.75;
}

.loading-tile {
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  border: 1px solid var(--ink-200);
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, var(--ink-050) 25%, var(--ink-100) 50%, var(--ink-050) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--ink-200);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner--sm { width: 15px; height: 15px; border-width: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-box {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: var(--ink-900);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--sh-lg);
  animation: toastIn 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
  max-width: 90vw;
}

.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast--ok svg { color: #4ade80; }
.toast--err svg { color: #f87171; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.out {
  animation: toastOut 0.22s ease forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px); }
}

/* 弹层 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 11, 15, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal.show { display: flex; }

.modal__box {
  background: #fff;
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: var(--sh-lg);
  animation: modalIn 0.24s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__head {
  padding: 22px 26px;
  border-bottom: 1px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal__title { font-size: 18px; font-weight: 650; }
.modal__body { padding: 24px 26px; }
.modal__foot {
  padding: 18px 26px;
  border-top: 1px solid var(--ink-100);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--ink-050);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(11, 11, 15, 0.92);
  cursor: zoom-out;
}

.lightbox.show { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--r-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

/* Key 状态卡 */
.key-card {
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 14px;
  background: #fff;
}

.key-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.key-card__name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-card__val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 5px;
}

.dot-ok {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-bg);
}

.dot-off {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-300);
  box-shadow: 0 0 0 3px var(--ink-100);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .workspace { grid-template-columns: 330px 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .nav__links { display: none; }
  .nav__toggle { display: grid; }
  .nav__links.open {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--ink-200);
    padding: 12px;
    gap: 2px;
    box-shadow: var(--sh-md);
  }
  .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .iso__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .step__line { display: none; }
  .preview__body { grid-template-columns: 1fr; }
  .preview__side { display: none; }
  .preview__main { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  .panel {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--ink-100);
  }
  .stage { padding: 22px 18px 50px; }
  .cta { padding: 52px 24px; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 62px 0 56px; }
  .stats { grid-template-columns: 1fr; }
  .auth-card { padding: 30px 22px; }
  .size-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
}
