/* 语音转小红书 · 共享样式：大厂风、苹果式简约大气（大留白、黑白灰骨架、克制蓝色点缀）。
   零依赖、零外部 CDN、零外部字体/图片（收款码图除外，由服务端订单接口返回 URL）。 */
:root {
  --ink: #111; --mut: #6b7280; --faint: #9ca3af; --line: #e5e7eb; --line-soft: #f0f0f0;
  --accent: #2563eb; --accent-soft: #eff6ff; --bg: #fff; --bg-soft: #fafafa;
  --danger: #b91c1c; --warn-bg: #fffbeb; --warn-line: #fde68a; --ok: #15803d;
  --radius: 14px; --max: 1020px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 40px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: 26px; line-height: 1.3; letter-spacing: -0.01em; margin: 48px 0 12px; font-weight: 700; }
h3 { font-size: 18px; margin: 0 0 8px; font-weight: 650; }
p { margin: 0 0 12px; }
.mut { color: var(--mut); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
img, canvas, video { max-width: 100%; height: auto; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-size: 19px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.topbar nav a { color: var(--ink); padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.topbar nav a:hover { background: var(--bg-soft); text-decoration: none; }
.topbar nav a.active { color: var(--accent); background: var(--accent-soft); }
.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-btn { background: none; border: none; color: var(--accent); cursor: pointer; padding: 6px 4px; font: inherit; font-size: 14px; }
.user-chip { font-size: 13px; color: var(--mut); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 布局 */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px 80px; }
.hero { padding: 72px 0 24px; }
.hero p.lead { font-size: 19px; color: var(--mut); max-width: 640px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; }
.card.soft { background: var(--bg-soft); }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.plan.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan .price { font-size: 30px; font-weight: 700; margin: 10px 0 4px; letter-spacing: -0.02em; }
.plan ul { margin: 12px 0; padding-left: 18px; color: #374151; font-size: 14.5px; }
.plan li { margin: 4px 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 650; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
.notice { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 16px 0; font-size: 15px; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.notice.err { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.notice.ok { background: #f0fdf4; border-color: #bbf7d0; color: var(--ok); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; padding: 14px 0 14px 44px; position: relative; border-bottom: 1px solid var(--line-soft); }
.steps li:last-child { border-bottom: none; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.steps li b { display: block; }

/* 表单与按钮 */
button, input, textarea, select { font: inherit; }
button { padding: 11px 20px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; font-weight: 600; }
button:hover { filter: brightness(1.06); }
button.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
button.danger { background: #fff; color: var(--danger); border-color: #fecaca; }
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
button.sm { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
input, textarea, select { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); margin: 6px 0; background: #fff; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
label { font-size: 14px; font-weight: 600; display: block; margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row > * { flex: 1; min-width: 160px; }
#msg, .msg { color: var(--danger); min-height: 1.4em; font-size: 14px; }
.msg.ok { color: var(--ok); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 6px 0; cursor: pointer; }
.check input { width: auto; margin: 4px 0 0; }

/* 工作台 */
.step-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.wave { width: 100%; height: 72px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); display: block; }
.timer { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; font-weight: 700; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); margin-right: 6px; vertical-align: middle; }
.rec-dot.on { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.transcript { min-height: 160px; }
.kit-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; }
.kit-block h3 { margin-bottom: 4px; }
.kit-block .body { white-space: pre-wrap; word-break: break-word; color: #374151; font-size: 14.5px; }
.tpl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tpl-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.tpl-btn.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--accent); }
.tpl-btn .swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); vertical-align: -2px; margin-right: 6px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 12px; }
.card-cell { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.card-cell canvas { width: 100%; display: block; border-radius: 8px; }
.score-num { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
.score-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.score-item:last-child { border-bottom: none; }
.score-item .mark { font-weight: 700; flex: 0 0 auto; }
.score-item .mark.pass { color: var(--ok); }
.score-item .mark.fail { color: var(--danger); }
.list-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 10px 0; }
.list-item .title { font-weight: 650; }
.list-item .body { color: #374151; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; margin-top: 6px; }
.hidden { display: none; }
.mt12 { margin-top: 12px; }
.qr-img { max-width: 260px; border: 1px solid var(--line); border-radius: 12px; display: block; margin: 12px 0; }

footer { border-top: 1px solid var(--line); padding: 24px 20px; text-align: center; color: var(--mut); font-size: 13px; }

/* 响应式：手机 / iPad —— 390 宽度无横向溢出 */
@media (max-width: 720px) {
  h1 { font-size: 30px; }
  h2 { font-size: 22px; margin-top: 36px; }
  .hero { padding: 44px 0 16px; }
  .hero p.lead { font-size: 17px; }
  .topbar-inner { gap: 8px; padding: 10px 14px; }
  .wrap { padding: 0 14px 64px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .field-row > * { min-width: 0; }
  .score-num { font-size: 36px; }
}
@media (min-width: 721px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
