:root {
  --color-desk: #26241f;
  --color-font: #ece5d7;
  --color-muted: #8f877a;
  --color-icon: #a99f90;
  --color-panel-background: #2d2a26;
  --color-panel-header-background: #272420;
  --color-panel-selected: #3a3630;
  --color-box-background: #38342e;
  --color-input-background: #3a3630;
  --color-header-font: #e8e2d6;
  --color-header-muted: #9a9184;
  --ink: #3b5ea8;
}

*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
}

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

body {
  background: var(--color-desk);
  color: var(--color-font);
  font-family: BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDGothic", meiryo, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

input {
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

svg {
  display: block;
}

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

.Logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 28px;
}
.Logo-Text {
  color: var(--color-header-font);
  font-family: "Rubik Iso", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDGothic", meiryo, sans-serif;
  font-size: 22px;
  line-height: 2;
  font-weight: 400;
  cursor: pointer;
  user-select: 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-header-muted);
  cursor: pointer;
  user-select: none;
}
.PanelControl-Item[data-open] {
  color: var(--color-header-font);
}

.PanelColumn {
  position: absolute;
  left: 0;
  top: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.Panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: max-content;
  background: var(--color-panel-background);
  border-radius: 12px 8px 8px 8px;
  overflow: hidden;
}
.Panel[data-panel]:not([data-open]) {
  display: none;
}
.Panel[data-float] {
  position: fixed;
}
.Panel[data-edge-left] {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.Panel[data-edge-right] {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.Panel[data-edge-top] {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.Panel[data-edge-bottom] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.Panel-Header {
  flex-shrink: 0;
  height: 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  user-select: none;
}
.Panel-Header:active {
  cursor: grabbing;
}
.Panel-CloseIcon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-icon);
  cursor: pointer;
}
.Panel-CloseIcon svg {
  visibility: hidden;
}
.Panel-CloseIcon:hover {
  color: var(--color-font);
}
.Panel-Header:hover .Panel-CloseIcon svg {
  visibility: visible;
}
.Panel-Title {
  display: flex;
  align-items: 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;
}
.Panel-Title[data-end] {
  padding: 0 16px;
}
.Panel-Main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}
.Panel-Handle {
  position: absolute;
  z-index: 1;
}
.Panel-Handle[data-direction=n] {
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  cursor: ns-resize;
}
.Panel-Handle[data-direction=s] {
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  cursor: ns-resize;
}
.Panel-Handle[data-direction=e] {
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
}
.Panel-Handle[data-direction=w] {
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
}
.Panel-Handle[data-direction=ne] {
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  cursor: nesw-resize;
  z-index: 2;
}
.Panel-Handle[data-direction=nw] {
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
  z-index: 2;
}
.Panel-Handle[data-direction=se] {
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
  z-index: 2;
}
.Panel-Handle[data-direction=sw] {
  bottom: 0;
  left: 0;
  width: 12px;
  height: 12px;
  cursor: nesw-resize;
  z-index: 2;
}

.Watercolor[data-fixed] .Panel {
  position: fixed;
  top: 56px;
  right: 0;
  left: auto;
}
.Watercolor[data-fixed] .Panel-Header {
  cursor: default;
}

.ApplicationMenu {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  z-index: 29;
  display: none;
  flex-direction: column;
  width: 300px;
  background: var(--color-panel-background);
  border-radius: 0 12px 0 0;
  overflow-y: auto;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}
.ApplicationMenu[data-open] {
  display: flex;
}
.ApplicationMenu-Section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
}
.ApplicationMenu-Section + .ApplicationMenu-Section {
  border-top: 1px solid #35312b;
}
.ApplicationMenu-Link {
  padding: 0 24px;
}
.ApplicationMenu-Link-Name {
  display: block;
  font-size: 15px;
  line-height: 23px;
  color: var(--color-font);
  text-decoration: none;
}
.ApplicationMenu-Link-Description {
  font-size: 12px;
  line-height: 20px;
  color: var(--color-muted);
}

.ToolList {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.ToolList-Item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 14px;
  cursor: pointer;
  user-select: none;
}
.ToolList-Item[data-current] {
  background: var(--color-panel-selected);
}
.ToolList-Item-Mark {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}
.ToolList-Item-Label {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-font);
}
.ToolList-Item[data-tool=water] .ToolList-Item-Mark, .ToolList-Item[data-tool=eraser] .ToolList-Item-Mark {
  background: none;
  box-shadow: inset 0 0 0 1px var(--color-icon);
}
.ToolList-Item[data-tool=picker] .ToolList-Item-Mark {
  background: none;
  box-shadow: inset 0 0 0 1px var(--ink);
}

.PaintBox {
  display: grid;
  grid-template-columns: repeat(7, 26px);
  grid-auto-rows: 26px;
  gap: 6px;
  padding: 12px 14px;
  background: var(--color-box-background);
}
.PaintBox-Pan, .PaintBox-Pick {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.16s;
}
.PaintBox-Pan::after, .PaintBox-Pick::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 58%);
}
.PaintBox-Pan:hover, .PaintBox-Pick:hover {
  transform: translateY(-2px);
}
.PaintBox-Pan[data-current], .PaintBox-Pick[data-current] {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--color-font);
}
.PaintBox-Pan {
  background: var(--paint-color);
}
.PaintBox-Pick {
  background: conic-gradient(from 0.25turn, #e4572e, #f2d64b, #7fa84a, #4a9dd0, #8a6bbf, #e3849b, #e4572e);
}
.PaintBox-Pick[data-current] {
  background: var(--paint-color);
}
.PaintBox-Picker {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.LayerList {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.LayerList-Item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 14px;
  cursor: pointer;
  user-select: none;
}
.LayerList-Item[data-current] {
  background: var(--color-panel-selected);
}
.LayerList-Item-Mark {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-icon);
}
.LayerList-Item-Label {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-font);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.LayerList-Item[data-hidden] .LayerList-Item-Mark {
  background: none;
  box-shadow: inset 0 0 0 1px var(--color-icon);
}
.LayerList-Item[data-hidden] .LayerList-Item-Label {
  color: var(--color-muted);
}

.LayerAction {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 8px;
}
.LayerAction-Item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--color-icon);
  cursor: pointer;
}
.LayerAction-Item:hover {
  color: var(--color-font);
}

.ActionList {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.ActionList-Item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 14px;
  cursor: pointer;
  user-select: none;
}
.ActionList-Item:hover {
  background: var(--color-panel-selected);
}
.ActionList-Item[data-disabled] {
  opacity: 0.35;
  cursor: default;
}
.ActionList-Item[data-disabled]:hover {
  background: none;
}
.ActionList-Item-Icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-icon);
}
.ActionList-Item-Label {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-font);
}

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

.NumberInput {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
}
.NumberInput-Arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--color-muted);
  cursor: pointer;
}
.NumberInput-Arrow:hover {
  color: var(--color-font);
}
.NumberInput-Field {
  display: flex;
  align-items: center;
  gap: 4px;
}
.NumberInput-Input {
  width: calc(3ch + 16px);
  height: 24px;
  padding: 0 4px;
  border-radius: 2px;
  background: var(--color-input-background);
  color: var(--color-font);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.NumberInput-Input:focus {
  outline: none;
}
.NumberInput-Unit {
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-muted);
}

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

.Toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 40;
  display: none;
  max-width: 70vw;
  padding: 10px 18px;
  background: var(--color-panel-background);
  color: var(--color-font);
  font-size: 13px;
  line-height: 20px;
  border-radius: 8px;
  transform: translateX(-50%);
}
.Toast[data-open] {
  display: block;
}

.Watercolor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--color-desk);
  color: var(--color-font);
  font-family: BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDGothic", meiryo, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

.Stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.Stage-Canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.FileInput {
  display: none;
}