:root { color-scheme: dark; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #1c1d1f; color: #f5f5f0; }
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
button:focus-visible, .stage:focus-visible { outline: 2px solid #ff9545; outline-offset: 4px; }
.experiment { max-width: 1120px; margin: auto; padding: 30px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 9px; color: #ffad70; font: 10px/1.5 ui-monospace, monospace; text-transform: uppercase; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(26px, 3.8vw, 42px); font-weight: 550; letter-spacing: -.045em; }
.instructions { color: #b9bbb7; font-size: 13px; line-height: 1.6; margin: 0; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 234px; gap: 26px; }
.stage { position: relative; min-height: 390px; display: grid; place-items: center; overflow: hidden; border: 1px solid #404143; border-radius: 16px; background: radial-gradient(circle, #333130 0%, #232426 70%); touch-action: none; user-select: none; }
.stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .25; background-image: radial-gradient(#73716c .8px, transparent .8px); background-size: 22px 22px; }
.stage-label { position: absolute; top: 20px; left: 22px; color: #a6a6a0; font: 10px ui-monospace, monospace; }
.portrait { position: relative; width: min(68%, 292px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #ff9545; box-shadow: 0 0 0 10px #ff95450a, 0 18px 50px #0003; pointer-events: none; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stage-bottom { position: absolute; bottom: 19px; left: 22px; right: 22px; display: flex; justify-content: space-between; gap: 16px; font: 10px/1.5 ui-monospace, monospace; color: #d1d0c8; }
.tracking { color: #a1a49b; text-align: right; }
.target { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 1px solid #ffd2af; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 4px #ff954525; }
.target::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #ffd2af; }
.controls { align-self: center; }
.directions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 15px 0 18px; }
.directions button { position: relative; padding: 3px; background: #292a2c; border: 1px solid #424345; border-radius: 10px; aspect-ratio: 1; overflow: hidden; transition: border-color .12s; }
.directions button:hover { border-color: #ffad70; }
.directions button[aria-pressed="true"] { border: 2px solid #ff9545; padding: 2px; box-shadow: 0 0 0 2px #ff954526; }
.directions img { display: block; width: 100%; height: 100%; border-radius: 6px; object-fit: cover; }
.directions span { position: absolute; bottom: 3px; right: 3px; width: 20px; height: 20px; background: #1c1d1fe6; border-radius: 5px; color: #fff; font-size: 14px; }
.follow, .reset { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 42px; border-radius: 8px; font-size: 12px; }
.follow { border: 1px solid #55514b; background: #30302d; color: #f3eee7; padding: 9px 12px; }
.follow span { width: 25px; height: 14px; border-radius: 8px; background: #656560; position: relative; }
.follow span::after { content: ""; position: absolute; width: 10px; height: 10px; top: 2px; left: 2px; border-radius: 50%; background: #1c1d1f; }
.follow[aria-pressed="true"] span { background: #ff9545; }
.follow[aria-pressed="true"] span::after { left: 13px; }
.reset { justify-content: center; margin-top: 7px; border: 1px solid transparent; background: transparent; color: #bbbcb7; }
.reset:hover { color: #fff; background: #292a2c; }
.note { font-size: 11px; color: #959791; line-height: 1.65; margin: 10px 0 0; }
footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; color: #898c85; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .experiment { padding: 20px 16px; }
  .intro { display: block; margin-bottom: 18px; }
  .instructions { margin-top: 10px; font-size: 12px; }
  .workspace { grid-template-columns: 1fr; gap: 20px; }
  .stage { min-height: 310px; }
  .portrait { width: 208px; }
  .stage-label { top: 16px; left: 16px; }
  .stage-bottom { left: 16px; right: 16px; bottom: 16px; font-size: 9px; }
  .controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; align-items: start; }
  .controls > .eyebrow { grid-column: 1 / -1; margin: 0; }
  .directions { grid-column: 1; grid-row: 2 / 5; margin: 0; gap: 5px; }
  .follow, .reset, .note { grid-column: 2; font-size: 11px; margin: 0; }
  .follow { padding: 8px; gap: 8px; }
  .follow span { flex: 0 0 25px; }
  .note { font-size: 10px; }
  footer { flex-wrap: wrap; font-size: 9px; }
}
.is-embedded, .is-embedded body { height: 100%; background: #111b2b; }
.is-embedded .experiment { max-width: none; height: 100%; padding: 0; }
.is-embedded .intro, .is-embedded .controls, .is-embedded footer { display: none; }
.is-embedded .workspace { display: block; height: 100%; }
.is-embedded .stage { min-height: 0; height: 100%; border: 0; border-radius: 0; background: #111b2b; }
.is-embedded .stage::before { display: none; }
.is-embedded .portrait { width: min(58%, 190px); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
