/* ===== Grid/List page picker — visual front-end for #designSelect ===== */
.design-select { position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; } /* keep functional but hidden */
.select-wrap .chevron { display: none; }

/* ---- control row: page picker + background, left-aligned over the canvas ---- */
.cb-controls {
  width: 100%; max-width: 25rem; margin: 0 auto 0.5rem;
  display: flex; align-items: center; justify-content: center;
  gap: 0.4rem; flex-wrap: nowrap;
}

.picker-trigger {
  flex: 0 1 auto; min-width: 0; display: flex; align-items: center;
  justify-content: space-between; gap: 0.4rem; cursor: pointer; font-family: inherit;
  font-size: 0.82rem; font-weight: 600; line-height: 1.1; color: #fff;
  background: #221F3D; border: 1px solid #3A3760; border-radius: 0.55rem;
  padding: 0.3rem 0.55rem; transition: border-color .15s ease, transform .1s ease;
}
.picker-trigger .pt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-trigger:hover { border-color: #7EE9D0; }
.picker-trigger:active { transform: scale(0.99); }
.picker-trigger .pt-chev { color: #B7B6D6; flex: none; }

/* ---- mini background dropdown (replaces the 3-way cycling button) ---- */
.bg-select-wrap { position: relative; flex: 0 1 auto; min-width: 0; display: flex; }
.bg-select-wrap[hidden] { display: none; }
.bg-select {
  font-family: inherit; font-size: 0.78rem; font-weight: 600; line-height: 1.1;
  color: #B7B6D6; background: #221F3D; border: 1px solid #3A3760;
  border-radius: 0.55rem; padding: 0.3rem 1.5rem 0.3rem 0.55rem;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  max-width: 100%; text-overflow: ellipsis;
}
.bg-select:hover { border-color: #7EE9D0; }
.bg-select.on { background: #3FE1D0; color: #0B2E2B; border-color: #3FE1D0; }
.bg-select.on ~ .bg-chev { color: #0B2E2B; }
.bg-select option { background: #221F3D; color: #FFFFFF; }
.bg-chev { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: #B7B6D6; }

/* ticker under the canvas */
.cb-ticker { width: 100%; max-width: 25rem; margin: 0 auto 0.55rem; height: 1.5rem;
  display: block; position: relative; overflow: hidden; border-radius: 0.3rem;
  background: rgba(140,255,59,0.06); border: 1px solid rgba(140,255,59,0.18);
  -webkit-mask-image: linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent);
  mask-image: linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent); }
.cb-ticker[hidden] { display: none; }
.cb-ticker-track { position: absolute; top: 0; left: 0; height: 100%; display: flex;
  align-items: center; white-space: nowrap; animation: cb-scroll var(--dur,18s) linear infinite; }
.cb-ticker-track span { padding: 0 1.4rem; font-size: 0.8rem; font-weight: 600;
  color: #8CFF3B; text-shadow: 0 0 6px rgba(140,255,59,.5); }
@keyframes cb-scroll { from { transform: translateX(0);} to { transform: translateX(-50%);} }
@media (prefers-reduced-motion: reduce) {
  .cb-ticker { -webkit-mask-image:none; mask-image:none; }
  .cb-ticker-track { position: static; animation: none; width: 100%; justify-content: center; }
  .cb-ticker-track span:nth-child(2) { display: none; }
}

/* sheet */
.pk-overlay { position: fixed; inset: 0; background: rgba(5,4,15,.8); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.pk-overlay[hidden] { display: none; }
.pk-sheet { width: min(560px,100%); max-height: 92vh; background: #14132A;
  border: 1px solid #3A3760; border-bottom: none; border-radius: 1.1rem 1.1rem 0 0;
  display: flex; flex-direction: column; animation: pk-rise .22s cubic-bezier(.2,.8,.3,1); }
@keyframes pk-rise { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pk-sheet { animation: none; } }
.pk-head { padding: 0.9rem 1rem 0.6rem; border-bottom: 1px solid #3A3760; }
.pk-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.pk-top h2 { margin: 0; font-size: 1.05rem; color: #fff; }
.pk-top .pk-count { font-size: 0.72rem; color: #B7B6D6; font-weight: 500; }
.pk-close { background: none; border: none; color: #B7B6D6; font-size: 1.5rem; line-height: 1;
  cursor: pointer; padding: 0 .25rem; }
.pk-close:hover { color: #fff; }
.pk-chips { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.15rem; scrollbar-width: none; }
.pk-chips::-webkit-scrollbar { display: none; }
.pk-chip { flex: none; font-family: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer;
  background: #221F3D; color: #B7B6D6; border: 1px solid #3A3760; border-radius: 9999px;
  padding: 0.32rem 0.75rem; white-space: nowrap; transition: all .15s ease; }
.pk-chip:hover { color: #fff; }
.pk-chip.on { background: #7EE9D0; color: #062018; border-color: #7EE9D0; }
.pk-tools { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.6rem 1rem; border-bottom: 1px solid #3A3760; }
.pk-shuffle { font-family: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer;
  background: transparent; color: #8CFF3B; border: 1px solid rgba(140,255,59,.4);
  border-radius: 9999px; padding: 0.32rem 0.8rem; transition: all .15s ease; }
.pk-shuffle:hover { background: rgba(140,255,59,.12); }
.pk-seg { display: flex; background: #221F3D; border: 1px solid #3A3760; border-radius: 9999px; padding: 2px; }
.pk-seg button { font-family: inherit; font-size: 0.72rem; font-weight: 600; cursor: pointer;
  background: none; border: none; color: #B7B6D6; border-radius: 9999px; padding: 0.26rem 0.7rem; }
.pk-seg button.on { background: #FF2E88; color: #fff; }
.pk-body { overflow-y: auto; padding: 0.85rem 1rem 1.4rem; flex: 1; }
.pk-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.6rem; }
@media (min-width:520px) { .pk-grid { grid-template-columns: repeat(4,1fr); } }
.pk-group-head { font-size: 0.68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: #7EE9D0; margin: 0.9rem 0 0.5rem; grid-column: 1/-1; }
.pk-group-head:first-child { margin-top: 0; }
.pk-card { display: block; width: 100%; position: relative; cursor: pointer; border: none;
  padding: 0; background: none; font-family: inherit; text-align: left; }
.pk-art { display: block; width: 100%; position: relative; background: #fff; border-radius: 0.6rem;
  overflow: hidden; aspect-ratio: 700/915; border: 2px solid transparent;
  transition: border-color .15s ease, transform .12s ease; }
.pk-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pk-art img.pk-scene { position: absolute; inset: 0; opacity: 0; transition: opacity .28s ease; }
.pk-card.reveal .pk-art img.pk-scene { opacity: 1; }
.pk-card:hover .pk-art { transform: translateY(-3px); border-color: #7EE9D0; }
.pk-card.sel .pk-art { border-color: #FF2E88; box-shadow: 0 0 14px rgba(255,46,136,.5); }
.pk-card.locked .pk-art { filter: opacity(.45); }
.pk-cap { font-size: 0.66rem; color: #B7B6D6; margin-top: 0.3rem; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-card.sel .pk-cap { color: #fff; }
.pk-lock { position: absolute; top: 5px; right: 5px; background: rgba(5,4,15,.82); border-radius: 9999px;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; z-index: 2; }
.pk-badge { position: absolute; bottom: 5px; left: 5px; z-index: 2; cursor: pointer;
  background: rgba(5,4,15,.82); color: #7EE9D0; border: 1px solid rgba(126,233,208,.45);
  border-radius: 9999px; font-size: 0.56rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 2px 6px; font-family: inherit; }
.pk-badge.gated { color: #8CFF3B; border-color: rgba(140,255,59,.45); }
.pk-list { display: flex; flex-direction: column; }
.pk-row { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; width: 100%;
  background: none; border: none; font-family: inherit; text-align: left; color: #fff;
  padding: 0.55rem 0.6rem; border-radius: 0.5rem; transition: background .12s ease; }
.pk-row + .pk-row { border-top: 1px solid rgba(58,55,96,.5); }
.pk-row:hover { background: rgba(255,255,255,.06); }
.pk-row.sel { background: rgba(255,46,136,.16); }
.pk-row .pk-rl { flex: 1; font-size: 0.85rem; font-weight: 600; }
.pk-row .pk-rs { font-size: 0.72rem; color: #B7B6D6; flex: none; }
.pk-row.locked .pk-rl { color: #B7B6D6; }

/* Wavelength pages are titled now; the old number stays as a quiet subtitle so
   nothing gets harder to find. */
.pk-num {
  display: block;
  font-size: 0.56rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6F6D92;
  margin-top: 0.08rem;
}
.pk-card.sel .pk-num { color: #B7B6D6; }
.pk-rnum {
  font-size: 0.62rem;
  color: #6F6D92;
  letter-spacing: 0.04em;
  margin-left: 0.35rem;
}
