@charset "utf-8";
:root {
  color-scheme: light;
  --page: #f6f4ef;
  --ink: #111316;
  --muted: #62666d;
  --line: rgba(17, 19, 22, .12);
  --panel: #ffffff;
  --panel-alt: #e8f4f1;
  --accent: #f05d3b;
  --accent-2: #00a6a6;
  --accent-3: #b9ef4f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #111316;
    --ink: #f4f1ea;
    --muted: #aaa59e;
    --line: rgba(244, 241, 234, .14);
    --panel: #1c2025;
    --panel-alt: #172827;
  }
}
* { box-sizing: border-box; }
body { margin: 0; }
button, select, input { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; border-radius: 6px; color: inherit; font-weight: 850; cursor: pointer; touch-action: manipulation; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: default; opacity: .45; }
main, .topbar { max-width: 1212px; margin: auto; padding-inline: 16px; }
.topbar { height: 68px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 850; }
.brand-mark { width: 44px; height: 44px; flex: 0 0 44px; background: currentColor; -webkit-mask: url('/assets/images/moyi-logo.svg') center / contain no-repeat; mask: url('/assets/images/moyi-logo.svg') center / contain no-repeat; }
.brand-label { font-size: 10px; color: var(--muted); font-weight: 750; letter-spacing: .12em; margin-left: 6px; }
.back-link { font-size: 13px; font-weight: 800; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.back-link span { margin-left: 12px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; border-top: 1px solid var(--line); padding: 30px 0 28px; }
.eyebrow { color: var(--accent-2); font-size: 11px; font-weight: 850; letter-spacing: .14em; margin: 0 0 14px; }
h1 { font-size: clamp(30px, 3.8vw, 50px); letter-spacing: -.04em; font-weight: 920; margin: 0; line-height: 1.1; }
h1 span { color: var(--accent); }
.intro-copy { font-size: 12px; color: var(--muted); line-height: 1.9; margin: 0 0 2px; }
.studio-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.viewer-column { min-width: 0; background: var(--page); }
.viewer-top { display: flex; justify-content: space-between; align-items: center; height: 65px; padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
.mode-tabs { display: flex; gap: 4px; padding: 4px; background: var(--page); border-radius: 8px; }
.mode-tabs button { padding: 9px 14px; background: transparent; font-size: 12px; color: var(--muted); }
.mode-tabs button.active { background: var(--ink); color: var(--page); }
.icon-button { background: transparent; font-size: 25px; width: 36px; height: 36px; color: var(--muted); }
.viewport { position: relative; height: min(60vw, 580px); min-height: 420px; background: var(--page); overflow: hidden; }
.viewport canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.viewport #fallback-image { width: 100%; height: 100%; object-fit: contain; }
.model-status { position: absolute; z-index: 2; top: 20px; left: 22px; display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); pointer-events: none; }
.model-status span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.viewer-help { position: absolute; bottom: 20px; left: 22px; font-size: 10px; color: var(--muted); pointer-events: none; }
.viewer-help i { font-style: normal; margin: 0 7px; opacity: .5; }
.viewer-index { position: absolute; right: 22px; bottom: 20px; color: var(--muted); letter-spacing: .1em; font-size: 9px; pointer-events: none; }
.viewer-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 15px 22px; background: var(--panel); border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.unit { color: var(--muted); font-size: 10px; }
.loading { position: absolute; inset: 0; z-index: 3; background: var(--page); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.loading-ring { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.controls { padding: 25px 22px; background: var(--panel); border-left: 1px solid var(--line); }
.tiny-label { font-size: 10px; font-weight: 850; letter-spacing: .14em; color: var(--accent-2); }
.control-heading h2 { font-size: 20px; font-weight: 920; margin: 10px 0 22px; }
.adapter-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.adapter-options button { display: flex; align-items: center; gap: 8px; background: var(--page); border: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.adapter-options b { font-size: 10px; font-weight: 850; width: 20px; height: 22px; display: grid; place-items: center; border-radius: 4px; background: var(--panel); color: var(--muted); }
.adapter-options span { font-size: 11px; white-space: nowrap; color: var(--muted); }
.adapter-options button.selected { border-color: var(--accent); background: var(--panel); }
.adapter-options button.selected b { background: var(--accent); color: white; }
.adapter-options button.selected span { color: var(--ink); }
.adapter-note { min-height: 34px; font-size: 11px; line-height: 1.7; color: var(--muted); margin: 13px 0 18px; }
.field-label { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; margin-bottom: 9px; }
.field-label span { font-size: 9px; color: var(--muted); }
select { width: 100%; background: var(--page); border: 1px solid var(--line); color: var(--ink); border-radius: 6px; padding: 10px; font-size: 12px; cursor: pointer; }
.position-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.position-controls label { font-size: 10px; color: var(--muted); }
.position-controls select { margin-top: 8px; font-size: 10px; padding: 9px 6px; }
.control-divider { height: 1px; background: var(--line); margin: 23px 0 20px; }
.range-heading { display: flex; justify-content: space-between; font-size: 11px; }
.range-heading output { color: var(--accent); }
input[type=range] { width: 100%; height: 5px; margin: 18px 0 21px; accent-color: var(--accent); cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); }
.checkbox { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); margin-bottom: 16px; }
.play-button { width: 100%; background: var(--accent); color: white; padding: 12px; font-size: 13px; }
.play-button span { font-size: 18px; vertical-align: -1px; margin-right: 4px; }
.motion-note { color: var(--muted); font-size: 9px; text-align: center; line-height: 1.6; margin: 9px 0 0; }
.step-panel { padding: 14px 20px 10px; background: var(--panel-alt); border-top: 1px solid var(--line); }
.step-buttons { display: flex; gap: 6px; }
.step-buttons button { flex: 1; font-size: 11px; padding: 9px 5px; background: var(--panel); color: var(--muted); }
.step-buttons button.active { background: var(--ink); color: var(--page); }
.step-description { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.step-description p { font-size: 11px; line-height: 1.8; color: var(--muted); }
.step-description button { background: transparent; color: var(--ink); font-size: 11px; white-space: nowrap; }
footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 35px; padding: 22px 0 28px; color: var(--muted); font-size: 10px; line-height: 1.8; }
footer p { margin: 0; max-width: 650px; }
footer p:last-child { text-align: right; flex-shrink: 0; }
footer a { display: block; color: var(--ink); }
.hidden { display: none !important; }
@media (max-width: 1000px) {
  .studio-shell { grid-template-columns: minmax(0, 1fr) 270px; }
  .controls { padding: 22px 16px; }
  .intro-copy { font-size: 11px; }
  .viewer-index { display: none; }
}
@media (max-width: 760px) {
  main, .topbar { padding-inline: 16px; }
  .topbar { height: 62px; }
  .brand { font-size: 16px; }
  .brand-label { font-size: 8px; }
  .intro { display: block; padding: 23px 0 24px; }
  h1 { font-size: 30px; }
  .eyebrow { font-size: 8px; margin-bottom: 12px; }
  .intro-copy { margin-top: 14px; line-height: 1.8; }
  .studio-shell { grid-template-columns: 1fr; border-radius: 8px; }
  .viewer-top { height: 58px; padding: 9px 11px; }
  .mode-tabs button { padding: 8px 9px; font-size: 11px; }
  .viewport { height: 420px; min-height: 0; }
  .model-status { left: 16px; top: 16px; font-size: 9px; }
  .viewer-help { left: 16px; bottom: 17px; font-size: 9px; }
  .viewer-bottom { font-size: 10px; padding: 13px 16px; }
  .controls { border-left: 0; border-top: 1px solid var(--line); padding: 23px 20px; }
  .adapter-options { grid-template-columns: repeat(3, 1fr); }
  .adapter-options button { padding: 11px 7px; gap: 5px; }
  .adapter-options span { font-size: 10px; }
  .adapter-note { min-height: 0; }
  .control-heading h2 { margin-bottom: 18px; }
  .step-panel { padding: 12px; }
  .step-buttons { gap: 4px; }
  .step-buttons button { font-size: 9px; }
  .step-description { gap: 10px; }
  .step-description p { font-size: 10px; }
  footer { display: block; font-size: 9px; padding-top: 18px; }
  footer p:last-child { text-align: left; margin-top: 10px; }
}
@media (max-width: 400px) { .viewport { height: 345px; } .brand-label { display: none; } }
.is-embedded .topbar, .is-embedded .intro, .is-embedded footer { display: none; }
.is-embedded main { max-width: none; padding: 0; }
.is-embedded .studio-shell { height: 100vh; height: 100dvh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.is-embedded .viewer-column { display: flex; flex-direction: column; min-height: 0; }
.is-embedded .viewer-top, .is-embedded .viewer-bottom, .is-embedded .step-panel { flex: none; }
.is-embedded .viewport { flex: 1; height: auto; min-height: 0; }
.is-embedded .controls { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 760px) {
  .is-embedded .studio-shell { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
  .is-embedded .viewer-column { display: block; }
  .is-embedded .viewport { height: 300px; height: min(56dvh, 360px); min-height: 240px; }
  .is-embedded .controls { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
