:root {
  color-scheme: dark;
  --paper: #050507;
  --ink: #f5efe4;
  --muted: rgba(245, 239, 228, 0.56);
  --rule: rgba(245, 239, 228, 0.18);
  --gold: #d7a340;
  font-family: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body,
.shell {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  overscroll-behavior: none;
  touch-action: none;
}

.shell {
  position: fixed;
  inset: 0;
}

.viz {
  position: absolute;
  top: calc(58px + env(safe-area-inset-top));
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(100vh - 58px - env(safe-area-inset-top));
  border: 0;
  background: #050507;
}

.meta {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  left: 54px;
  right: 54px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  pointer-events: none;
}

.meta__left,
.meta__right {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.meta__plate {
  color: var(--ink);
}

.meta__name,
.kbd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta__sep {
  color: var(--gold);
}

.kbd {
  border: 1px solid var(--rule);
  padding: 1px 5px;
  letter-spacing: 0.12em;
}

.constellation {
  position: absolute;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.constellation a {
  color: rgba(245, 239, 228, 0.46);
  text-decoration: none;
  border: 1px solid transparent;
  padding: 4px 6px;
  background: rgba(5, 5, 7, 0.32);
}

.constellation a:hover {
  color: var(--ink);
  border-color: var(--rule);
}

html[data-shell="native"] .constellation {
  display: none;
}

.is-viz-fullscreen .viz {
  top: 0;
  height: 100vh;
}

.is-viz-fullscreen .meta,
.is-viz-fullscreen .constellation {
  display: none;
}

@media (max-width: 760px) {
  .viz {
    top: calc(74px + env(safe-area-inset-top));
    bottom: 0;
    height: calc(100vh - 74px - env(safe-area-inset-top));
  }

  .meta {
    left: 18px;
    right: 18px;
    top: 14px;
    align-items: flex-start;
    font-size: 9px;
    letter-spacing: 0.2em;
  }

  .meta__left {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .meta__name {
    display: none;
  }

  .meta__right {
    display: none;
  }

  .constellation {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .meta__right,
  .constellation {
    display: none;
  }
}
