:root {
  --paper: #f2eee5;
  --surface: #fffdf8;
  --ink: #18201e;
  --muted: #6b7470;
  --line: rgb(24 32 30 / 14%);
  --violet: #6f4be8;
  --violet-dark: #5031bd;
  --violet-soft: #eee9ff;
  --blue: #3978f2;
  --blue-dark: #2457b8;
  --coral: #f16f52;
  --coral-dark: #aa3f2c;
  --yellow: #f2ca51;
  --shadow: 0 25px 70px rgb(52 43 34 / 12%);
  color-scheme: light;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 4%, rgb(57 120 242 / 14%), transparent 31rem),
    radial-gradient(circle at 96% 4%, rgb(241 111 82 / 16%), transparent 35rem),
    linear-gradient(135deg, #eef3ef, var(--paper) 53%, #ede3d8);
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

h1,
h2,
h3,
p,
pre {
  margin: 0;
}

.page {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 46px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--violet-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.eyebrow i {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--violet);
  border-radius: 50%;
}

.eyebrow i::before,
.eyebrow i::after {
  position: absolute;
  background: var(--violet);
  content: "";
}

.eyebrow i::before {
  top: 7px;
  right: -5px;
  left: -5px;
  height: 2px;
}

.eyebrow i::after {
  top: -5px;
  bottom: -5px;
  left: 7px;
  width: 2px;
}

h1 {
  font-size: clamp(42px, 5vw, 74px);
  line-height: 1;
}

.lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 800;
  line-height: 1.65;
}

.lead code {
  color: var(--violet-dark);
}

.hero-actions,
.preview-actions,
.head-copy,
.panel-head,
.preview-head,
.code-head {
  display: flex;
  align-items: center;
}

.head-copy {
  gap: 11px;
}

.hero-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.support-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgb(111 75 232 / 28%);
  border-radius: 12px;
  color: var(--violet-dark);
  background: var(--violet-soft);
  font-size: 10px;
  font-weight: 900;
}

.button,
.replay-button {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 10px;
  font-weight: 900;
}

.button {
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  border-color: rgb(24 32 30 / 34%);
  transform: translateY(-2px);
}

.button--dark {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.button--copy {
  color: white;
  border-color: var(--coral);
  background: var(--coral);
}

.studio {
  display: grid;
  grid-template-columns: minmax(370px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: start;
}

.control-panel,
.preview-panel,
.code-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgb(255 253 248 / 94%);
  box-shadow: var(--shadow);
}

.control-panel {
  position: sticky;
  top: 14px;
  overflow: hidden;
}

.panel-head,
.preview-head,
.code-head {
  gap: 11px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.preview-head,
.code-head {
  justify-content: space-between;
}

.panel-head p,
.preview-head p,
.code-head p {
  color: var(--violet-dark);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.preview-head p {
  color: var(--blue-dark);
}

.code-head p {
  color: var(--coral-dark);
}

.panel-head h2,
.preview-head h2,
.code-head h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.2;
}

.section-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  color: white;
  background: var(--violet);
  font-size: 10px;
  font-weight: 900;
}

.section-mark--blue {
  background: var(--blue);
}

.section-mark--coral {
  background: var(--coral);
}

.control-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.control-section:last-child {
  border-bottom: 0;
}

.control-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.control-title span {
  color: var(--violet-dark);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.control-title h3 {
  margin-top: 3px;
  font-size: 15px;
}

.control-title output {
  color: var(--violet-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 900;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.scene-grid button {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 10px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.scene-grid button:hover {
  transform: translateY(-2px);
}

.scene-grid button[aria-pressed="true"] {
  border-color: var(--violet);
  background: var(--violet-soft);
}

.scene-grid span {
  margin-top: 7px;
  font-size: 9px;
  font-weight: 900;
}

.scene-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 6px;
  font-weight: 800;
}

.scene-icon {
  position: relative;
  display: block;
  width: 34px;
  height: 27px;
}

.scene-icon--door {
  width: 23px;
  height: 31px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  transform: perspective(60px) rotateY(-24deg);
  transform-origin: left center;
}

.scene-icon--door::after {
  position: absolute;
  top: 13px;
  right: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.scene-icon--pendulum {
  width: 16px;
  height: 31px;
  transform: rotate(-15deg);
  transform-origin: 50% 2px;
}

.scene-icon--pendulum::before {
  position: absolute;
  top: 1px;
  left: 7px;
  width: 2px;
  height: 17px;
  border-radius: 999px;
  background: var(--ink);
  content: "";
}

.scene-icon--pendulum::after {
  position: absolute;
  top: 16px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  content: "";
}

.scene-icon--button {
  width: 34px;
  height: 18px;
  margin-top: 7px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 0 5px 0 rgb(24 32 30 / 18%);
}

.scene-icon--card {
  width: 34px;
  height: 24px;
  margin-top: 2px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--violet) 49%, white 50%);
  transform: perspective(70px) rotateY(-20deg);
}

.origin-editor {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 13px;
}

.origin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  aspect-ratio: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(rgb(24 32 30 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(24 32 30 / 7%) 1px, transparent 1px),
    white;
  background-size: 50% 50%;
}

.origin-grid button {
  position: relative;
  border: 0;
  background: transparent;
}

.origin-grid button::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: white;
  content: "";
  translate: -50% -50%;
  transition:
    scale 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.origin-grid button:hover::before {
  scale: 1.25;
}

.origin-grid button[aria-pressed="true"]::before {
  border-color: var(--violet);
  background: var(--violet);
  box-shadow: 0 0 0 5px rgb(111 75 232 / 16%);
}

.coordinate-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  align-content: start;
}

.coordinate-readout p {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.coordinate-readout span {
  color: var(--violet-dark);
  font-size: 7px;
  font-weight: 900;
}

.coordinate-readout strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
}

.coordinate-readout small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.5;
}

.range-stack {
  display: grid;
  gap: 13px;
  margin-top: 15px;
}

.range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.range-grid--origin {
  margin-top: 14px;
}

.range-field {
  display: grid;
  gap: 7px;
}

.range-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-field b {
  font-size: 9px;
}

.range-field output {
  color: var(--violet-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 900;
}

input[type="range"] {
  --range-progress: 50%;
  width: 100%;
  height: 4px;
  margin: 6px 0;
  border-radius: 999px;
  appearance: none;
  background:
    linear-gradient(var(--violet), var(--violet)) 0 / var(--range-progress) 100% no-repeat,
    rgb(24 32 30 / 12%);
}

input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid white;
  border-radius: 50%;
  appearance: none;
  background: var(--violet);
  box-shadow: 0 2px 8px rgb(24 32 30 / 22%);
}

input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 2px 8px rgb(24 32 30 / 22%);
}

.segmented {
  position: relative;
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(24 32 30 / 4%);
}

.segmented button {
  position: relative;
  z-index: 1;
  min-height: 37px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 900;
}

.segmented button[aria-pressed="true"] {
  color: var(--ink);
  background: white;
  box-shadow: 0 4px 14px rgb(24 32 30 / 10%);
}

.motion-switch button {
  flex: 1;
}

@supports (anchor-name: --selected-option) {
  .segmented::before {
    position: absolute;
    z-index: 0;
    top: anchor(top);
    left: anchor(left);
    width: anchor-size(width);
    height: anchor-size(height);
    border-radius: 9px;
    background: white;
    box-shadow: 0 4px 14px rgb(24 32 30 / 10%);
    content: "";
    pointer-events: none;
    transition:
      top 250ms cubic-bezier(0.22, 1, 0.36, 1),
      left 250ms cubic-bezier(0.22, 1, 0.36, 1),
      width 250ms cubic-bezier(0.22, 1, 0.36, 1),
      height 250ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .motion-switch button[aria-pressed="true"] {
    anchor-name: --motion-selected;
  }

  .motion-switch::before {
    position-anchor: --motion-selected;
  }

  .speed-switch button[aria-pressed="true"] {
    anchor-name: --speed-selected;
  }

  .speed-switch::before {
    position-anchor: --speed-selected;
  }

  .segmented button[aria-pressed="true"] {
    background: transparent;
    box-shadow: none;
  }
}

.switches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.switch-field span {
  display: grid;
  gap: 3px;
}

.switch-field b {
  font-size: 9px;
}

.switch-field small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-field > i {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgb(24 32 30 / 14%);
  transition: background-color 180ms ease;
}

.switch-field > i::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 7px rgb(24 32 30 / 22%);
  content: "";
  transition: translate 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.switch-field input:checked + i {
  background: var(--violet);
}

.switch-field input:checked + i::after {
  translate: 18px 0;
}

.result-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.preview-panel,
.code-panel {
  min-width: 0;
  overflow: hidden;
}

.preview-actions {
  gap: 8px;
}

.speed-switch button {
  min-width: 44px;
}

.replay-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.replay-button span {
  font-size: 16px;
}

.comparison-stage {
  --origin-x: 0%;
  --origin-y: 50%;
  --object-width: 148px;
  --object-height: 198px;
  --perspective: 900px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  min-height: 480px;
  margin: 16px 18px 12px;
  padding: 47px 13px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(rgb(24 32 30 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(24 32 30 / 5%) 1px, transparent 1px),
    rgb(255 255 255 / 72%);
  background-size: 24px 24px;
  overflow: hidden;
}

.stage-grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 52%, rgb(57 120 242 / 9%), transparent 24%),
    radial-gradient(circle at 75% 52%, rgb(111 75 232 / 11%), transparent 24%);
  pointer-events: none;
}

.same-motion-chip {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 50%;
  padding: 7px 11px;
  border: 1px solid rgb(111 75 232 / 24%);
  border-radius: 999px;
  color: var(--violet-dark);
  background: var(--violet-soft);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
  translate: -50% 0;
}

.compare-side {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgb(255 255 255 / 82%);
}

.compare-side--custom {
  border-color: rgb(111 75 232 / 34%);
  background: rgb(238 233 255 / 58%);
}

.compare-side header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.compare-side header span {
  color: var(--blue-dark);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.compare-side--custom header span {
  color: var(--violet-dark);
}

.compare-side h3 {
  margin-top: 2px;
  font-size: 17px;
}

.compare-side header output {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: white;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
}

.compare-side > p {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  line-height: 1.55;
}

.object-zone {
  display: grid;
  place-items: center;
  min-height: 330px;
  perspective: var(--perspective);
  perspective-origin: center center;
}

.object-wrap {
  position: relative;
  width: var(--object-width);
  height: var(--object-height);
  transform-style: preserve-3d;
}

.demo-object,
.object-ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 17px;
}

.object-ghost {
  border: 2px dashed rgb(24 32 30 / 18%);
  opacity: 1;
  transition: opacity 160ms ease;
}

.comparison-stage:not(.show-ghost) .object-ghost {
  opacity: 0;
}

.demo-object {
  transform-style: preserve-3d;
  will-change: transform;
}

.object-wrap--fixed .demo-object {
  transform-origin: 50% 50%;
}

.object-wrap--custom .demo-object {
  transform-origin: var(--origin-x) var(--origin-y);
}

.object-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: inherit;
  backface-visibility: hidden;
  overflow: hidden;
}

.object-face--front {
  color: white;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 18%), transparent 48%),
    var(--coral);
  box-shadow: 10px 12px 0 rgb(24 32 30 / 13%);
}

.object-face--back {
  color: white;
  background: var(--violet);
  transform: rotateY(180deg);
}

.object-face span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.scene-door .object-face--front::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  content: "";
  translate: 0 -50%;
}

.scene-pendulum {
  --object-width: 82px;
  --object-height: 210px;
}

.scene-pendulum .object-face {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.scene-pendulum .object-face--front::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 145px;
  border-radius: 999px;
  background: var(--ink);
  content: "";
  translate: -50% 0;
}

.scene-pendulum .object-face--front::after {
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 8px 10px 0 rgb(24 32 30 / 13%);
  content: "";
}

.scene-pendulum .object-face span {
  display: none;
}

.scene-pendulum .object-ghost {
  border-radius: 999px;
}

.scene-button {
  --object-width: 205px;
  --object-height: 82px;
}

.scene-button .demo-object,
.scene-button .object-ghost,
.scene-button .object-face {
  border-radius: 999px;
}

.scene-button .object-face--front {
  background: var(--coral);
}

.scene-card {
  --object-width: 205px;
  --object-height: 132px;
}

.scene-card .object-face--front {
  background:
    linear-gradient(135deg, var(--violet) 0 48%, var(--coral) 48% 100%);
}

.fixed-origin-dot,
.origin-handle {
  position: absolute;
  z-index: 6;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  translate: -50% -50%;
}

.fixed-origin-dot {
  top: 50%;
  left: 50%;
  background: var(--blue);
  box-shadow:
    0 0 0 5px rgb(57 120 242 / 16%),
    0 3px 10px rgb(24 32 30 / 18%);
}

.fixed-origin-dot::before,
.fixed-origin-dot::after,
.origin-handle::before,
.origin-handle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: white;
  content: "";
  translate: -50% -50%;
}

.fixed-origin-dot::before,
.origin-handle::before {
  width: 10px;
  height: 2px;
}

.fixed-origin-dot::after,
.origin-handle::after {
  width: 2px;
  height: 10px;
}

.origin-handle {
  top: var(--origin-y);
  left: var(--origin-x);
  padding: 0;
  background: var(--violet);
  box-shadow:
    0 0 0 6px rgb(111 75 232 / 18%),
    0 3px 12px rgb(24 32 30 / 22%);
  cursor: grab;
  touch-action: none;
}

.origin-handle:active {
  cursor: grabbing;
  scale: 1.12;
}

.origin-handle i {
  position: absolute;
  inset: -11px;
  border: 1px dashed rgb(111 75 232 / 52%);
  border-radius: 50%;
}

.origin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 0 18px 18px;
}

.origin-summary article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.origin-summary span {
  color: var(--violet-dark);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.origin-summary strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  font-size: 17px;
}

.origin-summary small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.code-panel {
  color: white;
  background: #111814;
}

.code-head {
  border-bottom-color: rgb(255 255 255 / 12%);
}

.code-head h2 {
  color: white;
}

.code-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(210px, 0.55fr);
  gap: 12px;
  padding: 15px 18px;
}

.code-layout pre {
  max-height: 280px;
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 15px;
  background: #090d0b;
  overflow: auto;
  color: #e7eee9;
  font-size: 10px;
  line-height: 1.7;
  white-space: pre;
}

.code-layout aside {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgb(111 75 232 / 32%);
  border-radius: 15px;
  background: rgb(111 75 232 / 12%);
}

.code-layout aside span {
  color: #b8a8ff;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.code-layout aside strong {
  color: white;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.code-layout aside p {
  color: rgb(255 255 255 / 56%);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.65;
}

.code-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 17px;
  color: rgb(255 255 255 / 52%);
  font-size: 8px;
  font-weight: 700;
}

.copy-status {
  min-height: 1em;
  color: #b8a8ff;
  font-weight: 900;
}

.page-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 17px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(255 253 248 / 72%);
}

.page-note strong {
  color: var(--violet-dark);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.page-note p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.page-note span {
  margin-left: auto;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--violet-dark);
  background: var(--violet-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 900;
}

@media (max-width: 1120px) {
  .studio {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 22px, 560px);
    padding: 18px 0 32px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(38px, 12vw, 56px);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .support-chip {
    grid-column: 1 / -1;
  }

  .control-panel,
  .preview-panel,
  .code-panel {
    border-radius: 20px;
  }

  .panel-head,
  .preview-head,
  .code-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }

  .preview-actions {
    width: 100%;
  }

  .speed-switch,
  .speed-switch button,
  .replay-button {
    flex: 1;
  }

  .control-section {
    padding: 15px;
  }

  .scene-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .origin-editor {
    grid-template-columns: 112px 1fr;
  }

  .motion-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .switches {
    grid-template-columns: 1fr;
  }

  .comparison-stage {
    grid-template-columns: 1fr;
    min-height: 820px;
    margin: 13px;
    padding: 45px 10px 10px;
  }

  .object-zone {
    min-height: 280px;
  }

  .origin-summary {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 13px 13px;
  }

  .code-layout {
    grid-template-columns: 1fr;
    padding-inline: 13px;
  }

  .code-panel footer {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 13px;
  }

  .page-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-note span {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .range-grid {
    grid-template-columns: 1fr;
  }

  .origin-editor {
    grid-template-columns: 100px 1fr;
  }

  .comparison-stage {
    min-height: 780px;
  }

  .object-zone {
    min-height: 255px;
  }

  .scene-button {
    --object-width: 175px;
  }

  .scene-card {
    --object-width: 178px;
    --object-height: 116px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .demo-object {
    animation-duration: 0.01ms !important;
  }
}
