/* Standalone study tokens: shared by the original neutral and red-silk controls. */
:root {
  --study-surface: #efefeb;
  --study-foreground: #252525;
  --study-muted: #595959;
  --study-border: #ccc;
  --study-control-border: #aaa;
  --study-hover: #fff;
  --study-selected: #252525;
  --study-selected-foreground: #fff;
  --study-ring: #2452ac;
  --study-status: #efefebdf;
  --study-status-foreground: var(--study-foreground);
  --study-scene: var(--study-surface);
  --study-font: system-ui, sans-serif;
  --study-text: 14px;
  --study-text-small: 12px;
  --study-text-title: 20px;
  --study-space: 4px;
  --study-border-width: 1px;
  --study-radius: 5px;
  --study-status-radius: 4px;
  --study-control-x: 13px;
  --study-control-y: 9px;
  --study-stage-min: 220px;
  --study-status-bottom: 18px;
  --study-slider-width: 90px;
  --study-focus-width: 3px;
  --study-focus-offset: 3px;
}
:root[data-study="silk"] {
  --study-surface: #151515;
  --study-foreground: #f7f7f7;
  --study-muted: #bbb;
  --study-border: #333;
  --study-control-border: #666;
  --study-hover: #343434;
  --study-selected: #fff;
  --study-selected-foreground: #222;
  --study-ring: #fff;
  --study-status: #8d1720;
  --study-status-foreground: #fff;
  --study-scene: #bd2430;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--study-surface);
  color: var(--study-foreground);
  font: var(--study-text) var(--study-font);
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
header,
footer {
  padding: calc(var(--study-space) * 5) calc(var(--study-space) * 7);
}
header {
  display: flex;
  justify-content: space-between;
  gap: calc(var(--study-space) * 5);
  flex-wrap: wrap;
  border-bottom: var(--study-border-width) solid var(--study-border);
}
h1 {
  font-size: var(--study-text-title);
  margin: 0 0 calc(var(--study-space) * 1.5);
}
p {
  margin: 0;
  color: var(--study-muted);
}
nav {
  display: flex;
  gap: calc(var(--study-space) * 2);
  flex-wrap: wrap;
  align-items: center;
}
button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: var(--study-border-width) solid var(--study-control-border);
  border-radius: var(--study-radius);
  padding: var(--study-control-y) var(--study-control-x);
  cursor: pointer;
}
button:hover {
  background: var(--study-hover);
}
button:focus-visible,
canvas:focus-visible,
input:focus-visible {
  outline: var(--study-focus-width) solid var(--study-ring);
  outline-offset: var(--study-focus-offset);
}
button[aria-pressed="true"] {
  background: var(--study-selected);
  color: var(--study-selected-foreground);
}
main {
  flex: 1;
  min-height: var(--study-stage-min);
  position: relative;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
}
footer {
  border-top: var(--study-border-width) solid var(--study-border);
  display: flex;
  justify-content: space-between;
  gap: calc(var(--study-space) * 3);
  flex-wrap: wrap;
  font-size: var(--study-text-small);
}
#status {
  position: absolute;
  bottom: var(--study-status-bottom);
  left: calc(var(--study-space) * 7);
  background: var(--study-status);
  color: var(--study-status-foreground);
  padding: calc(var(--study-space) * 2);
  border-radius: var(--study-status-radius);
  pointer-events: none;
}
label {
  display: flex;
  align-items: center;
  gap: calc(var(--study-space) * 2);
  font-size: var(--study-text-small);
}
input {
  accent-color: var(--study-ring);
  width: var(--study-slider-width);
}
footer a {
  color: var(--study-selected);
}
html[data-embed="hero"],
html[data-embed="hero"] body {
  height: 100%;
  background: transparent;
  overflow: hidden;
}
html[data-embed="hero"] :is(header, footer, #status) {
  display: none;
}
html[data-embed="hero"] main {
  min-height: 0;
}
html[data-embed="hero"] canvas {
  /* OrbitControls writes an inline touch-action; the embedded hero must allow page scrolling. */
  touch-action: pan-y !important;
}
