@import url("/assets/fonts.css");
:root {
  --paper: #f5f5ef;
  --ink: #243f37;
  --muted: #7a8279;
  --green: #355e4c;
  --mint: #56ed9b;
  --line: #dfe2d8;
  --white: #fff;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
label:has(input:focus-visible) {
  outline: 3px solid #60bb94;
  outline-offset: 4px;
}
input {
  accent-color: var(--green);
}
[hidden] {
  display: none !important;
}
.header {
  height: 94px;
  max-width: 1360px;
  margin: auto;
  padding: 0 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 20px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
}
.brand-icon {
  font-size: 32px;
  color: var(--green);
  font-weight: 400;
}
.beta {
  font-size: 10px;
  letter-spacing: 0;
  font-weight: 400;
  border: 1px solid #cdd7c6;
  padding: 3px 7px;
  border-radius: 4px;
  color: #71816e;
  margin-left: 5px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  padding: 10px;
}
.text-button span {
  padding-left: 12px;
}
main {
  max-width: 1256px;
  margin: 0 auto;
  padding: 0 0 35px;
}
.intro {
  padding: 62px 0 40px;
  text-align: center;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #6f806e;
}
.eyebrow span {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #93a987;
}
.intro h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.4;
  letter-spacing: 3px;
  margin: 20px 0 18px;
}
.intro p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0;
}
.workspace {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: start;
  padding: 0 55px;
}
.visual-panel {
  background: #e8ebe2;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d9ded1;
  position: sticky;
  top: 24px;
}
.panel-top,
.panel-bottom {
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-top {
  font-size: 12px;
  font-weight: 500;
}
.pill {
  font-size: 10px;
  font-weight: 400;
  background: #f8f9f3bd;
  border: 1px solid #d6dccf;
  border-radius: 100px;
  padding: 6px 10px;
  white-space: nowrap;
  color: #6c7e67;
}
.view-wrap {
  padding: 0 20px;
}
.stage {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #1b2924;
  width: 100%;
}
.stage > img,
.stage > video,
.stage > canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: cover;
}
.stage > canvas {
  pointer-events: none;
  z-index: 3;
}
.empty-art {
  height: 100%;
  background: #e9e7d9;
  position: relative;
}
.empty-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.art-label {
  position: absolute;
  bottom: 44px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 2px;
}
.empty-art small {
  position: absolute;
  bottom: 21px;
  text-align: center;
  width: 100%;
  font-size: 9px;
  color: #7c8877;
}
.panel-bottom {
  font-size: 10px;
  color: #7c8776;
  line-height: 1.7;
}
.tiny-lock {
  font-size: 9px;
  white-space: nowrap;
}
.frame-legend {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: #182c24b3;
  padding: 8px 11px;
  border-radius: 100px;
  display: flex;
  gap: 14px;
  white-space: nowrap;
  color: white;
  font-size: 10px;
}
.frame-legend i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border: 1.5px solid;
  border-radius: 2px;
  margin-right: 4px;
}
.mint {
  color: var(--mint);
}
.white {
  color: white;
}
.live-label {
  position: absolute;
  top: 13px;
  left: 14px;
  color: white;
  background: #182c247a;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-label span {
  width: 5px;
  height: 5px;
  background: var(--mint);
  border-radius: 50%;
}
.control-panel {
  padding: 8px 0 0;
}
.steps {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: #8a9185;
  margin-bottom: 35px;
  white-space: nowrap;
}
.steps span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.steps b {
  font-weight: 400;
  width: 21px;
  height: 21px;
  border: 1px solid #cfd6c7;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
}
.steps .active {
  color: var(--green);
}
.steps .active b {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.steps i {
  height: 1px;
  background: var(--line);
  flex: 1;
}
.section-kicker {
  font-size: 10px;
  letter-spacing: 1px;
  color: #8a987e;
}
h2 {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 1px;
  font-weight: 500;
  margin: 13px 0 15px;
}
.muted {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.upload-zone {
  border: 1px dashed #abbda3;
  border-radius: 10px;
  background: #ffffff70;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 25px 10px;
  cursor: pointer;
  margin-top: 24px;
  transition: 0.2s;
}
.upload-zone:hover {
  background: #eaf0e5;
  border-color: var(--green);
}
.upload-icon {
  border-radius: 50%;
  background: #e4ebdf;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 200;
  margin-bottom: 13px;
}
.upload-zone strong {
  font-size: 13px;
  font-weight: 500;
}
.upload-zone > span:not(.upload-icon) {
  font-size: 10px;
  color: #93998c;
  margin-top: 10px;
}
.upload-zone .upload-link {
  color: var(--green) !important;
  font-size: 11px !important;
  margin-top: 20px !important;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.local-note {
  display: flex;
  gap: 11px;
  margin: 16px 0 25px;
}
.local-note > span {
  font-size: 22px;
  color: #819675;
}
.local-note p {
  font-size: 10px;
  color: #929889;
  line-height: 1.8;
  margin: 0;
}
.local-note strong {
  font-weight: 400;
  color: #6c7e63;
}
.poses {
  border-top: 1px solid var(--line);
  padding-top: 21px;
  margin-top: 22px;
}
.pose-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pose-heading h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 0;
}
.pose-heading > span {
  font-size: 9px;
  color: #939b8b;
}
.pose-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.pose-card {
  border: 1px solid transparent;
  border-radius: 8px;
  background: #e9ecdf;
  padding: 0;
  overflow: hidden;
  position: relative;
  color: #77836d;
}
.pose-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
  color: var(--green);
}
.pose-card img {
  width: 100%;
  height: 92px;
  display: block;
  object-fit: contain;
}
.pose-card span {
  display: block;
  font-size: 10px;
  background: #f8f8f0;
  padding: 9px;
}
.pose-hint {
  font-size: 10px;
  color: #89917e;
  line-height: 1.8;
  margin: 12px 0 0;
}
.how-strip {
  margin: 45px 55px 0;
  border-top: 1px solid var(--line);
  padding: 26px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.how-strip > div {
  display: flex;
  align-items: center;
  gap: 13px;
}
.how-strip > div > span {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 27px;
  color: #a5b297;
}
.how-strip p {
  font-size: 10px;
  line-height: 1.9;
  color: #929887;
  margin: 0;
}
.how-strip strong {
  font-weight: 400;
  font-size: 11px;
  color: #56694c;
}
footer {
  max-width: 1256px;
  margin: 0 auto;
  padding: 25px 55px 30px;
  display: flex;
  gap: 17px;
  align-items: center;
  font-size: 10px;
  color: #a0a695;
}
footer span:last-child {
  margin-left: auto;
  font-size: 9px;
}
.brand-footer {
  font-size: 12px;
  color: #687d5d;
  font-weight: 500;
}
.primary {
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
  min-height: 46px;
  border-radius: 7px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 500;
  width: 100%;
  transition: background 0.2s;
}
.primary:hover {
  background: #274c3b;
}
.primary > span:last-child:not(:first-child) {
  margin-left: auto;
}
.secondary {
  background: transparent;
  border: 1px solid #cad3c2;
  border-radius: 7px;
  color: var(--green);
  padding: 11px 14px;
  font-size: 11px;
}
.full {
  width: 100%;
}
.checklist {
  margin: 23px 0;
  display: grid;
  gap: 14px;
}
.checklist label {
  font-size: 12px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.checklist input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.tip {
  padding: 14px 16px;
  background: #e8edde;
  border-radius: 7px;
  margin: 16px 0 22px;
  font-size: 11px;
  line-height: 1.8;
}
.tip b {
  font-weight: 500;
  color: #4f6743;
}
.tip p {
  margin: 5px 0 0;
  color: #7b8971;
  font-size: 11px;
}
.notice {
  padding: 12px 15px;
  background: #f4e7d9;
  color: #8b5b36;
  font-size: 12px;
  line-height: 1.8;
  border-radius: 7px;
  margin: 15px 0;
}
.status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #d3ddcb;
  background: #eaf0e3;
  border-radius: 9px;
  padding: 15px;
}
.status-card > span {
  font-size: 25px;
  color: #8ca27b;
}
.status-card strong {
  font-size: 12px;
  font-weight: 500;
}
.status-card p {
  font-size: 11px;
  line-height: 1.7;
  color: #788b6b;
  margin: 6px 0 0;
}
.status-card.ready {
  background: #dcf2e6;
  border-color: #93bf9b;
}
.status-card.ready > span {
  color: #378153;
}
.match-rows {
  font-size: 10px;
  margin-top: 15px;
}
.match-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
}
.match-rows span {
  color: #7d8974;
}
.match-rows small {
  font-size: 8px;
  border: 1px solid #ced8c5;
  border-radius: 3px;
  padding: 1px 3px;
}
.match-rows b {
  font-weight: 400;
}
.hold-track {
  height: 3px;
  background: #dce3d4;
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}
.hold-track > div {
  height: 100%;
  background: #529d73;
  width: 0%;
  transition: width 0.15s;
}
.micro {
  font-size: 9px;
  line-height: 1.8;
  color: #919989;
}
.center {
  text-align: center;
}
.tools {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 15px;
  display: grid;
  gap: 12px;
}
.tools label {
  font-size: 11px;
  color: #6c7d61;
}
.tools output {
  float: right;
}
.tools input[type="range"] {
  display: block;
  width: 100%;
  margin: 12px 0 0;
  height: 12px;
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.shutter {
  margin-top: 16px;
}
.shutter-icon {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  border: 2px solid white;
  outline: 1px solid #ffffff70;
  outline-offset: 2px;
}
.button-row {
  display: flex;
  gap: 9px;
}
.button-row > * {
  flex: 1;
}
.import-result {
  font-size: 10px;
  color: #7e8c70;
  display: block;
  text-align: center;
  margin-top: 17px;
  cursor: pointer;
}
.result-panel {
  margin: 35px 55px 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff9;
}
.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.comparison figure {
  margin: 0;
}
.comparison img {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #e8ebe2;
  border-radius: 7px;
}
.comparison figcaption {
  text-align: center;
  font-size: 11px;
  color: #839078;
  padding: 12px;
}
.result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px auto;
  max-width: 550px;
}
.result-actions .primary {
  width: auto;
  flex: 1;
}
.result-panel > a {
  display: block;
  text-align: center;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  color: var(--ink);
  padding: 35px;
  max-width: 530px;
  width: calc(100% - 32px);
}
dialog::backdrop {
  background: #152c2270;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 23px;
}
dialog ol {
  padding-left: 20px;
  font-size: 12px;
  line-height: 2.2;
  color: #78866e;
}
.close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: 0;
  background: none;
  font-size: 27px;
  color: #87927c;
}
@media (min-width: 1400px) {
  .intro {
    padding-top: 65px;
  }
  .workspace {
    gap: 45px;
  }
}
@media (max-width: 1000px) {
  .header {
    padding: 0 30px;
  }
  .workspace {
    padding: 0 30px;
    gap: 25px;
  }
  .how-strip {
    margin-left: 30px;
    margin-right: 30px;
  }
  .intro h1 {
    font-size: 40px;
  }
  .panel-top,
  .panel-bottom {
    padding: 14px;
  }
  .view-wrap {
    padding: 0 12px;
  }
  .tiny-lock {
    display: none;
  }
  .steps {
    gap: 7px;
  }
  .steps span {
    gap: 4px;
  }
}
@media (max-width: 680px) {
  .header {
    height: 70px;
    padding: 0 20px;
  }
  .brand {
    font-size: 17px;
    gap: 7px;
  }
  .brand-icon {
    font-size: 28px;
  }
  .beta {
    font-size: 8px;
    padding: 2px 5px;
  }
  .text-button {
    font-size: 11px;
  }
  .intro {
    padding: 34px 20px 27px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .intro h1 {
    font-size: 33px;
    letter-spacing: 1px;
    margin: 16px 0 13px;
  }
  .intro p {
    font-size: 11px;
    line-height: 1.9;
  }
  .desktop {
    display: none;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    gap: 24px;
  }
  .visual-panel {
    position: relative;
    top: 0;
    width: 100%;
    border-radius: 12px;
  }
  .stage {
    margin-inline: auto;
  }
  .panel-top {
    padding: 13px 15px;
  }
  .panel-bottom {
    font-size: 9px;
    padding: 12px 15px;
  }
  .view-wrap {
    padding: 0 12px;
  }
  .control-panel {
    width: 100%;
    padding: 0;
  }
  .steps {
    margin-bottom: 23px;
    gap: 12px;
    font-size: 11px;
  }
  .steps span {
    gap: 6px;
  }
  h2 {
    font-size: 25px;
  }
  .section-kicker {
    font-size: 10px;
  }
  .muted {
    font-size: 12px;
  }
  .upload-zone {
    padding: 22px;
    margin-top: 20px;
  }
  .local-note {
    margin-bottom: 22px;
  }
  .poses {
    margin-top: 23px;
  }
  .pose-card img {
    height: 96px;
  }
  .pose-card span {
    font-size: 11px;
  }
  .how-strip {
    margin: 30px 20px 0;
    padding-top: 21px;
    gap: 12px;
  }
  .how-strip > div {
    display: block;
  }
  .how-strip > div > span {
    font-size: 23px;
  }
  .how-strip p {
    font-size: 9px;
    margin-top: 6px;
  }
  .how-strip strong {
    font-size: 10px;
  }
  footer {
    padding: 22px 20px;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 9px;
  }
  footer span:last-child {
    width: 100%;
    margin-left: 0;
    font-size: 8px;
  }
  .result-panel {
    margin: 25px 20px 0;
    padding: 18px;
  }
  .result-heading h2 {
    font-size: 23px;
  }
  .comparison {
    gap: 10px;
  }
  .comparison figcaption {
    font-size: 10px;
  }
  .result-actions {
    flex-wrap: wrap;
  }
  .result-actions .primary {
    min-width: 100%;
  }
  body.shooting .intro {
    display: none;
  }
  body.shooting .workspace {
    padding-top: 18px;
  }
  body.shooting .visual-panel {
    position: relative;
  }
  body.shooting .stage {
    width: min(100%, calc(44svh * var(--frame-ratio, 0.8)));
    margin-inline: auto;
  }
  body.shooting .steps {
    display: none;
  }
  body.shooting .section-kicker {
    display: none;
  }
  body.shooting h2 {
    font-size: 21px;
    margin-top: 0;
  }
  body.shooting .workspace {
    gap: 18px;
  }
  body.shooting .control-panel {
    padding-bottom: 10px;
  }
  .primary {
    min-height: 48px;
  }
  dialog {
    padding: 27px 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.mode-choice {
  display: flex;
  gap: 6px;
  background: #e7ecdf;
  padding: 5px;
  border-radius: 10px;
  max-width: 420px;
  margin: 24px auto 0;
}
.mode-choice button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  min-height: 44px;
  flex: 1;
  color: #6b7c60;
  font-size: 12px;
  font-weight: 500;
}
.mode-choice button.selected {
  background: var(--green);
  color: white;
  box-shadow: 0 2px 6px #253f3720;
}
.mode-description {
  text-align: center;
  color: #87957b;
  font-size: 11px !important;
  margin: 12px 0 0 !important;
}
.reference-capture {
  display: block;
  text-align: center;
  cursor: pointer;
  margin-top: 12px;
  min-height: 44px;
}
.camera-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.camera-control > span {
  font-size: 10px;
  color: #7d8b72;
}
.camera-control button {
  min-height: 40px;
}
.header {
  gap: 8px;
}
.header .brand {
  margin-right: auto;
}
.header .text-button {
  white-space: nowrap;
}
#video {
  transform-origin: center;
}
body.shooting .mode-choice {
  margin-top: 0;
}
body.shooting #intro {
  display: block;
  padding: 12px 20px 0;
}
body.shooting #intro > .eyebrow,
body.shooting #intro > h1,
body.shooting #intro > p:not(.mode-description) {
  display: none;
}
body.shooting .mode-description {
  display: none;
}
body.shooting #intro .mode-choice {
  margin: 0 auto;
}
@media (max-width: 680px) {
  .intro .mode-choice {
    margin-top: 21px;
  }
  .header {
    padding-left: 16px;
    padding-right: 12px;
  }
  .header .text-button {
    padding: 9px 6px;
    font-size: 10px;
  }
  .header .brand {
    gap: 5px;
  }
  .header .beta {
    display: none;
  }
  .mode-choice {
    width: 100%;
  }
  .mode-description {
    font-size: 10px !important;
  }
  .control-panel .steps {
    margin-top: 4px;
  }
  .camera-control {
    flex-wrap: wrap;
  }
  .camera-control button {
    flex: 1;
  }
}
.reference-controls {
  padding: 0 20px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.reference-controls > span {
  font-size: 10px;
  color: #73846b;
  flex: 1;
  min-width: 150px;
  line-height: 1.8;
}
.reference-controls > button {
  min-height: 44px;
  font-size: 11px;
}
.reference-controls > button[aria-pressed="true"] {
  background: #dce9d4;
  border-color: #69875d;
}

/* Keep the single capture workflow visible while the viewfinder is active. */
body.shooting .how-strip, body.shooting footer { display: none; }
.tools small { display: block; line-height: 1.6; margin-top: 6px; color: var(--muted); }
@media (max-width: 640px) {
  .header { padding-inline: 18px; }
  .header .brand { font-size: 17px; }
  .header .beta { display: none; }
}

.adjustments { margin-top: 14px; border-block: 1px solid var(--line); }
.adjustments summary { cursor: pointer; padding: 14px 0; font-size: 12px; color: var(--ink); }
.adjustments summary span { float: right; }
.adjustments .tools { margin-bottom: 14px; }
@media (max-width: 680px) {
  body.shooting .header, body.shooting #intro,
  body.shooting .panel-bottom, body.shooting .reference-controls,
  body.shooting #shootPanel > h2 { display: none; }
  body.shooting .workspace { padding-top: 10px; gap: 10px; }
  body.shooting .panel-top { padding: 10px 12px; }
  body.shooting .view-wrap { padding: 0 8px 8px; }
  body.shooting .stage { width: min(100%, calc(46svh * var(--frame-ratio, .8))); }
  body.shooting .status-card { margin-top: 0; padding: 12px; min-height: 86px; }
  body.shooting .hold-track { margin-block: 8px; }
  body.shooting .shutter { margin-top: 8px; }
  body.shooting .adjustments { margin-top: 10px; }
}
