:root {
  --color-font: #ededed;
  --color-muted: #8f8f8f;
  --color-group-header-font: #909090;
  --color-icon: #b4b4b4;
  --color-panel-background: #1e1e1e;
  --color-panel-header-background: #181818;
  --color-panel-group-border: #2a2a2a;
  --color-input-background: #2b2b2b;
  --color-item-hover: #272727;
  --color-item-selected: #333333;
  --color-body-background: #141414;
}

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

* {
  margin: 0;
  padding: 0;
}

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

input {
  border: none;
  outline: none;
  font-family: inherit;
  background: transparent;
}

svg {
  display: block;
}

.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-font);
  font-family: "Rubik Iso", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 22px;
  line-height: 2;
  cursor: pointer;
  user-select: none;
}

.ApplicationMenu {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  z-index: 35;
  display: none;
  flex-direction: column;
  width: 300px;
  background: var(--color-panel-background);
  border-radius: 0 8px 0 0;
  overflow-y: scroll;
  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 var(--color-panel-group-border);
}
.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-group-header-font);
}

.FractalEditor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--color-body-background);
  color: var(--color-font);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
.FractalEditor-Stage {
  position: absolute;
  inset: 0;
  cursor: grab;
}
.FractalEditor-Canvas {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
}

.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-muted);
  cursor: pointer;
  user-select: none;
}
.PanelControl-Item[data-open] {
  color: var(--color-font);
}

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

.SinglePanel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: max-content;
  background: var(--color-panel-background);
  border-radius: 12px 8px 8px 8px;
  overflow: hidden;
}
.SinglePanel[data-panel]:not([data-open]) {
  display: none;
}
.SinglePanel[data-float] {
  position: fixed;
}
.SinglePanel[data-edge-left] {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.SinglePanel[data-edge-right] {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.SinglePanel[data-edge-top] {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.SinglePanel[data-edge-bottom] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.SinglePanel-Header {
  flex-shrink: 0;
  height: 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  user-select: none;
}
.SinglePanel-Header:active {
  cursor: grabbing;
}
.SinglePanel-CloseIcon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-icon);
  cursor: pointer;
}
.SinglePanel-CloseIcon svg {
  visibility: hidden;
}
.SinglePanel-CloseIcon:hover svg {
  visibility: visible;
}
.SinglePanel-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;
}
.SinglePanel-Title[data-end] {
  padding: 0 16px;
}
.SinglePanel-Main {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 90px);
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}

.ChildPanel {
  position: fixed;
  display: none;
  width: max-content;
  background: var(--color-panel-background);
  border-radius: 8px;
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}
.ChildPanel[data-open] {
  display: block;
}

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

.ActionList {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.ActionList-Row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 30px;
  padding: 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.ActionList-Row[data-selected] {
  color: var(--color-font);
}

.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;
  gap: 12px 16px;
  padding: 16px;
}
.RightLabelGrid-Row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1/-1;
  align-items: center;
}
.RightLabelGrid-Row-Label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
}
.RightLabelGrid-Row-Value {
  display: flex;
  align-items: center;
  gap: 8px;
}
.RightLabelGrid-Row-Unit {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-group-header-font);
  user-select: none;
}

.ShapeList {
  display: flex;
  flex-direction: column;
  padding: 8px 4px;
}
.ShapeList-Item {
  display: flex;
  align-items: stretch;
  border-radius: 2px;
}
.ShapeList-Item:hover {
  background-color: var(--color-item-hover);
}
.ShapeList-Item[data-active] {
  background-color: var(--color-item-selected);
}
.ShapeList-Select {
  flex: 1;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
  text-align: left;
  user-select: none;
}
.ShapeList-Sample {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  color: var(--color-icon);
}
.ShapeList-Sample:hover {
  color: var(--color-font);
}
.ShapeList-Sample svg {
  width: 14px;
}

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

.RoundNumberInput {
  justify-self: start;
  display: flex;
  height: 24px;
  border-radius: 12px;
  background: var(--color-input-background);
  overflow: hidden;
}
.RoundNumberInput-Previous, .RoundNumberInput-Next {
  flex-shrink: 0;
  width: 12px;
  cursor: pointer;
}
.RoundNumberInput-Input {
  flex-shrink: 0;
  width: 40px;
  background: transparent;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
  text-align: center;
}
.RoundNumberInput-Input:focus {
  outline: none;
}

.RoundStepperInput {
  justify-self: start;
  display: flex;
  height: 24px;
  border-radius: 12px;
  background: var(--color-input-background);
  overflow: hidden;
}
.RoundStepperInput-Previous, .RoundStepperInput-Next {
  flex-shrink: 0;
  width: 12px;
  cursor: pointer;
}
.RoundStepperInput-Track {
  display: grid;
  align-items: center;
  justify-items: center;
  min-width: 64px;
  padding: 0 4px;
}
.RoundStepperInput-Option {
  grid-area: 1/1;
  visibility: hidden;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
  user-select: none;
}
.RoundStepperInput-Option[data-selected] {
  visibility: visible;
}

.ViewStatus {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 32px;
}

.ZoomControl {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ZoomControl-Unit {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
  user-select: none;
}

.FractalGalleryPage {
  display: flex;
  height: 100vh;
  background: radial-gradient(120% 120% at 50% 0%, #16202c 0%, #0a0e14 70%);
  color: #dce8f4;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.FractalGalleryPage-Sidebar {
  flex-shrink: 0;
  width: 210px;
  height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 20px 12px;
  border-right: 1px solid rgba(120, 160, 200, 0.16);
  background: rgba(18, 26, 36, 0.82);
}
.FractalGalleryPage-Main {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 32px;
}
.FractalGalleryPage-Title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 10px;
  color: #dff1ff;
}
.FractalGalleryPage-Lead {
  font-size: 14px;
  line-height: 1.7;
  color: #9bb3cc;
  margin-bottom: 6px;
  max-width: 720px;
}
.FractalGalleryPage-Hint {
  font-size: 13px;
  line-height: 1.6;
  color: #5cc8ff;
  margin-bottom: 24px;
}
.FractalGalleryPage-Nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.FractalGalleryPage-Nav-Item {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #dce8f4;
  text-decoration: none;
  border-radius: 4px;
}
.FractalGalleryPage-Nav-Item:hover {
  background: rgba(92, 200, 255, 0.14);
}
.FractalGalleryPage-Nav-Item[data-active] {
  color: #07151f;
  background: #5cc8ff;
}

.FractalGallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  max-width: 1000px;
}
.FractalGallery-Cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.FractalGallery-Frame {
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(120, 160, 200, 0.16);
}
.FractalGallery-Frame svg {
  display: block;
  width: 100%;
  height: 100%;
}
.FractalGallery-Actions {
  display: flex;
  gap: 4px;
}
.FractalGallery-Button {
  flex: 1;
  height: 26px;
  font-size: 11px;
  color: #dce8f4;
  background: rgba(10, 16, 22, 0.6);
  border: 1px solid rgba(120, 160, 200, 0.16);
  border-radius: 3px;
  cursor: pointer;
}
.FractalGallery-Button:hover {
  border-color: rgba(92, 200, 255, 0.3);
}
.FractalGallery-Button[data-edit] {
  color: #07151f;
  background: #5cc8ff;
  border-color: #5cc8ff;
}

@media (max-width: 760px) {
  .FractalGalleryPage {
    flex-direction: column;
    height: auto;
  }
  .FractalGalleryPage-Sidebar {
    width: 100%;
    height: auto;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid rgba(120, 160, 200, 0.16);
  }
  .FractalGalleryPage-Nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
  }
  .FractalGalleryPage-Nav-Item {
    flex-shrink: 0;
  }
  .FractalGalleryPage-Main {
    height: auto;
    padding: 20px;
  }
  .FractalGallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }
}
body {
  background: radial-gradient(120% 120% at 50% 0%, #16202c 0%, #0a0e14 70%);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
