.particle-demo { border: 1px solid #dfd9ea; border-radius: 14px; overflow: hidden; background: #fff; text-align: left; box-shadow: 0 12px 42px #39276108; }
.particle-demo [hidden] { display: none !important; }
.particle-demo button, .particle-demo input { font: inherit; }
.particle-demo button { cursor: pointer; transition: background .15s, box-shadow .15s; }
.particle-demo button:disabled { cursor: wait; }
.particle-demo button:focus-visible, .particle-demo input:focus-visible, .particle-demo canvas:focus-visible { outline: 3px solid #8560d4; outline-offset: 3px; }
.demo-topline, .demo-bottomline { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 22px; }
.demo-topline { border-bottom: 1px solid #e8e3ef; font-size: .88rem; }
.demo-topline strong > span { margin-inline: 7px; color: #c6bcd6; font-weight: 400; }
.demo-tag { display: inline-block; margin-left: 12px; color: #7253ac; font-size: .67rem; text-transform: uppercase; letter-spacing: .065em; background: #f1ebfa; border-radius: 20px; padding: 2px 9px; vertical-align: 1px; }
.demo-engine { font-size: .75rem; color: var(--muted); }
.demo-workspace { position: relative; }
.demo-viewport { min-width: 0; position: relative; background: #eae7eb; height: 640px; overflow: hidden; isolation: isolate; }
.demo-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 51%; }
.demo-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 28px 14px; text-align: center; gap: 12px; background: linear-gradient(transparent 45%, #fcfaffee 85%); z-index: 3; }
.demo-start p { font-size: 1.02rem; font-weight: 600; color: #3f3059; }
#demo-load { display: flex; gap: 24px; align-items: center; border: 0; border-radius: 8px; background: #5943a0; color: #fff; padding: 11px 20px; font-weight: 600; }
#demo-load:hover { background: #403077; }
#demo-load span { font-size: 1.35rem; }
.demo-load-note { font-size: .7rem; color: #645a73; }
.demo-viewport canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.demo-canvas-caption { position: absolute; top: 17px; left: 18px; display: flex; align-items: center; gap: 6px; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #4c3a67; background: #ffffffdf; padding: 4px 9px; border-radius: 20px; pointer-events: none; z-index: 2; }
.demo-live-dot { width: 5px; height: 5px; border-radius: 50%; background: #8560d4; }
.demo-handles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.demo-handle { position: absolute; width: 34px; height: 34px; padding: 0; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: auto; touch-action: none; cursor: grab !important; border: 1px solid #f4eaffaa; background: radial-gradient(circle at 32% 26%, #ffffffa8 0, #eee5ff2e 24%, #a889ce32 65%, #7852a563 100%); box-shadow: inset 0 0 9px #efe2ff50, 0 2px 10px #21142d30; }
.demo-handle:hover, .demo-handle[aria-expanded="true"] { border-color: #fff; background: radial-gradient(circle at 32% 26%, #ffffffe0 0, #eee5ff45 24%, #b59ac750 65%, #7951a878 100%); box-shadow: inset 0 0 9px #f8eeff60, 0 0 0 4px #d4b9f331, 0 2px 12px #21142d35; }
.demo-handle.is-dragging { cursor: grabbing !important; }
.demo-axis-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.demo-axis-labels span { position: absolute; transform: translate(-50%, -50%); font-size: .66rem; font-weight: 700; line-height: 19px; text-align: center; width: 19px; border-radius: 50%; background: #ffffffed; box-shadow: 0 1px 4px #24163020; }
.particle-demo [data-axis="x"] { color: #b52f43; }
.particle-demo [data-axis="y"] { color: #267436; }
.particle-demo [data-axis="z"] { color: #305fbe; }
.demo-view-tools { display: flex; justify-content: center; padding: 6px 12px; white-space: nowrap; background: #fff; border-top: 1px solid #e4dbee; }
.demo-view-tools button { color: #5a4779; border: none; background: transparent; font-size: .72rem; padding: 10px 14px; }
.demo-view-tools button + button { border-left: 1px solid #e4dbee; }
.demo-view-tools button:hover, .demo-view-tools button[aria-pressed="true"] { background: #eee7f7; }
.demo-controls { position: absolute; z-index: 4; top: 62px; right: 18px; width: 252px; border: 1px solid #eee6f7d9; border-radius: 12px; padding: 17px 19px; background: #fdfbfaf0; backdrop-filter: blur(16px); box-shadow: 0 10px 32px #2b193033; }
.demo-controls[data-side="left"] { right: auto; left: 18px; }
.demo-editor-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 21px; }
.demo-editor-heading h3 { font-size: .9rem; line-height: 1.3; margin: 0; color: #4b3c60; font-weight: 600; }
#demo-close { border: none; background: transparent; color: #746180; font-size: 1.3rem; width: 28px; height: 28px; line-height: 1; margin: -5px -7px -5px 0; border-radius: 50%; }
#demo-close:hover { background: #eae1f5; }
.demo-controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.demo-controls fieldset:disabled { opacity: .6; }
.demo-transform-modes { display: flex; gap: 3px; padding: 3px; border-radius: 7px; background: #eee7f6; }
.demo-transform-modes button { flex: 1; border: 0; padding: 6px 9px; border-radius: 5px; color: #6b5786; background: transparent; font-size: .75rem; }
.demo-transform-modes button[aria-pressed="true"] { color: #fff; background: #684ba5; box-shadow: 0 1px 4px #35205020; }
.demo-axis-hint { font-size: .67rem; color: #81718f; line-height: 1.5; margin: 9px 0 16px; }
.demo-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.demo-slider-heading { display: flex; justify-content: space-between; align-items: center; font-size: .74rem; color: #645571; }
#demo-scale-value { font-variant-numeric: tabular-nums; color: #5943a0; }
#demo-scale { width: 100%; accent-color: #8560d4; margin: 9px 0 20px; display: block; }
.demo-position { display: flex; gap: 7px; margin: 8px 0 20px; }
.demo-position label { flex: 1; min-width: 0; font-size: .66rem; color: #8b7d9b; }
.demo-position input { display: block; width: 100%; min-width: 0; margin-top: 3px; border: 1px solid #e0d8eb; border-radius: 5px; padding: 6px 3px 6px 7px; color: #4c3c60; background: #ffffffc9; font-size: .78rem; }
.demo-toggle-row { display: flex; justify-content: flex-end; align-items: center; padding-bottom: 17px; border-bottom: 1px solid #e8e0ef; }
#demo-focus { color: #665080; background: transparent; border: 1px solid #ded2e9; padding: 4px 7px; border-radius: 5px; font-size: .68rem; }
#demo-focus:hover { background: #eee5f7; }
.demo-reset-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 14px; }
.demo-reset-row button { font-size: .71rem; border: 0; background: transparent; color: #6f548e; padding: 3px 0; text-decoration: underline; text-underline-offset: 3px; }
.demo-reset-row span { color: #93859f; font-size: .64rem; }
.demo-status { font-size: .68rem; color: #84768f; line-height: 1.5; padding: 0 22px 12px; background: #fbf9fd; min-height: 2.5em; }
.demo-bottomline { font-size: .69rem; color: #7a7086; background: #fbf9fd; border-top: 1px solid #e8e3ef; padding-block: 11px 4px; }
.demo-bottomline strong { font-weight: 500; color: #5e4c73; }
.demo-method-note, .demo-provenance { color: var(--muted); font-size: .8rem; line-height: 1.7; }
.demo-method-note { margin-top: 19px; }
p.demo-provenance { margin-top: 6px; color: #81788d; font-size: .73rem; }
@media (max-width: 850px) {
  .demo-engine { display: none; }
  .demo-viewport { height: 540px; }
  .demo-bottomline { flex-direction: column; gap: 3px; align-items: flex-start; }
}
@media (max-width: 620px) {
  .demo-topline { padding: 13px 14px; font-size: .77rem; }
  .demo-tag { display: none; }
  .demo-viewport { height: 390px; }
  .demo-controls, .demo-controls[data-side="left"] { position: static; width: auto; border: 0; border-radius: 0; border-top: 1px solid #e8e3ef; padding: 17px 22px 20px; box-shadow: none; background: #fdfbfe; }
  .demo-editor-heading { margin-bottom: 15px; }
  .demo-handle { width: 32px; height: 32px; }
  .demo-bottomline { padding-inline: 15px; }
  .demo-status { padding-inline: 15px; }
  .demo-view-tools button { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { .particle-demo button { transition: none; } }
