/* ==========================================================================
   FiveMRides Livery Studio ([fivem_livery_studio])
   Scoped to .fls. Brand: neon synthwave (cyan #00f0ff, pink #ff2f9e,
   purple #a855f7 on deep navy), same tokens as optimizer.css (--fro-*).
   Upload step lives in the page flow; pick + paint run as a full screen app.
   Shared Studio components (top bar, buttons, cards, fields, viewport frame,
   rail, upload hero, toasts) live in fmr-studio-ui.css (.fsu-*), loaded first;
   this sheet keeps the Livery-specific layout and widgets.
   ========================================================================== */

.fls {
    /* aliases of the shared Studio tokens (fmr-studio-ui.css, root class .fsu) */
    --bg: var(--fsu-bg);
    --bg2: var(--fsu-bg2);
    --panel: var(--fsu-panel);
    --panel2: var(--fsu-panel2);
    --panel3: var(--fsu-panel3);
    --line: var(--fsu-line);
    --line2: var(--fsu-line2);
    --text: var(--fsu-text);
    --muted: var(--fsu-muted);
    --dim: var(--fsu-dim);
    --cyan: var(--fsu-cyan);
    --pink: var(--fsu-pink);
    --purple: var(--fsu-purple);
    --good: var(--fsu-good);
    --warn: var(--fsu-warn);
    --bad: var(--fsu-bad);
    --grad: var(--fsu-grad);
    --r: var(--fsu-r);
    --r-sm: var(--fsu-r-sm);
    --r-xs: var(--fsu-r-xs);
    --shadow: var(--fsu-shadow);
    --ease: var(--fsu-ease);
    color: var(--text);
    font: 500 13px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    position: relative;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    text-align: left;
}
.fls *, .fls *::before, .fls *::after { box-sizing: border-box; }
.fls [hidden] { display: none !important; }
:where(.fls) button { font: inherit; color: inherit; }
/* theme guards: the site skin styles bare buttons, headings and inputs */
.fls button { text-transform: none; letter-spacing: normal; text-shadow: none; min-height: 0; min-width: 0; margin: 0; line-height: 1.2; }
.fls button:focus { outline: none; }
.fls button:focus-visible { outline: 2px solid rgba(0, 240, 255, .7); outline-offset: 2px; }
.fls a { color: var(--cyan); }
.fls a.fls-btn { color: var(--text); }
.fls a.fls-btn-primary { color: #fff; }
.fls h1, .fls h2, .fls h3 { margin: 0; color: var(--text); letter-spacing: 0; text-transform: none; }
.fls p { margin: 0; }
.fls kbd { font: 600 10px/1 "JetBrains Mono", ui-monospace, monospace; }
html.fls-lock, html.fls-lock body { overflow: hidden !important; }


/* ---------------------------------------------------------------- app shell */
.fls { display: flex; flex-direction: column; min-height: 720px; }
.fls:not(.is-app) { min-height: max(720px, calc(100vh - var(--fls-offset, 160px))); }
.fls.is-app {
    position: fixed; inset: 0; z-index: 2147483000; min-height: 0; height: 100vh; height: 100dvh;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(168, 85, 247, .10), transparent 60%),
        radial-gradient(900px 500px at 100% 120%, rgba(0, 240, 255, .06), transparent 60%),
        var(--bg);
}
.fls-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fls-stage { flex: 1; min-height: 0; }

/* ------------------------------------------------------------------ top bar */
/* top bar, brand, logo, beta, steps, spacer, credits: shared (.fsu-top ...) */
.fls:not(.is-app) .fls-top { border-radius: var(--r) var(--r) 0 0; }
.fls:not(.is-app) .fls-back { visibility: hidden; }
.fls-model { display: flex; align-items: baseline; gap: 7px; padding: 6px 11px; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); white-space: nowrap; }
.fls-model small { color: var(--dim); font: 600 10px/1 "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.fls-model code { font: 600 12.5px/1 "JetBrains Mono", monospace; color: var(--cyan); background: none; padding: 0; }
.fls-save { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; color: var(--muted); }
.fls-save .fls-i { width: 15px; height: 15px; }
.fls-save.is-ok .fls-i { color: var(--good); }
.fls-save.is-saving .fls-i { color: var(--cyan); animation: fls-pulse 1s infinite; }
.fls-save.is-off .fls-i { color: var(--warn); }

/* buttons, icon buttons and chips: shared (.fsu-btn / .fsu-iconbtn / .fsu-chip) */

/* --------------------------------------------------------------- upload step */
.fls-stage-upload { padding: 34px clamp(16px, 4vw, 56px) 48px; overflow: auto; background:
    radial-gradient(700px 380px at 82% 10%, rgba(255, 47, 158, .10), transparent 65%),
    radial-gradient(700px 420px at 10% 90%, rgba(0, 240, 255, .07), transparent 65%); }
.fls:not(.is-app) .fls-stage-upload { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r); }
/* hero, eyebrow, two-tone title, lead, check chips, drop card: shared (.fsu-hero ...) */
.fls-progress { width: 100%; max-width: 440px; display: grid; gap: 16px; text-align: left; position: relative; }
.fls-progress-file { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-weight: 700; font-size: 15px; }
.fls-progress-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fls-progress-file small { color: var(--muted); font-weight: 500; }
.fls-progress-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fls-progress-steps li { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; color: var(--dim); font-weight: 600; transition: color .3s; }
.fls-progress-steps i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); position: relative; transition: all .3s; }
.fls-progress-steps li.is-on { color: var(--text); }
.fls-progress-steps li.is-on i { border-color: var(--cyan); border-top-color: transparent; animation: fls-spin .8s linear infinite; }
.fls-progress-steps li.is-done { color: #c7d0dd; }
.fls-progress-steps li.is-done i { border-color: var(--good); background: var(--good); }
.fls-progress-steps li.is-done i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #06110c; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fls-progress-steps b { font: 600 12px/1 "JetBrains Mono", monospace; color: var(--muted); }
.fls-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.fls-bar > div { height: 100%; width: 0; border-radius: inherit; background: var(--grad); box-shadow: 0 0 16px rgba(255, 47, 158, .5); transition: width .25s var(--ease); position: relative; overflow: hidden; }
.fls-bar > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: fls-shine 1.4s infinite; }
.fls-progress-msg { color: var(--muted); font-size: 12.5px; min-height: 18px; }
.fls-progress-msg.is-error { color: var(--bad); }
.fls-progress .fls-btn { justify-self: start; }
.fls-restore {
    max-width: 1280px; margin: 26px auto 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r);
    border: 1px solid rgba(0, 240, 255, .3); background: linear-gradient(90deg, rgba(0, 240, 255, .08), rgba(168, 85, 247, .06));
}
.fls-restore > div:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.fls-restore small { color: var(--muted); }
.fls-restore-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(0, 240, 255, .14); color: var(--cyan); }
/* step cards: shared .fsu-how */

/* ------------------------------------------------------------- cards / side */
.fls-partlist::-webkit-scrollbar, .fls-layerlist::-webkit-scrollbar { width: 8px; }
.fls-partlist::-webkit-scrollbar-thumb, .fls-layerlist::-webkit-scrollbar-thumb { background: #263043; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
/* side column, cards, card head, count, head actions, note, empty: shared (.fsu-side / .fsu-card ...) */

/* inputs */
/* search field: shared .fsu-search */
.fls input[type=text], .fls input[type=number], .fls select, .fls textarea {
    background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; font: inherit; outline: none;
    transition: border-color .15s, box-shadow .15s; box-shadow: none;
}
.fls input[type=text]:focus, .fls input[type=number]:focus, .fls select:focus, .fls textarea:focus { border-color: rgba(0, 240, 255, .55); box-shadow: 0 0 0 3px rgba(0, 240, 255, .1); }
.fls select { height: 32px; padding: 0 28px 0 9px; appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d98ab' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center; }
.fls select option { background: #10141d; color: var(--text); }
.fls-textarea { width: 100%; padding: 9px 10px; resize: vertical; min-height: 54px; font: 600 15px/1.3 Inter, sans-serif !important; }
.fls-inline-input { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; }
.fls-inline-input span { color: var(--muted); font-size: 12px; }
.fls-inline-input input, .fls-inline-input select { width: 100%; height: 32px; padding: 0 9px; }
.fls-inline-input select { padding-right: 28px; }
.fls-field-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fls-field-row > span { color: var(--muted); font-size: 12px; }
.fls-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fls-btnrow { display: flex; flex-wrap: wrap; gap: 6px; }
.fls-num { display: flex; align-items: center; height: 32px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.fls-num:focus-within { border-color: rgba(0, 240, 255, .55); }
.fls-num span { padding: 0 8px; color: var(--dim); font-size: 11px; font-weight: 700; min-width: 30px; }
.fls-num input { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 2px; font: 600 12px/1 "JetBrains Mono", monospace !important; -moz-appearance: textfield; }
.fls-num input::-webkit-inner-spin-button, .fls-num input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.fls-num em { font-style: normal; color: var(--dim); padding-right: 8px; font-size: 11px; }

/* sliders */
.fls-slider { display: grid; gap: 6px; }
.fls-slider-top { display: flex; justify-content: space-between; align-items: baseline; }
.fls-slider-top span { color: var(--muted); font-size: 12px; }
.fls-slider-top output { font: 600 11.5px/1 "JetBrains Mono", monospace; color: var(--text); }
.fls input[type=range] {
    --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; cursor: pointer; margin: 0; padding: 0; border: 0;
}
.fls input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--pink), var(--purple) var(--p), rgba(255, 255, 255, .09) var(--p)); }
.fls input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--pink), var(--purple) var(--p), rgba(255, 255, 255, .09) var(--p)); }
.fls input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; margin-top: -5.5px; background: #fff; border: 0; box-shadow: 0 0 0 3px rgba(255, 47, 158, .35), 0 2px 6px rgba(0, 0, 0, .5); transition: transform .12s; }
.fls input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 3px rgba(255, 47, 158, .35); }
.fls input[type=range]:active::-webkit-slider-thumb { transform: scale(1.18); }
.fls input[type=range]:focus-visible { outline: none; }
.fls input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(0, 240, 255, .5); }

/* switches, checks, toggles, segmented buttons: shared (.fsu-switch / .fsu-check / .fsu-toggle / .fsu-seg) */
.fls-switch-row { display: flex; color: var(--text); font-size: 12.5px; flex-wrap: wrap; }
.fls-switch-row small { color: var(--dim); font-size: 11.5px; }

/* swatches */
.fls-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 7px; }
.fls-swatch { position: relative; width: 100%; aspect-ratio: 1; min-width: 22px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55), transparent 42%), var(--c);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .4); transition: transform .15s var(--ease), box-shadow .15s; }
.fls-swatch:hover { transform: scale(1.12); }
.fls-swatch.is-on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan), 0 0 14px rgba(0, 240, 255, .5); }
.fls-swatch-orig::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .55); pointer-events: none; }
.fls-swatch-custom { display: grid; place-items: center; background: conic-gradient(from 0deg, #ff2f9e, #ffd21f, #22c55e, #00f0ff, #a855f7, #ff2f9e); color: #fff; }
.fls-swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.fls-swatch-custom .fls-i { width: 13px; height: 13px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }
.fls-swatch-sm { border-radius: 7px; min-width: 0; }
.fls-swatches { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.fls-colorrow { display: flex; gap: 8px; align-items: center; }
.fls-bigswatch { position: relative; width: 44px; height: 36px; border-radius: 9px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), 0 4px 14px rgba(0, 0, 0, .35); cursor: pointer; flex: none; }
.fls-bigswatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.fls-hex { flex: 1; min-width: 0; height: 36px; padding: 0 10px; font: 600 13px/1 "JetBrains Mono", monospace !important; text-transform: uppercase; }
.fls-colorfield { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 34px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-size: 12px; cursor: pointer; }
.fls-colorfield input { width: 30px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 6px; }
.fls-colorfield input::-webkit-color-swatch-wrapper { padding: 0; }
.fls-colorfield input::-webkit-color-swatch { border: 1px solid rgba(255, 255, 255, .2); border-radius: 6px; }
.fls-colorfield-row { width: 100%; }

/* ---------------------------------------------------------------- pick step */
.fls-stage-pick {
    display: grid; grid-template-columns: clamp(250px, 19vw, 320px) minmax(0, 1fr) clamp(270px, 20vw, 340px); gap: 12px; padding: 12px;
}
.fls-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.fls-partlist { flex: 1; min-height: 120px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; scrollbar-color: #2a3448 transparent; }
.fls-bone { border-radius: 9px; margin-bottom: 2px; }
.fls-bone-row { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 2px; border-radius: 9px; transition: background .12s; }
.fls-bone-row:hover { background: rgba(255, 255, 255, .04); }
.fls-caret { width: 22px; height: 22px; padding: 0; box-shadow: none; display: grid; place-items: center; border: 0; background: none; color: var(--dim); cursor: pointer; border-radius: 6px; transition: transform .2s var(--ease); }
.fls-caret .fls-i { width: 14px; height: 14px; }
.fls-bone.is-open > .fls-bone-row .fls-caret { transform: rotate(90deg); }
.fls-tick { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid var(--line2); background: var(--bg2); display: grid; place-items: center; color: #fff; cursor: pointer; padding: 0; transition: all .15s; }
.fls-tick .fls-i { width: 12px; height: 12px; stroke-width: 3; }
.fls-bone.is-on .fls-bone-row .fls-tick, .fls-part.is-on .fls-tick { background: linear-gradient(135deg, #00c8ff, #18d8ff); border-color: transparent; color: #04141a; box-shadow: 0 0 10px rgba(24, 216, 255, .45); }
.fls-bone.is-mixed .fls-bone-row .fls-tick { background: rgba(24, 216, 255, .25); border-color: rgba(24, 216, 255, .6); color: #bff6ff; }
.fls-bone.is-lock .fls-bone-row .fls-tick, .fls-part.is-lock .fls-tick { border-color: transparent; background: transparent; color: var(--dim); cursor: not-allowed; }
.fls-bone-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
.fls-bone.is-lock .fls-bone-name { color: var(--dim); cursor: default; }
.fls-bone.is-on .fls-bone-name { color: #bff6ff; }
.fls-bone-meta { display: flex; flex-direction: column; align-items: flex-end; font: 600 11px/1.1 "JetBrains Mono", monospace; color: var(--muted); }
.fls-bone-meta small { color: var(--dim); font-size: 10px; font-weight: 500; }
.fls-bone-parts { display: none; padding: 2px 0 6px 30px; }
.fls-bone.is-open .fls-bone-parts { display: block; }
.fls-part { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px; border-radius: 7px; cursor: pointer; transition: background .12s; }
.fls-part:hover { background: rgba(255, 255, 255, .04); }
.fls-part.is-lock { cursor: not-allowed; opacity: .6; }
.fls-part-name { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fls-part-name small { color: var(--dim); margin-left: 5px; font: 500 10.5px "JetBrains Mono", monospace; }
.fls-part-meta { font: 500 10.5px "JetBrains Mono", monospace; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.fls-tag { font-style: normal; font-size: 9.5px; padding: 1px 5px; border-radius: 4px; color: var(--purple); border: 1px solid rgba(168, 85, 247, .45); }

/* viewport frame (.fls-viewport, .fls-work): shared .fsu-viewport */
.fls-gl-slot, .fls-preview-slot, .fls-main-slot { position: absolute; inset: 0; }
.fls-gl { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
/* legend, view tools, separator, hint, tip, loading, spinner: shared look (.fsu-*); Livery positions: */
.fls-legend { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); }
.fls-vtools { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); }
.fls-hint { position: absolute; left: 16px; bottom: 12px; }
.fls-thumb { position: relative; border-radius: 11px; overflow: hidden; background: #0c1018; border: 1px solid var(--line); aspect-ratio: 1; }
.fls-thumb canvas { display: block; width: 100%; height: 100%; }
.fls-thumb-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--dim); font-size: 12.5px; }

/* --------------------------------------------------------------- paint step */
.fls-stage-paint {
    display: grid; grid-template-columns: 54px clamp(240px, 17vw, 290px) minmax(0, 1fr) clamp(290px, 21vw, 380px); gap: 10px; padding: 10px;
}
/* rail, tools, rail separator: shared (.fsu-rail / .fsu-tool / .fsu-rail-sep) */
.fls-rail-color { position: relative; width: 34px; height: 34px; flex: none; cursor: pointer; }
.fls-rail-color input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.fls-rail-color span { display: block; width: 100%; height: 100%; border-radius: 10px; background: #ff2f9e; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85), 0 0 0 1px rgba(0, 0, 0, .6), 0 4px 12px rgba(0, 0, 0, .4); }

.fls-work { background: #090b12; }
.fls-sheet-host { position: absolute; inset: 0; }
.fls-sheet-host canvas { position: absolute; inset: 0; display: block; }
.fls-sheet-bg { background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .025) 1px, transparent 1.5px) 0 0 / 22px 22px,
    radial-gradient(ellipse 80% 70% at 50% 45%, #0f1320, #080a10); }
.fls-sheet-over { outline: none; touch-action: none; }
.fls-floatbar {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; max-width: calc(100% - 24px);
    padding: 5px; border-radius: 13px; background: rgba(10, 13, 21, .82); border: 1px solid var(--line2); backdrop-filter: blur(12px);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .45); z-index: 2;
}
.fls-group { display: flex; align-items: center; gap: 2px; padding: 0 3px; }
.fls-group + .fls-group { border-left: 1px solid var(--line); padding-left: 7px; }
.fls-floatbar .fls-iconbtn { width: 32px; height: 32px; }
.fls-floatbar .fls-iconbtn .fls-i { width: 17px; height: 17px; }
.fls-zoomval { min-width: 54px; height: 30px; padding: 0 4px; box-shadow: none; border: 0; background: transparent; color: var(--text); font: 600 12px/1 "JetBrains Mono", monospace; cursor: pointer; border-radius: 7px; }
.fls-zoomval:hover { background: rgba(255, 255, 255, .06); }
.fls-jump { gap: 4px; }
.fls-jump .fls-chip { height: 26px; padding: 0 8px; font-size: 11.5px; }
.fls-status {
    position: absolute; left: 12px; bottom: 10px; display: flex; gap: 12px; padding: 5px 10px; border-radius: 8px; background: rgba(8, 10, 17, .72);
    border: 1px solid var(--line); font: 600 11px/1.2 "JetBrains Mono", monospace; color: var(--muted); pointer-events: none;
}
.fls-status span:first-child { color: var(--cyan); }
.fls-dropzone { position: absolute; inset: 10px; border-radius: 14px; border: 2px dashed var(--cyan); background: rgba(0, 240, 255, .08); display: grid; place-items: center; z-index: 4; pointer-events: none; backdrop-filter: blur(2px); }
.fls-dropzone div { display: grid; justify-items: center; gap: 10px; color: #c9fbff; font-size: 16px; }
.fls-dropzone .fls-i { width: 40px; height: 40px; }

.fls-preview-card { padding: 11px; gap: 8px; }
.fls-preview-slot {
    position: relative !important; inset: auto !important; height: clamp(190px, 30vh, 400px); flex: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
    background:
        radial-gradient(ellipse 75% 60% at 50% 72%, rgba(120, 70, 220, .22), transparent 70%),
        linear-gradient(180deg, #0b0e17, #07090f);
    transition: box-shadow .3s;
}
.fls-preview-slot.is-flash { box-shadow: 0 0 0 2px var(--pink), 0 0 30px rgba(255, 47, 158, .5); }
.fls[data-mode3d="paint"] .fls-preview-slot, .fls[data-mode3d="paint"].is-swapped .fls-main-slot { box-shadow: inset 0 0 0 2px rgba(255, 47, 158, .55); }
.fls[data-mode3d="place"] .fls-preview-slot, .fls[data-mode3d="place"].is-swapped .fls-main-slot { box-shadow: inset 0 0 0 2px rgba(0, 240, 255, .6); }
.fls-preview-foot { display: flex; align-items: center; gap: 4px; }
.fls-mini-palette { flex: 1; display: flex; gap: 5px; flex-wrap: nowrap; overflow: hidden; }
.fls-mini-palette .fls-swatch { width: 20px; min-width: 20px; height: 20px; flex: none; }
.fls-preview-note { font-size: 11.5px; }
.fls-card-head .fls-seg-sm { margin-left: auto; }
.fls.is-swapped .fls-preview-slot .fls-sheet-host { position: absolute; inset: 0; }

.fls-livtabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.fls-livtab {
    box-shadow: none; flex: none; width: 64px; display: grid; gap: 4px; padding: 5px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; transition: all .15s;
}
.fls-livtab canvas { width: 52px; height: 52px; border-radius: 6px; background: #0c1018; display: block; }
.fls-livtab span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; display: flex; gap: 4px; }
.fls-livtab span em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.fls-livtab .fls-rename { height: 20px; font-size: 11px; padding: 0 4px; width: 100%; }
.fls-livtab-add small { font-size: 10.5px; }
.fls-livtab span b { color: var(--pink); margin-right: 4px; }
.fls-livtab:hover { border-color: var(--line2); }
.fls-livtab.is-on { border-color: rgba(255, 47, 158, .6); background: rgba(255, 47, 158, .07); box-shadow: 0 0 14px rgba(255, 47, 158, .2); }
.fls-livtab.is-on span { color: #fff; }
.fls-livtab-add { display: grid; place-items: center; align-content: center; gap: 4px; color: var(--dim); border-style: dashed; min-height: 76px; }
.fls-livtab-add:hover { color: var(--cyan); border-color: rgba(0, 240, 255, .5); }

.fls-layers { min-height: 300px; flex: 1 0 auto; }
.fls-layerlist { flex: 1; min-height: 90px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: #2a3448 transparent; }
.fls-layer {
    display: flex; align-items: center; gap: 7px; padding: 5px 5px 5px 3px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
    background: rgba(255, 255, 255, .02); transition: background .12s, border-color .12s; position: relative;
}
.fls-layer:hover { background: rgba(255, 255, 255, .05); }
.fls-layer.is-on { border-color: rgba(0, 240, 255, .45); background: linear-gradient(90deg, rgba(0, 240, 255, .10), rgba(0, 240, 255, .03)); }
.fls-layer.is-hidden .fls-lthumb, .fls-layer.is-hidden .fls-lname { opacity: .4; }
.fls-layer.is-drag { opacity: .4; }
.fls-layer.is-dropbefore::before, .fls-layer.is-dropafter::after { content: ""; position: absolute; left: 8px; right: 8px; height: 2px; border-radius: 2px; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.fls-layer.is-dropbefore::before { top: -3px; }
.fls-layer.is-dropafter::after { bottom: -3px; }
.fls-grip { color: var(--dim); cursor: grab; display: grid; }
.fls-grip .fls-i { width: 14px; height: 14px; }
.fls-lthumb { width: 40px; height: 40px; border-radius: 7px; flex: none; border: 1px solid var(--line);
    background: repeating-conic-gradient(#1a2030 0 25%, #121722 0 50%) 0 0 / 10px 10px; }
.fls-lname { flex: 1; min-width: 0; display: grid; gap: 1px; }
.fls-lname b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fls-lname small { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fls-rename { width: 100%; height: 26px; padding: 0 6px; font-size: 12.5px; }
.fls-layerprops { display: grid; gap: 9px; padding-top: 10px; border-top: 1px solid var(--line); }
.fls-layerprops.is-disabled { opacity: .4; pointer-events: none; }
.fls-propsrow { display: grid; grid-template-columns: 1fr 118px; gap: 10px; align-items: end; }
.fls-blend { display: grid; gap: 4px; }
.fls-blend span { color: var(--muted); font-size: 12px; }
.fls-blend select { width: 100%; height: 30px; font-size: 12px; }
.fls-btnrow-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.fls-btnrow-4 .fls-btn { padding: 0 4px; font-size: 11px; gap: 4px; min-width: 0; }
.fls-btnrow-4 .fls-btn .fls-i { width: 13px; height: 13px; }
.fls-export-cta { flex: none; position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -10px 24px rgba(6, 8, 14, .9), 0 6px 22px rgba(255, 47, 158, .28), inset 0 0 0 1px rgba(255, 255, 255, .14); }

.fls-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.fls-preset { box-shadow: none; display: grid; gap: 5px; padding: 5px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; text-align: left; transition: all .15s var(--ease); }
.fls-preset canvas { width: 100%; height: auto; aspect-ratio: 132 / 84; border-radius: 6px; display: block; }
.fls-preset span { font-size: 11.5px; font-weight: 600; color: #cdd5e2; padding: 0 2px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fls-preset:hover { border-color: rgba(255, 47, 158, .55); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 47, 158, .2); }
.fls-fontstrip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.fls-fontstrip button { box-shadow: none; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg2); color: #cdd5e2; font-size: 15px; cursor: pointer; transition: all .15s; padding: 0; }
.fls-fontstrip button:hover { border-color: var(--line2); color: #fff; }
.fls-fontstrip button.is-on { border-color: rgba(0, 240, 255, .55); color: #c9fbff; background: rgba(0, 240, 255, .08); }

/* swap: 3D big, sheet small */
.fls.is-swapped .fls-floatbar .fls-zoom, .fls.is-swapped .fls-floatbar .fls-jump { display: none; }
.fls.is-swapped .fls-status { display: none; }

/* ------------------------------------------------------------------- modals */
.fls-modal { position: fixed; inset: 0; z-index: 2147483100; display: grid; place-items: center; padding: 16px; background: rgba(3, 4, 8, .66); backdrop-filter: blur(6px); animation: fls-fade .2s; }
.fls-modal-card { width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--line2);
    background: linear-gradient(180deg, #141a27, #0d1119); box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 47, 158, .08); animation: fls-pop .25s var(--ease); }
.fls-modal-sm { width: min(460px, 100%); }
.fls-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.fls-modal-head h2 { font: 700 20px/1.1 Rajdhani, Inter, sans-serif; }
.fls-modal-body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 14px; }
.fls-modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.fls-modal-foot .fls-price { flex: 1; color: var(--muted); font-size: 13px; }
.fls-price b { color: var(--text); }
.fls-price.is-short { color: var(--warn); }
.fls-lead-sm { color: var(--muted); }
.fls-exp-list { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.fls-exp-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); }
.fls-exp-item canvas { width: 64px; height: 64px; border-radius: 8px; border: 1px solid var(--line); background: #0c1018; }
.fls-exp-item > div { flex: 1; display: grid; gap: 5px; }
.fls-exp-item small { color: var(--pink); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.fls-exp-item input { height: 34px; padding: 0 10px; width: 100%; }
.fls-exp-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.fls-exp-summary span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: #cdd5e2; font-size: 12px; font-weight: 600; }
.fls-exp-summary .fls-i { width: 14px; height: 14px; color: var(--cyan); }
.fls-terms { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.fls-exp-progress { display: grid; gap: 8px; }
.fls-exp-progress p { color: var(--muted); font-size: 12.5px; }
.fls-error { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .08); color: #ffc4c4; font-size: 13px; }
.fls-exp-done { display: grid; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .07); }
.fls-done-head { display: flex; gap: 12px; align-items: center; }
.fls-done-head > .fls-i { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--good); color: #06110c; stroke-width: 3; }
.fls-done-head div { display: grid; }
.fls-done-head small { color: var(--muted); }
.fls-warns summary { cursor: pointer; color: var(--warn); font-size: 12.5px; text-transform: none; letter-spacing: normal; padding: 0; background: none; border: 0; list-style: revert; font-weight: 600; }
.fls-warns summary::after, .fls-warns summary::before { content: none !important; }
.fls-warns { border: 0; padding: 0; margin: 0; background: none; }
.fls-warns ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; }
.fls-keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; align-items: center; }
.fls-keys dt { margin: 0; }
.fls-keys dd { margin: 0; color: #cdd5e2; }
.fls-keys kbd { display: inline-block; padding: 5px 8px; border-radius: 6px; background: var(--panel3); border: 1px solid var(--line2); border-bottom-width: 2px; color: #fff; font-size: 11px; }

/* toasts: shared (.fsu-toasts / .fsu-toast) */
.fls-fatal { padding: 30px; border-radius: 14px; border: 1px solid rgba(248, 113, 113, .45); color: #ffc4c4; background: #120a0d; }

/* --------------------------------------------------------------- animations */
@keyframes fls-spin { to { transform: rotate(360deg); } }
@keyframes fls-pulse { 50% { opacity: .35; } }
@keyframes fls-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes fls-fade { from { opacity: 0; } }
@keyframes fls-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fls-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .fls *, .fls *::before, .fls *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1500px) {
    .fls-jump { display: none; }
    .fls-preview-card .fls-seg-sm button { font-size: 0; gap: 0; padding: 0 9px; }
    .fls-preview-card .fls-seg-sm button .fls-i { width: 15px; height: 15px; }
}
@media (max-width: 1440px) {
    .fls-model small { display: none; }
}
@media (max-width: 1280px) {
    .fls-stage-paint { grid-template-columns: 50px 236px minmax(0, 1fr) 290px; gap: 8px; padding: 8px; }
    .fls-stage-pick { grid-template-columns: 250px minmax(0, 1fr) 270px; }
    .fls-save span { display: none; }
    .fls-preview-slot { height: clamp(180px, 30vh, 320px); }
    .fls-floatbar .fls-btn-sm { padding: 0 8px; }
}
@media (max-height: 900px) {
    .fls-preview-note { display: none; }
}
@media (max-height: 820px) {
    .fls-preview-slot { height: clamp(170px, 29vh, 300px); }
    .fls-livtab { width: 62px; }
    .fls-livtab canvas { width: 50px; height: 50px; }
    .fls-livtab-add { min-height: 78px; }
    .fls-lthumb { width: 34px; height: 34px; }
    .fls-vtools { top: 54px; }
}
@media (max-width: 1100px) {
    .fls-stage-pick { grid-template-columns: 1fr; grid-template-rows: 55vh auto auto; overflow-y: auto; }
    .fls-stage-pick .fls-viewport { order: -1; }
    .fls-stage-paint { grid-template-columns: 1fr; grid-auto-rows: auto; overflow-y: auto; }
    .fls-stage-paint .fls-work { height: 60vh; order: -1; }
}
@media (max-width: 640px) {
    .fls-model { display: none; }
    .fls-stage-upload { padding: 20px 16px 32px; }
    .fls-vtools { display: none; }
    .fls-floatbar { flex-wrap: wrap; justify-content: center; }
}
