:root {
  --color-paper: #f7f3e9;
  --color-font: #ece5d7;
  --color-muted: #8f877a;
  --color-icon: #a99f90;
  --color-panel-background: #2d2a26;
  --color-panel-header-background: #272420;
  --color-panel-selected: #3a3630;
  --color-rack-background: #38342e;
  --color-input-background: #3a3630;
  --color-header-font: #2f2b24;
  --color-header-muted: #a39985;
  --ink: #e2483c;
}

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

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

body {
  background: var(--color-paper);
  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;
}

.Crayon[data-fixed] .Panel {
  position: fixed;
  top: 56px;
  right: 0;
  left: auto;
}
.Crayon[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=eraser] .ToolList-Item-Mark {
  background: none;
  box-shadow: inset 0 0 0 1px var(--color-icon);
}

.CrayonRack {
  display: grid;
  grid-template-columns: repeat(7, 22px);
  grid-auto-rows: 54px;
  align-items: end;
  column-gap: 5px;
  row-gap: 4px;
  padding: 10px 14px 12px;
  background: var(--color-rack-background);
}
.CrayonRack-Item, .CrayonRack-Pick {
  position: relative;
  width: 22px;
  height: 46px;
  clip-path: polygon(50% 0, 78% 15%, 78% 100%, 22% 100%, 22% 15%);
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1), filter 0.16s;
}
.CrayonRack-Item::after, .CrayonRack-Pick::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 34%;
  height: 34%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px rgba(0, 0, 0, 0.22), inset 0 -1px rgba(0, 0, 0, 0.22);
}
.CrayonRack-Item:hover, .CrayonRack-Pick:hover {
  transform: translateY(-4px);
  filter: none;
}
.CrayonRack-Item[data-current], .CrayonRack-Pick[data-current] {
  transform: translateY(-8px);
  filter: none;
}
.CrayonRack-Item {
  background: var(--crayon-color);
  filter: brightness(0.86) saturate(0.9);
}
.CrayonRack-Pick {
  background: conic-gradient(from 0.25turn, #e2483c, #f5c93f, #8cc152, #4bb3d8, #8a5bd0, #ef8fb0, #e2483c);
}
.CrayonRack-Pick[data-current] {
  background: var(--crayon-color);
}
.CrayonRack-Picker {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.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);
}

.Crayon {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--color-paper);
  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;
}