.lyf-universe {
  position: fixed;
  inset: 0;
  z-index: 16000;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  color: #eaf7f4;
  background: #050b0e;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility .24s ease;
}

.lyf-universe.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.lyf-universe-open {
  overflow: hidden;
}

.lyf-universe-bar {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(126, 220, 207, .2);
  background: rgba(5, 11, 14, .92);
  backdrop-filter: blur(16px);
}

.lyf-universe-brand {
  min-width: 180px;
}

.lyf-universe-brand strong,
.lyf-universe-brand span {
  display: block;
}

.lyf-universe-brand strong {
  font-size: .92rem;
}

.lyf-universe-brand span {
  margin-top: 3px;
  color: rgba(234, 247, 244, .45);
  font: 600 .58rem ui-monospace, Consolas, monospace;
}

.lyf-universe-search {
  width: min(460px, 45vw);
  height: 38px;
  margin-left: auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(126, 220, 207, .24);
  background: rgba(255, 255, 255, .035);
}

.lyf-universe-search input {
  width: 100%;
  min-width: 0;
  color: #eaf7f4;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: .76rem;
}

.lyf-universe-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: rgba(234, 247, 244, .66);
  border: 1px solid rgba(126, 220, 207, .2);
  border-radius: 4px;
  background: transparent;
}

.lyf-universe-icon:hover,
.lyf-universe-icon:focus-visible {
  color: #79ead8;
  border-color: #79ead8;
  outline: 0;
}

.lyf-universe-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.lyf-universe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.lyf-universe-canvas:active {
  cursor: grabbing;
}

.lyf-universe-hud {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  gap: 14px;
  color: rgba(234, 247, 244, .5);
  font: 600 .62rem ui-monospace, Consolas, monospace;
  pointer-events: none;
}

.lyf-universe-hud b {
  color: #79ead8;
  font-weight: 700;
}

.lyf-universe-detail {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: min(340px, calc(100vw - 40px));
  max-height: calc(100% - 40px);
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(126, 220, 207, .22);
  background: rgba(7, 15, 18, .84);
  backdrop-filter: blur(16px);
}

.lyf-universe-kind {
  color: #79ead8;
  font: 700 .62rem ui-monospace, Consolas, monospace;
}

.lyf-universe-detail h2 {
  margin: 8px 0 10px;
  color: #f4f8f7;
  font-size: 1.35rem;
  line-height: 1.3;
}

.lyf-universe-detail p {
  margin: 0;
  color: rgba(234, 247, 244, .66);
  font-size: .8rem;
  line-height: 1.72;
}

.lyf-universe-topics {
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lyf-universe-topics span {
  padding: 4px 7px;
  color: #d9b8ff;
  border: 1px solid rgba(217, 184, 255, .24);
  background: rgba(217, 184, 255, .06);
  font-size: .62rem;
}

.lyf-universe-open-link {
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #07110f;
  border-radius: 4px;
  background: #79ead8;
  text-decoration: none;
  font-size: .74rem;
  font-weight: 700;
}

.lyf-universe-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  color: rgba(234, 247, 244, .56);
  background: #050b0e;
  font: 600 .72rem ui-monospace, Consolas, monospace;
  transition: opacity .2s ease;
}

.lyf-universe-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 700px) {
  .lyf-universe {
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .lyf-universe-bar {
    padding: 0 10px;
    gap: 7px;
  }

  .lyf-universe-brand {
    min-width: 0;
    margin-right: auto;
  }

  .lyf-universe-brand span,
  .lyf-universe-search i {
    display: none;
  }

  .lyf-universe-search {
    width: min(145px, 38vw);
    margin-left: 0;
  }

  .lyf-universe-detail {
    top: auto;
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    max-height: 38%;
    padding: 15px;
  }

  .lyf-universe-detail h2 {
    font-size: 1rem;
  }

  .lyf-universe-hud {
    top: 12px;
    bottom: auto;
    left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lyf-universe {
    transition: none;
  }
}

@media print {
  .lyf-universe {
    display: none !important;
  }
}
