/* ==========================================================================
   FiveMRides Chain Studio ([fivem_chain_studio]) - scoped to .fch
   Shared Studio components (top bar, buttons, cards, fields, viewport frame,
   toasts) come from fmr-studio-ui.css (.fsu-*), loaded first: same look as the
   Livery Studio. This sheet keeps the Chain Studio layout and its widgets.
   Full screen app, Livery Studio layout: step pills in the top bar, left list
   card, tool rail on the edge of the viewport, centre viewport, right cards that
   end with the gradient action button.
   ========================================================================== */

html.fch-lock, html.fch-lock body { overflow: hidden !important; }

.fch {
    position: fixed; inset: 0; z-index: 2147483000; height: 100vh; height: 100dvh;
    color: var(--fsu-text);
    font: 500 13px/1.45 var(--fsu-font);
    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(--fsu-bg);
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    text-align: left;
}
.fch *, .fch *::before, .fch *::after { box-sizing: border-box; }
.fch [hidden] { display: none !important; }
:where(.fch) button, :where(.fch) input, :where(.fch) select { font: inherit; color: inherit; }
/* theme guards: the site skin styles bare buttons, headings and inputs */
.fch button { text-transform: none; letter-spacing: normal; text-shadow: none; min-height: 0; min-width: 0; margin: 0; line-height: 1.2; }
.fch button:focus { outline: none; }
.fch button:focus-visible, .fch [role=button]:focus-visible { outline: 2px solid rgba(0, 240, 255, .7); outline-offset: 2px; }
.fch a { color: var(--fsu-cyan); }
.fch a.fsu-btn { color: var(--fsu-text); }
.fch a.fsu-btn-primary { color: #fff; }
.fch h1, .fch h2, .fch h3, .fch h4 { margin: 0; color: var(--fsu-text); letter-spacing: 0; text-transform: none; }
.fch p { margin: 0; }
.fch kbd { font: 600 9px/1 var(--fsu-mono); color: var(--fsu-dim); margin-left: 3px; }
.fch-i { width: 18px; height: 18px; flex: none; display: block; }

.fch-app { height: 100%; display: flex; flex-direction: column; }

/* ------------------------------------------------------------------ top bar */
.fch-top { gap: 10px; }
.fch-back { color: var(--fsu-muted); text-decoration: none; }
.fch-project { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-left: 8px; padding-left: 14px; border-left: 1px solid var(--fsu-line); }
.fch .fch-name {
    width: min(260px, 26vw); height: 22px; padding: 0 6px; margin-left: -6px; border: 1px solid transparent; border-radius: 6px; background: transparent;
    color: var(--fsu-text); font: 700 14px/1 var(--fsu-display); letter-spacing: .01em; outline: none;
}
.fch .fch-name:hover { border-color: var(--fsu-line2); }
.fch .fch-name:focus { border-color: rgba(0, 240, 255, .55); background: var(--fsu-bg2); }
.fch-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fsu-muted); white-space: nowrap; }
.fch-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--fsu-warn); }
.fch-status.is-saved i, .fch-status.is-synced i { background: var(--fsu-good); }
.fch-status.is-syncing i, .fch-status.is-local i { background: var(--fsu-cyan); animation: fch-pulse 1s infinite; }
.fch-status.is-error i { background: var(--fsu-bad); }
.fch-export b { font-weight: 800; }

/* ------------------------------------------------------------------- layout */
.fch-body {
    flex: 1; min-height: 0; display: grid; gap: 10px; padding: 10px;
    grid-template-columns: clamp(250px, 19vw, 310px) 54px minmax(0, 1fr) clamp(280px, 20vw, 340px);
}
.fch-left, .fch-right { min-height: 0; }
.fch-stage { min-height: 0; }
.fch-steps { margin-left: 14px; }
.fch-steps li.is-on button span { background: var(--fsu-grad); }

/* left column: one card per step */
.fch-lcard { min-height: 0; }
.fch-lcard[data-left="design"], .fch-lcard[data-left="finish"] { flex: 1 1 auto; overflow-y: auto; scrollbar-width: thin; }
.fch-lcard[data-left="export"] { flex: 1 1 auto; overflow: hidden; }
.fch-lcard[data-left="export"] .fch-packlist { flex: 1 1 auto; }
.fch-lcard[data-left="export"] > .fsu-note:last-child { flex: none; }
.fch-dtabs button .fsu-i { width: 14px; height: 14px; }
.fch-dpanel { display: grid; gap: 9px; }
.fch-build { border: 1px solid var(--fsu-line); border-radius: 11px; padding: 0 10px; background: rgba(255, 255, 255, .015); }
.fch-build[open] { padding-bottom: 10px; display: grid; gap: 8px; }
.fch-build summary { cursor: pointer; list-style: none; padding: 9px 0; font: 700 13px/1.2 var(--fsu-display); letter-spacing: .02em; color: #dfe6f1; display: flex; justify-content: space-between; }
.fch-build summary::-webkit-details-marker { display: none; }
.fch-build summary::after { content: "+"; color: var(--fsu-dim); }
.fch-build[open] summary::after { content: "-"; }
.fch-gridtitle { font: 700 11px/1 var(--fsu-display); letter-spacing: .14em; text-transform: uppercase; color: var(--fsu-dim); margin: 4px 0 -2px; }
.fch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fch-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fch .fch-checklist li { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #cdd5e2; }
.fch-checklist li .fsu-i { width: 16px; height: 16px; flex: none; }
.fch-checklist li.is-ok .fsu-i { color: var(--fsu-good); }
.fch-checklist li.is-bad .fsu-i { color: var(--fsu-warn); }
.fch-field { display: grid; gap: 5px; min-width: 0; }
.fch-field > span { color: var(--fsu-muted); font-size: 11.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.fch-field > span b { color: var(--fsu-text); font-weight: 700; }
.fch select, .fch input[type=text], .fch input[type=number], .fch input[type=search] {
    width: 100%; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--fsu-line2);
    background: var(--fsu-bg2); color: var(--fsu-text); outline: none; font-size: 12.5px; box-shadow: none; margin: 0;
}
.fch select { padding-right: 26px; cursor: pointer; }
.fch select option { background: #0e121b; color: #e8edf5; }
.fch select:focus, .fch input[type=text]:focus, .fch input[type=number]:focus { border-color: rgba(0, 240, 255, .55); box-shadow: 0 0 0 3px rgba(0, 240, 255, .1); }
.fch select:disabled { opacity: .5; cursor: default; }
.fch .fsu-search input[type=search] { height: 100%; border: 0; background: transparent; padding: 0; box-shadow: none; }
.fch input[type=range] { width: 100%; accent-color: #ff2f9e; height: 22px; margin: 0; background: transparent; }
.fch input[type=color] { width: 100%; height: 34px; padding: 2px; border-radius: 9px; border: 1px solid var(--fsu-line2); background: var(--fsu-bg2); cursor: pointer; }
.fch-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.fch-mt { padding-bottom: 8px; }
.fch-shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fch-shape {
    display: grid; justify-items: center; gap: 4px; padding: 9px 2px 6px; border-radius: 10px; border: 1px solid var(--fsu-line2);
    background: var(--fsu-panel2); color: var(--fsu-cyan); cursor: pointer; transition: all .15s; box-shadow: none;
}
.fch-shape small { color: var(--fsu-muted); font-size: 10px; }
.fch-shape:hover { border-color: rgba(0, 240, 255, .5); background: rgba(0, 240, 255, .07); }
.fch-shape .fsu-i { width: 20px; height: 20px; }

/* library */
.fch-libcount, .fch-fincount { margin: 0; }
.fch-libgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fch-libgrid.is-finish { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fch-libgrid.is-finish .fch-libitem b { font-size: 10.5px; }
.fch-libitem {
    display: grid; gap: 3px; padding: 7px; border-radius: 11px; border: 1px solid var(--fsu-line); background: var(--fsu-card-bg);
    text-align: left; cursor: pointer; transition: border-color .15s, transform .15s var(--fsu-ease); box-shadow: none; color: var(--fsu-text); min-width: 0;
}
.fch-libitem:hover { border-color: rgba(0, 240, 255, .5); transform: translateY(-1px); }
.fch-libitem b { font-size: 11.5px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fch-libitem small { color: var(--fsu-dim); font-size: 10px; }
.fch-thumb { aspect-ratio: 1; border-radius: 8px; background: radial-gradient(circle at 50% 40%, #1f2533, #0b0e15); display: grid; place-items: center; overflow: hidden; }
.fch-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ------------------------------------------------------------------ viewport */
.fch-stage { position: relative; }
.fch-canvas { position: absolute; inset: 0; }
.fch-canvas canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
/* tool rail on the left edge of the viewport (Vehicle Studio rail) */
.fch-rail { align-self: stretch; justify-content: flex-start; }
.fch-rail .fsu-tool:disabled { opacity: .35; cursor: default; background: transparent; }
.fch-rail .fsu-tool.fch-del:not(:disabled):hover { color: #ffb4b4; background: rgba(248, 113, 113, .1); }
/* camera: one segmented control, top centre */
.fch-cam { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2; background: rgba(10, 13, 21, .78); backdrop-filter: blur(8px); }
/* Body: one control, top right, opens a small card */
.fch-bodyctl { position: absolute; top: 14px; right: 14px; z-index: 4; display: grid; justify-items: end; gap: 6px; }
.fch-body-btn { background: rgba(10, 13, 21, .78); backdrop-filter: blur(8px); }
.fch-body-btn .fsu-i:last-child { width: 13px; height: 13px; opacity: .7; }
.fch-body-pop { width: 250px; gap: 12px; padding: 12px; box-shadow: var(--fsu-shadow); }
.fch-body-row { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: center; font-size: 12px; color: var(--fsu-muted); }
.fch-skins { display: flex; gap: 6px; }
.fch-skin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); padding: 0; cursor: pointer; box-shadow: none; }
.fch-skin.is-on { border-color: #fff; box-shadow: 0 0 0 2px var(--fsu-pink); }
.fch-loading { z-index: 5; }
.fch-overlapflag {
    position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 8px;
    padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(251, 191, 36, .6); background: rgba(40, 30, 6, .88); color: #ffe3a3;
    font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 26px rgba(0, 0, 0, .4); backdrop-filter: blur(8px); max-width: calc(100% - 24px);
}
.fch-overlapflag .fsu-i { width: 16px; height: 16px; color: var(--fsu-warn); flex: none; }
.fch-overlapflag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fch-overlapflag small { color: #d9b866; font-size: 11px; white-space: nowrap; }
.fch-empty {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100% - 32px)); z-index: 2;
    display: grid; justify-items: center; gap: 8px; text-align: center; padding: 24px 22px;
    border-radius: 18px; border: 1px dashed rgba(0, 240, 255, .35); background: rgba(10, 13, 21, .86); backdrop-filter: blur(10px); box-shadow: var(--fsu-shadow);
}
.fch-empty-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--fsu-grad); box-shadow: 0 10px 30px rgba(255, 47, 158, .3); }
.fch-empty-ic .fsu-i { width: 26px; height: 26px; }
.fch-empty h3 { font: 700 20px/1.2 var(--fsu-display); }
.fch-empty p { color: var(--fsu-muted); font-size: 12.5px; margin-bottom: 6px; }
.fch-hint { position: absolute; right: 14px; bottom: 14px; z-index: 1; font-size: 11px; padding: 5px 9px; border-radius: 8px; background: rgba(8, 10, 17, .6); }
.fch-stats { position: absolute; left: 14px; bottom: 14px; z-index: 1; display: grid; justify-items: start; gap: 5px; pointer-events: auto; padding: 7px 10px; border-radius: 10px; background: rgba(8, 10, 17, .72); border: 1px solid var(--fsu-line); backdrop-filter: blur(8px); }
.fch-stats-text { font: 600 11px/1 var(--fsu-mono); color: var(--fsu-muted); text-shadow: 0 1px 2px #000; }
.fch-budget { width: 150px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.fch-budget > div { height: 100%; width: 0; background: var(--fsu-good); border-radius: inherit; transition: width .3s var(--fsu-ease); }
.fch-budget.is-warn > div { background: var(--fsu-warn); }
.fch-budget.is-over > div { background: var(--fsu-bad); }

/* ------------------------------------------------------------------- right */
.fch-right { display: flex; flex-direction: column; }
.fch-export-card { margin-top: auto; position: sticky; bottom: 0; z-index: 2; background: linear-gradient(180deg, #141a27, #0f131c); box-shadow: 0 -10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .03); }
.fch-export-card .fsu-btn-lg { margin-top: 2px; }
.fch-export-top { display: none; }
.fch-dname { display: flex !important; gap: 4px; align-items: center; }
.fch-dname input { flex: 1; }
.fch-piece-list { display: grid; gap: 2px; max-height: 190px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.fch-prow { padding-right: 2px; }
.fch-prow.is-on { background: linear-gradient(120deg, rgba(255, 47, 158, .14), rgba(168, 85, 247, .14)); box-shadow: inset 0 0 0 1px rgba(255, 47, 158, .35); }
.fch-pkind { color: var(--fsu-cyan); }
.fch-pkind .fsu-i { width: 15px; height: 15px; }
.fch-dhead { display: flex; justify-content: space-between; align-items: flex-start; }
.fch-dhead h2 { font: 700 22px/1.1 var(--fsu-display); margin-top: 2px; }
.fch-dhead .fsu-eyebrow { margin-bottom: 4px; font-size: 10px; color: #ff9a7a; }
.fch-dchip { cursor: default; height: 22px; font-size: 10.5px; }
.fch-nosel { padding: 4px 0 6px; }
.fch-dsec { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--fsu-line); }
.fch-dsec:first-of-type { border-top: 0; padding-top: 4px; }
.fch-dsec h4 { font: 700 15px/1.2 var(--fsu-display); }
.fch-dsec-head { display: flex; justify-content: space-between; align-items: center; }
.fch-xyzrow { display: grid; grid-template-columns: 52px repeat(3, minmax(0, 1fr)); gap: 5px; align-items: center; }
.fch-xyzrow > span { color: var(--fsu-muted); font-size: 11.5px; font-weight: 600; }
.fch-xyz { position: relative; display: block; }
.fch-xyz i { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); font: 700 10px/1 var(--fsu-mono); font-style: normal; pointer-events: none; }
.fch-xyz .fch-ax-x { color: #ff6b6b; } .fch-xyz .fch-ax-y { color: #5fd38d; } .fch-xyz .fch-ax-z { color: #5aa8ff; }
.fch .fch-xyz input { padding: 0 4px 0 18px; height: 30px; font: 600 11.5px var(--fsu-mono); }
.fch-danger { color: #ffb4b4; }
.fch-danger:hover { border-color: rgba(248, 113, 113, .5); background: rgba(248, 113, 113, .1); }
.fch-pickpart.is-on { color: #c9fbff; }
.fch-partsel { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; border: 1px solid rgba(24, 216, 255, .45); background: rgba(24, 216, 255, .08); font: 600 12px var(--fsu-mono); color: #bff6ff; }
.fch-partsel span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fch-partsel .fsu-i { width: 15px; height: 15px; }
.fch-texrow { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 4px 0 10px; border-radius: 9px; border: 1px solid var(--fsu-line2); background: var(--fsu-bg2); }
.fch-texname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fsu-muted); font-size: 12px; }
.fch-attach { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, .02); border: 1px solid var(--fsu-line); }
.fch-warnline { color: #ffd38a; font-size: 12px; line-height: 1.45; }
.fch .fch-warnmeta { color: var(--fsu-warn); }
.fch-genders { display: flex; gap: 14px; flex-wrap: wrap; }
.fch-prices { margin: 0; display: grid; gap: 6px; }
.fch-prices div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.fch-prices dt { color: var(--fsu-muted); }
.fch-prices dd { margin: 0; color: var(--fsu-cyan); font-weight: 700; }

/* --------------------------------------------------------------- My chains */
.fch-steps button em { font-style: normal; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center; font: 700 10.5px/1 var(--fsu-mono); color: #fff; background: rgba(255, 47, 158, .35); }
.fch-steps button em:empty { display: none; }
.fch-pack-btn { display: none; gap: 5px; }
.fch-pack-btn b { font: 700 11px/1 var(--fsu-mono); }
.fch-packbtns { display: grid; gap: 6px; }
.fch-packbtns .fch-row2 .fsu-btn { min-width: 0; }
.fch-packbtns .fsu-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fch-packlist { display: grid; gap: 6px; align-content: start; overflow-y: auto; min-height: 60px; margin: 0 -4px; padding: 2px 4px; scrollbar-width: thin; }
.fch-pitem {
    display: grid; grid-template-columns: 16px 52px minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 6px 6px 6px 2px;
    border-radius: 12px; border: 1px solid var(--fsu-line); background: var(--fsu-card-bg); transition: border-color .15s, background .15s; outline: none;
}
.fch-pitem:hover { border-color: var(--fsu-line2); }
.fch-pitem:focus-visible { border-color: rgba(0, 240, 255, .6); }
.fch-pitem.is-on { background: linear-gradient(120deg, rgba(255, 47, 158, .12), rgba(168, 85, 247, .12)); border-color: rgba(255, 47, 158, .45); }
.fch-pitem.is-dragging { opacity: .75; border-style: dashed; border-color: rgba(0, 240, 255, .6); }
.fch-pitem.is-heavy { border-color: rgba(248, 113, 113, .45); }
.fch-pitem.is-draft { grid-template-columns: 52px minmax(0, 1fr) auto; padding-left: 6px; border-style: dashed; border-color: rgba(0, 240, 255, .4); }
.fch-pinfo { min-width: 0; display: grid; gap: 2px; }
.fch-pinfo b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.fch-pinfo small { color: var(--fsu-dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fch .fch-pinfo input.fch-item-name { height: 26px; padding: 0 6px; margin-left: -6px; border-color: transparent; background: transparent; font-weight: 700; font-size: 13px; width: calc(100% + 6px); text-overflow: ellipsis; }
.fch .fch-pinfo input.fch-item-name:hover { border-color: var(--fsu-line2); }
.fch .fch-pinfo input.fch-item-name:focus { border-color: rgba(0, 240, 255, .55); background: var(--fsu-bg2); }
.fch-grip { width: 18px; height: 40px; padding: 0; border: 0; background: none; color: var(--fsu-dim); cursor: grab; touch-action: none; display: grid; place-items: center; box-shadow: none; }
.fch-grip:active { cursor: grabbing; }
.fch-grip .fsu-i { width: 15px; height: 15px; }
.fch-pthumb { position: relative; width: 52px; height: 52px; padding: 0; border-radius: 9px; overflow: hidden; border: 1px solid var(--fsu-line); background: #0c0f17; display: grid; place-items: center; color: var(--fsu-dim); cursor: pointer; box-shadow: none; }
.fch-pthumb img { width: 100%; height: 100%; object-fit: cover; }
.fch-pthumb .fch-pedit { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6, 8, 14, .55); color: #fff; opacity: 0; transition: opacity .15s; }
.fch-pthumb:hover .fch-pedit, .fch-pthumb:focus-visible .fch-pedit { opacity: 1; }
.fch-pthumb .fch-pedit .fsu-i { width: 18px; height: 18px; }
.fch-pnum { position: absolute; left: 3px; top: 3px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 6px; background: rgba(6, 8, 14, .78); font: 700 10px/16px var(--fsu-mono); font-style: normal; color: #dfe6f1; }
.fch-plock { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 6px; background: rgba(6, 8, 14, .8); display: grid; place-items: center; color: #ffd38a; }
.fch-plock .fsu-i { width: 11px; height: 11px; }
.fch-pact { display: flex; gap: 2px; }
.fch-pdel.is-armed { color: #fff; background: rgba(248, 113, 113, .5); border-color: rgba(248, 113, 113, .8); }
.fch-checkwrap { border-top: 1px solid var(--fsu-line); padding-top: 8px; }
.fch-checkwrap summary { cursor: pointer; font: 700 13px/1.2 var(--fsu-display); padding: 2px 0 8px; color: #dfe6f1; }
.fch-lostlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fch .fch-lostlist li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 11px; border: 1px solid rgba(251, 191, 36, .45); background: rgba(40, 30, 6, .5); }
.fch-lostlist li > span { display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; row-gap: 1px; min-width: 0; font-size: 12.5px; color: #f1e3c0; }
.fch-lostlist li > span .fsu-i { width: 16px; height: 16px; color: var(--fsu-warn); grid-row: span 3; margin-top: 1px; }
.fch-lostlist small, .fch-lostlist em { color: #d9c08a; font-size: 11.5px; font-style: normal; }
.fch-lostlist .fsu-btn { flex: none; }
.fch-importrules { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fch .fch-importrules li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #cdd5e2; }
.fch-importrules .fsu-i { width: 15px; height: 15px; color: var(--fsu-good); flex: none; margin-top: 2px; }
.fch-current { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; }
.fch-current.is-draft { border-color: rgba(0, 240, 255, .35); }
.fch-current.is-locked { border-color: rgba(251, 191, 36, .45); }
.fch-cur-thumb { width: 40px; height: 40px; border-radius: 9px; overflow: hidden; background: #0c0f17; display: grid; place-items: center; color: var(--fsu-cyan); }
.fch-cur-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fch-cur-info { min-width: 0; display: grid; gap: 1px; }
.fch-cur-eyebrow { color: var(--fsu-dim); font-size: 10.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fch-cur-name { font: 700 14px/1.2 var(--fsu-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fch-cur-act { white-space: nowrap; }
.fch-tris { display: grid; gap: 6px; }
.fch-tris:empty { display: none; }
.fch-tlist { display: grid; gap: 3px; max-height: 112px; overflow-y: auto; scrollbar-width: thin; }
.fch-trow { display: grid; grid-template-columns: 16px minmax(0, 1fr) 54px 46px; gap: 6px; align-items: center; font-size: 11.5px; }
.fch-trow span { color: var(--fsu-dim); font: 600 10px/1 var(--fsu-mono); }
.fch-trow b { font-weight: 600; color: #cdd5e2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fch-trow i { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.fch-trow i u { display: block; height: 100%; background: var(--fsu-good); border-radius: inherit; }
.fch-trow.is-over i u { background: var(--fsu-bad); }
.fch-trow em { font: 600 10.5px/1 var(--fsu-mono); font-style: normal; color: var(--fsu-muted); text-align: right; }
.fch-trow.is-over em { color: var(--fsu-bad); }
.fch-ttotal { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 12px; }
.fch-ttotal span { color: var(--fsu-muted); }
.fch-ttotal b { font: 700 12px/1 var(--fsu-mono); }
.fch-ttotal small { margin-left: auto; color: var(--fsu-dim); font-size: 10.5px; }

/* ------------------------------------------------------------------- modal */
.fch-modal { position: fixed; inset: 0; z-index: 2147483100; display: grid; place-items: center; padding: 16px; }
.fch-modal-back { position: absolute; inset: 0; background: rgba(3, 5, 10, .72); backdrop-filter: blur(3px); }
.fch-modal-card { position: relative; width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; gap: 14px; box-shadow: var(--fsu-shadow); }
.fch-modal-card.wide { width: min(760px, 100%); }
.fch-modal-card h2 { font: 700 24px/1.1 var(--fsu-display); }
.fch-modal-card > p { color: #b9c3d3; line-height: 1.55; }
.fch-modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.fch-sum { margin: 0; display: grid; gap: 7px; padding: 12px; border-radius: 11px; border: 1px solid var(--fsu-line); background: rgba(255, 255, 255, .02); }
.fch-sum div { display: flex; justify-content: space-between; gap: 12px; }
.fch-sum dt { color: var(--fsu-muted); }
.fch-sum dd { margin: 0; font-weight: 700; text-align: right; }
.fch-sum dd.is-bad { color: var(--fsu-bad); }
.fch-warnbox { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .08); color: #ffd0d0 !important; }
.fch-progress { display: grid; gap: 10px; }
.fch-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.fch-bar > div { height: 100%; width: 0; border-radius: inherit; background: var(--fsu-grad); transition: width .25s var(--fsu-ease); }
.fch-progress-msg { color: var(--fsu-muted); font-size: 12.5px; }
.fch-progress-msg.is-error { color: var(--fsu-bad); }
.fch-projlist { display: grid; gap: 8px; }
.fch-proj { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--fsu-line); background: rgba(255, 255, 255, .02); }
.fch-proj.is-on { border-color: rgba(255, 47, 158, .45); }
.fch-proj-thumb { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; background: #0b0e15; display: grid; place-items: center; color: var(--fsu-dim); }
.fch-proj-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fch-proj-info { min-width: 0; display: grid; gap: 2px; }
.fch-proj-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fch-proj-info small { color: var(--fsu-dim); font-size: 11.5px; }
.fch-proj-act { display: flex; gap: 6px; align-items: center; }
.fch-revs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.fch-fatal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 460px; padding: 18px; border-radius: 14px; background: #1a1016; border: 1px solid rgba(248, 113, 113, .5); color: #ffd0d0; z-index: 9; }

@keyframes fch-pulse { 50% { opacity: .35; } }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
    .fch-body { grid-template-columns: 250px 50px minmax(0, 1fr) 280px; gap: 8px; padding: 8px; }
    .fch-open-projects span, .fch-save span { display: none; }
    .fch-project { display: none; }
}
@media (max-width: 1020px) {
    .fch { overflow-y: auto; }
    .fch-app { height: auto; min-height: 100%; }
    .fch-body { display: flex; flex-direction: column; }
    .fch-stage { order: -2; height: 62vh; min-height: 380px; flex: none; }
    .fch-rail { order: -1; flex-direction: row; justify-content: center; align-self: stretch; overflow-x: auto; }
    .fch-left, .fch-right { overflow: visible; }
    .fch-lcard[data-left="design"], .fch-lcard[data-left="finish"], .fch-lcard[data-left="export"] { overflow: visible; }
    .fch-packlist { overflow: visible; }
    .fch-libgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .fch-piece-list { max-height: none; }
    .fch-export-card { position: static; }
    .fch-export-top { display: inline-flex; }
}
@media (max-width: 640px) {
    .fch-body { padding: 8px; gap: 8px; }
    .fch-top .fsu-credits, .fch-steps { display: none; }
    .fch-pack-btn { display: inline-flex; }
    .fch-stage { height: 64vh; min-height: 340px; border-radius: 14px; }
    .fch-cam { top: auto; bottom: 10px; left: 8px; right: 8px; transform: none; overflow-x: auto; scrollbar-width: none; }
    .fch-cam button { flex: 1 0 auto; }
    .fch-bodyctl { top: 10px; right: 10px; }
    .fch-hint { display: none; }
    .fch-stats { top: 10px; bottom: auto; left: 10px; padding: 5px 8px; }
    .fch-stats-text { font-size: 10px; }
    .fch-budget { width: 110px; }
    .fch-rail { gap: 2px; padding: 4px; }
    .fch-rail .fsu-tool { width: 36px; height: 36px; }
    .fch-rail .fsu-rail-sep { width: 1px; height: 22px; margin: 0 2px; }
    .fch-empty { padding: 16px; }
    .fch-proj { grid-template-columns: 48px 1fr; }
    .fch-proj-act { grid-column: 1 / -1; }
    .fch-proj-thumb { width: 48px; height: 40px; }
}

/* fonts by group, letter looks, photo frames (CONTRACT section 9) */
.fch-fontpick { display: grid; gap: 6px; }
.fch-fontgroups { display: flex; flex-wrap: wrap; gap: 4px; }
.fch-fontgroups .fsu-chip { padding: 3px 9px; font-size: 11px; }
.fch-fontlist { display: grid; gap: 5px; max-height: 236px; overflow-y: auto; padding-right: 2px; }
.fch-font {
    display: grid; gap: 2px; text-align: left; padding: 7px 10px 6px; border-radius: 10px; border: 1px solid var(--fsu-line2);
    background: var(--fsu-panel2); color: var(--fsu-text); cursor: pointer; transition: border-color .15s, background .15s; box-shadow: none; min-width: 0;
}
.fch-font:hover { border-color: rgba(0, 240, 255, .5); background: rgba(0, 240, 255, .06); }
.fch-font.is-on { border-color: rgba(255, 47, 158, .7); background: linear-gradient(120deg, rgba(255, 47, 158, .14), rgba(168, 85, 247, .14)); }
.fch-font-sample { font-size: 22px; line-height: 1.25; color: #f6e2a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fch-font-sample.is-loading { opacity: .35; }
.fch-font small { color: var(--fsu-muted); font-size: 10.5px; }
.fch-looks, .fch-ftiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.fch-look, .fch-ftile {
    display: grid; justify-items: center; gap: 3px; padding: 7px 2px 5px; border-radius: 10px; border: 1px solid var(--fsu-line2);
    background: var(--fsu-panel2); color: var(--fsu-cyan); cursor: pointer; transition: border-color .15s, background .15s; box-shadow: none; min-width: 0;
}
.fch-look small, .fch-ftile small { color: var(--fsu-muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fch-look:hover, .fch-ftile:hover { border-color: rgba(0, 240, 255, .5); background: rgba(0, 240, 255, .07); }
.fch-look.is-on, .fch-ftile.is-on { border-color: rgba(255, 47, 158, .7); background: linear-gradient(120deg, rgba(255, 47, 158, .16), rgba(168, 85, 247, .16)); }
.fch-look.is-on small, .fch-ftile.is-on small { color: var(--fsu-text); }
.fch-fic { width: 26px; height: 26px; }
.fch-lookswatch { display: grid; place-items: center; width: 40px; height: 26px; border-radius: 7px; }
.fch-lookswatch b { font: 900 16px/1 var(--fsu-display); letter-spacing: .02em; }
.fch-lookswatch.is-solid b { color: #f2c45c; }
.fch-lookswatch.is-outlined { background: #f2c45c; }
.fch-lookswatch.is-outlined b { color: #c99a2e; text-shadow: 0 1px 0 #fff3c4; }
.fch-lookswatch.is-two_tone { background: #15161a; border: 1.5px solid #f2c45c; }
.fch-lookswatch.is-two_tone b { color: #f2c45c; }
.fch-lookswatch.is-iced { background: #f2c45c; }
.fch-lookswatch.is-iced b {
    color: transparent; background: radial-gradient(circle, #fff 0 1.1px, #bfe9ff 1.3px 1.7px, transparent 2px) 0 0 / 4px 4px, #dfe9f2;
    -webkit-background-clip: text; background-clip: text;
}
.fch-framing { border-radius: 12px; border: 1px solid var(--fsu-line2); background: repeating-conic-gradient(#121722 0 25%, #0d111a 0 50%) 0 0 / 16px 16px; overflow: hidden; }
.fch-framing-cv { display: block; width: 100%; height: 160px; cursor: grab; touch-action: none; }
.fch-framing-cv.is-drag { cursor: grabbing; }
@media (max-width: 420px) { .fch-looks, .fch-ftiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
