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

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

a, button, canvas, div, h1, h2, h3, input, li, ol, option, p, pre, select, span, strong, td, textarea, th, ul {
  color: #ededed;
}

a, button, div, input, li, ol, option, p, select, span, strong, textarea, ul {
  -webkit-appearance: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-size: 100%;
  vertical-align: baseline;
}

html, body {
  overflow: hidden;
}

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

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

ol, ul {
  list-style: none;
}

input[type=file],
input[type=checkbox] {
  display: none;
}

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

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

.Dot {
  width: 100%;
  height: 100vh;
  user-select: none;
}

.Dot-Main {
  position: relative;
  display: flex;
  width: 100%;
  height: 100vh;
  align-items: center;
  justify-content: center;
  background: #3a3a3a;
  overflow: hidden;
}

.Panel {
  position: absolute;
  background: #363636;
  border: 1px solid #2e2e2e;
  border-radius: 2px;
}
.Panel-Header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  width: 100%;
  background: #323232;
  border-bottom: 1px solid #2a2a2a;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.Panel-Header:active {
  cursor: grabbing;
}
.Panel-CloseIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #ededed;
  cursor: pointer;
}
.Panel-CloseIcon svg {
  width: 9px;
}
.Panel-Title {
  color: #ededed;
  font-size: 11px;
  line-height: 1.5;
}
.Panel-Title[data-end] {
  margin-left: auto;
  padding-right: 16px;
}
.Panel-Main {
  padding: 0;
}

.PanelGroup + .PanelGroup {
  border-top: 1px solid #2a2a2a;
}
.PanelGroup-Header {
  display: flex;
  height: 28px;
  padding: 9px 12px 0;
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.5;
}

.ViewPanel {
  min-width: 150px;
}

.FilePanel,
.HistoryPanel {
  min-width: 120px;
}

.SizePanel .StepperInput {
  padding: 8px 12px;
}

.ToolPanel .NumberInput-Input {
  min-width: calc(1ch + 16px);
  max-width: calc(1ch + 16px);
}

.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-Label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 36px;
  padding: 0 12px;
  color: #ededed;
  font-size: 13px;
  line-height: 1.5;
}

.SelectGrid {
  display: grid;
  grid-template-columns: max-content 1fr;
  padding: 8px 12px;
}
.SelectGrid-Row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1/-1;
  align-items: center;
  height: 36px;
  column-gap: 8px;
}
.SelectGrid-Row[data-selected] {
  background-color: #575757;
  border-radius: 2px;
  margin: 0 -4px;
}
.SelectGrid-Row-Label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 32px;
  padding: 0 12px;
  color: #ededed;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}

.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;
  color: #ededed;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}
.SelectList-Item[data-selected] {
  background-color: #575757;
  border-radius: 2px;
}
.SelectList-Item:disabled {
  color: #9a9a9a;
  cursor: default;
  opacity: 0.5;
}

.ViewControl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px;
}
.ViewControl-Item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: 36px;
  padding: 0 12px;
  color: #ededed;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}
.ViewControl-Item[data-selected] {
  background-color: #575757;
  border-radius: 2px;
}
.ViewControl-Item-Check {
  display: flex;
  align-items: center;
  visibility: hidden;
}
.ViewControl-Item[data-selected] .ViewControl-Item-Check {
  visibility: visible;
}

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

.StepperInput {
  display: flex;
  align-items: center;
  gap: 4px;
}
.StepperInput-Arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: #dadada;
  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;
  color: #ededed;
  font-size: 12px;
  line-height: 1.5;
  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;
  color: #ededed;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}
.ToggleInput [data-selected]::before, .ToggleInput [data-selected]::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  pointer-events: none;
}
.ToggleInput [data-selected]::before {
  left: 0;
  border-left: 1px solid #a5a5a5;
  border-top: 1px solid #a5a5a5;
  border-bottom: 1px solid #a5a5a5;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}
.ToggleInput [data-selected]::after {
  right: 0;
  border-right: 1px solid #a5a5a5;
  border-top: 1px solid #a5a5a5;
  border-bottom: 1px solid #a5a5a5;
  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: #dadada;
  cursor: pointer;
}
.NumberInput-Arrow[data-disabled] {
  opacity: 0.3;
  cursor: default;
}
.NumberInput-Field {
  display: flex;
  align-items: center;
  gap: 4px;
}
.NumberInput-Input {
  field-sizing: content;
  min-width: calc(2ch + 16px);
  max-width: calc(8ch + 16px);
  height: 24px;
  padding: 0 4px;
  border: 1px solid #a5a5a5;
  border-radius: 2px;
  background: transparent;
  color: #ededed;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.NumberInput-Input:focus {
  outline: none;
}
.NumberInput-Unit {
  color: #ededed;
  font-size: 12px;
  line-height: 1.5;
  user-select: none;
}

.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-Add {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 12px;
  color: #dadada;
  cursor: pointer;
}
.Palette-Form {
  display: none;
  gap: 8px;
  padding: 16px 16px 0;
}
.Palette-Form[data-open] {
  display: flex;
}
.Palette-Name {
  flex: 1;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #a5a5a5;
  border-radius: 2px;
  background: transparent;
  color: #ededed;
  font-size: 12px;
  line-height: 1.5;
}
.Palette-Name:focus {
  outline: none;
}
.Palette-Register {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #a5a5a5;
  border-radius: 2px;
  color: #ededed;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.Palette-Swatches {
  display: grid;
  grid-template-columns: repeat(8, 20px);
  gap: 8px;
  padding: 16px;
}
.Palette-Swatch {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  cursor: pointer;
}
.Palette-Swatch[data-active]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border: 1px solid #2f2f2f;
  border-radius: 50%;
  pointer-events: none;
}
.Palette-Swatch[data-active][data-dark]::after {
  border-color: #f5f5f5;
}
.Palette-AddColor {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid #a5a5a5;
  border-radius: 2px;
  color: #dadada;
  cursor: pointer;
}

.Stage {
  position: relative;
  flex: none;
  overflow: hidden;
  border-radius: 2px;
  line-height: 0;
}

.Stage-Surface {
  display: block;
  background: #000000;
  image-rendering: pixelated;
  touch-action: none;
  cursor: pointer;
}
.Stage-Surface[data-crosshair] {
  cursor: crosshair;
}

.Stage-Crop {
  position: absolute;
  display: block;
  pointer-events: none;
  border: 1px solid #ff3b30;
  box-sizing: border-box;
}

.Stage-Selection {
  position: absolute;
  display: none;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, #fff 0, #fff 4px, #000 4px, #000 8px, transparent 8px, transparent 10px), repeating-linear-gradient(90deg, #fff 0, #fff 4px, #000 4px, #000 8px, transparent 8px, transparent 10px), repeating-linear-gradient(0deg, #fff 0, #fff 4px, #000 4px, #000 8px, transparent 8px, transparent 10px), repeating-linear-gradient(0deg, #fff 0, #fff 4px, #000 4px, #000 8px, transparent 8px, transparent 10px);
  background-size: 20px 2px, 20px 2px, 2px 20px, 2px 20px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  animation: marching-ants 0.4s linear infinite;
}

@keyframes marching-ants {
  0% {
    background-position: 0 0, 100% 0, 0 100%, 0 0;
  }
  100% {
    background-position: 20px 0, calc(100% - 20px) 0, 0 calc(100% - 20px), 0 20px;
  }
}
.SelectionBar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  transform: translateX(-50%);
  background: #363636;
  border: 1px solid #2e2e2e;
  border-radius: 2px;
}

.SelectionBar-Label {
  color: #9a9a9a;
  font-size: 12px;
}

.SelectionBar-Button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #a5a5a5;
  border-radius: 2px;
  color: #ededed;
  font-size: 12px;
  cursor: pointer;
}
.SelectionBar-Button:disabled {
  color: #9a9a9a;
  opacity: 0.5;
  cursor: default;
}
.SelectionBar-Button[data-warn] {
  border-color: #e06a6a;
  color: #e06a6a;
}

.Layer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 230px;
  padding: 8px 12px;
}
.Layer-Header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.Layer-Add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #dadada;
  cursor: pointer;
}
.Layer-List {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.Layer-Row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #323232;
  cursor: pointer;
}
.Layer-Row[data-active] {
  border-color: #ededed;
  background: #575757;
}
.Layer-Row[data-selected] {
  border-color: #a5a5a5;
  background: #575757;
}
.Layer-Row[data-hidden] {
  opacity: 0.45;
}
.Layer-Visibility {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #9a9a9a;
  cursor: pointer;
}
.Layer-Visibility[data-on] {
  color: #ededed;
}
.Layer-Indicator {
  flex-shrink: 0;
  color: #ededed;
}
.Layer-Thumb {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background: #2a2a2a;
  image-rendering: pixelated;
}
.Layer-Body {
  flex: 1;
  min-width: 0;
}
.Layer-Move {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 2px;
}
.Layer-Move-Button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 13px;
  color: #9a9a9a;
  cursor: pointer;
}
.Layer-Move-Button:not(:disabled):hover {
  color: #ededed;
}
.Layer-Move-Button:disabled {
  opacity: 0.3;
  cursor: default;
}
.Layer-Name {
  overflow: hidden;
  color: #ededed;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.Layer-BlendBadge {
  margin-left: 4px;
  color: #9a9a9a;
  font-size: 11px;
}
.Layer-Rename {
  width: 100%;
  padding: 2px 4px;
  border: 1px solid #a5a5a5;
  border-radius: 2px;
  background: transparent;
  color: #ededed;
  font-size: 12px;
}
.Layer-Controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.Layer-Opacity {
  display: flex;
  align-items: center;
  gap: 4px;
}
.Layer-Opacity-Label {
  color: #9a9a9a;
  font-size: 11px;
}
.Layer-Opacity-Range {
  flex: 1;
  height: 8px;
  accent-color: #a5a5a5;
}
.Layer-Opacity-Value {
  width: 32px;
  color: #ededed;
  font-size: 11px;
  text-align: right;
}
.Layer-Blend {
  width: 100%;
  padding: 4px;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  background: #323232;
  color: #ededed;
  font-size: 12px;
  cursor: pointer;
}
.Layer-Footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #2a2a2a;
}
.Layer-Ops {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}
.Layer-Merge {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.Layer-Op {
  height: 28px;
  padding: 0 6px;
  border-radius: 2px;
  background: #323232;
  color: #ededed;
  font-size: 12px;
  cursor: pointer;
}
.Layer-Op:disabled {
  color: #9a9a9a;
  cursor: default;
  opacity: 0.5;
}
.Layer-Op[data-warn] {
  color: #e06a6a;
}
.Layer-Multi {
  color: #ededed;
  font-size: 11px;
  text-align: center;
}
.Layer-Multi-Clear {
  margin-left: 6px;
  color: #9a9a9a;
  cursor: pointer;
}
.Layer-Locks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.Layer-Lock, .Layer-AlphaLock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  background: #323232;
  color: #ededed;
  font-size: 12px;
  cursor: pointer;
}
.Layer-Lock[data-on], .Layer-AlphaLock[data-on] {
  border-color: #ededed;
  background: #575757;
}

.Confirm {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}

.Confirm-Dialog {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 280px;
  padding: 20px;
  border: 1px solid #2e2e2e;
  border-radius: 2px;
  background: #363636;
}

.Confirm-Message {
  color: #ededed;
  font-size: 13px;
  line-height: 1.6;
}

.Confirm-Buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.Confirm-Button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #a5a5a5;
  border-radius: 2px;
  color: #ededed;
  font-size: 12px;
  cursor: pointer;
}
.Confirm-Button[data-accept] {
  border-color: #e06a6a;
  color: #e06a6a;
}