.nmc-shell {
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0;
}

.nmc-intro {
  max-width: 54rem;
  margin-bottom: 2rem;
}

.nmc-intro h1 {
  max-width: 13ch;
}

.nmc-intro .lede {
  max-width: 47rem;
}

.nmc-catalog-state {
  display: inline-flex;
  margin-top: 1.25rem;
  border: 1px solid rgba(48, 179, 174, .38);
  border-radius: 999px;
  background: rgba(48, 179, 174, .1);
  padding: .55rem .9rem;
  color: #b8f0eb;
  font-size: .83rem;
  font-weight: 800;
}

.nmc-catalog {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: clamp(1.25rem, 3vw, 2rem);
  background: rgba(9, 29, 36, .88);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .28);
}

.nmc-toolbar {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .025);
}

.nmc-pills {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .2rem;
  scrollbar-width: thin;
}

.nmc-pills button,
.nmc-modes button,
.nmc-reset {
  flex: 0 0 auto;
  min-height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  padding: .58rem .95rem;
  color: #dce8e7;
  font-size: .84rem;
  font-weight: 800;
}

.nmc-pills button:hover,
.nmc-modes button:hover,
.nmc-reset:hover {
  border-color: rgba(245, 196, 107, .75);
  color: #ffe2a8;
}

.nmc-pills button.active,
.nmc-modes button.active {
  border-color: #f5c46b;
  background: #f5c46b;
  color: #07151a;
}

.nmc-browser {
  display: grid;
  min-height: 43rem;
}

.nmc-list-panel {
  min-width: 0;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.nmc-search-label {
  display: grid;
  gap: .45rem;
  color: #dce8e7;
  font-size: .8rem;
  font-weight: 850;
}

.nmc-search {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: .85rem;
  background: #06171d;
  padding: .7rem .85rem;
  color: #fff;
  outline: none;
}

.nmc-search:focus {
  border-color: #30b3ae;
  box-shadow: 0 0 0 4px rgba(48, 179, 174, .12);
}

.nmc-result-count {
  margin: .75rem 0;
  color: #8fa7aa;
  font-size: .78rem;
  font-weight: 800;
}

.nmc-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 15rem);
  gap: .65rem;
  overflow-x: auto;
  padding-bottom: .55rem;
}

.nmc-asset {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  width: 100%;
  border: 1px solid transparent;
  border-radius: .95rem;
  background: rgba(255, 255, 255, .035);
  padding: .55rem;
  color: #fff;
  text-align: left;
}

.nmc-asset:hover,
.nmc-asset.active {
  border-color: rgba(48, 179, 174, .72);
  background: rgba(48, 179, 174, .1);
}

.nmc-asset img {
  width: 4.4rem;
  height: 3.25rem;
  border-radius: .65rem;
  background: #08181e;
  object-fit: cover;
}

.nmc-asset span,
.nmc-asset strong,
.nmc-asset small {
  display: block;
  min-width: 0;
}

.nmc-asset strong {
  overflow: hidden;
  font-size: .88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nmc-asset small {
  margin-top: .2rem;
  color: #91a8aa;
  font-size: .73rem;
}

.nmc-detail,
.nmc-empty {
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem);
}

.nmc-empty {
  display: grid;
  min-height: 24rem;
  place-items: center;
  color: #91a8aa;
  text-align: center;
}

.nmc-empty[hidden] {
  display: none;
}

.nmc-detail-heading {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.nmc-breadcrumb {
  margin: 0 0 .35rem;
  color: #f5c46b;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.nmc-quality-badge {
  display: inline-flex;
  margin-top: .65rem;
  border: 1px solid rgba(245, 196, 107, .38);
  border-radius: 999px;
  background: rgba(245, 196, 107, .09);
  padding: .35rem .65rem;
  color: #ffe2a8;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.nmc-detail h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1;
}

.nmc-detail-description {
  max-width: 50rem;
  margin: .7rem 0 0;
  color: #afc1c2;
  line-height: 1.65;
}

.nmc-modes {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.nmc-viewer {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  min-height: 17rem;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at 65% 28%, rgba(48, 179, 174, .16), transparent 37%),
    linear-gradient(145deg, #07171d, #0c2831);
}

.nmc-viewer canvas,
.nmc-viewer img {
  width: 100%;
  height: 100%;
}

.nmc-viewer canvas {
  cursor: grab;
  touch-action: none;
}

.nmc-viewer canvas:active {
  cursor: grabbing;
}

.nmc-viewer img {
  object-fit: cover;
}

.nmc-viewer-message {
  position: absolute;
  z-index: 2;
  max-width: 24rem;
  border-radius: .75rem;
  background: rgba(4, 15, 19, .82);
  padding: .75rem 1rem;
  color: #dce8e7;
  font-size: .85rem;
  text-align: center;
}

.nmc-viewer-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .65rem;
  margin: .8rem .15rem 1.35rem;
  color: #91a8aa;
  font-size: .76rem;
}

.nmc-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: 0;
}

.nmc-facts div {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: .9rem;
  background: rgba(255, 255, 255, .03);
  padding: .85rem;
}

.nmc-facts dt {
  color: #829a9d;
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nmc-facts dd {
  overflow-wrap: anywhere;
  margin: .38rem 0 0;
  color: #e7f0ef;
  font-size: .83rem;
  line-height: 1.45;
}

.nmc-failed .nmc-catalog {
  border-color: rgba(248, 113, 113, .5);
}

@media (min-width: 760px) {
  .nmc-toolbar {
    padding: 1.25rem;
  }

  .nmc-detail-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (min-width: 980px) {
  .nmc-browser {
    grid-template-columns: 18rem minmax(0, 1fr);
  }

  .nmc-list-panel {
    border-right: 1px solid rgba(255, 255, 255, .09);
    border-bottom: 0;
  }

  .nmc-list {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    max-height: 46rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: .35rem;
  }
}

@media (max-width: 520px) {
  .nmc-shell {
    width: min(100% - 1rem, 80rem);
  }

  .nmc-facts {
    grid-template-columns: 1fr;
  }

  .nmc-viewer {
    min-height: 14rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nmc-pills button,
  .nmc-modes button,
  .nmc-reset,
  .nmc-asset {
    transition: none;
  }
}
