:root {
  color-scheme: light;
  font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  color: #252236;
  background: #f6f4fa;
  --primary: #51408a;
  --tint: #eae3fc;
  --muted: #625b73;
  --border: #e5dfed;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { border-bottom: 1px solid var(--border); background: #fcfaff; }
.topbar, main { width: min(100% - 48px, 1256px); margin-inline: auto; }
.topbar { display: flex; align-items: center; min-height: 68px; gap: 12px; }
.brand { font-size: 17px; font-weight: 720; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--tint); color: var(--primary); }
.icon { width: 20px; height: 20px; flex: none; }
main { padding-block: clamp(30px, 5vw, 68px); }
.intro { margin-bottom: 28px; }
h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.055em; line-height: 1.12; margin: 0 0 12px; }
p { line-height: 1.6; margin: 0; }
.intro p, .hint, .phase-detail, #motion, .privacy p { color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(285px, 1fr); gap: 18px; align-items: start; }
.viewer, .sidebar { border: 1px solid var(--border); border-radius: 28px; background: #fffdff; overflow: hidden; box-shadow: 0 5px 20px #34235508; }
.viewer-head { padding: 20px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.file-name { color: var(--muted); margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.stage { min-width: 0; position: relative; display: grid; place-items: center; padding: clamp(14px, 3.1vw, 40px); background: #ece8f2; border-block: 1px solid var(--border); }
.stage[data-drop] { outline: 3px solid var(--primary); outline-offset: -4px; }
.image-frame { position: relative; width: min(100%, 640px); overflow: hidden; border-radius: 18px; background: #e2dbea; }
canvas { display: block; width: 100%; aspect-ratio: 4 / 3; cursor: grab; touch-action: pan-y pinch-zoom; }
canvas:active { cursor: grabbing; }
canvas:focus-visible { outline-offset: -4px; }
.scan { display: none; position: absolute; inset-inline: 0; top: 0; height: 34%; pointer-events: none; background: linear-gradient(transparent, #d9c8ff36 97%, #e8deff99); animation: scan 2.75s ease-in-out infinite; }
.stage[data-phase="depth"] .scan, .stage[data-phase="mesh"] .scan { display: block; }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(300%); } }
.viewer-foot { padding: 18px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.hint, #motion { font-size: 13px; }
#motion { flex-basis: 100%; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
button { appearance: none; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border: 1px solid transparent; border-radius: 999px; color: var(--primary); background: var(--tint); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
button:hover { box-shadow: inset 0 0 0 100px #3320580e; }
button.primary { color: white; background: var(--primary); }
button.primary:hover { background: #5b4998; }
button.secondary { background: transparent; border-color: #d7cfe3; }
button[aria-pressed="true"] { background: var(--tint); border-color: var(--primary); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.sidebar { padding: 24px; }
.status-head { display: flex; align-items: center; gap: 10px; }
.phase-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--primary); background: var(--tint); border-radius: 12px; }
#status { margin-top: 19px; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.phase-detail { margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.progress { position: relative; height: 6px; border-radius: 12px; overflow: hidden; background: #eae4f3; margin: 18px 0 0; }
.progress span { display: block; height: 100%; width: var(--value, 0%); background: #735bb1; border-radius: inherit; transition: width .18s ease; }
.progress:not([aria-valuenow]) span { width: 36%; animation: slide 1.35s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(280%); } }
.steps { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 15px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.steps li::before { content: ''; width: 9px; height: 9px; border: 2px solid #a69bb9; border-radius: 50%; }
.steps li[aria-current="step"] { color: var(--primary); font-weight: 700; }
.steps li[aria-current="step"]::before { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px var(--tint); }
.steps li[data-done]::before { background: var(--primary); border-color: var(--primary); }
.privacy { padding: 15px; background: #f0ebf9; border-radius: 17px; }
.privacy strong { display: flex; align-items: center; gap: 7px; color: #42316e; font-size: 14px; }
.privacy p { font-size: 13px; margin-top: 6px; }
@media (max-width: 800px) { .workspace { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .topbar, main { width: calc(100% - 28px); } .viewer-head, .viewer-foot, .sidebar { padding: 16px; } .viewer, .sidebar { border-radius: 22px; } .intro { margin-bottom: 20px; } }
@media (prefers-reduced-motion: reduce) { .scan { animation: none; visibility: hidden; } .progress span { transition: none; } .progress:not([aria-valuenow]) span { animation: none; } }
