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

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

body {
  background: linear-gradient(180deg, #0e1420 0%, #070a11 100%);
  --color-font: #e8edf3;
  --color-muted: #8d97ad;
  --color-panel-background: #131924;
  --color-panel-header-background: #19202c;
  --color-card: #1d2532;
  --color-field-border: #2a3444;
  --color-selection: #8fe3ea;
  color: var(--color-font);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body[data-drag] {
  cursor: grabbing;
}

input {
  font-family: inherit;
}

svg {
  display: block;
}

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

.Logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 24px;
}
.Logo-Text {
  color: var(--color-font);
  font-family: "Quicksand", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDGothic", meiryo, sans-serif;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
}

.ApplicationMenu {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  z-index: 40;
  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;
}
.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-card);
}
.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);
}

.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;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 21px;
  cursor: pointer;
  user-select: none;
  transition: color 0.18s;
}
.PanelControl-Item[data-open] {
  color: var(--color-font);
}

.Panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: max-content;
  background: var(--color-panel-background);
  border-radius: 12px;
  overflow: hidden;
}
.Panel[data-hidden] {
  display: none;
}
.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;
  touch-action: none;
}
.Panel-Header:active {
  cursor: grabbing;
}
.Panel-CloseIcon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  color: var(--color-muted);
  cursor: pointer;
}
.Panel-Header:hover .Panel-CloseIcon {
  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-muted);
  border-bottom-right-radius: 12px;
}
.Panel-Title[data-end] {
  padding: 0 16px;
}
.Panel-Main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.Panel-Handle {
  position: absolute;
  z-index: 3;
}
.Panel-Handle[data-direction=n] {
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  cursor: ns-resize;
}
.Panel-Handle[data-direction=s] {
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  cursor: ns-resize;
}
.Panel-Handle[data-direction=e] {
  top: 0;
  bottom: 0;
  right: 0;
  width: 4px;
  cursor: ew-resize;
}
.Panel-Handle[data-direction=w] {
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  cursor: ew-resize;
}
.Panel-Handle[data-direction=ne] {
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  cursor: nesw-resize;
}
.Panel-Handle[data-direction=nw] {
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  cursor: nwse-resize;
}
.Panel-Handle[data-direction=se] {
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  cursor: nwse-resize;
}
.Panel-Handle[data-direction=sw] {
  bottom: 0;
  left: 0;
  width: 10px;
  height: 10px;
  cursor: nesw-resize;
}

.Dna[data-fixed] .Panel {
  top: 56px;
  right: 24px;
  left: auto;
  width: max-content;
  height: auto;
  max-height: calc(100vh - 56px - 172px);
}
.Dna[data-fixed] .Panel .Panel-Header {
  cursor: default;
}
.Dna[data-fixed] .Panel .Panel-Handle {
  display: none;
}

.SequencePanel,
.PairPanel,
.DisplayPanel {
  max-height: calc(100vh - 56px - 172px);
}

.ActionList {
  display: flex;
  flex-direction: column;
  padding: 8px 6px;
}

.ActionItem {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.ActionItem[data-active], .ActionItem[data-selected] {
  color: var(--color-selection);
}

.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: 16px;
}
.RightLabelGrid-Row[data-clickable] {
  cursor: pointer;
}
.RightLabelGrid-Label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted);
  padding: 0 4px;
}

.ValueText {
  justify-self: start;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-font);
  font-variant-numeric: tabular-nums;
}

.CheckInput {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-field-border);
  border-radius: 2px;
  cursor: pointer;
}
.CheckInput svg {
  visibility: hidden;
}
.CheckInput[data-checked] {
  background: var(--color-font);
  border-color: var(--color-font);
  color: var(--color-panel-background);
}
.CheckInput[data-checked] svg {
  visibility: visible;
}

.SequenceInput {
  justify-self: start;
  width: 22ch;
  height: 26px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--color-field-border);
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--color-font);
}
.SequenceInput:focus {
  border-color: var(--color-selection);
}

.NumberField {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 6px;
}
.NumberField-Unit {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-muted);
  user-select: none;
  white-space: nowrap;
}

.RoundNumberInput {
  display: flex;
  height: 24px;
  border-radius: 12px;
  background: var(--color-card);
  overflow: hidden;
}
.RoundNumberInput-Previous, .RoundNumberInput-Next {
  flex-shrink: 0;
  width: 12px;
  cursor: pointer;
}
.RoundNumberInput-Input {
  flex-shrink: 0;
  width: 32px;
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-font);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.RoundNumberInput-Input:focus {
  outline: none;
}

.BaseSelect {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 4px 14px 14px;
}
.BaseSelect-Item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  background: var(--color-card);
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--base-color);
  cursor: pointer;
  user-select: none;
}
.BaseSelect-Item[data-current] {
  background: color-mix(in srgb, var(--base-color) 22%, var(--color-card));
}

.PairDetail {
  display: flex;
  flex-direction: column;
  width: 232px;
  padding: 12px 14px 4px;
}
.PairDetail-Index {
  padding-bottom: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}
.PairDetail-Node {
  display: flex;
  align-items: center;
  gap: 10px;
}
.PairDetail-Glyph {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: color-mix(in srgb, var(--base-color) 16%, transparent);
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--base-color);
}
.PairDetail-Body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.PairDetail-Name {
  font-size: 13px;
  line-height: 18px;
  color: var(--color-font);
}
.PairDetail-Kind {
  font-size: 11px;
  line-height: 16px;
  color: var(--color-muted);
}
.PairDetail-Bond {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 26px;
}
.PairDetail-Rung {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 100%;
}
.PairDetail-Rung span {
  display: block;
  width: 1px;
  height: 100%;
  background: var(--color-muted);
}
.PairDetail-BondText {
  font-size: 11px;
  line-height: 16px;
  color: var(--color-muted);
}

.LadderBar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 172px;
  background: var(--color-panel-background);
}
.LadderBar-Head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 24px;
  padding: 0 20px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-muted);
  user-select: none;
}
.LadderBar-Direction {
  display: flex;
  align-items: center;
  gap: 6px;
}
.LadderBar-Strand {
  color: var(--color-font);
}
.LadderBar-Note {
  color: var(--color-muted);
}
.LadderBar-Viewport {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.SequenceLadder {
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

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

.Legend {
  position: fixed;
  left: 0;
  bottom: 172px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 12px 20px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-muted);
  pointer-events: none;
  user-select: none;
}
.Legend-Item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.Legend-Chip {
  display: block;
  width: 8px;
  height: 8px;
  background: var(--legend-color);
  border-radius: 2px;
}
.Legend-Bar {
  display: block;
  width: 14px;
  height: 2px;
  background: var(--legend-color);
  border-radius: 1px;
}

.UsagePanel .Panel-Main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

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

.Dna {
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: var(--color-font);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
.Dna-Canvas {
  display: block;
  touch-action: none;
  cursor: grab;
}