:root {
  color-scheme: light;
  --ink: #171714;
  --ink-soft: #24231e;
  --paper: #f5f3eb;
  --paper-deep: #eae7dc;
  --white: #fffefa;
  --yellow: #ffc800;
  --yellow-bright: #ffc800;
  --muted: #77756d;
  --line: #dedbd0;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { min-width: 320px; margin: 0; background: var(--paper); }
a, button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
img { max-width: 100%; }
.container { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; transform: translateY(-150%); padding: 12px 16px; color: var(--ink); background: var(--yellow); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.site-header { position: relative; z-index: 5; background: var(--paper); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand-copy { display: grid; gap: 4px; }
.brand-copy strong { font-size: 1.12rem; font-weight: 950; letter-spacing: .025em; line-height: 1; }
.brand-copy small { color: var(--muted); font-size: .62rem; font-weight: 650; letter-spacing: .01em; }
.main-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); }
.footer-register:hover { color: var(--yellow); }
.button { min-height: 52px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; border: 1px solid transparent; border-radius: 4px; font-size: .88rem; font-weight: 800; line-height: 1.1; text-decoration: none; cursor: pointer; transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.button-small { min-height: 42px; padding-inline: 17px; font-size: .78rem; }
.button-yellow { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.button-yellow:hover { background: var(--yellow-bright); border-color: var(--yellow-bright); }
.button-dark { color: var(--white); background: var(--ink); }
.button-dark:hover:not(:disabled) { background: #333229; }
.button:disabled { cursor: not-allowed; opacity: .42; }

.studio-section { padding: 54px 0 76px; background: var(--paper); }
.section-heading { margin-bottom: 34px; display: flex; justify-content: space-between; align-items: end; gap: 36px; }
.section-index { margin: 0 0 15px; color: var(--ink-soft); font: 750 .68rem/1.2 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.section-index span { color: #aaa58e; }
.section-heading h2 { margin: 0; color: var(--ink); font-size: clamp(2.3rem, 4.2vw, 4rem); font-weight: 900; letter-spacing: -.045em; line-height: 1.03; text-wrap: balance; }
.weex-word { display: inline-block; white-space: nowrap; letter-spacing: .025em; }
.section-heading > p { width: min(365px, 34%); margin: 0 0 4px; color: #77756d; font-size: .9rem; line-height: 1.75; }
.mobile-break { display: none; }
.studio-card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); overflow: hidden; border: 1px solid #e3e0d5; border-radius: 12px; background: var(--white); box-shadow: 0 22px 70px #312d190e; }
.preview-panel { min-width: 0; padding: 28px clamp(20px, 4vw, 52px) 23px; display: flex; flex-direction: column; background: var(--yellow); }
.panel-topline { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #2a281c; font-size: .76rem; font-weight: 800; }
.preview-status { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font: 700 .55rem/1 var(--mono); letter-spacing: .07em; }
.preview-status i { width: 6px; height: 6px; background: #496c2f; border-radius: 50%; }
.avatar-stage { width: min(100%, 480px); margin: auto; position: relative; aspect-ratio: 1; overflow: hidden; isolation: isolate; touch-action: none; user-select: none; }
.portrait-window { position: absolute; z-index: 1; inset: 11.1%; overflow: hidden; border-radius: 50%; background: var(--yellow); }
.portrait-photo { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transform: translate(var(--photo-x, 0px), var(--photo-y, 0px)) scale(var(--photo-scale, 1)); transform-origin: center; }
.empty-preview { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-soft); text-align: center; }
.empty-preview[hidden] { display: none; }
.empty-preview strong { font-size: clamp(.72rem, 1.8vw, .9rem); }
.empty-preview small { font-size: .65rem; opacity: .8; }
.empty-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #6b5d143d; border-radius: 50%; font-size: 1.25rem; }
.frame-overlay { width: 100%; height: 100%; position: absolute; z-index: 3; inset: 0; object-fit: contain; pointer-events: none; }
.preview-corner { width: 13px; height: 13px; position: absolute; z-index: 4; border-color: #201e17a8; border-style: solid; }
.preview-corner-tl { top: 2px; left: 2px; border-width: 1px 0 0 1px; }
.preview-corner-tr { top: 2px; right: 2px; border-width: 1px 1px 0 0; }
.preview-corner-bl { bottom: 2px; left: 2px; border-width: 0 0 1px 1px; }
.preview-corner-br { right: 2px; bottom: 2px; border-width: 0 1px 1px 0; }
.drag-hint { margin: 12px 0 0; color: var(--ink-soft); text-align: center; font-size: .68rem; line-height: 1.5; }
.drag-hint span { font-size: 1rem; vertical-align: -.05em; }
.controls-panel { padding: clamp(25px, 4vw, 47px) clamp(22px, 4vw, 48px) 30px; display: flex; flex-direction: column; }
.control-heading { display: flex; align-items: flex-start; gap: 13px; }
.step-number { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); font: 800 .63rem/1 var(--mono); }
.control-heading h3 { margin: 0; color: var(--ink); font-size: .94rem; font-weight: 850; }
.control-heading p { margin: 6px 0 0; color: #8a877d; font-size: .68rem; line-height: 1.5; }
.upload-button { min-height: 75px; margin: 19px 0 0 44px; padding: 12px 14px; display: flex; align-items: center; gap: 13px; border: 1px dashed #c8c4b7; background: #fbfaf5; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.upload-button:hover, .upload-button.is-dragging { border-color: var(--yellow); background: var(--yellow); }
.upload-symbol { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: var(--ink); background: var(--yellow); font-size: 1.2rem; }
.upload-button > span:nth-child(2) { min-width: 0; display: grid; gap: 5px; }
.upload-button strong { font-size: .77rem; }
.upload-button small { color: #8a877d; font-size: .62rem; }
.upload-arrow { margin-left: auto; font-size: 1rem; }
.visually-hidden { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.field-help { margin: 9px 0 0 44px; color: #88857b; font-size: .61rem; }
.control-divider { height: 1px; margin: 23px 0; background: var(--line); }
.control-heading-tight { align-items: center; }
.zoom-label { margin: 17px 0 0 44px; display: flex; justify-content: space-between; color: #4d4b44; font-size: .68rem; font-weight: 700; }
.zoom-label output { color: var(--ink-soft); font: 700 .66rem/1 var(--mono); }
.zoom-range { width: calc(100% - 44px); margin: 14px 0 0 44px; accent-color: var(--yellow); cursor: pointer; }
.range-ends { margin: 5px 0 0 44px; display: flex; justify-content: space-between; color: #949188; font-size: .56rem; }
.download-button { width: calc(100% - 44px); margin: 18px 0 0 44px; justify-content: space-between; }
.editor-status { min-height: 22px; margin: 11px 0 0 44px; color: #88857b; font-size: .62rem; line-height: 1.5; }
.editor-status[data-state="error"] { color: #a43e28; }
.studio-footnote { padding-top: 15px; display: flex; justify-content: flex-end; gap: 22px; color: #858277; font: 650 .58rem/1.2 var(--mono); letter-spacing: .02em; }

.site-footer { padding: 37px 0 22px; background: #eae7dc; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-footer img { width: 34px; height: 34px; }
.footer-register { color: #4c493e; font-size: .7rem; font-weight: 750; text-decoration: none; transition: color .18s; }
.footer-risk { margin-top: 30px; padding: 18px 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; border-top: 1px solid #d1cec2; border-bottom: 1px solid #d1cec2; }
.footer-risk strong { color: var(--ink); font-size: .68rem; }
.footer-risk p { max-width: 850px; margin: 0; color: #706e65; font-size: .65rem; line-height: 1.8; }
.footer-bottom { padding-top: 19px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #8b887d; font: 650 .56rem/1.3 var(--mono); letter-spacing: .02em; }

@media (max-width: 980px) {
  .studio-card { grid-template-columns: minmax(0, 1fr) minmax(330px, .92fr); }
  .controls-panel { padding-inline: 27px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 18px; }
  .container { width: min(100% - 36px, 600px); }
  .header-inner { min-height: 70px; }
  .brand img { width: 34px; height: 34px; }
  .brand-copy small { font-size: .56rem; }
  .button-small { min-height: 39px; padding-inline: 14px; }
  .button { min-height: 48px; padding-inline: 17px; font-size: .8rem; }
  .studio-section { padding: 42px 0 58px; }
  .section-heading { margin-bottom: 25px; display: block; }
  .section-heading h2 { font-size: clamp(2.2rem, 9vw, 3.2rem); }
  .section-heading > p { width: auto; max-width: 430px; margin-top: 15px; font-size: .82rem; }
  .mobile-break { display: block; }
  .studio-card { grid-template-columns: 1fr; border-radius: 8px; }
  .preview-panel { padding: 19px 17px 17px; }
  .avatar-stage { width: min(100%, 430px); }
  .controls-panel { padding: 25px 20px 26px; }
  .upload-button, .field-help { margin-left: 44px; }
  .control-divider { margin-block: 20px; }
  .studio-footnote { justify-content: space-between; gap: 8px; font-size: .49rem; }
  .footer-risk { grid-template-columns: 1fr; gap: 8px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (max-width: 390px) {
  .container { width: calc(100% - 28px); }
  .studio-section { padding-top: 36px; }
  .controls-panel { padding-inline: 16px; }
  .upload-button { padding-inline: 10px; gap: 9px; }
  .upload-button small { font-size: .58rem; }
  .studio-footnote { font-size: .44rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
