@font-face { font-family: Bricolage; src: url('../../assets/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../../assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
:root { color-scheme: light; font-family: Bricolage, sans-serif; color: #162d45; background: #fff; font-synthesis: none; --line: #d3dce8; --control-line: #7387a2; --blue: #2458cf; }
* { box-sizing: border-box; } body { margin: 0; } button, select, input { font: inherit; color: inherit; } button, select, input[type='number'], input[type='search'] { min-height: 36px; border: 1px solid var(--control-line); border-radius: 4px; background: white; padding: 7px 10px; font-size: 12px; } button { cursor: pointer; font-weight: 550; } button:hover { background: #eaf0fb; border-color: #4e6581; } button:disabled { color: #687b90; background: #edf1f6; cursor: wait; } a { color: var(--blue); text-underline-offset: 3px; } :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; } [hidden] { display: none !important; }
.player { min-width: 0; max-width: 1600px; margin: auto; }
.player-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 20px 10px; gap: 16px; }
h1 { font-size: 23px; line-height: 1.2; font-weight: 600; margin: 0 0 7px; letter-spacing: -.02em; } .player-head p { font-size: 12px; color: #53677e; line-height: 1.5; margin: 0; }
#standalone { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--control-line); border-radius: 4px; } #standalone svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.view-tabs { display: flex; gap: 0; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.view-tabs button { border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 12px 16px; background: transparent; font-size: 13px; min-height: 44px; }
.view-tabs button[aria-selected='true'] { color: var(--blue); border-bottom-color: var(--blue); }
.surfaces { position: relative; height: 470px; background: #f4f7fb; overflow: hidden; }
.surface { position: absolute; inset: 0; } /* React Flow sets visibility inline on every measured node, so the parked panel is also clipped away; visibility alone would leave the nodes painted. Clipping keeps the node subtrees' styles untouched, which is what makes parking cheap. */
.surface.is-parked { visibility: hidden; clip-path: inset(100%); } #scene, #diagram-host { position: absolute; inset: 0; } #scene iframe { width: 100%; height: 100%; border: 0; } #scene canvas { display: block; width: 100%; height: 100%; }
#scene-labels { position: absolute; inset: 0; pointer-events: none; } .scene-label { position: absolute; text-align: center; transform: translate(-50%, 0); max-width: 130px; padding: 4px 6px; background: #ffffffed; border-radius: 3px; font-size: 12px; line-height: 1.4; color: #162d45; } .scene-label small { display: block; color: #4e6581; font: 10px/1.5 'JetBrains Mono', monospace; }
#diagram-host .model-viewer { width: 100%; height: 100%; }
.code-surface { display: flex; flex-direction: column; background: #f7f9fd; } .code-tools { display: flex; align-items: center; gap: 20px; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); background: white; font-size: 12px; } .code-tools label { display: flex; align-items: center; gap: 10px; }
pre { margin: 0; padding: 18px 20px; overflow: auto; flex: 1; tab-size: 2; } code { font: 11px/1.65 'JetBrains Mono', monospace; }
/* Source blocks skip layout while off screen; the placeholder height is 200 lines at 11px/1.65. */
#source-code > div { content-visibility: auto; contain-intrinsic-size: auto 3630px; }
.data-surface { padding: 14px 16px 0; display: flex; flex-direction: column; background: white; }
.filter-label { display: flex; align-items: center; gap: 10px; font-size: 12px; } .filter-label input { min-width: 0; width: 230px; } .event-tools { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
/* Download trace is the Events-tab twin of the Code tab's Download OSDL, so it wears the same link styling rather than a button. */
#download-events { border: 0; background: none; padding: 0; min-height: 0; color: var(--blue); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
#download-events:hover { background: none; border: 0; }
#download-events:disabled { color: #687b90; background: none; text-decoration: none; }
.panel-note { color: #53677e; font-size: 11px; line-height: 1.6; margin: 10px 0; }
.data-scroll { flex: 1; overflow: auto; scrollbar-gutter: stable; } table { border-collapse: collapse; width: 100%; text-align: left; font: 11px/1.5 'JetBrains Mono', monospace; } th { background: #edf2f9; position: sticky; top: 0; font-weight: 400; font-family: Bricolage, sans-serif; } th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; } td:last-child { max-width: 460px; } td:first-child { white-space: nowrap; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; text-align: center; background: #f4f7fbed; font-size: 14px; z-index: 5; line-height: 1.7; } .loading.is-error { color: #a52a36; }
/* The diagram takes a moment to import, lay out, and mount. The ring is a
   transform animation, so it keeps turning while the layout blocks the main
   thread. */
.surface-loading { position: absolute; inset: 0; display: grid; place-items: center; gap: 14px; background: #f4f7fbed; font-size: 13px; color: #53677e; z-index: 6; }
.dark .surfaces { background: #0e1928; }
.dark .surface-loading { background: #152337f2; color: #b1c3da; }
.surface-loading .ring { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); animation: surface-spin .9s linear infinite; }
@keyframes surface-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .surface-loading .ring { animation-duration: 3s; } }
.transport { display: flex; gap: 8px; padding: 13px 16px; align-items: center; border-top: 1px solid var(--line); flex-wrap: wrap; } .transport .primary { background: var(--blue); color: white; border-color: var(--blue); min-width: 64px; } .transport .primary:disabled { background: #687b90; border-color: #687b90; }
.timeline-label { flex: 1; min-width: 100px; display: flex; } #timeline { width: 100%; accent-color: var(--blue); } #time { font: 10px 'JetBrains Mono', monospace; min-width: 95px; text-align: right; } .speed-label { font-size: 11px; display: flex; gap: 6px; align-items: center; }
.run-settings { display: flex; gap: 12px; align-items: center; padding: 0 16px 12px; font-size: 11px; } .run-settings label { display: flex; align-items: center; gap: 8px; } #seed { width: 115px; font-family: 'JetBrains Mono', monospace; font-size: 10px; } #run-status { color: #53677e; line-height: 1.5; }
.player-note { padding: 12px 16px 15px; border-top: 1px solid var(--line); } .player-note p { font-size: 12px; line-height: 1.55; margin: 0; } .player-note p + p { margin-top: 5px; color: #53677e; font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 600px) { .player-head { padding: 16px 12px 8px; } h1 { font-size: 20px; } .view-tabs { padding: 0 4px; } .view-tabs button { padding: 10px 12px; font-size: 12px; } .surfaces { height: 355px; } .transport { padding: 10px 12px; gap: 7px; } .timeline-label { min-width: 140px; order: 5; } #time { order: 6; } .speed-label { margin-left: auto; } .run-settings { flex-wrap: wrap; padding: 0 12px 10px; gap: 8px; } #run-status { flex: 1; } .filter-label { flex-wrap: wrap; gap: 4px; } .filter-label input { width: 160px; } .data-surface { padding: 10px 8px 0; } .code-tools { gap: 8px; padding: 8px; } .code-tools label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .code-tools select { max-width: 160px; } th, td { padding: 6px; font-size: 10px; } .scene-label { font-size: 10px; max-width: 85px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

.dark { color-scheme: dark; color: #e9f1fc; background: #152337; --line: #344961; --control-line: #6a8199; --blue: #a1bdff; }
.dark .player, .dark .data-surface, .dark .code-tools { background: #152337; }
.dark .code-surface { background: #0e1928; }
.dark button, .dark select, .dark input[type='number'], .dark input[type='search'] { background: #1c2d43; color: #dce8f8; }
.dark button:disabled { color: #7f93aa; background: #16253a; border-color: #3a4b63; }
.dark .transport .primary:disabled { background: #3a4b63; border-color: #3a4b63; color: #b1c3da; }
.dark button:hover:not(:disabled) { background: #243a55; border-color: #8ea6c2; }
.dark .player-head p, .dark .panel-note, .dark #run-status, .dark .player-note p + p { color: #b1c3da; }
.dark th { background: #213650; }
.dark .transport .primary { background: #2458cf; color: white; border-color: #6288dc; }
.dark .loading { background: #152337f2; }
.dark .loading.is-error { color: #ffadad; }
.dark a { color: #a1bdff; }
.view-note { position: static; margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.6; color: #53677e; }
.dark .view-note { color: #b1c3da; }
.scene-event { position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px); padding: 8px 10px; background: #101d2de8; border: 1px solid #c39860; border-radius: 4px; color: #ffe0ae; font-size: 12px; line-height: 1.5; pointer-events: auto; text-align: left; }
.scene-event:hover { background: #203247; color: #ffe0ae; border-color: #ffe0ae; }
