/* «Аметист» «Сменить одежду» (partials/catalog.html, partials/scene.html): loaded only on a site that has it. Its card
   heads «Фоторедактор» in the grid, ringed in the orange of «+»; opened, the scenario card shows its «Образ» — «Своя
   вещь», then the wardrobe as small tall cards with their names under them; the one picked gets the orange ring and a
   cream tick, a revealing one says so quietly in its corner. The costume picked stands whole on the warm glow on top. */

/* The card: the example (else a hanger on the glow), the name top left, what it does, «от» its price. */
.scard-fit { box-shadow: inset 0 0 0 1.5px var(--flame); cursor: pointer; }
.scard-fit .scard-media:has(> .fit-ph) { background: radial-gradient(90% 70% at 30% 20%, #4a2810, transparent 70%), radial-gradient(80% 70% at 80% 90%, #2a1a0e, transparent 70%), var(--velvet); }
.fit-ph { position: absolute; inset: 0; width: 36%; height: 36%; margin: auto; fill: none; stroke: var(--amber); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.scard-fit .scard-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgb(12 10 9 / .35), transparent 35%, transparent 50%, rgb(12 10 9 / .88)); }
.scard-fit-lead { position: absolute; left: 14px; right: 14px; bottom: 50px; z-index: 2; color: var(--cream); font-size: 13px; line-height: 1.3; text-align: left; }

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

/* The top: the costume picked, whole on the glow; 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: 52px 18px 30px; object-fit: contain; object-position: 50% 50%;
  background: radial-gradient(70% 60% at 50% 42%, #4a2810, transparent 72%), var(--night); }
.fit-chip { position: absolute; bottom: 16px; left: 16px; z-index: 3; width: 22%; max-width: 104px; aspect-ratio: 3 / 4.4; margin: 0; overflow: hidden; border-radius: 16px;
  background: var(--velvet-2); box-shadow: 0 0 0 1.5px var(--flame), 0 10px 26px rgb(0 0 0 / .5); }
.fit-chip img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.fit-chip figcaption { position: absolute; left: 5px; right: 5px; bottom: 5px; overflow: hidden; padding: 2px 8px; border-radius: 999px; background: rgb(16 13 11 / .72); font-size: 11px;
  font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
html:is([data-site-step="upload"], [data-site-step="choose"]) .fit-chip { display: none; }

/* «Образ»: the sections — pills 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: 8px; 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 15px; border: 0; border-radius: 999px;
  background: rgb(247 241 234 / .09); box-shadow: inset 0 0 0 1px var(--line); color: var(--cream); font-size: 14px; font-weight: 500; white-space: nowrap; scroll-snap-align: start; }
.kit-outfit-tab:focus-visible { outline-offset: -2px; }
.kit-outfit-count { color: var(--ash); font-size: 12px; font-weight: 600; }
.kit-outfit-tab[aria-pressed="true"] { background: var(--cream); box-shadow: none; color: #160f08; }
.kit-outfit-tab[aria-pressed="true"] .kit-outfit-count { color: rgb(22 15 8 / .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(--cream); 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: 14px; background: var(--velvet-2); 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%, #3a200d, var(--velvet-2)); }
.kit-outfit:active > img, .kit-outfit:active > .fit-own-icon { transform: scale(.96); }
.kit-outfit-name { display: -webkit-box; overflow: hidden; font-size: 12px; font-weight: 500; 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 6px; border-radius: 999px; background: rgb(16 13 11 / .66); color: var(--ash); font-size: 9.5px; font-weight: 500; line-height: 1.6; }
.kit-outfit[aria-pressed="true"] > img, .kit-outfit[aria-pressed="true"] > .fit-own-icon { box-shadow: 0 0 0 2.5px var(--flame); }
/* The cream tick in the top corner of 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: 5px; left: 5px; z-index: 3; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--cream); box-shadow: 0 2px 8px rgb(0 0 0 / .4); }
.kit-outfit[aria-pressed="true"] .kit-outfit-tick::before { content: ""; width: 9px; height: 5px; margin-top: -2px; border: solid #160f08; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.kit-outfit:focus-visible { outline: none; }
.kit-outfit:focus-visible > img, .kit-outfit:focus-visible > .fit-own-icon { outline: 2px solid var(--cream); outline-offset: 2px; }
/* «Своя вещь»: a dashed orange frame with «+». */
.fit-own-icon { display: grid; place-items: center; background: rgb(255 122 26 / .08); box-shadow: inset 0 0 0 1.5px rgb(255 122 26 / .55); }
.fit-own-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--flame); stroke-width: 2.2; stroke-linecap: round; }
.kit-outfits-note { grid-column: 1 / -1; margin: 0; padding: 14px 12px; border-radius: 16px; background: rgb(247 241 234 / .05); color: var(--ash); font-size: 13.5px; text-align: center; }
.kit-outfits-retry { justify-self: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: rgb(247 241 234 / .09); color: var(--cream); font-weight: 600; }

@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: 60px 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; } }
