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

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

a,
blockquote,
button,
code,
div,
figcaption,
h1,
h2,
h3,
input[type=email],
input[type=text],
input[type=password],
li,
ol,
option,
p,
pre,
select,
span,
strong,
sub,
sup,
td,
textarea,
th,
ul {
  color: #1f1f1f;
}

a,
blockquote,
body,
br,
button,
code,
div,
figure,
figcaption,
h1,
h2,
h3,
html,
iframe,
img,
input,
li,
ol,
option,
p,
pre,
select,
span,
strong,
sub,
sup,
table,
tbody,
td,
th,
thead,
tr,
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: BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDGothic", meiryo, sans-serif;
  font-size: 0;
  line-height: 1;
  -webkit-text-size-adjust: 100%;
}

ol,
ul {
  list-style: none;
}

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

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

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

:root {
  --color-font: #ededed;
  --color-group-header-font: #9a9a9a;
  --color-panel-background: #363636;
  --color-panel-header-background: #323232;
  --color-panel-border: #2e2e2e;
  --color-panel-group-border: #2a2a2a;
  --color-stage-background: #232323;
  --color-input-border: #5a5a5a;
  --color-button-background: #3d3d3d;
  --color-button-border: #4a4a4a;
  --color-button-selected: #505050;
  --color-shape-background: #2b2b2b;
  --color-accent: #2563eb;
  --color-section: #f59e0b;
  --color-point: #34d399;
}

html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--color-stage-background);
}

#app {
  width: 100vw;
  height: 100vh;
}

.SliceStage {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

.VertexLabel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.VertexLabel-Item {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 11px;
  line-height: 1.5;
  font-style: italic;
  color: var(--color-font);
  white-space: nowrap;
  user-select: none;
  text-shadow: 0 0 3px var(--color-stage-background), 0 0 3px var(--color-stage-background), 0 0 3px var(--color-stage-background);
}
.VertexLabel-Item[data-hidden] {
  display: none;
}

.Panel {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 240px;
  max-height: calc(100vh - 32px);
  background: var(--color-panel-background);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.Panel[data-panel=section] {
  top: auto;
  right: auto;
  bottom: 16px;
  left: 16px;
  width: 280px;
}
.Panel-Header {
  height: 32px;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.Panel-Title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  background: var(--color-panel-header-background);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-font);
  border-bottom-right-radius: 12px;
}
.Panel-Main {
  padding: 0 0 6px;
  overflow-y: auto;
  min-height: 0;
}
.Panel-Main[data-mode=angle] [data-group=point] {
  display: none;
}
.Panel-Main[data-mode=point] [data-group=angle] {
  display: none;
}

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

.PanelAction {
  display: flex;
  gap: 6px;
  padding: 6px 12px 8px;
}

.Segment {
  display: flex;
  margin: 8px 12px;
  border: 1px solid var(--color-button-border);
  border-radius: 2px;
  overflow: hidden;
}
.Segment-Button {
  flex: 1;
  height: 26px;
  padding: 0 6px;
  background: var(--color-button-background);
  border-right: 1px solid var(--color-button-border);
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-group-header-font);
  white-space: nowrap;
  user-select: none;
}
.Segment-Button:last-child {
  border-right: 0;
}
.Segment-Button[data-selected] {
  background: var(--color-button-selected);
  color: var(--color-font);
}

.Toggle,
.Action {
  flex: 1;
  height: 26px;
  padding: 0 8px;
  background: var(--color-button-background);
  border: 1px solid var(--color-button-border);
  border-radius: 2px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-group-header-font);
  white-space: nowrap;
  user-select: none;
}

.Toggle[data-selected] {
  background: var(--color-button-selected);
  color: var(--color-font);
}

.Slider {
  display: grid;
  grid-template-columns: 52px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
}
.Slider[data-disabled] {
  opacity: 0.4;
}
.Slider-Label {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
  user-select: none;
}
.Slider-Input[type=range] {
  width: 100%;
  height: 16px;
  background: transparent;
  cursor: pointer;
}
.Slider-Input[type=range]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: var(--color-input-border);
}
.Slider-Input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--color-font);
}
.Slider-Input[type=range]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: var(--color-input-border);
}
.Slider-Input[type=range]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-font);
}
.Slider-Value {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-group-header-font);
  text-align: right;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.Readout {
  padding: 2px 12px 6px;
}
.Readout-Row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}
.Readout-Key {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
}
.Readout-Value {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-section);
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.PointList {
  padding: 2px 12px 0;
}
.PointList-Empty {
  padding: 4px 0 6px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-group-header-font);
}

.PointRow {
  display: grid;
  grid-template-columns: 22px 22px 1fr 34px 18px;
  align-items: center;
  gap: 6px;
  height: 26px;
}
.PointRow-Tag {
  font-size: 10px;
  line-height: 1.5;
  color: var(--color-point);
  user-select: none;
}
.PointRow-Edge {
  font-size: 11px;
  line-height: 1.5;
  font-style: italic;
  color: var(--color-font);
  user-select: none;
}
.PointRow-Input[type=range] {
  width: 100%;
  height: 16px;
  background: transparent;
  cursor: pointer;
}
.PointRow-Input[type=range]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: var(--color-input-border);
}
.PointRow-Input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--color-point);
}
.PointRow-Input[type=range]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: var(--color-input-border);
}
.PointRow-Input[type=range]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-point);
}
.PointRow-Value {
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-group-header-font);
  text-align: right;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.PointRow-Delete {
  font-size: 14px;
  line-height: 1;
  color: var(--color-group-header-font);
  text-align: center;
  user-select: none;
}

.PresetList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 4px;
}
.PresetList-Button {
  height: 24px;
  padding: 0 8px;
  background: var(--color-button-background);
  border: 1px solid var(--color-button-border);
  border-radius: 2px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-group-header-font);
  white-space: nowrap;
  user-select: none;
}

.ShapeView {
  display: block;
  width: calc(100% - 24px);
  aspect-ratio: 1/1;
  margin: 10px 12px 2px;
  background: var(--color-shape-background);
  border-radius: 2px;
}