:root {
  --bg: #0f1a1c;
  --panel: #14262a;
  --line: #24424a;
  --text: #e8f2f2;
  --muted: #8aa6a9;
  --accent: #2fd3a5;
  --warn: #f0b84b;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 20% -10%, #16343a 0%, var(--bg) 55%);
  color: var(--text);
  font: 15px/1.6 -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }

header h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.5px; }
header h1 span { color: var(--accent); }
header p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card h2 { font-size: 15px; margin: 0 0 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }

/* 上传区：实线大按钮式，避免虚线在部分安卓 WebView 上渲染残缺 */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,.02);
}
.drop:active { border-color: var(--accent); background: rgba(47,211,165,.06); }
.drop strong { display: block; margin-bottom: 4px; font-size: 16px; }
.drop small { color: var(--muted); }
.drop input { display: none; }
.stage.ready .drop { display: none; }

/* 画布 */
#stage { position: relative; }
/* 未上传照片：隐藏画布和 Size/Zoom/Background 控件，只留干净的上传框 */
#stage:not(.ready) #view,
#stage:not(.ready) .row { display: none; }
#view {
  width: 100%;
  display: block;
  background: #fff;
  border-radius: 8px;
  touch-action: none;
  cursor: grab;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
#view:active { cursor: grabbing; }

/* 控件 */
.row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.row label { color: var(--muted); font-size: 13px; min-width: 62px; }
select, input[type=range] { accent-color: var(--accent); }
select {
  flex: 1; background: #0d1c20; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px;
}
input[type=range] { flex: 1; }
input[type=color] { width: 34px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: none; }
#zoomVal { color: var(--muted); font-size: 12px; min-width: 42px; text-align: right; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 14px; margin-top: 10px;
  border-radius: 10px; border: 1px solid var(--line);
  background: #0d1c20; color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .16s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #06231c; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 检查清单 */
ul#checks { list-style: none; padding: 0; margin: 0; }
ul#checks li { padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,.06); font-size: 13.5px; }
ul#checks li:last-child { border-bottom: 0; }
ul#checks li.ok { color: #b8f5e2; }
ul#checks li.warn { color: var(--warn); }
ul#checks li.muted { color: var(--muted); }
.verdict { margin-top: 10px; font-weight: 700; font-size: 14px; }
.verdict.pass { color: var(--accent); }
.verdict.fail { color: var(--warn); }

#status { margin-top: 12px; color: var(--muted); font-size: 12.5px; min-height: 18px; }

footer { margin-top: 26px; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.9; padding-bottom: 20px; }
footer .foot-links { display: inline-block; margin: 4px 0; }
footer .foot-links a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }
footer .foot-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- 法律条款页 ---------- */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: 26px; margin: 8px 0 4px; }
.legal h2 { font-size: 16px; margin: 26px 0 8px; color: var(--text); }
.legal p, .legal li { color: #c6d6d7; font-size: 14px; line-height: 1.75; }
.legal ul { padding-left: 20px; }
.legal .muted { color: var(--muted); font-size: 12px; }
.legal a { color: var(--accent); }

/* ---------- 轻量提示 ---------- */
.pp-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 14px);
  background: #1d3438; color: #fff; border: 1px solid var(--line);
  padding: 12px 20px; border-radius: 10px; font-size: 14px; line-height: 1.5;
  z-index: 9999; opacity: 0; pointer-events: none; transition: .22s ease;
  box-shadow: 0 12px 34px rgba(0,0,0,.45); max-width: 88vw; text-align: center;
}
.pp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 落地页 ---------- */
.landing header { text-align: center; padding: 12px 0 4px; }
.landing header .btn { display: inline-flex; width: auto; padding: 13px 26px; margin: 16px auto 4px; }
.landing .card { max-width: 760px; margin: 16px auto 0; text-align: left; }
.landing ol.steps { margin: 0; padding-left: 20px; }
.landing ol.steps li { padding: 6px 0; font-size: 14px; line-height: 1.6; }
table.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
table.spec td { padding: 9px 6px; border-bottom: 1px solid var(--line); }
table.spec td:first-child { color: var(--muted); width: 130px; }
.landing .card p { font-size: 14px; line-height: 1.7; color: var(--text); }
.footer-nav { margin-top: 24px; text-align: center; font-size: 12px; color: var(--muted); }
.footer-nav a { color: var(--muted); margin: 0 8px; text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

/* ---------- 付费墙 ---------- */
.paywall {
  position: fixed; inset: 0; background: rgba(4,12,14,.72);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.paywall.show { display: flex; }
.paywall .box {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  max-width: 420px; width: 100%; padding: 26px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.paywall h3 { margin: 0 0 6px; font-size: 20px; }
.paywall .price { font-size: 34px; font-weight: 800; color: var(--accent); margin: 10px 0 2px; }
.paywall .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.paywall ul { list-style: none; padding: 0; margin: 14px 0 18px; text-align: left; }
.paywall ul li { font-size: 13.5px; padding: 5px 0; color: var(--text); }
.paywall ul li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.paywall .close { position: absolute; top: 14px; right: 18px; color: var(--muted); cursor: pointer; font-size: 22px; }
.lock-badge { font-size: 11px; color: var(--muted); margin-top: 8px; }
body.unlocked .lock-badge { display: none; }
