*,
:before,
::before,
:after,
::after {
  box-sizing: border-box;
}

* {
  border: 0;
  border-radius: 0;
  margin: 0;
  outline: 0;
  padding: 0;
}

a,
button,
div,
h1,
input[type=text],
p,
span {
  color: #e8e4d8;
}

a,
body,
button,
div,
h1,
html,
input,
p,
span {
  -webkit-appearance: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-size: 100%;
  vertical-align: baseline;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0;
  line-height: 1;
  -webkit-text-size-adjust: 100%;
}

a {
  background: transparent;
  font-size: 0;
  margin: 0;
  padding: 0;
  text-decoration: none;
  vertical-align: baseline;
}

svg {
  border: 0;
  stroke-width: 0;
}

input[type=text] {
  background-color: transparent;
}

button {
  cursor: pointer;
  background-color: transparent;
  font-family: inherit;
}

::-webkit-scrollbar {
  display: none;
}

body {
  background: #04060f;
  color: #e8e4d8;
}

.Hanabi {
  --ink: #e8e4d8;
  --ink-mute: rgba(232, 228, 216, 0.62);
  --gold: #d4af37;
  --vermilion: #e0533a;
  --line: rgba(232, 228, 216, 0.12);
  --panel-solid: rgba(10, 14, 32, 0.92);
  --color-font: #ededed;
  --color-group-header-font: #9a9a9a;
  --color-hex: #9a9a9a;
  --color-stepper-icon: #dadada;
  --color-number-icon: #dadada;
  --color-input-border: #a5a5a5;
  --color-panel-background: #363636;
  --color-panel-header-background: #323232;
  --color-panel-border: #2e2e2e;
  --color-panel-group-border: #2a2a2a;
  --color-selected: #575757;
  --color-recording: #d0563a;
}
.Hanabi-Stage {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 100%, #1a1f4a 0%, #0a1024 40%, #04060f 100%);
  cursor: crosshair;
  touch-action: none;
}
.Hanabi-OutputFrame {
  position: fixed;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
.Hanabi-OutputFrame-Label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #04060f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
}
.Hanabi-OutputFrame-Edge {
  position: absolute;
  pointer-events: auto;
}
.Hanabi-OutputFrame-EdgeTop {
  top: -6px;
  left: 0;
  right: 0;
  height: 12px;
  cursor: move;
}
.Hanabi-OutputFrame-EdgeBottom {
  bottom: -6px;
  left: 0;
  right: 0;
  height: 12px;
  cursor: move;
}
.Hanabi-OutputFrame-EdgeLeft {
  top: 0;
  bottom: 0;
  left: -6px;
  width: 12px;
  cursor: move;
}
.Hanabi-OutputFrame-EdgeRight {
  top: 0;
  bottom: 0;
  right: -6px;
  width: 12px;
  cursor: move;
}
.Hanabi-OutputFrame-Corner {
  position: absolute;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.9);
  pointer-events: auto;
}
.Hanabi-OutputFrame-CornerNw {
  top: -7px;
  left: -7px;
  cursor: nwse-resize;
}
.Hanabi-OutputFrame-CornerNe {
  top: -7px;
  right: -7px;
  cursor: nesw-resize;
}
.Hanabi-OutputFrame-CornerSw {
  bottom: -7px;
  left: -7px;
  cursor: nesw-resize;
}
.Hanabi-OutputFrame-CornerSe {
  bottom: -7px;
  right: -7px;
  cursor: nwse-resize;
}
.Hanabi-RecordIndicator {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 15;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--vermilion);
  border-radius: 99px;
  background: rgba(224, 83, 58, 0.15);
  backdrop-filter: blur(10px);
  color: var(--vermilion);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  transform: translateX(-50%);
}
.Hanabi-RecordIndicator[data-show] {
  display: flex;
}
.Hanabi-RecordIndicator-Dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vermilion);
  animation: Hanabi-Pulse 1s ease-in-out infinite;
}
.Hanabi-Hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 5;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--panel-solid);
  backdrop-filter: blur(20px);
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.3s;
}
.Hanabi-Hint[data-show] {
  opacity: 1;
}
.Hanabi-Hint-Key {
  display: inline-block;
  margin: 0 2px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.Hanabi-Toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  z-index: 100;
  padding: 10px 18px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--panel-solid);
  backdrop-filter: blur(20px);
  color: var(--ink);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
  transition: all 0.3s;
}
.Hanabi-Toast[data-show] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes Hanabi-Pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
.HanabiLogo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 28px;
}
.HanabiLogo a {
  color: var(--color-font);
  font-family: "Rubik Iso", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22px;
  line-height: 2;
  text-decoration: none;
}

.PanelControl {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  padding: 0 32px;
}
.PanelControl-Item {
  display: flex;
  align-items: center;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-group-header-font);
  cursor: pointer;
  user-select: none;
}
.PanelControl-Item[data-open] {
  color: var(--color-font);
}

.PanelColumn {
  position: absolute;
  left: 24px;
  top: 56px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}

.SinglePanel {
  position: static;
  width: max-content;
  background: var(--color-panel-background);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px 8px 8px 8px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 0;
  pointer-events: auto;
}
.SinglePanel[data-panel]:not([data-open]) {
  display: none;
}
.SinglePanel[data-float] {
  position: fixed;
}
.SinglePanel-Header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 32px;
  cursor: grab;
  user-select: none;
}
.SinglePanel-Header:active {
  cursor: grabbing;
}
.SinglePanel-Title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  background: var(--color-panel-header-background);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-font);
  border-bottom-right-radius: 12px;
}
.SinglePanel-Title[data-end] {
  padding: 0 16px;
}
.SinglePanel-CloseIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-font);
  cursor: pointer;
}
.SinglePanel-CloseIcon svg {
  width: 9px;
  visibility: hidden;
}
.SinglePanel-CloseIcon:hover svg {
  visibility: visible;
}
.SinglePanel-Main {
  padding: 0;
}

.Hanabi[data-fixed] .SinglePanel {
  position: fixed;
  top: 56px;
  right: 24px;
  left: auto;
}
.Hanabi[data-fixed] .SinglePanel-Header {
  cursor: default;
}

.PanelGroup + .PanelGroup {
  border-top: 1px solid var(--color-panel-group-border);
}
.PanelGroup-Header {
  display: flex;
  height: 28px;
  padding: 9px 12px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-group-header-font);
}

.RightLabelGrid {
  display: grid;
  grid-template-columns: max-content 1fr;
  padding: 8px 12px;
}
.RightLabelGrid-Row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1/-1;
  align-items: center;
  height: 36px;
  column-gap: 8px;
}
.RightLabelGrid-Row[data-hidden] {
  display: none;
}
.RightLabelGrid-Row-Label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
}

.StepperInput,
.ToggleInput,
.ColorInput,
.NumberInput {
  justify-self: start;
}

.SelectList {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
}
.SelectList-Item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
  cursor: pointer;
  user-select: none;
}
.SelectList-Item:hover {
  background-color: var(--color-selected);
  border-radius: 2px;
}
.SelectList-Item[data-recording] {
  color: var(--color-recording);
}

.StepperInput {
  display: flex;
  align-items: center;
  gap: 4px;
}
.StepperInput-Arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px 12px;
  color: var(--color-stepper-icon);
  cursor: pointer;
}
.StepperInput-Arrow[data-disabled] {
  opacity: 0.3;
  cursor: default;
}
.StepperInput-Track {
  display: grid;
  justify-items: center;
}
.StepperInput-Option {
  grid-area: 1/1;
  visibility: hidden;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
  user-select: none;
}
.StepperInput-Option[data-selected] {
  visibility: visible;
}

.ToggleInput {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
.ToggleInput-Option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
  cursor: pointer;
  user-select: none;
}
.ToggleInput-Option[data-selected]::before, .ToggleInput-Option[data-selected]::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  pointer-events: none;
}
.ToggleInput-Option[data-selected]::before {
  left: 0;
  border-left: 1px solid var(--color-input-border);
  border-top: 1px solid var(--color-input-border);
  border-bottom: 1px solid var(--color-input-border);
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}
.ToggleInput-Option[data-selected]::after {
  right: 0;
  border-right: 1px solid var(--color-input-border);
  border-top: 1px solid var(--color-input-border);
  border-bottom: 1px solid var(--color-input-border);
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

.NumberInput {
  display: flex;
  align-items: center;
  gap: 4px;
}
.NumberInput-Arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: var(--color-number-icon);
  cursor: pointer;
}
.NumberInput-Arrow[data-disabled] {
  opacity: 0.3;
  cursor: default;
}
.NumberInput-Field {
  display: flex;
  align-items: center;
  gap: 4px;
}
.NumberInput-Input {
  -webkit-appearance: none;
  appearance: none;
  field-sizing: content;
  min-width: calc(2ch + 16px);
  max-width: calc(8ch + 16px);
  height: 24px;
  padding: 0 4px;
  background: transparent;
  border: 1px solid var(--color-input-border);
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
  text-align: center;
}
.NumberInput-Input:focus {
  outline: none;
}
.NumberInput-Unit {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
  user-select: none;
}

.ColorInput {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  cursor: pointer;
}
.ColorInput-Swatch {
  width: 20px;
  height: 20px;
  border: 1px solid var(--color-input-border);
  border-radius: 2px;
}
.ColorInput-Hex {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--color-hex);
  text-transform: uppercase;
}
.ColorInput-Native {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.Palette {
  display: flex;
  flex-direction: column;
}
.Palette-Bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px 0;
}
.Palette-Stepper {
  flex: 1;
  justify-content: space-between;
}
.Palette-Swatches {
  display: grid;
  grid-template-columns: repeat(8, 20px);
  gap: 8px;
  padding: 16px;
}
.Palette-Swatch {
  width: 20px;
  height: 20px;
  border-radius: 2px;
  cursor: pointer;
}
.Palette-Swatch:hover {
  box-shadow: 0 0 0 2px var(--color-input-border);
}
.Palette-AddColor {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--color-input-border);
  border-radius: 2px;
  color: var(--color-stepper-icon);
  cursor: pointer;
}
.Palette-ColorInput {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.TextBlock {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 260px;
  padding: 16px 18px;
}
.TextBlock h1 {
  color: var(--color-font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.TextBlock p {
  color: var(--color-group-header-font);
  font-size: 13px;
  line-height: 21px;
}
