:root {
  color-scheme: light;
  --paper: #eff5f2;
  --ink: #122e2c;
  --muted: #476762;
  --border: #c6d9d1;
  --accent: #147d70;
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
main { max-width: 1440px; margin: auto; padding: 0 clamp(16px, 4vw, 60px) 30px; }
header { display: flex; align-items: center; justify-content: space-between; min-height: 67px; border-bottom: 1px solid var(--border); gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; position: relative; width: 37px; height: 37px; border-radius: 10px; background: #123632; color: #d8f2e9; font-size: 24px; font-weight: 900; line-height: 1; }
.brand-mark span { position: absolute; color: #65e1c1; right: 4px; bottom: 3px; font-size: 11px; }
.brand-name { font-size: 18px; letter-spacing: .09em; font-weight: 850; line-height: 1; }
.brand-name span, .intro em { color: var(--accent); }
.brand-name small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: .25em; }
.header-note { color: var(--muted); font-size: 13px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 24px 0; }
.intro h1 { margin: 0; font-size: clamp(2.25rem, 4.4vw, 4.55rem); line-height: 1; letter-spacing: -.065em; }
.intro em { font-style: normal; }
.intro p { max-width: 33ch; margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 248px; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.scene { position: relative; min-width: 0; min-height: clamp(460px, 69vh, 680px); isolation: isolate; overflow: hidden; background: #dfe9e5; }
.scene-canvas { position: absolute; display: block; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.scene-canvas:active { cursor: grabbing; }
.scene-status, .views, .hint { position: absolute; z-index: 2; }
.scene-status, .hint { margin: 0; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: #f8fcfaed; color: #294f48; }
.scene-status { top: 13px; left: 13px; max-width: calc(100% - 123px); font-size: 12px; font-weight: 650; }
.views { right: 13px; top: 13px; display: flex; gap: 4px; }
.views button { padding: 5px 8px; font-size: 12px; }
.views [aria-pressed=true] { color: #11655a; border-color: #68a99a; background: #def4ec; }
.hint { left: 13px; bottom: 13px; font-size: 11px; pointer-events: none; }
.scene-loading { position: absolute; z-index: 3; inset: 0; display: grid; justify-items: center; align-content: center; gap: 10px; padding: 20px; text-align: center; background: #e6efeb; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
.scene-loading.failed .spinner { display: none; }
.no-script { position: absolute; z-index: 4; inset: 36% 10% auto; padding: 14px; background: white; text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }
aside { padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--border); }
aside h2 { font-size: 17px; margin: 0 0 4px; }
button, select { min-height: 35px; padding: 6px 10px; color: var(--ink); background: #f7fbf9; border: 1px solid var(--border); border-radius: 7px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
button:enabled:hover, select:enabled:hover { background: #e3f1ec; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled, select:disabled { cursor: default; opacity: .55; }
.primary { background: var(--accent); border-color: var(--accent); color: white; padding-block: 11px; font-size: 14px; }
.primary:enabled:hover { background: #096c5f; }
.field, .toggle { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.toggle { justify-content: start; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.input-status { margin: -7px 0 0; min-height: 15px; color: var(--muted); font-size: 11px; }
.playback { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
dl { margin: 2px 0 0; border-top: 1px solid var(--border); }
dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: 10px; }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 0; color: var(--accent); font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 760px) {
  .intro { display: grid; gap: 7px; padding-block: 18px; }
  .intro p { max-width: 44ch; }
  .demo { grid-template-columns: 1fr; }
  .scene { min-height: clamp(320px, 52vh, 450px); }
  aside { border-left: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; }
  aside h2, .primary, dl { grid-column: 1 / -1; }
  .input-status { margin: 0; align-self: center; }
}
@media (max-width: 380px) {
  .header-note { font-size: 11px; }
  aside { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
