/* «Леденец» «Сменить одежду» (partials/catalog.html, partials/scene.html): loaded only on a site that has it. Its card heads
   «Фоторедактор» in «Примеры»; opened, the scenario card shows its «Образ» — «Своя вещь», then the wardrobe as small
   frames with their names under them, as a mode's variants stand; the one picked gets a pink ring and a pink dot, a
   revealing one says so quietly. The costume picked stands in the card's frame. */

/* The card: the example (else a hanger in the frame), its kind, name, what it does and «от» its price. */
.card-fit .card-media { box-shadow: inset 0 0 0 1.5px var(--rose); }
.card-fit .card-media.is-empty { background: radial-gradient(80% 70% at 50% 35%, var(--veil-3), var(--veil)); }
.card-fit .card-media > .ph { width: 40%; height: 40%; stroke: rgb(var(--glow-rgb) / .55); }
.card-fit .card-title { overflow-wrap: normal; hyphens: manual; }

/* Only the card opened from it has «Образ». */
.sheet-scene:not([data-outfit="yes"]) .scene-fit { display: none; }
.scene-fit { margin-top: 2px; }

/* The card's frame: the costume picked, whole on a soft light; the result over it, the costume small in its corner. */
.free-shot > .fit-look { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; padding: 18px 18px 30px; object-fit: contain; object-position: 50% 50%;
  background: radial-gradient(70% 60% at 50% 40%, var(--veil-3), var(--sky) 75%); }
.fit-chip { position: absolute; left: 22px; bottom: 22px; z-index: 5; width: 22%; max-width: 104px; aspect-ratio: 3 / 4.4; margin: 0; overflow: hidden; border-radius: 12px;
  background: var(--veil); box-shadow: 0 0 0 1.5px rgb(var(--glow-rgb) / .55), 0 8px 22px rgb(0 0 0 / .45); }
.fit-chip img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.fit-chip figcaption { position: absolute; left: 4px; right: 4px; bottom: 4px; overflow: hidden; padding: 1px 6px; border-radius: 6px; background: var(--shade); color: var(--glow);
  font: 700 10px/1.5 var(--mono); white-space: nowrap; text-overflow: ellipsis; }
/* Until a run: the costume fills the frame, no chip over it. */
html:is([data-site-step="upload"], [data-site-step="choose"]) .fit-chip { display: none; }

/* «Образ»: the sections — chips in one line that scrolls sideways —, then the tiles, four in a row on a phone. */
.fit-wardrobe { display: grid; gap: 10px; min-width: 0; }
.kit-outfit-tabs { display: flex; gap: 6px; margin: 0 -14px; padding: 2px 14px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  scroll-padding-inline: 14px; }
.kit-outfit-tabs::-webkit-scrollbar { display: none; }
.kit-outfit-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px 0 14px; border: 0; border-radius: 10px; background: var(--veil-2);
  color: var(--glow); font-size: 13.5px; font-weight: 700; white-space: nowrap; scroll-snap-align: start; }
.kit-outfit-tab:focus-visible { outline-offset: -2px; }
.kit-outfit-count { color: var(--mist); font: 700 11px/1 var(--mono); }
.kit-outfit-tab[aria-pressed="true"] { background: var(--glow); color: var(--ink); }
.kit-outfit-tab[aria-pressed="true"] .kit-outfit-count { color: rgb(var(--ink-rgb) / .6); }

.kit-outfit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 12px 8px; }
.kit-outfit { position: relative; display: grid; align-content: start; gap: 5px; min-width: 0; padding: 0; border: 0; background: none; color: var(--glow); text-align: left; cursor: pointer; }
.kit-outfit:disabled { cursor: default; }
.kit-outfit > img, .fit-own-icon { display: block; width: 100%; aspect-ratio: 3 / 4; height: auto; border-radius: 11px; background: var(--sky); object-fit: cover; object-position: 50% 18%;
  transition: transform .15s; }
.kit-outfit:not(.has-example) > img { object-fit: contain; padding: 4px; background: radial-gradient(80% 70% at 50% 40%, var(--veil-3), var(--sky)); }
.kit-outfit:active > img, .kit-outfit:active > .fit-own-icon { transform: scale(.96); }
.kit-outfit-name { display: -webkit-box; overflow: hidden; font-size: 11.5px; font-weight: 750; line-height: 1.2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; hyphens: auto; }
.kit-outfit-mark { position: absolute; top: 4px; right: 4px; z-index: 1; padding: 0 4px; border-radius: 5px; background: var(--shade); color: var(--mist); font: 700 8.5px/1.6 var(--mono);
  letter-spacing: .02em; text-transform: uppercase; }
.kit-outfit[aria-pressed="true"] > img, .kit-outfit[aria-pressed="true"] > .fit-own-icon { box-shadow: 0 0 0 2.5px var(--rose); }
/* A pink dot on the tile picked (kit-outfit-tick: the kit's empty mark). */
.kit-outfit-tick { display: none; }
.kit-outfit[aria-pressed="true"] .kit-outfit-tick { position: absolute; top: 6px; left: 6px; z-index: 2; display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--rose);
  box-shadow: 0 0 0 2px rgb(var(--ink-rgb) / .7); }
.kit-outfit:focus-visible { outline: none; }
.kit-outfit:focus-visible > img, .kit-outfit:focus-visible > .fit-own-icon { outline: 2px solid var(--glow); outline-offset: 2px; }
/* «Своя вещь»: a dashed frame with «+», as a frame waiting for its shot. */
.fit-own-icon { display: grid; place-items: center; background: rgb(var(--glow-rgb) / .045); box-shadow: inset 0 0 0 1.5px rgb(var(--glow-rgb) / .35); }
.fit-own-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--glow); stroke-width: 2; stroke-linecap: round; }
.kit-outfits-note { grid-column: 1 / -1; margin: 0; padding: 14px 12px; border-radius: 12px; background: rgb(var(--glow-rgb) / .045); color: var(--mist); font-size: 13.5px; text-align: center; }
.kit-outfits-retry { justify-self: center; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--veil-2); color: var(--glow); font-weight: 700; }

@media (min-width: 420px) { .kit-outfit-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); } }
@media (min-width: 1000px) {
  .free-shot > .fit-look { padding: 34px 34px 46px; }
  .fit-chip { max-width: 124px; }
  .kit-outfit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .kit-outfit > img, .fit-own-icon { transition: none; } }
