.items-page {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.items-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px;
}

.item-stage {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: space-around;
  position: relative;
  min-height: 560px;
  isolation: isolate;
  height: calc(100svh - 52px);
  overflow: hidden;
}

.items-intro {
  position: relative;
  top: 31%;
  left: 50%;
  width: min(340px, calc(100% - 32px));
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
  margin-bottom: 48px;
  flex: 0 0 100%;
}

.item-stage.is-ready { display: block; }
.item-stage:not(.is-ready) .items-intro { top: auto; left: auto; transform: none; margin-top: 40px; }
.is-ready .items-intro { position: absolute; margin-bottom: 0; }
.is-ready .item { position: absolute; }

.items-intro h1 { margin: 0 0 12px; }
.items-intro p { margin: 0; }

.item {
  position: relative;
  width: var(--item-width);
  max-width: 30%;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #555;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 174px;
  object-fit: contain;
  pointer-events: none;
}

.item:focus-visible { outline: 1px dotted #00e; outline-offset: 4px; }

.item-panel {
  position: absolute;
  z-index: 10000;
  box-sizing: border-box;
  width: 264px;
  max-width: calc(100% - 24px);
  padding: 12px;
  border: 1px solid #000;
  background: #fff;
}

.item-panel-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.item-panel h2 { margin: 0; font-size: 13px; }
.item-panel p { margin: 12px 0 0; }
.item-panel-heading button { padding: 0; border: 0; background: none; color: #00e; text-decoration: underline; cursor: pointer; }

.items-page noscript { display: block; padding: 16px; }

@media (max-width: 600px) {
  .items-header { padding: 12px; }
  .item-stage { height: calc(100svh - 44px); min-height: 570px; }
  .items-intro { top: 35%; width: calc(100% - 48px); }
  .item { width: calc(var(--item-width) * .82); }
  .item img { max-height: 140px; }
}
