/* 探验 · 工具版首版 共用样式
 * 依据《探验 · 工具版首版方案》：首页 / 生成中 / 结果页，共 3 页，无底部 Tab。
 * 配色与类名沿用方案给出的 HTML（--brand #FF6B35 / --bg #F7F5F2 / --surface #FFF / --border #EAE6E1 等）
 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --brand: #FF6B35;
  --brand-soft: #FFF4EE;
  --bg: #F7F5F2;
  --surface: #FFFFFF;
  --border: #EAE6E1;
  --t1: #1A1815;
  --t2: #6B6560;
  --t3: #9B948C;
  --radius: 20px;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── 顶部 ─────────────────────────────────────────────────────── */
.header { padding: 40px 24px 24px; text-align: center; }
.logo { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.tagline { font-size: 15px; color: var(--t2); margin-top: 12px; line-height: 1.6; }
.header--compact { padding: 18px 24px 8px; }

.main { flex: 1; padding: 0 24px 40px; max-width: 480px; margin: 0 auto; width: 100%; }

/* ── 上传区 ───────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 18px;
  padding: 34px 16px;
  text-align: center;
  cursor: pointer;
  background: #FCFBFA;
  transition: border-color .2s, background .2s, transform .2s;
}
.upload-zone:hover { border-color: var(--brand); background: var(--brand-soft); }
.upload-zone:active { transform: scale(.99); }
.upload-zone.has-photo { padding: 14px; border-style: solid; border-color: var(--brand); background: var(--surface); }
.upload-zone.disabled { opacity: .5; pointer-events: none; }
.photo-preview {
  width: 100%; max-height: 320px; border-radius: 12px;
  object-fit: contain; display: block; background: #F7F5F2;
}
.upload-icon { font-size: 40px; line-height: 1; }
.upload-text { font-size: 15px; font-weight: 700; margin-top: 14px; }
.upload-sub { font-size: 12.5px; color: var(--t3); margin-top: 6px; }

/* ── 区块 ─────────────────────────────────────────────────────── */
.section { margin-top: 32px; }
.section-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.section-title span { color: var(--t3); font-weight: 500; }

/* ── 方向卡 / 风格标签 ────────────────────────────────────────── */
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kind {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 20px 8px 15px; text-align: center;
  cursor: pointer;
  transition: transform .16s, border-color .16s, box-shadow .16s, background .16s;
}
/* 每张卡顶部一条渐变"封面"，让九宫格不呆板 */
.kind::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 66px;
  opacity: .6; transition: opacity .16s;
}
.kind:nth-child(1)::before { background: linear-gradient(135deg,#FFE0D2,#FFF3EC); }
.kind:nth-child(2)::before { background: linear-gradient(135deg,#DDE9FF,#EFF5FF); }
.kind:nth-child(3)::before { background: linear-gradient(135deg,#FFE6C7,#FFF5E6); }
.kind:nth-child(4)::before { background: linear-gradient(135deg,#D6F0E4,#ECF9F3); }
.kind:nth-child(5)::before { background: linear-gradient(135deg,#E3E2FF,#F2F2FF); }
.kind:nth-child(6)::before { background: linear-gradient(135deg,#FFDCEA,#FFF0F6); }
.kind:nth-child(7)::before { background: linear-gradient(135deg,#D9E9F5,#EEF7FD); }
.kind:nth-child(8)::before { background: linear-gradient(135deg,#F6DDF0,#FDEEF9); }
.kind:nth-child(9)::before { background: linear-gradient(135deg,#F3E7C9,#FCF6E6); }
.kind:hover { border-color: #DCD6CF; box-shadow: 0 8px 22px rgba(26,24,21,.07); transform: translateY(-2px); }
.kind:active { transform: translateY(0) scale(.985); }
.kind.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 8px 24px rgba(255,107,53,.16); }
.kind.selected::before { opacity: .9; }
.kind-emoji { position: relative; font-size: 27px; line-height: 1; }
.kind-name { position: relative; font-size: 13px; font-weight: 700; margin-top: 9px; }

.templates { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 0; }
.template {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 999px; padding: 9px 18px; font-size: 13.5px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .12s;
}
.template:hover { border-color: #DCD6CF; }
.template:active { transform: scale(.97); }
.template.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 700; }

/* ── 主按钮 ───────────────────────────────────────────────────── */
.cta {
  margin-top: 32px; height: 52px; border-radius: 26px; background: var(--brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .12s, background .15s;
  border: 0; width: 100%; font-family: inherit;
}
.cta:active { transform: scale(.97); }
.cta.disabled { background: #D9D4CE; cursor: not-allowed; }
.cta--ghost { background: var(--surface); color: var(--t1); border: 1.5px solid var(--border); }

.credits { text-align: center; font-size: 13px; color: var(--t3); margin-top: 16px; }
.credits b { color: var(--brand); }
.notice {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 12.5px;
  background: var(--brand-soft); color: #A8391A; line-height: 1.6;
}
.notice--muted { background: #F1EFEC; color: var(--t2); }
.notice code { background: #fff; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.notice b { color: var(--t1); }

/* 登录页：通道切换（手机号+密码 / 短信验证码） */
.seg {
  display: flex; gap: 4px; padding: 4px; margin: 18px 0 20px;
  background: #F1EFEC; border-radius: 12px;
}
.seg__b {
  flex: 1; padding: 10px 8px; border: 0; border-radius: 9px;
  background: transparent; color: var(--t2);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg__b.is-on { background: #fff; color: var(--t1); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.form-tip--mini { font-size: 12.5px; color: var(--t3); margin-top: -6px; }

/* ── 生成中页 ─────────────────────────────────────────────────── */
.gen-wrap { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 24px; text-align: center; max-width: 480px; margin: 0 auto; width: 100%; }
.gen-spark { font-size: 56px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.12); opacity: .75 } }
.gen-title { font-size: 20px; font-weight: 800; margin-top: 24px; }
.progress-wrap { width: 100%; margin-top: 32px; display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; height: 10px; border-radius: 5px; background: #E7E3DE; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, #FF9A6C, var(--brand)); transition: width .35s ease; }
.progress-pct { font-size: 13px; font-weight: 700; color: var(--t2); min-width: 42px; text-align: right; }
.gen-stage { font-size: 14px; color: var(--t2); margin-top: 20px; min-height: 22px; }
.gen-hint { font-size: 12px; color: var(--t3); margin-top: 10px; }

/* ── 结果页 ───────────────────────────────────────────────────── */
.result-img {
  width: 100%; border-radius: var(--radius); display: block;
  background: var(--surface); border: 1px solid var(--border);
}
.result-meta { margin-top: 16px; font-size: 15px; font-weight: 700; }
.result-meta span { color: var(--t3); font-weight: 500; font-size: 13px; }
.result-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.share-card {
  margin-top: 28px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); text-align: center;
}
.share-card h3 { font-size: 15px; margin-bottom: 6px; }
.share-card p { font-size: 13px; color: var(--t2); line-height: 1.6; }
.share-card .cta { margin-top: 14px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; font-size: 15px;
  font-weight: 600; color: var(--t2); text-decoration: none; }
.backlink:hover { color: var(--brand); }

/* ── 同意提示（上传前必须可见）与页脚 ─────────────────────────── */
.consent { margin-top: 14px; font-size: 12px; color: var(--t3); text-align: center; line-height: 1.7; }
.consent a { color: var(--t2); text-decoration: underline; }
.consent a:hover { color: var(--brand); }

.foot {
  margin-top: auto; padding: 22px 24px 28px; display: flex; flex-wrap: wrap;
  gap: 8px 16px; justify-content: center; font-size: 12px; color: var(--t3);
  border-top: 1px solid var(--border);
}
.foot a { color: var(--t2); text-decoration: none; }
.foot a:hover { color: var(--brand); }
.todo { color: var(--brand); border-bottom: 1px dashed currentColor; }

/* ── 法务页 ──────────────────────────────────────────────────── */
.legal { padding-bottom: 32px; }
.legal__h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.legal__meta { font-size: 12.5px; color: var(--t3); margin-top: 8px; }
.legal__body {
  margin-top: 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.legal__body h2 { font-size: 15px; font-weight: 800; margin: 20px 0 6px; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p, .legal__body li { font-size: 13.5px; color: var(--t2); line-height: 1.75; }
.legal__body p { margin-top: 8px; }
.legal__body ul, .legal__body ol { margin-top: 8px; padding-left: 20px; }
.legal__body li { margin-top: 5px; }
.legal__body b { color: var(--t1); }
.legal__body a { color: var(--brand); text-decoration: underline; }
.legal__body code { background: #F1EFEC; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.legal__note {
  margin-top: 18px; padding: 14px; border-radius: 12px; font-size: 12px;
  background: #F1EFEC; color: var(--t2); line-height: 1.7;
}
.legal__note code { background: #fff; padding: 1px 5px; border-radius: 4px; }

/* ── 登录 / 注册 / 管理员登录 表单 ─────────────────────────────── */
.form-h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.form-sub { font-size: 13.5px; color: var(--t2); margin-top: 10px; line-height: 1.7; }
.form { margin-top: 24px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--t2); margin-bottom: 8px; }
.field input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface);
  font: inherit; font-size: 15px; color: var(--t1); outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--brand); }
.field__row { display: flex; gap: 10px; }
.field__row input { flex: 1; min-width: 0; }
.btn-send {
  flex: 0 0 auto; height: 48px; padding: 0 16px; border-radius: 12px;
  border: 1.5px solid var(--brand); background: var(--brand-soft); color: var(--brand);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: opacity .15s, transform .12s;
}
.btn-send:active { transform: scale(.97); }
.btn-send:disabled { opacity: .55; cursor: not-allowed; }
.form-tip { min-height: 20px; font-size: 13px; margin: 4px 0 14px; line-height: 1.6; }
.form-tip--err { color: #C0392B; }
.form-tip--ok { color: #1F9254; }
.form-tip--warn { color: #B7791F; }

/* 顶部登录态 */
.topbar-user { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); }
.accountbar { min-height: 20px; display: flex; justify-content: flex-end; font-size: 13px; }
.accountbar a { color: var(--t2); text-decoration: none; }
.accountbar a:hover { color: var(--brand); text-decoration: underline; }
.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%) translateY(-80px);
  background: #1C1917; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 80; opacity: 0; transition: .25s; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════════════════════
   首页（桌面优先）：顶部导航 / 头图 / 两栏工作台 / 说明区
   全部限定在 body[data-page="home"]，不影响登录页、法务页、后台
   ══════════════════════════════════════════════════════════════ */

body[data-page="home"] { background: #FAF8F6; }
body[data-page="home"] .main { max-width: 1120px; padding: 0 28px 72px; }

/* 顶部导航（吸顶 + 毛玻璃） */
.tnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,246,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.tnav__in { max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 62px;
  display: flex; align-items: center; gap: 26px; }
.tnav__logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--t1); flex: 0 0 auto; }
.tnav__logo b { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.tnav__menu { display: flex; gap: 4px; flex: 1; }
.tnav__menu a { font-size: 14px; color: var(--t2); text-decoration: none; padding: 7px 13px;
  border-radius: 9px; transition: background .15s, color .15s; }
.tnav__menu a:hover { background: #F1EDE9; color: var(--t1); }
.tnav__menu a.is-on { color: var(--brand); font-weight: 700; background: var(--brand-soft); }
body[data-page="home"] .accountbar { min-height: 0; }

/* 头图 */
.hero {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(880px 360px at 78% -12%, #FFE9DF 0%, rgba(255,233,223,0) 62%),
    linear-gradient(180deg, #FFFDFC, #FAF8F6);
}
.hero__in { max-width: 1120px; margin: 0 auto; padding: 62px 28px 66px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .3px;
  color: #A8391A; background: var(--brand-soft); border: 1px solid #FFD9C7;
  padding: 5px 12px; border-radius: 999px; }
.hero h1 { font-size: 43px; line-height: 1.22; font-weight: 800; letter-spacing: -1.4px; margin-top: 20px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero__p { font-size: 15px; line-height: 1.85; color: var(--t2); margin-top: 18px; max-width: 30em; }
.hero__btns { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px; border-radius: 999px; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .12s, box-shadow .18s, background .18s; }
.btn:active { transform: scale(.975); }
.btn--brand { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(255,107,53,.28); }
.btn--brand:hover { box-shadow: 0 14px 30px rgba(255,107,53,.34); }
.btn--line { background: var(--surface); color: var(--t1); border-color: var(--border); }
.btn--line:hover { border-color: #DCD6CF; }
.facts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 32px; padding-top: 22px;
  border-top: 1px solid var(--border); list-style: none; }
.facts li { font-size: 13px; color: var(--t2); }
.facts b { font-size: 19px; color: var(--t1); margin-right: 3px; }

/* 头图右侧：纯 CSS 的「照片 → 结果」示意（不使用假图，也不冒充生成结果） */
.hero__art { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 300px; }
.shot { width: 148px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 10px; box-shadow: 0 18px 40px rgba(26,24,21,.09); }
.shot__lab { font-size: 11.5px; color: var(--t3); text-align: center; padding: 2px 0 8px; }
.shot__ph { height: 176px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 42px; }
.shot__ph--in { background: linear-gradient(160deg, #EFEBE6, #E0DAD3); }
.shot__ph--out { background: linear-gradient(160deg, #FFE2D2, #FFC7AB); }
.shot__to { font-size: 22px; color: var(--brand); font-weight: 700; }
.chip { position: absolute; font-size: 12.5px; font-weight: 600; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px;
  box-shadow: 0 10px 24px rgba(26,24,21,.08); }
.chip--1 { top: 4px; left: 2px; }
.chip--2 { bottom: 30px; right: 0; }
.chip--3 { bottom: -8px; left: 42px; }

/* 工作台：左窄右宽 */
.studio { display: grid; grid-template-columns: 372px 1fr; gap: 22px; margin-top: 40px; align-items: start; }
.studio__left { position: sticky; top: 82px; }
.studio__right { display: grid; gap: 22px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 24px;
  box-shadow: 0 1px 2px rgba(26,24,21,.03); }
.panel__h { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; margin-bottom: 18px; }
.panel__h em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--t3); margin-left: auto; }
.panel__n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; }
body[data-page="home"] .credits { margin-top: 18px; }
body[data-page="home"] .cta { margin-top: 14px; }

/* 说明区 */
.sec { margin-top: 62px; }
.sec__h { font-size: 25px; font-weight: 800; letter-spacing: -.7px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px; }
.cell { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.cell__n { font-size: 13px; font-weight: 800; color: var(--brand); letter-spacing: 1px; }
.cell h3 { font-size: 16px; font-weight: 800; margin-top: 12px; }
.cell p { font-size: 13.5px; line-height: 1.85; color: var(--t2); margin-top: 10px; }
.cell a { color: var(--brand); text-decoration: underline; }

/* 手机 / 窄屏（保持可用） */
@media (max-width: 900px) {
  body[data-page="home"] .main { padding: 0 18px 56px; }
  .tnav__in { padding: 0 18px; gap: 14px; }
  .tnav__menu { display: none; }
  .hero__in { grid-template-columns: 1fr; gap: 34px; padding: 38px 18px 42px; }
  .hero h1 { font-size: 30px; letter-spacing: -.8px; }
  .hero__art { min-height: 250px; }
  .shot { width: 124px; }
  .shot__ph { height: 146px; font-size: 36px; }
  .studio { grid-template-columns: 1fr; gap: 16px; }
  .studio__left { position: static; }
  .panel { padding: 18px; border-radius: 18px; }
  .grid3 { grid-template-columns: 1fr; gap: 14px; }
  .sec { margin-top: 42px; }
  .sec__h { font-size: 21px; }
}

/* ── 无障碍 ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
