/* SELVO gear, round 14: placeholder cards until real gear photos exist, colour dots on the gear cards,
   faster glides on the gear page pickers. Black and white, nothing teleports. */
@property --g1 { syntax: '<color>'; inherits: true; initial-value: #1a1a1b; }

/* ---------- placeholder card: calm grey, the S mark, the item name, the colourway ---------- */
.pp.gx { position: relative; display: block; container-type: inline-size; background: color-mix(in srgb, var(--g1) 6%, #eeede9); }
.pp.gx .gx-in { position: absolute; inset: 0 0 6% 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 3.4cqi, 16px); padding-inline: 8%; }
.pp.gx .gx-m { display: block; width: clamp(28px, 13cqi, 58px); height: auto; flex: none; }
.pp.gx .gx-n { max-width: 100%; text-align: center; font: 500 clamp(11px, 3.9cqi, 15px)/1.3 'Satoshi', sans-serif; letter-spacing: .01em; color: rgba(29, 29, 31, .52); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp.gx .gx-c { position: absolute; left: clamp(10px, 4.6cqi, 20px); bottom: clamp(9px, 4.2cqi, 18px); display: flex; align-items: center; gap: clamp(6px, 2cqi, 9px); font: 500 clamp(10.5px, 3.2cqi, 13px)/1 'Satoshi', sans-serif; color: rgba(29, 29, 31, .5); }
.pp.gx .gx-c i { width: clamp(9px, 3.2cqi, 13px); aspect-ratio: 1; border-radius: 3px; background: var(--g1); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
@container (max-width: 170px) { .pp.gx .gx-n, .pp.gx .gx-c { display: none; } .pp.gx .gx-in { inset: 0; } }
.pt-card:hover .pp.gx, .gs-card:hover .pp.gx { background: color-mix(in srgb, var(--g1) 10%, #e6e5e2); }
.pt-card:active .pp.gx { opacity: .92; }
.pp.gx { transition: --g1 .4s cubic-bezier(.22, 1, .36, 1), background-color .3s linear, opacity .15s linear; }
/* dark mode: the page is inverted, so the card follows the page (a dark grey step) and only the colour chip turns back */
.pp.gx .gx-cn { font: inherit; color: inherit; }
html.dark .pp.gx { filter: none; background: color-mix(in srgb, var(--g1) 6%, #e8e8e9); }
html.dark .pt-card:hover .pp.gx, html.dark .gs-card:hover .pp.gx { background: color-mix(in srgb, var(--g1) 8%, #e2e2e3); }
html.dark .pp.gx .gx-c i { filter: invert(1) hue-rotate(180deg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
/* swatches keep their real colour in dark mode; a light hairline keeps black visible on the dark ground */
html.dark .pt-card .cdr .cd::before, html.dark #gdSw button { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
html.dark #gdSw .ring { box-shadow: inset 0 0 0 2px var(--ink); }
/* a real photo (selvo/img/gear-<id>.webp) fills the card */
.pp.gp:not(.gx) { background: #efefed; }
.pp.gp:not(.gx) img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }

/* ---------- colour dots on the gear cards (the ring glides) ---------- */
.pt-card .ch { align-items: center; }
.pt-card .cdr { position: relative; display: inline-flex; align-items: center; margin-left: -4px; }
.pt-card .cdr .cd { position: relative; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; display: grid; place-items: center; cursor: pointer; align-self: center; }
.pt-card .cdr .cd::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); transition: opacity .15s linear; }
.pt-card .cdr .cd:active::before { opacity: .7; }
.pt-card .cdr .ring { position: absolute; top: 0; left: 0; width: 22px; height: 22px; margin: 4px 0 0 4px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink); pointer-events: none; transition: transform .22s cubic-bezier(.22, 1, .36, 1); }

/* ---------- gear page pickers glide in about 200 ms ---------- */
#gdSw .ring { transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
#gdSz .seg .thumb { transition: transform .22s cubic-bezier(.22, 1, .36, 1), width .22s cubic-bezier(.22, 1, .36, 1); }
main:has(#gdSw) #ptFilter .thumb { transition: transform .22s cubic-bezier(.22, 1, .36, 1), width .22s cubic-bezier(.22, 1, .36, 1); }
#gdSw button { transition: opacity .15s linear; } #gdSw button:active { opacity: .75; }
.pt-drawer .dpic .pp.gx.big { aspect-ratio: 4 / 3; }

/* ---------- reduced motion: indicators fade instead of gliding ---------- */
@media (prefers-reduced-motion: reduce) {
  .pp.gx { transition: --g1 .15s linear, background-color .15s linear; }
  .pt-card .cdr .ring, #gdSw .ring { display: none; }
  .pt-card .cdr .cd { transition: box-shadow .15s linear; } .pt-card .cdr .cd[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); } html.dark .pt-card .cdr .cd[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px #fff; }
  #gdSw button { transition: box-shadow .15s linear; } #gdSw button[aria-pressed="true"], html.dark #gdSw button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
  #gdSz .seg .thumb, main:has(#gdSw) #ptFilter .thumb { display: none; }
  #gdSz .seg button, main:has(#gdSw) #ptFilter button { transition: background-color .15s linear, color .15s linear; }
  #gdSz .seg button[aria-selected="true"], main:has(#gdSw) #ptFilter button[aria-selected="true"] { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
}
