/* ============================================================
   openji.ai 设计系统 · 风格 A「暖纸纪念」
   暖米纸感底 / 衬线标题 / 细线框 / 克制的深棕点缀
   ============================================================ */

/* hidden 属性恒生效：任何 display 规则（如 .upload-grid 的 flex）不得覆盖它 */
[hidden] { display: none !important; }

:root {
  --bg: #f7f3ec;
  --paper: #fffdf8;
  --ink: #3d3629;
  --ink-soft: #7a6f5d;
  --ink-faint: #b0a68f;
  --line: #e4dccb;
  --accent: #a8783c;
  --accent-deep: #7c5626;
  --danger: #a0522d;
  --ok: #6b7f4e;
  --serif: "Palatino Linotype", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", sans-serif;
  --shadow: 0 24px 60px rgba(93, 74, 44, .14);
  --radius: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 1px; }

/* ---------- 导航 ---------- */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.logo { font-family: var(--serif); font-size: 23px; letter-spacing: 1px; text-decoration: none; }
.logo em { font-style: normal; color: var(--accent); }
.logo small { font-size: 11px; color: var(--ink-soft); letter-spacing: 4px; margin-left: 10px; }
.menu { display: flex; gap: 30px; align-items: center; font-size: 14px; color: var(--ink-soft); }
.menu a { text-decoration: none; }
.menu a:hover { color: var(--ink); }
.menu .on { color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.menu-auth {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 18px; color: var(--ink) !important; background: var(--paper);
}
.credits {
  font-size: 13px; color: var(--accent-deep);
  border: 1px solid #d8c39a; background: #f6efe1;
  border-radius: 999px; padding: 4px 14px;
}
/* 顶部语言切换：<details> 国旗下拉（触屏/键盘可用，JS 仅做外点与 Esc 关闭增强） */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 12px; background: var(--paper);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { border-color: var(--accent-deep); }
.lang-switch .flag { border-radius: 2px; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.lang-switch .lang-cur { font-size: 13px; color: var(--ink); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  margin: 0; padding: 6px; list-style: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr));
  max-height: 60vh; overflow-y: auto; min-width: 320px;
}
.lang-list a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px;
  font-size: 13px; text-decoration: none; color: var(--ink-soft); white-space: nowrap;
}
.lang-list a:hover { background: #f3ecdd; color: var(--ink); }
.lang-list a.on { color: var(--accent-deep); font-weight: 600; }
.lang-list .flag { border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

/* 生成页自定义语言下拉（原生 select 无法嵌图片；select 本体隐藏但保留表单 value，
   JS 失败时不隐藏、原生下拉可用） */
.flag-select { position: relative; }
.flag-select-btn {
  display: inline-flex; align-items: center; gap: 9px; width: 100%;
  min-height: 46px; padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font-size: 15px; font-family: var(--sans);
  text-align: left; justify-content: flex-start;
}
.flag-select-btn:hover { border-color: var(--accent-deep); }
.flag-select-btn img { border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.flag-select-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  margin: 0; padding: 6px; list-style: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 320px; overflow-y: auto;
}
.flag-select-list li {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 6px; cursor: pointer;
  font-size: 14px; color: var(--ink-soft);
}
.flag-select-list li:hover { background: #f3ecdd; color: var(--ink); }
.flag-select-list li.on { color: var(--accent-deep); font-weight: 600; background: #f6efe1; }
.flag-select-list li img { border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

/* ---------- 按钮 ----------
   <a> 与 <button> 统一为固定高度 + flex 垂直居中（button 默认 line-height 与
   继承值不同，曾导致同排按钮一高一矮）；.btn 与 .btn-outline 同高可并排使用 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 32px; line-height: 1; white-space: nowrap;
  background: var(--accent-deep); color: #fdfaf4;
  font-size: 15px; letter-spacing: 2px; text-decoration: none;
  border: none; border-radius: var(--radius); cursor: pointer;
  font-family: var(--sans);
  box-shadow: 0 2px 0 #5e4019;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; opacity: .92; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 30px; line-height: 1; white-space: nowrap;
  border: 1px solid var(--accent-deep); color: var(--accent-deep);
  font-size: 14px; letter-spacing: 2px; text-decoration: none;
  border-radius: var(--radius); background: transparent; cursor: pointer;
}
.btn-outline:hover { background: #f3ecdd; }
.btn-sm { height: 38px; padding: 0 20px; font-size: 13px; }
.link { color: var(--ink-soft); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.link:hover { color: var(--ink); }

/* ---------- 首屏 ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; padding: 80px 0 90px; }
.kicker { font-size: 13px; letter-spacing: 6px; color: var(--accent-deep); margin-bottom: 22px; }
.kicker::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--accent); vertical-align: middle; margin-right: 12px; }
.hero h1 { font-size: 42px; line-height: 1.42; margin-bottom: 24px; }
.hero .sub { color: var(--ink-soft); font-size: 16px; max-width: 420px; margin-bottom: 38px; }
.actions { display: flex; align-items: center; gap: 26px; }

/* 相框照片 */
.frame {
  position: relative; justify-self: center;
  background: var(--paper); padding: 16px 16px 54px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
}
.frame::before {
  content: ""; position: absolute; top: -12px; left: 50%;
  width: 96px; height: 26px; margin-left: -48px;
  background: rgba(214, 188, 140, .38);
  transform: rotate(-2deg);
  border-left: 1px dashed rgba(255,255,255,.6);
  border-right: 1px dashed rgba(255,255,255,.6);
}
.frame img { display: block; width: 330px; height: 412px; object-fit: cover; filter: sepia(.12) contrast(.98); }
.frame figcaption {
  position: absolute; bottom: 14px; left: 0; right: 0; text-align: center;
  font-family: var(--serif); font-size: 14px; color: var(--ink-soft); letter-spacing: 3px;
}

/* ---------- 首页三步说明 ---------- */
.steps-home { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 20px 0 90px; }
.step-home { border-top: 1px solid var(--line); padding-top: 26px; }
.step-home .no { font-family: var(--serif); font-size: 15px; color: var(--accent); letter-spacing: 3px; }
.step-home h3 { font-size: 19px; margin: 10px 0 8px; }
.step-home p { color: var(--ink-soft); font-size: 14px; }

/* ---------- 区块标题 ---------- */
.section { padding: 24px 0 100px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 34px; }
.section-head h2 { font-size: 25px; }
.section-head span { font-size: 13px; color: var(--ink-soft); }

/* ---------- 卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { background: var(--paper); border: 1px solid var(--line); padding: 14px 14px 20px; position: relative; }
a.card { text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(93, 74, 44, .10); }
.card img { width: 100%; height: 250px; object-fit: cover; filter: sepia(.1); }
.card .no-img {
  width: 100%; height: 250px; display: flex; align-items: center; justify-content: center;
  background: #efe8d8; color: var(--ink-faint);
  font-family: var(--serif); font-size: 44px; letter-spacing: 2px;
}
.card .info { padding: 16px 6px 0; }
.card .name { font-family: var(--serif); font-size: 19px; letter-spacing: 2px; }
.card .rel { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.card-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px dashed #cfc3a8; background: transparent; min-height: 380px;
  color: var(--ink-soft); text-decoration: none; gap: 10px;
}
.card-new:hover { border-color: var(--accent); color: var(--accent-deep); background: rgba(255, 253, 248, .6); }
.card-new .plus { font-family: var(--serif); font-size: 40px; line-height: 1; }

/* 角色详情：左卡右信息两栏（必须用类而非内联 style，否则媒体查询被压过、手机端横向溢出） */
.role-grid { grid-template-columns: 340px 1fr; }
.role-actions { margin-top: 26px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

/* 状态徽标 */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; border-radius: 999px; padding: 3px 12px;
  border: 1px solid #d8c39a; background: #f6efe1; color: var(--accent-deep);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pill.ok { border-color: #c2cbb0; background: #eef1e6; color: var(--ok); }
.pill.ok i { background: var(--ok); }
.pill.warn { border-color: #dcc9b4; background: #f7ece2; color: var(--danger); }
.pill.warn i { background: var(--danger); }

/* ---------- 表单 ---------- */
.form-narrow { max-width: 520px; }
.field { margin-bottom: 26px; }
.field label { display: block; font-size: 14px; letter-spacing: 1px; margin-bottom: 8px; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; line-height: 1.6; }
.input, textarea.input {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168, 120, 60, .12); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.8; }

/* 上传框 */
.upload-box {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px dashed #cfc3a8; border-radius: var(--radius);
  background: rgba(255, 253, 248, .5);
  padding: 48px 24px; text-align: center; color: var(--ink-soft);
  cursor: pointer; gap: 8px;
}
/* 透明文件输入覆盖整个上传区：点击原生打开选择器，不依赖 JS 转发 */
.upload-box input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; padding: 0; border: 0; cursor: pointer;
}
.upload-box:hover { border-color: var(--accent); color: var(--accent-deep); }
.upload-box .big { font-family: var(--serif); font-size: 20px; letter-spacing: 2px; }

/* 选完即传：照片缩略图（固定尺寸横排）+ 进度条 + 点击放大 */
.upload-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.up-item {
  position: relative; width: 104px; flex: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); overflow: hidden; cursor: default;
}
.up-thumb {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  background: #efe8d8;
}
.up-item.done { cursor: zoom-in; }
.up-item.err .up-thumb { opacity: .35; filter: grayscale(1); }
.up-item.err { cursor: pointer; }
.up-item.err:hover { border-color: var(--danger); }
.up-pct {
  position: absolute; inset: 0 0 14px 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fdfaf4; text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  pointer-events: none; letter-spacing: 1px;
}
.up-item.err .up-pct { color: var(--danger); text-shadow: none; font-size: 12px; padding: 0 6px; text-align: center; }
.up-item.done .up-pct { display: none; }
.up-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: rgba(61, 54, 41, .14);
}
.up-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transition: width .18s ease;
}
.up-item.done .up-bar { display: none; }
.up-del {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  border: none; border-radius: 50%; background: rgba(61, 54, 41, .72);
  color: #fdfaf4; font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.up-del:hover { background: var(--danger); }

/* 图片放大查看（点击缩略图打开，点击任意处/ Esc 关闭） */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(30, 26, 19, .82);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; animation: lb-in .16s ease;
}
.lightbox img {
  max-width: 92vw; max-height: 92vh;
  border-radius: var(--radius); box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

/* 选完即传：独立进度条（声音上传中） */
.up-line { margin-top: 14px; }
.up-bar.standalone {
  position: static; height: 6px; border-radius: 999px; overflow: hidden;
}

/* 选完即传：声音/视频在线预览 */
.voice-preview {
  margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 14px;
}
.voice-preview video, .voice-preview audio { width: 100%; display: block; }
.voice-preview video { max-height: 320px; border-radius: var(--radius); background: #000; }
.voice-preview audio { height: 44px; }
.voice-preview .media-err { margin-top: 10px; font-size: 13px; color: var(--danger); }

/* 音频裁切器：波形选区 + 双手柄拖动（>15s 录音显示，选 6~15s 段） */
.voice-trimmer {
  margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 14px;
}
.voice-trimmer > .hint { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-soft); }
.trim-wave-wrap {
  position: relative; height: 88px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: #faf6ee;
}
#trim-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.trim-handle {
  position: absolute; top: 0; bottom: 0; width: 12px; z-index: 2;
  cursor: ew-resize; touch-action: none;
}
.trim-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px;
  background: var(--accent-deep);
}
.trim-handle::after {
  content: ""; position: absolute; top: 50%; left: 1px; width: 10px; height: 20px;
  transform: translateY(-50%); border-radius: 2px; background: var(--accent-deep);
}
.trim-row {
  display: flex; align-items: center; justify-content: space-between; margin-top: 10px;
}
.trim-time { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ref-field { margin-top: 18px; }
.ref-warning { margin-top: 8px; }

/* 编辑页：当前容貌缩略图（点击放大） */
.edit-portrait img {
  width: 104px; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: zoom-in;
  background: #efe8d8;
}

/* ---------- 步骤条 ---------- */
.steps { display: flex; gap: 0; margin: 34px 0 44px; border-bottom: 1px solid var(--line); }
.steps .st {
  flex: 1; text-align: center; padding-bottom: 14px;
  font-size: 13.5px; color: var(--ink-faint); letter-spacing: 1px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.steps .st.on { color: var(--accent-deep); border-bottom-color: var(--accent); }
.steps .st.done { color: var(--ink-soft); }

/* ---------- 提示条 ---------- */
.notice {
  border: 1px solid #d8c39a; background: #f6efe1; color: var(--accent-deep);
  border-radius: var(--radius); padding: 14px 20px; font-size: 13.5px;
  margin-bottom: 28px; line-height: 1.8;
}
.notice.plain { border-color: var(--line); background: var(--paper); color: var(--ink-soft); }

/* ---------- 人像候选选择 ---------- */
.face-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.face {
  position: relative;
  background: var(--paper); border: 1px solid var(--line);
  padding: 12px; cursor: pointer; text-align: center;
}
.face img { width: 100%; height: 280px; object-fit: cover; }
.face:hover { border-color: var(--accent); }
.face.sel { border: 2px solid var(--accent-deep); }
.face .pick { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.face.sel .pick { color: var(--accent-deep); }
.face-zoom {
  position: absolute; top: 20px; right: 20px; width: 32px; height: 32px;
  border: none; border-radius: 50%; background: rgba(61, 54, 41, .72);
  cursor: zoom-in; display: flex; align-items: center; justify-content: center; padding: 0;
}
.face-zoom:hover { background: var(--accent-deep); }
.face-zoom svg { width: 16px; height: 16px; stroke: #fdfaf4; fill: none; stroke-width: 2; }

/* ---------- 视频卡 ---------- */
.video-card { background: var(--paper); border: 1px solid var(--line); padding: 14px; }
.video-card video, .video-card .poster { width: 100%; height: 230px; object-fit: cover; display: block; background: #2f2a22; }
.video-card .info { padding: 14px 6px 4px; }
.video-card .text { font-size: 14px; color: var(--ink); }
.video-card .meta { font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }

/* ---------- 空状态 / 页头 ---------- */
.empty { text-align: center; padding: 70px 0; color: var(--ink-faint); }
.empty .serif { font-family: var(--serif); font-size: 20px; letter-spacing: 3px; margin-bottom: 10px; color: var(--ink-soft); }
.page-title { padding: 46px 0 6px; }
.page-title h1 { font-size: 30px; }
.page-title .sub { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }

/* ---------- 价格卡 ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 30px 0 60px; }
.price-card { background: var(--paper); border: 1px solid var(--line); padding: 34px 30px; text-align: center; }
.price-card.hot { border-color: var(--accent); box-shadow: var(--shadow); }
.price-card h3 { font-size: 18px; letter-spacing: 2px; margin-bottom: 14px; }
.price-card .amount { font-family: var(--serif); font-size: 36px; color: var(--accent-deep); }
.price-card .unit { font-size: 13px; color: var(--ink-soft); }
.price-card ul { list-style: none; margin: 22px 0 26px; text-align: left; }
.price-card li { font-size: 13.5px; color: var(--ink-soft); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.price-card li::before { content: "·"; color: var(--accent); margin-right: 10px; }

/* ---------- 登录卡 ---------- */
.auth-card {
  max-width: 460px; margin: 70px auto 110px;
  background: var(--paper); border: 1px solid var(--line);
  padding: 48px 44px;
}
.auth-card h1 { font-size: 24px; margin-bottom: 8px; }
.auth-card .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 34px; }
.code-row { display: flex; gap: 14px; }
.code-row .input { text-align: center; font-family: var(--serif); font-size: 22px; letter-spacing: 8px; }

/* 登录页双 Tab（密码登录 / 验证码注册） */
.auth-card .tabs { display: flex; gap: 6px; margin: 26px 0 26px; border-bottom: 1px solid var(--line); }
.auth-card .tab {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: 10px 16px; font-size: 14px; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.auth-card .tab.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.auth-card .tab-pane .sub { margin-bottom: 22px; }
.auth-card .cf-turnstile { margin-bottom: 4px; }
.auth-card .hint .btn-sm { margin: 0 6px; }

/* ---------- 长文（关于页） ---------- */
.prose { max-width: 720px; padding: 30px 0 100px; }
.prose h2 { font-size: 20px; margin: 34px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 10px; }
.prose ul { padding-left: 22px; }

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  margin-top: 20px; padding: 26px 0 40px;
  display: block;
  font-size: 12px; color: var(--ink-faint); letter-spacing: 1px;
}
.footer-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px 28px; flex-wrap: wrap; }
.footer-top .footer-links { white-space: nowrap; }
footer a { color: inherit; text-decoration: none; margin-left: 22px; }
footer a:first-child { margin-left: 0; }
footer a:hover { color: var(--ink-soft); }
.anti-fraud { margin-top: 14px; max-width: 780px; font-size: 11.5px; line-height: 1.75; letter-spacing: .4px; opacity: .8; }

/* ---------- 授权确认勾选 ---------- */
.check-row {
  display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7;
}
.check-row input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent-deep); flex: none; }
.check-row a { color: var(--accent-deep); }

/* ---------- 后台管理 ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { background: #f6efe1; color: var(--accent-deep); font-weight: 600; letter-spacing: 1px; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { font-family: var(--serif); letter-spacing: 1px; }
.tbl td.empty { text-align: center; color: var(--ink-faint); padding: 40px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0 0 18px; }
.stat { background: var(--paper); border: 1px solid var(--line); padding: 18px 20px; }
.stat .n { font-family: var(--serif); font-size: 28px; color: var(--accent-deep); }
.stat .l { font-size: 12.5px; color: var(--ink-soft); letter-spacing: 1px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form .input { width: 84px; padding: 6px 10px; font-size: 13px; }

/* ---------- 个人中心 ---------- */
.me-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 12px 3px 3px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink);
}
.me-chip:hover { border-color: var(--accent-deep); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; display: inline-block; flex: none; background: var(--line);
}
.avatar-txt {
  background: var(--accent-deep); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-family: var(--serif);
}
.avatar-lg { width: 64px; height: 64px; font-size: 26px; }
.me-name {
  font-size: 13px; max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; }
.me-card { border: 1px solid var(--line); background: var(--paper); padding: 24px 26px; }
.me-card h3 {
  font-family: var(--serif); font-size: 18px; color: var(--accent-deep);
  margin: 0 0 16px; letter-spacing: 1px;
}
.me-avatar-row { display: flex; gap: 16px; align-items: flex-end; }
.me-avatar-row .avatar { margin-bottom: 8px; }
.meta-line { font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 18px; }
.balance { font-family: var(--serif); font-size: 34px; color: var(--accent-deep); margin-bottom: 14px; }
.balance small { font-size: 13px; color: var(--ink-soft); letter-spacing: 2px; margin-left: 6px; }
.me-tbl { min-width: 0; font-size: 13px; }
td.up { color: #2e7d43; }
td.down { color: #b0432e; }
.me-actions { margin-top: 26px; }

/* 危险区（注销账号） */
.danger-zone { border: 1px solid #dfb3a9; background: #fdf4f1; padding: 22px 26px; margin-top: 30px; }
.danger-zone h3 { margin: 0 0 8px; font-family: var(--serif); color: #a03a2a; font-size: 18px; letter-spacing: 1px; }
.danger-zone p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; margin: 0 0 14px; }
.btn-danger { background: #a03a2a; border-color: #a03a2a; color: #fff; }
.btn-danger:hover { background: #872e20; border-color: #872e20; }
.btn-sm.btn-danger { height: 32px; padding: 0 14px; font-size: 12.5px; }
.danger-zone .btn-danger { margin-top: 14px; }

/* 后台配置管理 */
.set-group { border: 1px solid var(--line); background: var(--paper); padding: 20px 26px; margin-top: 22px; }
.set-group h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 18px; letter-spacing: 1px; color: var(--accent-deep); }
.set-row { display: grid; grid-template-columns: 300px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px dashed var(--line); align-items: start; }
.set-row:last-child { border-bottom: none; }
.set-row .k { font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.set-row .k small { display: block; width: 100%; color: var(--ink-faint); font-size: 12px; line-height: 1.6; }
.set-row .src { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }
.set-row .input { max-width: 420px; }
.set-mail { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.set-mail .input { max-width: 360px; }
@media (max-width: 600px) {
  .set-row { grid-template-columns: 1fr; gap: 8px; }
}

/* 后台操作列 */
.ops { display: flex; gap: 6px; align-items: center; }
.ops .btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; white-space: nowrap; }
td.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 56px 0 70px; }
  .frame img { width: 280px; height: 350px; }
  .cards, .steps-home, .price-grid { grid-template-columns: 1fr 1fr; }
  .face-grid { grid-template-columns: 1fr 1fr; }
  .role-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  nav { flex-wrap: wrap; row-gap: 12px; padding: 18px 0; }
  .menu { flex-wrap: wrap; gap: 10px 18px; font-size: 13px; width: 100%; }
  .cards, .steps-home, .face-grid, .stat-grid { grid-template-columns: 1fr 1fr; }
  /* 必须写在 .cards 之后：同优先级后来居上，否则 340px+1fr 两列在手机上横向溢出 */
  .role-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 54px; }
  .hero h1 { font-size: 27px; }
  .hero .sub { font-size: 15px; }
  .section { padding: 16px 0 60px; }
  .page-title { padding: 28px 0 4px; }
  .page-title h1 { font-size: 24px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 24px; }
  .steps { margin: 24px 0 30px; flex-wrap: wrap; row-gap: 4px; }
  .steps .st { flex: 1 1 40%; text-align: left; font-size: 12.5px; }
  .form-narrow { max-width: none; }
  .auth-card { margin: 36px auto 60px; padding: 34px 24px; }
  .upload-box { padding: 34px 16px; }
  .upload-box .big { font-size: 17px; }
  .upload-grid { gap: 8px; }
  .up-item { width: 88px; }
  .voice-preview { padding: 10px; }
  .voice-preview audio { height: 40px; }
  .voice-trimmer { padding: 10px; }
  .trim-wave-wrap { height: 72px; }
  .actions { gap: 16px; }
  .card img { height: 210px; }
  .frame img { width: 232px; height: 290px; }
  .video-card video, .video-card .poster { height: 190px; }
  .video-card .meta { flex-wrap: wrap; gap: 4px 10px; }
  .face-grid { gap: 12px; }
  .face img { height: 200px; }
  .face-zoom { top: 14px; right: 14px; }
  .price-card { padding: 28px 20px; }
  footer { overflow-wrap: anywhere; }
  .footer-top { flex-direction: column; gap: 10px; text-align: center; }
  .footer-top .footer-links { white-space: normal; }
  footer a { margin: 0 10px; }
  .stat .n { font-size: 22px; }
  .btn { height: 46px; padding: 0 26px; }
  /* iOS Safari：输入框字号 <16px 聚焦时自动放大页面 */
  .input, textarea.input, select.input { font-size: 16px; }
  .role-actions { gap: 12px; }
  /* 语言切换下拉：移动端菜单换行后语言按钮在左侧，必须左锚定，
     否则 320px 宽下拉以 right 锚点向左展开、大半飞出屏幕外（真机截图已踩坑） */
  .lang-list {
    left: 0; right: auto; min-width: min(320px, calc(100vw - 36px)); grid-template-columns: 1fr;
  }
  .flag-select-list { max-height: 260px; }
  .me-grid { grid-template-columns: 1fr; }
  .me-avatar-row { flex-direction: column; align-items: flex-start; }
  .me-name { max-width: 84px; }
  .me-chip { padding: 3px 10px 3px 3px; }
  .balance { font-size: 28px; }
  .me-card { padding: 20px 18px; }
  .danger-zone { padding: 18px 18px; }
  .tbl { min-width: 640px; }
  .ops { flex-wrap: wrap; }
}
/* 极小屏（≤360px，如 iPhone SE 第一代 / 320px 安卓）：两列卡片挤不下，收单列 */
@media (max-width: 360px) {
  .cards, .steps-home, .stat-grid { grid-template-columns: 1fr; }
  .face-grid { grid-template-columns: 1fr; }
}
