.fml-kit-preview {
    --kit-width: 88px;
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    width: var(--kit-width);
    padding-block: 3px;
    filter: drop-shadow(0 2px 2px #16192236);
}
.fml-kit-shirt-slot {
    position: relative;
    display: grid;
    place-items: end center;
    width: 100%;
    aspect-ratio: 88 / 112;
    z-index: 1;
}
.fml-kit-shirt,
.fml-kit-shorts,
.fml-kit-socks > span {
    display: block;
    position: relative;
    isolation: isolate;
}
.fml-kit-shirt {
    --pattern: linear-gradient(transparent, transparent);
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 16%, #fff4, transparent 42%),
        linear-gradient(95deg, #0003, transparent 26% 74%, #0004),
        var(--pattern),
        var(--fml-kit-shirt);
    clip-path: polygon(32% 3%, 40% 0, 60% 0, 68% 3%, 83% 8%, 91% 13%, 95% 22%, 100% 42%, 84% 48%, 81% 44%, 80% 36%, 80% 59%, 82% 82%, 84% 97%, 77% 99%, 65% 100%, 35% 100%, 23% 99%, 16% 97%, 18% 82%, 20% 59%, 20% 36%, 19% 44%, 16% 48%, 0 42%, 5% 22%, 9% 13%, 17% 8%);
}
.fml-kit-preview[data-style="vertical"] .fml-kit-shirt {
    --pattern: repeating-linear-gradient(90deg, transparent 0 10%, var(--fml-kit-accent) 10% 20%);
}
.fml-kit-preview[data-style="horizontal"] .fml-kit-shirt {
    --pattern: repeating-linear-gradient(transparent 0 12%, var(--fml-kit-accent) 12% 24%);
}
.fml-kit-preview[data-style="sash"] .fml-kit-shirt {
    --pattern: linear-gradient(133deg, transparent 38%, var(--fml-kit-accent) 38% 53%, transparent 53%);
}
.fml-kit-preview[data-style="contrast-sleeves"] .fml-kit-shirt {
    --pattern: linear-gradient(102deg, var(--fml-kit-accent) 21%, transparent 21%), linear-gradient(258deg, var(--fml-kit-accent) 21%, transparent 21%);
}
.fml-kit-shirt::before {
    content: "";
    position: absolute;
    width: 30%;
    height: 11%;
    top: -3%;
    left: 35%;
    border: max(2px, calc(var(--kit-width) * .033)) solid var(--fml-kit-accent);
    border-radius: 0 0 50% 50%;
    background: #181923;
    box-shadow: inset 0 -2px 3px #0007, 0 1px 0 #fff5;
    box-sizing: border-box;
}
.fml-kit-shirt::after {
    content: "";
    position: absolute;
    inset: 1% 19% 2%;
    border: 1px solid #0003;
    border-radius: 38% 38% 12% 12% / 12% 12% 3% 3%;
    box-shadow: inset 0 1px 0 #fff5, 0 1px 0 #fff3;
    pointer-events: none;
}
.fml-kit-shorts {
    width: 79%;
    aspect-ratio: 1.58;
    margin-top: -3%;
    border-radius: 7% 7% 13% 13%;
    background:
        radial-gradient(ellipse at 50% 34%, #0005, transparent 50%),
        linear-gradient(109deg, #0004, #fff2 24%, transparent 43%, #0003 51%, #fff2 71%, #0004),
        var(--fml-kit-shorts);
    clip-path: polygon(9% 0, 91% 0, 94% 18%, 97% 51%, 100% 91%, 98% 94%, 92% 97%, 83% 99%, 71% 100%, 61% 99%, 55% 95%, 50% 51%, 45% 95%, 39% 99%, 29% 100%, 17% 99%, 8% 97%, 2% 94%, 0 91%, 3% 51%, 6% 18%);
}
.fml-kit-shorts::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--kit-short-trim, none);
}
.fml-kit-shorts::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(#0004 0 11%, #fff3 11% 12.5%, transparent 12.5%),
        linear-gradient(100deg, #0004, transparent 16% 85%, #0003);
    box-shadow: inset 0 -2px 0 #0003;
}
.fml-kit-preview[data-shorts-style="side-stripes"] .fml-kit-shorts {
    --kit-short-trim: linear-gradient(95deg, transparent 7.7%, var(--fml-kit-shorts-accent) 8% 10%, transparent 10.3%),
        linear-gradient(265deg, transparent 7.7%, var(--fml-kit-shorts-accent) 8% 10%, transparent 10.3%),
        linear-gradient(transparent 93%, var(--fml-kit-shorts-accent) 93%);
}
.fml-kit-preview[data-shorts-style="contrast-hem"] .fml-kit-shorts {
    --kit-short-trim: linear-gradient(transparent 89%, var(--fml-kit-shorts-accent) 89%);
}
.fml-kit-preview[data-shorts-style="side-panels"] .fml-kit-shorts {
    --kit-short-trim: linear-gradient(95deg, var(--fml-kit-shorts-accent) 16%, transparent 16%),
        linear-gradient(265deg, var(--fml-kit-shorts-accent) 16%, transparent 16%);
}
.fml-kit-preview[data-shorts-style="contrast-waist"] .fml-kit-shorts {
    --kit-short-trim: linear-gradient(var(--fml-kit-shorts-accent) 0 13%, transparent 13%);
}
.fml-kit-socks {
    display: flex;
    justify-content: space-between;
    width: 59%;
    aspect-ratio: 1 / 1.11;
    margin-top: 3%;
}
.fml-kit-socks > span {
    width: 35%;
    height: 100%;
    background:
        radial-gradient(ellipse at 52% 89%, #fff3, transparent 45%),
        linear-gradient(96deg, #0005, #fff2 31%, transparent 59%, #0004),
        var(--kit-sock-trim, linear-gradient(transparent, transparent)),
        var(--fml-kit-socks);
    clip-path: polygon(12% 3%, 25% 1%, 44% 0, 66% 0, 86% 1%, 96% 4%, 93% 12%, 99% 25%, 100% 36%, 96% 45%, 85% 57%, 78% 67%, 77% 74%, 82% 80%, 88% 85%, 88% 91%, 83% 95%, 71% 98%, 56% 100%, 31% 100%, 15% 98%, 6% 95%, 0 91%, 1% 87%, 10% 82%, 20% 77%, 24% 70%, 26% 62%, 25% 55%, 18% 44%, 12% 37%, 9% 30%, 9% 21%, 12% 12%);
}
.fml-kit-socks > span:nth-child(2) { transform: scaleX(-1); }
.fml-kit-socks > span::before {
    content: "";
    position: absolute;
    inset: 1% 5% auto 12%;
    height: 5%;
    border-radius: 50%;
    background: #12182187;
    box-shadow: 0 1px 0 #fff4;
}
.fml-kit-preview[data-socks-style="contrast-cuff"] .fml-kit-socks {
    --kit-sock-trim: linear-gradient(transparent 4%, var(--fml-kit-socks-accent) 4% 15%, transparent 15%);
}
.fml-kit-preview[data-socks-style="double-hoops"] .fml-kit-socks {
    --kit-sock-trim: linear-gradient(transparent 7%, var(--fml-kit-socks-accent) 7% 12%, transparent 12% 16%, var(--fml-kit-socks-accent) 16% 21%, transparent 21%);
}
.fml-kit-preview[data-socks-style="hoops"] .fml-kit-socks {
    --kit-sock-trim: linear-gradient(var(--fml-kit-socks) 0 6%, transparent 6% 54%, var(--fml-kit-socks) 54%),
        repeating-linear-gradient(transparent 0 8%, var(--fml-kit-socks-accent) 8% 16%);
}
.fml-kit-preview[data-socks-style="contrast-foot"] .fml-kit-socks {
    --kit-sock-trim: linear-gradient(transparent 76%, var(--fml-kit-socks-accent) 76%);
}
.fml-kit-tile,
.fml-apertura .fml-apertura-body .fml-kit-tile {
    display:grid;
    justify-items:center;
    gap:4px;
    align-content:center;
    width:max-content;
    min-width:108px;
    max-width:100%;
    margin:0;
    padding:8px 12px;
    border:1px solid #dedfe1;
    border-radius:10px;
    background:#f7f7f8;
}
.fml-kit-tile figcaption {color:#414550;font-size:.78rem;font-weight:750}
.fml-kit-team-summary {
    display:flex;
    align-items:start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}
.fml-kit-team-summary > div {min-width:0}
.fml-kit-gallery > div {display:flex;flex-wrap:wrap;gap:8px}
.fml-kit-editors {display:grid;gap:12px}
.fml-kit-editor {
    display:grid;
    grid-template-columns:minmax(132px, 1fr) minmax(0, 2fr);
    align-items:start;
    gap:10px 16px;
    border:1px solid #dedfe1;
    border-radius:10px;
    padding:clamp(10px,3vw,18px);
    background:#f7f7f8;
}
.fml-kit-editor-preview {
    display:grid;
    place-items:center;
    align-self:stretch;
    padding:18px 10px;
    border:1px solid #dedfe1;
    border-radius:10px;
    background:#fff;
}
.fml-kit-editor h4,
.fml-kit-actions {grid-column:1/-1;margin:0}
.fml-kit-editor-preview .fml-kit-preview { --kit-width: 148px; max-width: 100%; }
.fml-kit-fields { display: grid; gap: 12px; min-width: 0; }
.fml-kit-garment {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-width: 0;
    margin: 0;
    padding: 8px 12px 12px;
    border: 1px solid #dedfe1;
    border-radius: 8px;
    background: #fff;
}
.fml-kit-garment legend { padding-inline: 5px; font-size: .88rem; font-weight: 750; }
.fml-kit-fields label { display: grid; gap: 4px; min-width: 0; font-size: .82rem; font-weight: 750; }
.fml-kit-fields .fml-kit-style { flex: 1 1 130px; }
.fml-kit-fields .fml-kit-socks-choice { display: flex; align-items: center; flex: 1 0 100%; }
.fml-kit-socks-choice input[type="checkbox"] { margin: 0; }
.fml-kit-garment :disabled { opacity: .48; }
.fml-kit-fields select,
.fml-kit-fields input[type="color"] { box-sizing: border-box; min-width: 0; min-height: 44px; margin: 0; }
.fml-kit-fields select { width: 100%; }
.fml-kit-fields input[type="color"] { width: 55px; padding: 4px; }
.fml-kit-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.fml-kit-editor .fml-kit-actions button {min-height:44px;border-radius:6px;padding:5px 12px}
.fml-kit-editor .fml-kit-actions .fml-kit-remove {background:#fff;color:#161922}
@media (max-width: 600px) {
    .fml-kit-team-summary { flex-wrap: wrap; }
    .fml-kit-editor { grid-template-columns: minmax(0, 1fr); }
    .fml-kit-editor-preview .fml-kit-preview { --kit-width: 124px; }
}

.fml-kit-editor [hidden],
.fml-kit-preview [hidden] {display:none}
.fml-kit-preview .fml-kit-shirt-photo:not([hidden]) {
    display:block;
    position:absolute;
    bottom: -14.5%;
    left: 50%;
    transform: translateX(-50%);
    width: 153%;
    max-width: none;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}
.fml-kit-search {
    grid-column:1/-1;
    min-width:0;
    margin:0;
    padding:10px 12px 12px;
    border:1px solid #dedfe1;
    border-radius:8px;
    background:#fff;
}
.fml-kit-search legend {padding:0 5px;font-size:.88rem;font-weight:750}
.fml-kit-search-controls,
.fml-kit-search-results {display:flex;flex-wrap:wrap;align-items:end;gap:8px 12px}
.fml-kit-search-results {margin-top:8px}
.fml-kit-search label {display:grid;gap:4px;min-width:0;font-size:.82rem;font-weight:750}
.fml-kit-search label:first-child {flex:1 1 240px}
.fml-kit-search input,
.fml-kit-search select {width:100%;min-width:0;min-height:44px;margin:0}
.fml-kit-search button {min-height:44px;border-radius:6px;padding:5px 12px}
.fml-kit-search-status {margin:8px 0 0;color:#414550;font-size:.84rem}
.fml-kit-search-status:empty {display:none}
.fml-kit-import-note {display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:.82rem;color:#414550}
.fml-kit-import-note strong {flex-basis:100%;overflow-wrap:anywhere;color:#161922}
.fml-kit-import-note button {
    min-height:44px;
    padding:0 4px;
    border:0;
    background:transparent;
    color:#161922;
    font:inherit;
    font-weight:750;
    text-decoration:underline;
}
