/* ============================================================================
 * transition.css — то, чего нет в base.css (общая оболочка кастомайзеров LYSS)
 * ========================================================================== */

/* превью: два холста — сцена и прозрачный переход */
.pv-wrap { background: transparent; }
.pv-wrap canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.pv-wrap { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 18px 50px rgba(0,0,0,.45); border-radius: 4px; overflow: hidden; }
.scene[data-bg="scene"] { background: #07080f; }
.scene[data-bg="transparent"] .pv-wrap #sceneCv { display: none; }
.scene[data-bg="dark"] .pv-wrap #sceneCv, .scene[data-bg="light"] .pv-wrap #sceneCv, .scene[data-bg="colorful"] .pv-wrap #sceneCv { display: none; }
.pv-badge { position: absolute; left: 10px; top: 10px; z-index: 3; padding: 3px 9px; border-radius: 99px; background: rgba(8,10,24,.72);
  color: #dfe3ff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; pointer-events: none; }
.pv-badge.a { color: #bfe0ff; } .pv-badge.b { color: #ffd3ee; }
.pv-warn { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; max-width: 86%; padding: 7px 12px; border-radius: 10px;
  background: rgba(58,26,42,.92); border: 1px solid #7d2e3e; color: #ffd0d8; font-size: 12px; display: none; }
.pv-warn.on { display: block; }
.pv-warn.warn { background: rgba(51,40,26,.92); border-color: #7a5a30; color: #ffe2b8; }

/* нижняя панель: управление + таймлайн */
.pv-ctl .seg button { padding: 4px 8px; }
.pv-ctl .tm { font-variant-numeric: tabular-nums; color: #fff; min-width: 138px; }
.tl { position: relative; padding: 8px 14px 10px; background: var(--bg2); border-top: 1px solid var(--line); }
.tl canvas { display: block; width: 100%; height: 88px; border-radius: 9px; background: #0c0f26; cursor: ew-resize; touch-action: none; }
.tl__legend { display: flex; gap: 14px; margin-top: 6px; font-size: 11.5px; color: var(--mute); align-items: center; flex-wrap: wrap; }
.tl__legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tl__sw { margin-left: auto; font-weight: 700; color: var(--ink2); }
.tl__sw.ok { color: var(--ok); } .tl__sw.warn { color: #ffcf8a; } .tl__sw.bad { color: var(--err); }

/* семейства и пресеты */
.fam-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.fam { display: flex; flex-direction: column; gap: 5px; padding: 6px; text-align: left; background: #161b3d; border: 1px solid #262c5c; border-radius: 12px; white-space: normal; }
.fam:hover { background: #20275a; }
.fam.on { background: #2b3370; border-color: #7b86ff; }
.fam canvas { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: #0b0d1e; }
.fam b { font-size: 12px; color: #fff; line-height: 1.2; }
.fam small { font-weight: 400; font-size: 10.5px; color: var(--mute); line-height: 1.3; }
.strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.strip .fam { min-width: 118px; flex: none; }

/* материалы */
.mat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 12px; }
.mat-sw { display: block; height: 38px; border-radius: 9px; border: 1px solid rgba(255,255,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }

/* палитры */
.pal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 12px; }
.pal { display: flex; flex-direction: column; gap: 5px; padding: 6px; background: #161b3d; border: 1px solid #262c5c; border-radius: 11px; text-align: left; }
.pal.on { background: #2b3370; border-color: #7b86ff; }
.pal .sw5 { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); }
.pal .sw5 i { flex: 1; }
.pal b { font-size: 11px; color: var(--ink2); }

/* ассеты */
.lib-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.lib-tabs button { padding: 4px 8px; font-size: 11.5px; background: #1b2045; }
.lib-tabs button.on { background: #3a46a8; }
.lib-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 3px; margin-bottom: 10px; }
.lib-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; background: #141836; border: 1px solid var(--line); border-radius: 9px; }
.lib-item:hover { background: #20275a; }
.lib-item.on { border-color: #7b86ff; background: #2b3370; }
.lib-item canvas { width: 100%; aspect-ratio: 1; display: block; border-radius: 6px; background: repeating-conic-gradient(#171b3a 0 25%, #10132b 0 50%) 0 0 / 12px 12px; }
.lib-item small { font-size: 9.5px; color: var(--mute); text-align: center; line-height: 1.15; font-weight: 600; }

/* карточки декора / эффектов */
.layer-card { border-radius: 12px; background: #141836; border: 1px solid var(--line); padding: 8px 10px; margin-bottom: 8px; }
.layer-card.off { opacity: .6; }
.layer-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.layer-card__head canvas { width: 34px; height: 34px; border-radius: 7px; background: repeating-conic-gradient(#171b3a 0 25%, #10132b 0 50%) 0 0 / 10px 10px; flex: none; }
.layer-card__head b { flex: 1; font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-card .f-row input[type="range"] { width: 150px; }

/* экспорт */
.exp-box { padding: 10px 12px; border-radius: 12px; background: #141836; border: 1px solid var(--line2); margin-bottom: 10px; }
.exp-box h4 { font: 700 13px 'Comfortaa', sans-serif; margin-bottom: 7px; color: #fff; }
.exp-kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; font-size: 12.5px; }
.exp-kv i { font-style: normal; color: var(--mute); }
.exp-kv b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.exp-btns { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.exp-btns button { text-align: left; padding: 9px 12px; }
.exp-btns button small { display: block; font-weight: 400; opacity: .8; font-size: 11px; margin-top: 1px; }
.exp-prog { height: 8px; border-radius: 99px; background: #0f1330; border: 1px solid var(--line2); overflow: hidden; margin: 6px 0; }
.exp-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6b7cff, #c58bff); transition: width .15s; }
.exp-log { font-size: 12px; color: var(--ink2); white-space: pre-wrap; min-height: 18px; }
.exp-log.err { color: var(--err); } .exp-log.ok { color: var(--ok); }
.obs-steps { font-size: 12.5px; color: var(--ink2); line-height: 1.55; padding-left: 18px; }
.obs-steps li { margin-bottom: 3px; }
.obs-steps b { color: #fff; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #232a55; color: var(--ink2); }
.pill.ok { background: rgba(73,197,142,.16); color: var(--ok); }
.pill.warn { background: rgba(255,201,168,.14); color: var(--warn); }

/* движение */
.mo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 12px; }
.mo { padding: 7px; background: #161b3d; border: 1px solid #262c5c; border-radius: 11px; text-align: left; display: flex; flex-direction: column; gap: 4px; white-space: normal; }
.mo.on { background: #2b3370; border-color: #7b86ff; }
.mo svg { width: 100%; height: 34px; display: block; }
.mo b { font-size: 11.5px; color: #fff; }
.mo small { font-weight: 400; font-size: 10.5px; color: var(--mute); line-height: 1.25; }

/* замки random */
.dna-box { width: 100%; min-height: 92px; padding: 8px; border-radius: 9px; background: #0f1330; border: 1px solid var(--line2); color: #cfd3ff;
  font: 11px/1.45 ui-monospace, Consolas, monospace; resize: vertical; margin-bottom: 6px; }
.kv-note { font-size: 11.5px; color: var(--mute); margin: -4px 0 8px; }
.saved-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: center; padding: 6px; border-radius: 10px; background: #141836; border: 1px solid var(--line); margin-bottom: 6px; }
.saved-row canvas { width: 74px; height: 42px; border-radius: 6px; background: #0b0d1e; display: block; }
.saved-row b { font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-row small { color: var(--mute); font-size: 10.5px; }
.saved-row .b { display: flex; gap: 4px; }
.saved-row.cur { border-color: #7b86ff; }
.thumb-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #0b0d1e; }
.saved-row .thumb-img { width: 74px; height: 42px; border-radius: 6px; }
.exp-btns button { white-space: normal; }

/* ===== v2: темы, направления, маски, механики, избранное, проверка ===== */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 8px; }
.theme { display: flex; flex-direction: column; gap: 5px; padding: 6px; background: #161b3d; border: 1px solid #262c5c; border-radius: 11px; text-align: left; white-space: normal; }
.theme:hover { background: #20275a; }
.theme.on { background: #2b3370; border-color: #7b86ff; }
.theme .sw5 { display: flex; height: 20px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); }
.theme .sw5 i { flex: 1; }
.theme b { font-size: 11.5px; color: #fff; }
.mech-h { margin: 12px 0 6px; font: 700 11.5px 'Comfortaa', sans-serif; letter-spacing: .02em; color: var(--ink2); text-transform: none; }

.dir-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.dir { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; background: #161b3d; border: 1px solid #262c5c; border-radius: 10px; white-space: normal; }
.dir i { font-style: normal; font-size: 20px; line-height: 1; color: #fff; }
.dir small { font-size: 9.5px; color: var(--mute); text-align: center; line-height: 1.15; font-weight: 600; }
.dir.on { background: #2b3370; border-color: #7b86ff; }
.dir:disabled { opacity: .3; cursor: not-allowed; }

.mask-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.mask { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 4px; background: #141836; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.mask:hover { background: #20275a; }
.mask.on { border-color: #7b86ff; background: #2b3370; }
.mask img { width: 100%; aspect-ratio: 8 / 5; border-radius: 6px; display: block; background: #0e1230; }
.mask b { font-size: 10.5px; color: var(--ink2); text-align: center; line-height: 1.15; }

.mech-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 10px; }
.mech { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; background: #161b3d; border: 1px solid #262c5c; border-radius: 10px; text-align: left; white-space: normal; }
.mech b { font-size: 11.5px; color: #fff; }
.mech small { font-weight: 400; font-size: 10px; color: var(--mute); line-height: 1.25; }
.mech.on { background: #2b3370; border-color: #7b86ff; }

.starbtn { position: absolute; right: 3px; top: 2px; width: 22px; height: 22px; padding: 0; border-radius: 99px; background: rgba(8,10,24,.55); color: #6a7199; font-size: 12px; line-height: 22px; border: 0; z-index: 2; }
.starbtn.on { color: #ffd45e; }
.starbtn:hover { color: #ffe9a0; }
.lib-item, .fam, .mask { position: relative; }
.lib-search { width: 100%; margin-bottom: 6px; }
.lib-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.lib-filters select, .wide-sel { width: 100%; }
.f-row .wide-sel { max-width: 100%; }

/* проверка перед экспортом */
.valid { border-radius: 12px; background: #141836; border: 1px solid var(--line2); padding: 6px 8px; margin-bottom: 8px; }
.valid__row { display: grid; grid-template-columns: 18px 128px 1fr; gap: 6px; padding: 5px 2px; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,.05); align-items: baseline; }
.valid__row:last-of-type { border-bottom: 0; }
.valid__row i { font-style: normal; font-weight: 800; }
.valid__row b { color: #fff; font-weight: 700; }
.valid__row span { color: var(--ink2); line-height: 1.35; }
.valid__row.ok i { color: var(--ok); } .valid__row.warn i { color: #ffcf8a; } .valid__row.bad i { color: var(--err); }
.valid__sum { margin-top: 6px; padding: 6px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.valid__sum.ok { background: rgba(73,197,142,.12); color: var(--ok); }
.valid__sum.warn { background: rgba(255,201,168,.1); color: #ffcf8a; }
.valid__sum.bad { background: rgba(255,120,140,.12); color: var(--err); }
.f-row--wide .seg { flex-wrap: wrap; }
.pv-ctl { flex-wrap: wrap; }
.tl canvas { height: 112px; }

/* ===== UX redesign: стиль, быстрые настройки, инспектор ===== */
.ux-step { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; font-size: 12.5px; }
.ux-step:first-child { margin-top: 2px; }
.ux-step i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #2b3370; color: #fff; }
.ux-step b { color: #fff; font-weight: 700; }
.ux-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.ux-theme { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px !important; border-radius: 99px !important; background: #151a3c !important; color: var(--ink2); font-weight: 700; font-size: 12px; }
.ux-theme:hover { background: #1d2354 !important; }
.ux-theme.on { background: #2b3370 !important; color: #fff; box-shadow: inset 0 0 0 1px #6b78e6; }
.ux-theme__sw { display: inline-flex; } .ux-theme__sw i { width: 9px; height: 14px; }
.ux-theme__sw i:first-child { border-radius: 4px 0 0 4px; } .ux-theme__sw i:last-child { border-radius: 0 4px 4px 0; }
.ux-qa { display: flex; flex-direction: column; gap: 9px; padding: 10px; border-radius: 12px; background: #131736; }
.ux-qa__r { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); }
.ux-qa__r .seg { justify-self: start; max-width: 100%; }
.ux-qa__pal { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ux-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.ux-dot { width: 22px; height: 22px; padding: 0 !important; border-radius: 50% !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.ux-dot:hover { transform: scale(1.12); }
.ux-dot.on { box-shadow: 0 0 0 2px #0f1229, 0 0 0 4px #a8b4ff; }
.ux-insp__asset { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: #131736; margin-bottom: 10px; }
.ux-insp__asset > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ux-insp__asset small { color: var(--mute); font-size: 11px; }
.ux-insp__asset canvas { width: 44px; height: 44px; border-radius: 8px; background: repeating-conic-gradient(#171b3a 0 25%, #10132b 0 50%) 0 0 / 10px 10px; }
.io-text { width: 100%; padding: 8px; border-radius: 9px; background: #0b0e24; border: 1px solid var(--line2); color: #cfd3ff; font: 11px/1.45 ui-monospace, Consolas, monospace; resize: vertical; }
.ux-pal__box h4 { margin: 0; }
.mode .seg button { padding: 5px 10px; }
.pv-stage .pv-wrap { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 16px 50px rgba(0,0,0,.5); }
.ux-ov { background: transparent; }
