/* One native, touch-scrollable row. The spacers also center the first and last scout. */
#peetje { --scout-slide-width: clamp(140px,40vw,210px); --scout-canvas-width: clamp(180px,52vw,260px); color: var(--ink); font-family: inherit; }
#peetje .section-title { margin: 20px 0 0; }
#peetje .section-title h1 { font: 800 28px/1.2 var(--display-font); letter-spacing: 0; text-transform: none; }
#peetje .section-title p { margin-top: 5px; color: var(--muted); font: 400 14px/1.4 var(--display-font); }
#peetje .avatar-editor { display: block; }
#peetje #avatar-form { min-width: 0; }
#peetje .scout-carousel { position: relative; width: calc(100% + 32px); margin-inline: -16px; }
#peetje #scout-track {
  display: flex; flex-wrap: nowrap; gap: 12px; width: 100%; padding: 16px 0 10px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
#peetje #scout-track::-webkit-scrollbar { display: none; }
#peetje #scout-track::before, #peetje #scout-track::after {
  content: ''; flex: 0 0 max(0px,calc((100% - var(--scout-slide-width))/2 - 12px));
}
#peetje .scout-option {
  position: relative; display: flex; flex-direction: column; align-items: center;
  flex: 0 0 var(--scout-slide-width); width: var(--scout-slide-width); min-width: 0;
  margin: 0; padding: 0 0 12px; gap: 0; border: 0; border-radius: 0;
  background: transparent; color: #c0afca; box-shadow: none; scroll-snap-align: center;
  font-family: inherit; text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#peetje .scout-option:active { transform: none; }
#peetje .scout-option:focus-visible { outline-offset: -4px; border-radius: 3px; }
#peetje .scout-option::after { content: ''; display: block; width: 32px; height: 3px; margin-top: 12px; background: transparent; }
#peetje .scout-option canvas {
  display: block; width: var(--scout-canvas-width); max-width: none; height: auto; aspect-ratio: 6/7;
  image-rendering: pixelated; transform: scale(.8); transform-origin: center bottom;
  opacity: .64; transition: transform .2s ease, opacity .2s ease; pointer-events: none;
}
#peetje .scout-option .scout-name { display: grid; place-items: center; min-height: 2.4em; max-width: 100%; margin: 10px 0 5px; padding: 0 4px; font: 800 18px/1.2 var(--display-font); overflow-wrap: anywhere; }
#peetje .scout-option .unlock-level { display: block; min-height: 18px; font-size: 13px; font-weight: 400; line-height: 1.35; color: #baa8c6; }
#peetje .scout-option.is-active { color: #fff; }
#peetje .scout-option.is-active canvas { transform: scale(1); opacity: 1; }
#peetje .scout-option.is-active::after { background: #b969dd; }
#peetje .scout-option.is-active .unlock-level { color: #e8c8f6; }
#peetje .scout-option.is-locked { cursor: pointer; }
#peetje .scout-option:disabled { cursor: wait; }
#peetje .scout-arrow {
  position: absolute; z-index: 2; top: auto; bottom: -44px; width: 44px; height: 44px; min-height: 44px;
  display: grid; place-items: center; padding: 0; border: 1px solid #514059; border-radius: 3px;
  color: #f5eafa; background: #160f1def; box-shadow: 0 2px 0 #0008;
}
#peetje .scout-arrow svg { width: 25px; height: 25px; }
#peetje .scout-arrow:disabled { opacity: .25; box-shadow: none; cursor: default; }
#peetje #scout-prev { left: 8px; }
#peetje #scout-next-button { right: 8px; }
#peetje .scout-selection { text-align: center; margin: 0 0 18px; }
#peetje #scout-hint { display: flex; align-items: center; justify-content: center; min-height: 44px; padding-inline: 38px; color: #c1afcc; font-size: 13px; line-height: 1.3; }
#peetje .scout-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 12px 0 0; }
#peetje #scout-dots { display: flex; align-items: center; justify-content: center; gap: 8px; }
#peetje .scout-dot { display: block; width: 6px; height: 6px; border: 1px solid #8d729d; border-radius: 50%; background: transparent; }
#peetje .scout-dot.is-active { width: 8px; height: 8px; border-color: #c78be3; background: #c78be3; }
#peetje #scout-position { color: #c1afcc; font-size: 12px; font-variant-numeric: tabular-nums; }
#peetje #scout-preview-status { min-height: 18px; margin-top: 10px; color: #d9b1eb; font-size: 13px; line-height: 1.4; }
#peetje .collection-progress { margin: 0 0 14px; padding: 14px 0; border: 0; border-top: 1px solid #4a3655; border-bottom: 1px solid #4a3655; border-radius: 0; background: transparent; }
#peetje .collection-progress > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#peetje .collection-total { display: flex; gap: 7px; align-items: baseline; }
#peetje #collection-points { font: 800 24px/1.2 var(--display-font); font-variant-numeric: tabular-nums; color: #fff; }
#peetje .collection-progress span { color: #dbcbe5; font-size: 14px; }
#peetje #collection-count { white-space: nowrap; }
#peetje #collection-next { color: #c7b6d2; font-size: 13px; line-height: 1.4; margin-top: 9px; }
#peetje #collection-progress { height: 6px; border-radius: 1px; margin: 12px 0 0; }
#peetje #collection-progress::-webkit-progress-value { background: #a654c9; border-radius: 1px; }
#peetje #collection-progress::-moz-progress-bar { background: #a654c9; border-radius: 1px; }
#peetje .avatar-details { border: 0; border-top: 1px solid var(--rim); border-radius: 0; background: transparent; padding-inline: 0; }
#peetje .avatar-details summary { min-height: 48px; font-size: 15px; }
#peetje .avatar-details summary svg { width: 20px; height: 20px; }
#peetje .avatar-details-content { padding-top: 14px; }
#peetje #avatar-status { min-height: 20px; margin: 12px 0 8px; color: #d4c1df; font-size: 13px; }
#peetje .avatar-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
#peetje .avatar-actions .primary { width: 100%; min-height: 54px; border: 1px solid var(--accent-edge); border-radius: 12px; background: var(--brand-purple); color: #fff; font: 800 16px/1.2 var(--display-font); box-shadow: var(--edge); }
#peetje .avatar-actions .primary svg { width: 18px; height: 18px; }
#peetje .avatar-actions .primary:disabled { opacity: .5; box-shadow: none; }
#peetje .avatar-actions .subtle { min-height: 44px; border: 0; border-radius: 3px; background: transparent; color: #c9b6d4; box-shadow: none; font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  #peetje #scout-track { scroll-behavior: auto; }
  #peetje .scout-option canvas { transition: none; }
}

/* The physical rack enhances the accessible picker once its GLBs are ready. */
#peetje .section-title { display: block; margin: 20px 0 0; text-align: left; }
#peetje .section-title .scout-overview { display: flex; justify-content: flex-start; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-top: 6px; font-size: 14px; }
#peetje .scout-overview #collection-points { color: inherit; font: inherit; font-weight: 600; }
#peetje #scout-3d-stage { width: 100%; height: clamp(300px,96vw,560px); position: relative; isolation: isolate; }
#peetje #scout-rack-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
#peetje #scout-rack-canvas:active { cursor: grabbing; }
#peetje .has-scout-3d #scout-track {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
#peetje .has-scout-3d:has(#scout-track:focus-visible) #scout-3d-stage,
#peetje .has-scout-3d:has(.scout-option:focus-visible) #scout-3d-stage { outline: 2px solid #dca9f4; outline-offset: -4px; }
#peetje .scout-arrow { border-radius: 12px; border-color: var(--rim); background: var(--surface); box-shadow: var(--edge); }
#peetje #scout-prev { left: 18px; }
#peetje #scout-next-button { right: 18px; }
#peetje .scout-selection { margin-bottom: 20px; }
#peetje .scout-pagination { margin-top: 5px; }
#peetje .has-scout-3d ~ .scout-selection .scout-pagination { display: none; }
#peetje .collection-progress.scout-choice { max-width: 500px; margin: 0 auto; padding: 0; border: 0; text-align: center; }
#peetje #avatar-name { display: block; margin: 0; color: var(--ink); font: 800 26px/1.2 var(--display-font); overflow-wrap: anywhere; }
#peetje #scout-preview-status { margin-top: 10px; min-height: 20px; color: var(--muted); font: 600 14px/1.4 var(--display-font); }
#peetje #collection-progress { width: min(100%,400px); height: 9px; margin: 15px auto 7px; border-radius: 5px; background: #312039; }
#peetje #collection-progress::-webkit-progress-bar { background: #312039; border-radius: 5px; }
#peetje #collection-progress::-webkit-progress-value { background: #a64add; border-radius: 5px; }
#peetje #collection-progress::-moz-progress-bar { background: #a64add; border-radius: 5px; }
#peetje #collection-next { margin-top: 7px; color: #c1adce; font-size: 14px; }
#peetje #avatar-status { margin: 12px 0 8px; text-align: center; }
#peetje #avatar-status:empty { display: none; }
#peetje #scout-preview-status:empty,
#peetje #collection-next:empty,
#peetje #aura-unlock:empty { display: none; }
#peetje .avatar-actions { width: 100%; max-width: 560px; margin: 20px auto 0; }
#peetje .avatar-actions .primary { position: relative; min-height: 54px; border-radius: 12px; font: 800 16px/1.2 var(--display-font); }
#peetje #scout-play svg { position: absolute; right: 18px; width: 22px; height: 22px; }
#peetje .avatar-details[hidden], #peetje #avatar-save[hidden], #peetje #scout-play[hidden],
#peetje #avatar-reset[hidden], #peetje #scout-3d-stage[hidden] { display: none; }

/* A permanent unlock meter: an empty patterned rail means progress is unknown. */
#peetje #collection-progress { display: block; appearance: none; width: min(100%,400px); height: 8px; margin: 17px auto 8px; border: 0; border-radius: 4px; background: var(--track); box-shadow: none; overflow: hidden; }
#peetje #collection-progress::-webkit-progress-bar { border-radius: 4px; background: var(--track); }
#peetje #collection-progress::-webkit-progress-value { border-radius: 4px; background: var(--accent-edge); transition: width .3s ease; }
#peetje #collection-progress::-moz-progress-bar { border-radius: 4px; background: var(--accent-edge); }
#peetje #collection-progress[data-state="unknown"] { background: repeating-linear-gradient(120deg,#24172f 0 8px,#32213d 8px 10px); }
#peetje #collection-progress[data-state="unknown"]::-webkit-progress-bar { background: repeating-linear-gradient(120deg,#24172f 0 8px,#32213d 8px 10px); }
#peetje #collection-next { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { #peetje #collection-progress::-webkit-progress-value { transition: none; } }
