/* 顺势 · 左手写字辅助装置 */
:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #191713;
  --ink-2: #3f3a31;
  --muted: #7d7668;
  --line: #e8e2d6;
  --line-2: #f0ebe2;
  --accent: #a8442c;
  --accent-soft: #f6ece7;
  --good: #2f6b5e;
  --warn: #b07a20;
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.7 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- 页头 ---------- */
.site-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 26px 40px;
  flex: none;
}
.brand {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .16em;
  font-weight: 600;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .22em;
}
.head-spacer { flex: 1; }

/* ---------- 主页 ---------- */
.home-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 24px 96px;
}
.home-inner {
  width: 100%;
  max-width: 620px;
  text-align: center;
  animation: rise .7s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.home-title {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 82px);
  line-height: 1.06;
  letter-spacing: .12em;
  margin: 0 0 18px;
  font-weight: 500;
  text-indent: .12em;
}
.home-lede {
  color: var(--muted);
  font-size: 15px;
  letter-spacing: .04em;
  margin: 0 0 48px;
}
.rule {
  width: 44px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 48px;
  opacity: .55;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.feature-card + .feature-card { margin-top: 12px; }
.feature-card:hover {
  transform: translateY(-2px);
  border-color: #dcd4c6;
  box-shadow: 0 12px 32px -18px rgba(40, 32, 20, .38);
}
.fc-icon {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.fc-text { flex: 1; min-width: 0; }
.fc-text h2 {
  font-size: 15.5px;
  font-weight: 600;
  margin: 0 0 3px;
  letter-spacing: .02em;
}
.fc-text p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.fc-arrow {
  flex: none;
  color: var(--muted);
  font-size: 18px;
  transition: transform .22s ease, color .22s ease;
}
.feature-card:hover .fc-arrow { transform: translateX(3px); color: var(--accent); }

.site-foot {
  flex: none;
  padding: 0 40px 28px;
  font-size: 11.5px;
  color: #a49c8d;
  letter-spacing: .06em;
  text-align: center;
}

/* ---------- 功能页 ---------- */
.page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 40px;
  flex: none;
  border-bottom: 1px solid var(--line-2);
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px 6px 6px;
  border-radius: 8px;
  transition: background .18s, color .18s;
}
.back:hover { background: #f2eee6; color: var(--ink); }
.page-title {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .1em;
  margin: 0;
  font-weight: 600;
}
.head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.page-note {
  margin-left: 0;
  font-size: 11.5px;
  color: var(--muted);
}
.head-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 11px;
  transition: background .18s, color .18s, border-color .18s;
}
.head-link:hover { background: #f7f3ec; border-color: #dbd3c4; color: var(--ink); }

.workspace {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 40px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; gap: 28px; padding: 24px 20px 48px; }
  .site-head, .page-head { padding: 18px 20px; }
}

/* 拍摄区 */
.stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  background: #f2eee6;
  border: 1px dashed #d8d0c0;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
/* 照片模式：容器跟着图片比例走，竖图/超宽图都不再留白边 */
.stage.has-image {
  border-style: solid;
  border-color: var(--line);
  padding: 0;
  background: #f2eee6;
  aspect-ratio: auto;
}
.stage > img { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; border-radius: 15px; }
.stage.has-frames {
  border-style: solid;
  border-color: var(--line);
  padding: 0;
  background: #17140f;
  aspect-ratio: 16 / 10;
}
.frames { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 100%; height: 100%; }
.frames img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage video { width: 100%; height: 100%; object-fit: cover; display: block; }

.stage-empty { color: var(--muted); font-size: 13.5px; line-height: 1.8; max-width: 260px; }
.stage-empty .big {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-2);
  letter-spacing: .06em;
  display: block;
  margin-bottom: 8px;
}
.stage-empty svg { color: #bdb3a2; margin-bottom: 14px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .12s, opacity .18s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn:hover { background: #f7f3ec; border-color: #dbd3c4; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #2b2620; border-color: #2b2620; }
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: #973c26; border-color: #973c26; }
.btn:disabled {
  background: #f4f1ea;
  border-color: var(--line);
  color: #ada493;
  cursor: not-allowed;
  transform: none;
}
.btn-block { width: 100%; justify-content: center; }

/* 摄像头覆盖层 */
.cam {
  position: fixed;
  inset: 0;
  background: #0d0c0b;
  z-index: 50;
  display: none;
  flex-direction: column;
}
.cam.open { display: flex; }
.cam-view {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.cam-view video { width: 100%; height: 100%; object-fit: cover; }
.cam-guide {
  position: absolute;
  inset: 9% 7%;
  border-radius: 14px;
  pointer-events: none;
}
.cam-guide::before,
.cam-guide::after {
  content: "";
  position: absolute;
  width: 34px; height: 34px;
  border: 2px solid rgba(255,255,255,.55);
}
.cam-guide::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.cam-guide::after { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.cam-tip {
  position: absolute;
  left: 0; right: 0;
  bottom: 22px;
  text-align: center;
  color: rgba(255,255,255,.78);
  font-size: 12.5px;
  letter-spacing: .04em;
}
.cam-bar {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  padding: 20px 28px 30px;
}
.cam-cancel {
  justify-self: start;
  background: none;
  border: none;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  cursor: pointer;
  padding: 8px;
}
.cam-cancel:hover { color: #fff; }
.cam-close {
  position: absolute;
  top: 18px; left: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.14);
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  display: grid; place-items: center;
  z-index: 2;
}
.shutter {
  width: 66px; height: 66px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.9);
  background: transparent;
  cursor: pointer;
  padding: 5px;
}
.shutter span {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #fff;
  transition: transform .12s;
}
.shutter:active span { transform: scale(.92); }

/* 报告 */
.report { min-height: 120px; }
.report-placeholder {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 34px 26px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.report-placeholder strong {
  display: block;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .05em;
  margin-bottom: 6px;
  font-weight: 600;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 14px;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

.score-row { display: flex; align-items: center; gap: 22px; }
.score-ring { flex: none; position: relative; width: 92px; height: 92px; }
.score-ring svg { transform: rotate(-90deg); display: block; }
.score-ring .track { stroke: var(--line-2); }
.score-ring .fill { stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.7,.3,1); }
.score-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .02em;
}
.score-num small { font-size: 11px; color: var(--muted); margin-left: 2px; font-family: var(--sans); }
.score-meta { min-width: 0; }
.level {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 99px;
  border: 1px solid;
  margin-bottom: 6px;
  letter-spacing: .06em;
}
.level-优秀 { color: var(--good); border-color: #bcd8d0; background: #f0f7f5; }
.level-良好 { color: var(--good); border-color: #cfe0da; background: #f4f9f7; }
.level-一般 { color: var(--warn); border-color: #e6d3ab; background: #fdf7ea; }
.level-需改进 { color: var(--accent); border-color: #e8c8bd; background: #fdf2ee; }
.summary { font-size: 14px; line-height: 1.75; color: var(--ink-2); margin: 0; }

.dim { padding: 13px 0; border-top: 1px solid var(--line-2); }
.dim:first-of-type { border-top: none; padding-top: 4px; }
.dim-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.dim-name { font-size: 13.5px; font-weight: 500; flex: none; }
.dim-score { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width .9s cubic-bezier(.2,.7,.3,1);
}
.bar i.good { background: var(--good); }
.bar i.mid { background: #c8963c; }
.bar i.low { background: var(--accent); }
.dim-comment { font-size: 12.5px; color: var(--muted); line-height: 1.75; margin: 8px 0 0; }

.list { margin: 0; padding: 0; list-style: none; }
.list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #c9c0ae;
}
.list.good li::before { background: #8fbfb2; }
.list.warn li::before { background: #d9b87e; }
.list.num { counter-reset: n; }
.list.num li { padding-left: 22px; }
.list.num li::before {
  counter-increment: n;
  content: counter(n);
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  display: grid;
  place-items: center;
  top: .42em;
}

/* 加载 / 错误 */
.loading {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px;
  background: var(--card);
  text-align: center;
}
.spinner {
  width: 26px; height: 26px;
  margin: 0 auto 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; color: var(--muted); letter-spacing: .02em; min-height: 1.7em; }
.dots::after { content: ""; animation: dots 1.6s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

.error-box {
  border: 1px solid #e8c8bd;
  background: #fdf2ee;
  color: #8c3623;
  border-radius: 16px;
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.75;
}
.error-box strong { display: block; margin-bottom: 4px; }

.privacy {
  margin-top: 14px;
  font-size: 11.5px;
  color: #a49c8d;
  line-height: 1.7;
}

[hidden] { display: none !important; }

@media (max-width: 560px) {
  .page-note { display: none; }
  .page-title { font-size: 15.5px; }
}

/* ---------- 隐私同意 ---------- */
.consent {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfbf7;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
  transition: border-color .2s, background .2s;
}
.consent:has(input:checked) { border-color: #d7ddd6; background: #f7faf7; }
.consent label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.consent input[type="checkbox"] {
  flex: none;
  width: 15px; height: 15px;
  margin: 4px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.consent a:hover { color: #8c3623; }

/* ---------- 隐私协议页 ---------- */
.doc {
  max-width: 700px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}
.doc h1 {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .08em;
  font-weight: 600;
  margin: 0 0 10px;
}
.doc .meta {
  font-size: 12px;
  color: #a49c8d;
  letter-spacing: .05em;
  margin: 0 0 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-2);
}
.doc .lead {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.9;
  margin: 0 0 34px;
}
.doc h2 {
  font-size: 14px;
  letter-spacing: .08em;
  font-weight: 600;
  margin: 34px 0 12px;
  padding-left: 11px;
  border-left: 2px solid var(--accent);
  line-height: 1.4;
}
.doc p, .doc li {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-2);
}
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: #b8ae9c; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: #f2eee6;
  border-radius: 4px;
  padding: 1px 5px;
}
.doc strong { color: var(--ink); font-weight: 600; }
.doc .note {
  margin-top: 34px;
  padding: 16px 18px;
  background: #fdfbf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.85;
}
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 26px;
}
.doc-back:hover { color: var(--ink); }

/* ---------- 历史记录 ---------- */
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; }

.hist-wrap {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 40px 72px;
}
@media (max-width: 880px) {
  .hist-wrap { padding: 20px 20px 56px; }
}

.hist-tools { display: flex; justify-content: flex-end; min-height: 0; margin-bottom: 14px; }
.hist-tools:has(#clear[hidden]) { margin-bottom: 0; }

.hist-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 18px 14px;
  margin-bottom: 12px;
}
.hist-top { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.hist-date {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.hist-top .level { margin-bottom: 0; }
.hist-score {
  margin-left: auto;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hist-score small { font-size: 10.5px; color: var(--muted); margin-left: 2px; font-family: var(--sans); }
.hist-del {
  flex: none;
  width: 22px; height: 22px;
  border: none;
  background: none;
  color: #c3baa8;
  font-size: 12px;
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .18s, color .18s;
}
.hist-del:hover { background: #fdf2ee; color: var(--accent); }

.hist-summary {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  margin: 0 0 10px;
}

.hist-more { border-top: 1px solid var(--line-2); padding-top: 9px; }
.hist-more summary {
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}
.hist-more summary::-webkit-details-marker { display: none; }
.hist-more summary::before {
  content: "▸";
  font-size: 10px;
  transition: transform .18s;
  display: inline-block;
}
.hist-more[open] summary::before { transform: rotate(90deg); }
.hist-more summary:hover { color: var(--ink); }

.hist-dims { margin-top: 12px; }
.hist-dim { padding: 10px 0; border-top: 1px dashed var(--line-2); }
.hist-dim:first-child { border-top: none; padding-top: 4px; }
.hist-dim-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 6px;
}
.hist-dim-score {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hist-dim .dim-comment { margin: 6px 0 0; }
.hist-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  margin: 16px 0 8px;
}
.hist-sub + .list li { font-size: 13px; }

.hist-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2;
}
.hist-empty .btn { margin-top: 12px; }

.hist-note {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  font-size: 11.5px;
  line-height: 1.9;
  color: #a49c8d;
}
.hist-note strong { color: var(--muted); font-weight: 500; }

.saved-hint {
  font-size: 12px;
  color: #a49c8d;
  margin: 2px 2px 0;
  line-height: 1.8;
}
.saved-hint a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 账号 ---------- */
.account { margin-left: auto; position: relative; display: flex; align-items: center; }
.acc-btn {
  font-size: 13px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 15px;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.acc-btn:hover { background: #f7f3ec; border-color: #dbd3c4; }

.acc-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px 4px 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.acc-user:hover { border-color: #dbd3c4; background: #fdfbf7; }
.acc-ava {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  flex: none;
}
.acc-name {
  font-size: 12.5px;
  color: var(--ink-2);
  max-width: 126px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-caret { font-size: 8px; color: var(--muted); line-height: 1; }

.acc-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 152px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 40px -24px rgba(40, 32, 20, .5);
  display: none;
  z-index: 40;
}
.account.open .acc-menu { display: block; }
.acc-menu a, .acc-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.acc-menu a:hover, .acc-menu button:hover { background: #f7f3ec; }
.acc-menu .danger { color: var(--accent); }
.acc-menu hr { border: none; border-top: 1px solid var(--line-2); margin: 5px 6px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(25, 22, 17, .42);
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 382px;
  background: #fff;
  border-radius: 18px;
  padding: 28px 26px 24px;
  box-shadow: 0 34px 80px -34px rgba(28, 22, 14, .58);
  animation: pop .22s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
}
.modal-close {
  position: absolute;
  top: 11px; right: 11px;
  width: 28px; height: 28px;
  border: none;
  border-radius: 50%;
  background: none;
  color: #b3aa99;
  font-size: 12px;
  cursor: pointer;
}
.modal-close:hover { background: #f4f1ea; color: var(--ink); }
.auth-title {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .08em;
  font-weight: 600;
  margin: 0 0 7px;
}
.auth-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.85;
  margin: 0 0 20px;
}
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.auth-input:focus { border-color: #e0c6ba; box-shadow: 0 0 0 3px rgba(168, 68, 44, .07); }
.auth-input::placeholder { color: #b9b0a0; }
.auth-code {
  font-size: 19px;
  letter-spacing: .34em;
  text-align: center;
  text-indent: .34em;
  font-variant-numeric: tabular-nums;
}
.auth-code::placeholder { letter-spacing: normal; text-indent: 0; font-size: 13.5px; }
.auth-error { margin: 2px 0 0; font-size: 12px; line-height: 1.7; color: var(--accent); }
.auth-dev {
  background: #f1f8f6;
  border: 1px solid #cfe0da;
  color: #2f6b5e;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.auth-dev b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  font-size: 13.5px;
}
.auth-links { display: flex; justify-content: space-between; margin-top: 15px; }
.auth-link {
  background: none;
  border: none;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #d8d0c0;
  text-decoration-thickness: 1px;
}
.auth-link:hover { color: var(--ink); }
.auth-link:disabled { color: #c3baa8; cursor: default; text-decoration: none; }
.auth-link.danger { color: var(--accent); display: block; margin: 14px auto 0; }
.auth-note {
  margin: 16px 0 0;
  font-size: 11.5px;
  line-height: 1.85;
  color: #a49c8d;
  text-align: center;
}
.auth-warn {
  background: #fdf7ea;
  border: 1px solid #eddfc0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.9;
  color: #8a6a24;
  margin-bottom: 14px;
}
.auth-warn strong { color: #7a5c1c; }
.auth-warn code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  background: rgba(0,0,0,.05);
  border-radius: 3px;
  padding: 1px 4px;
}
.modal-card .btn-block { width: 100%; justify-content: center; margin-top: 4px; }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 10px);
  background: rgba(25, 23, 19, .92);
  color: #fff;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 99px;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 90;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 个人主页 ---------- */
.acct-wrap {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 40px 72px;
}
@media (max-width: 880px) { .acct-wrap { padding: 22px 20px 56px; } }
.acct-loading { color: var(--muted); font-size: 13px; padding: 40px 0; text-align: center; }

.acct-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 14px;
}
.acct-guest { text-align: center; padding: 44px 26px; }
.acct-guest .auth-title { margin-bottom: 8px; }

.acct-head { display: flex; align-items: center; gap: 14px; }
.acct-ava {
  width: 50px; height: 50px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 21px;
}
.acct-info { min-width: 0; flex: 1; }
.acct-name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .04em;
  margin: 0 0 3px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-meta { font-size: 12.5px; color: var(--muted); margin: 0; }

.acct-form { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.acct-btns { display: flex; gap: 8px; }

.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat {
  background: #f7f3ec;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.stat b small { font-size: 11px; color: var(--muted); margin-left: 2px; font-family: var(--sans); }
.stat span { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

.acct-h {
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 14px;
}
.acct-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line-2);
}
.acct-line:first-of-type { border-top: none; padding-top: 0; }
.acct-line-head { padding-top: 0; border-top: none; }
.acct-line strong { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.acct-sub { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.acct-more { font-size: 12px; color: var(--accent); }
.acct-empty { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.9; }

.acct-list { list-style: none; margin: 0; padding: 0; }
.acct-list li {
  display: grid;
  grid-template-columns: 76px 58px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid var(--line-2);
  font-size: 12.5px;
}
.acct-list li:first-child { border-top: none; }
.acct-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.acct-score { color: var(--ink); font-variant-numeric: tabular-nums; }
.acct-summary { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.acct-danger { border-color: #efe0da; }
.btn-danger { color: var(--accent); border-color: #e8c8bd; }
.btn-danger:hover { background: #fdf2ee; border-color: #dfb3a4; }

/* ---------- 历史页横幅 ---------- */
.hist-banner {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  background: #f7f3ec;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.hist-banner strong { color: var(--ink-2); font-weight: 500; }
.hist-banner a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 分步指示 ---------- */
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #b3aa99; white-space: nowrap; }
.step i {
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1px solid #ddd6c8;
  display: grid; place-items: center;
  font-style: normal;
  font-size: 10px;
}
.step.active { color: var(--ink); }
.step.active i { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.done { color: var(--good); }
.step.done i { background: var(--good); border-color: var(--good); color: #fff; }
.step-line { flex: 1; height: 1px; background: var(--line-2); min-width: 8px; }

/* ---------- 表单字段 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.pw-wrap { position: relative; }
.pw-wrap .auth-input { padding-right: 42px; }
.pw-eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: none;
  border-radius: 8px;
  background: none;
  color: #b3aa99;
  cursor: pointer;
  display: grid; place-items: center;
  transition: color .18s, background .18s;
}
.pw-eye:hover { color: var(--ink-2); background: #f4f1ea; }

/* ---------- 滑块验证 ---------- */
.cap { margin: 4px 0 12px; }
.cap-track {
  position: relative;
  height: 44px;
  border-radius: 10px;
  background: #f4f1ea;
  border: 1px solid var(--line);
  overflow: hidden;
}
.cap-gap {
  position: absolute;
  top: 0;
  width: 44px;
  height: 100%;
  border-left: 1px dashed #cbbfa9;
  border-right: 1px dashed #cbbfa9;
  background: rgba(168, 68, 44, .06);
}
.cap-handle {
  position: absolute;
  top: 0; left: 0;
  width: 44px; height: 100%;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(30, 24, 15, .08);
  cursor: grab;
  touch-action: none;
  display: grid;
  place-items: center;
  color: #b3aa99;
  font-size: 14px;
}
.cap-handle::before { content: "››"; letter-spacing: -3px; }
.cap-handle.drag { cursor: grabbing; }
.cap-handle.snap { transition: transform .3s ease; }
.cap-track.ok { border-color: #9ec9bd; background: #f1f8f6; }
.cap-track.ok .cap-handle { border-color: #9ec9bd; color: var(--good); }
.cap-hint { font-size: 11.5px; color: #a49c8d; text-align: center; margin-top: 9px; }
.cap-hint.ok { color: var(--good); }
.cap-hint.bad { color: var(--accent); }

/* ---------- 验证码一行 ---------- */
.code-row { display: flex; gap: 8px; margin-bottom: 12px; }
.code-row .auth-input { flex: 1; min-width: 0; }
.code-resend {
  flex: none;
  padding: 0 13px;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.code-resend:hover:not(:disabled) { background: #f7f3ec; }
.code-resend:disabled { color: #b3aa99; cursor: default; }

/* ---------- 正式版协议 ---------- */
.doc h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 26px 0 8px;
  letter-spacing: .03em;
}
.doc h2 { scroll-margin-top: 24px; }

.doc-summary {
  background: #f7f3ec;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 16px 20px 14px;
  margin: 0 0 28px;
}
.doc-summary > strong {
  display: block;
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}
.doc-summary ul { margin: 0; padding-left: 17px; }
.doc-summary li { font-size: 12.5px; line-height: 1.95; color: var(--ink-2); margin-bottom: 3px; }

.doc-toc {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 20px 16px;
  margin-bottom: 34px;
  background: #fdfbf7;
}
.doc-toc > span { font-size: 11.5px; letter-spacing: .14em; color: var(--muted); }
.doc-toc ol { margin: 9px 0 0; padding-left: 17px; columns: 2; column-gap: 30px; }
.doc-toc li { font-size: 12.5px; line-height: 2.05; break-inside: avoid; }
.doc-toc a { color: var(--ink-2); }
.doc-toc a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 620px) { .doc-toc ol { columns: 1; } }

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 12.5px;
}
.doc-table th,
.doc-table td {
  border: 1px solid var(--line-2);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.75;
}
.doc-table th {
  background: #f7f3ec;
  font-weight: 500;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.doc-table td { color: var(--ink-2); }

.doc-note {
  margin-top: 34px;
  padding: 16px 18px;
  background: #fdfbf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.9;
}
.doc-note strong {
  display: block;
  color: var(--ink-2);
  margin-bottom: 4px;
  font-size: 11.5px;
  letter-spacing: .12em;
  font-weight: 500;
}

/* ---------- 联系我们 ---------- */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-start;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdfbf7;
  margin: 28px 0 10px;
}
.contact-label { font-size: 11.5px; letter-spacing: .14em; color: var(--muted); }
.contact-mail {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: .02em;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color .18s;
}
.contact-mail:hover { color: var(--accent); }
.contact-hint { font-size: 12px; color: #a49c8d; }
.doc-foot-link { margin-top: 36px; font-size: 12.5px; color: var(--muted); }
.doc-foot-link a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 写字姿势指南 ---------- */
.guide-wrap {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 38px 40px 72px;
}
@media (max-width: 880px) { .guide-wrap { padding: 22px 20px 56px; } }

.guide-head { margin-bottom: 26px; }
.guide-tag {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 3px 11px;
  margin-bottom: 11px;
}
.guide-title {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: .06em;
  font-weight: 600;
  margin: 0 0 9px;
}
.guide-sub { font-size: 13px; color: var(--muted); line-height: 1.95; margin: 0 0 12px; max-width: 560px; }

.hand-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .hand-row { grid-template-columns: 1fr; } }
.hand-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 26px 24px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.hand-card:hover {
  transform: translateY(-2px);
  border-color: #dcd4c6;
  box-shadow: 0 12px 32px -18px rgba(40, 32, 20, .38);
}
.hand-char {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.1;
  color: var(--accent);
}
.hand-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.hand-note { font-size: 12px; color: var(--muted); line-height: 1.6; }

.guide-list { list-style: none; counter-reset: g; margin: 0; padding: 0; }
.guide-list li {
  counter-increment: g;
  position: relative;
  padding: 19px 0 19px 46px;
  border-top: 1px solid var(--line-2);
}
.guide-list li:first-child { border-top: none; padding-top: 4px; }
.guide-list li::before {
  content: counter(g);
  position: absolute;
  left: 0;
  top: 20px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  display: grid;
  place-items: center;
}
.guide-list li:first-child::before { top: 5px; }
.guide-list h3 { font-size: 14.5px; font-weight: 600; margin: 0 0 7px; color: var(--ink); letter-spacing: .02em; }
.guide-list p { font-size: 13.5px; line-height: 1.95; color: var(--ink-2); margin: 0; }

.guide-cta {
  margin-top: 36px;
  padding: 24px;
  background: #f7f3ec;
  border-radius: 14px;
  text-align: center;
}
.guide-cta p { font-size: 12.5px; color: var(--muted); line-height: 1.9; margin: 0 0 16px; }

/* ---------- 照片 / 视频切换 ---------- */
.mode-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: #f4f1ea;
  border-radius: 10px;
  margin-bottom: 14px;
}
.mode-tab {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.mode-tab:hover { color: var(--ink-2); }
.mode-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(30, 24, 15, .1);
}

/* ---------- 识别到的手 ---------- */
.score-badges { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; flex-wrap: wrap; }
.score-badges .level { margin-bottom: 0; }
.hand-chip {
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-2);
  background: #f4f1ea;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 2px 9px;
}

/* 录制中的快门 */
.shutter.recording { border-color: #e05a3c; }
.shutter.recording span { background: #e05a3c; border-radius: 6px; }

/* ---------- 抽帧进度 ---------- */
.extract-bar {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  background: #f7f3ec;
  border-radius: 8px;
}

/* ---------- 开发者模式 ---------- */
.dev-chip {
  font-size: 11px;
  letter-spacing: .06em;
  color: #2f6b5e;
  background: #edf6f3;
  border: 1px solid #cfe0da;
  border-radius: 99px;
  padding: 3px 9px;
  margin-right: 10px;
}
.site-foot button.dev-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 11.5px;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-foot button.dev-link:hover { color: var(--ink-2); }
