:root {
  color-scheme: dark;
  scrollbar-color: #353a48 #101117;
  --hue: 183;
  --ink: #f2f1ec;
  --muted: #b5b5c1;
  --border: #a0abc12e;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: #0c0d12;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { max-width: none; padding: 0; margin: 0; background: radial-gradient(ellipse at 38% 40%, hsl(var(--hue) 35% 16% / .19), transparent 67%), #0c0d12; }
[data-plasma-work] { max-width: 1540px; min-height: 100svh; margin: auto; padding: 25px clamp(14px, 4vw, 60px) 26px; }
[data-plasma-work] > header { display: grid; gap: .5rem; padding-bottom: 1.25rem; }
[data-plasma-work] > header .page-title { order: 0; }
.work-intro { color: var(--muted); margin: 0; line-height: 1.4; font-size: .96rem; }
[data-plasma-work] h1 { display: flex; align-items: center; gap: 16px; font: 400 clamp(2rem, 5vw, 4.1rem)/1 Georgia,serif; letter-spacing: -.055em; margin: 0; }
h1 i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid hsl(var(--hue) 90% 75%); box-shadow: 0 0 19px hsl(var(--hue) 90% 57% / .4), inset 0 0 12px hsl(var(--hue) 90% 57% / .45); flex: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid hsl(var(--hue) 95% 80%); outline-offset: 4px; }
.image-picker { cursor: pointer; display: inline-grid; place-items: center; min-height: 2.75rem; padding: .35rem .55rem; font-size: .86rem; border: 1px solid #eef4f868; border-radius: 7px; background: #eff9f3; color: #181c23; font-weight: 680; white-space: nowrap; }
.image-picker:hover { background: hsl(var(--hue) 75% 89%); }
.source-actions:has(#file:focus-visible) .image-picker { outline: 2px solid hsl(var(--hue) 95% 80%); outline-offset: 4px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 294px); gap: clamp(12px, 2vw, 25px); align-items: start; }
.exhibit { min-width: 0; }
.stage {
  height: max(440px, min(72svh, 760px));
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  isolation: isolate;
  border-radius: 20px;
  border: 1px solid hsl(var(--hue) 32% 54% / .3);
  background:
    radial-gradient(ellipse at 48% 51%, hsl(var(--hue) 53% 22% / .31), transparent 66%),
    repeating-linear-gradient(90deg, transparent 0 47px, #aab9e608 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, #aab9e608 48px),
    linear-gradient(139deg, #131822, #080910 72%);
  box-shadow: inset 0 1px #e2f3ff1b, inset 0 0 100px #01020b8f, 0 20px 65px #02030980;
}
.stage.drag-over { box-shadow: inset 0 0 45px hsl(var(--hue) 85% 64% / .35); border-color: hsl(var(--hue) 86% 78%); }
#art { width: 100%; height: 100%; position: absolute; inset: 0; }
#empty { z-index: 1; pointer-events: none; text-align: center; padding: 18px; color: var(--muted); }
.caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 13px 0 0; }
.plasma-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#spectra { margin: 0; }
#spectra span { padding: 0 9px; }
.caption p, .note, .privacy { color: var(--muted); font-size: .875rem; line-height: 1.45; margin: 0; }
.caption button, .source-actions button, #automatic { min-height: 2.75rem; background: #e4f0ff0a; border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; }
.caption button:hover, .source-actions button:hover, #automatic:not(:disabled):hover { background: #e4f0ff1a; }
button:disabled { opacity: .52; cursor: default; }
aside { padding: 17px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(150deg, #191c25, #111219 65%); }
.source-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.range-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.source-actions button, #automatic { padding: .35rem .55rem; font-size: .86rem; }
#preview {
  display: block;
  width: 100%;
  margin: 11px 0 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  padding: 0;
  background: conic-gradient(#191d27 25%, #202430 0 50%, #191d27 0 75%, #202430 0) 0 0 / 16px 16px;
  cursor: crosshair;
}
#source { display: block; width: 100%; height: auto; }
#source-name { font-size: .9rem; margin: 0 0 4px; overflow-wrap: anywhere; }
#status { min-height: 1.45em; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 18px 0 0; }
legend, .range-label { font-size: .88rem; font-weight: 650; margin: 0 0 7px; }
.segments, .swatches { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--border); background: #07081055; border-radius: 9px; }
.segments label, .swatches label { position: relative; flex: 1; cursor: pointer; min-width: 0; }
fieldset input { position: absolute; opacity: 0; }
fieldset span { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; border-radius: 6px; color: var(--muted); font-size: .82rem; }
fieldset input:checked + span { background: #deeff520; color: #fff; }
fieldset input:focus-visible + span { outline: 2px solid hsl(var(--hue) 95% 80%); }
.swatches i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--chip); }
.drift { --chip: conic-gradient(#7afcff,#df91ff,#ffbe78,#7afcff); }
.ion { --chip: #8bdcff; }
.solar { --chip: #ffca68; }
.rose { --chip: #ff8cbe; }
#background { margin-top: 17px; }
#tolerance { width: 100%; height: 28px; margin: 0 0 6px; accent-color: hsl(var(--hue) 82% 72%); cursor: pointer; }
.privacy { margin-top: 15px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 740px) {
  [data-plasma-work] { padding-top: 17px; }
  [data-plasma-work] > header { padding-bottom: 17px; }
  .workspace { grid-template-columns: 1fr; }
  [data-plasma-work] h1 { font-size: clamp(1.5rem, 6.4vw, 2.35rem); gap: 9px; }
  h1 i { width: 15px; height: 15px; }
  .stage { height: clamp(19rem, 105vw, 26rem); }
  .caption { margin: 9px 0 6px; flex-direction: column; align-items: flex-start; gap: 8px; }
  #spectra span { padding: 0 8px; }
  aside { padding: 14px; }
  #preview { max-width: 340px; }
}
@media (max-width: 355px) {
  #spectra span { padding: 0 6px; }
}

body:has([data-plasma-work]) > header {
  box-sizing: border-box;
  padding-inline: clamp(0.9rem, 4vw, 3rem);
}
body:has([data-plasma-work]) .page-body {
  max-width: none;
  padding: 0;
}
[data-plasma-work] { min-height: calc(100svh - 5rem); }

[data-plasma-work] h1 { color: var(--ink); text-align: start; }
