/* ============================================================================
 * customizer.css — оформление Web Customizer (сам баннер — в style.css)
 * ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0d1024; --bg2: #141833; --bg3: #1b2043; --line: #262b52; --line2: #303663;
  --ink: #e8e9ff; --ink2: #c3c8f0; --mute: #8b91c4; --acc: #7b86ff; --acc2: #4b58c8;
  --ok: #49c58e; --warn: #ffc9a8; --err: #ff8fa3;
}
html, body { height: 100%; background: var(--bg); color: var(--ink); font: 13px/1.4 'Nunito', system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; background: #0f1330; padding: 0 4px; border-radius: 4px; color: #cfd3ff; }
.muted { color: var(--mute); font-size: 12px; }
.spacer { flex: 1; }

/* ---- кнопки ---- */
button { padding: 7px 11px; border: 0; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 12.5px;
  background: var(--acc2); color: #fff; transition: background .15s; white-space: nowrap; }
button:hover { background: #5c69dc; }
button.ghost { background: #232a55; }
button.ghost:hover { background: #333c78; }
button.primary { background: linear-gradient(135deg, #6b7cff, #9b6cff); }
button.primary:hover { filter: brightness(1.08); }
button.danger { background: #5a2440; }
button.danger:hover { background: #7a2e55; }
button.mini { padding: 4px 8px; font-size: 11.5px; border-radius: 7px; }
button.narrow { padding: 7px 9px; }
button.on { box-shadow: inset 0 0 0 1.5px #a3abff; }

/* ---- шапка ---- */
.top { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--bg2); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand b { display: block; font: 700 16px 'Comfortaa', sans-serif; }
.brand small { color: var(--mute); font-size: 11px; }
.export { position: relative; display: flex; gap: 2px; }
.menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 280px; padding: 6px;
  background: #1a1f45; border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.menu.open { display: block; }
.menu button { display: block; width: 100%; text-align: left; background: transparent; padding: 8px 10px; }
.menu button:hover { background: #262d63; }
.menu b { display: block; font-size: 12.5px; }
.menu span { font-weight: 400; color: var(--mute); font-size: 11.5px; }

/* ---- раскладка ---- */
.app { display: grid; grid-template-columns: 176px 410px 1fr; height: calc(100vh - 56px); }
.nav { background: var(--bg2); border-right: 1px solid var(--line); overflow-y: auto; padding: 8px 6px; }
.nav__b { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent;
  padding: 8px 10px; margin-bottom: 2px; font-weight: 600; color: var(--ink2); }
.nav__b:hover { background: #1f2550; }
.nav__b.on { background: #2b3370; color: #fff; box-shadow: inset 3px 0 0 var(--acc); }
.nav__i { width: 20px; text-align: center; }
.panel { overflow-y: auto; padding: 14px 16px 80px; border-right: 1px solid var(--line); background: #10132b; }
.panel::-webkit-scrollbar, .nav::-webkit-scrollbar { width: 10px; }
.panel::-webkit-scrollbar-thumb, .nav::-webkit-scrollbar-thumb { background: #2c3260; border-radius: 6px; }
.panel__h { font: 700 17px 'Comfortaa', sans-serif; margin-bottom: 12px; }
.is-basic .is-adv { display: none !important; }

/* ---- поля ---- */
.f-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; margin: 0 0 9px; }
.f-row > .f-hint { grid-column: 1 / -1; margin-top: -3px; }
.f-label { display: flex; align-items: baseline; gap: 6px; color: var(--ink2); font-size: 12.5px; min-width: 0; }
.f-val { margin-left: auto; color: var(--mute); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.f-badge { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 6px; background: #2b3370; color: #cfd3ff; }
.f-row input[type="range"] { width: 170px; accent-color: var(--acc); }
.f-row select, .f-row input[type="text"], .f-row input[type="password"], .f-row input[type="number"] {
  width: 190px; padding: 6px 8px; border-radius: 8px; background: #0f1330; border: 1px solid var(--line2); font-size: 12.5px; }
.f-row select.font-sel { width: 210px; }
.f-head { margin: 18px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); font: 700 13.5px 'Comfortaa', sans-serif; color: #fff; }
.f-head small { display: block; font: 400 11.5px 'Nunito', sans-serif; color: var(--mute); margin-top: 3px; }
.f-sub { font-weight: 700; color: var(--ink2); margin: 4px 0 7px; font-size: 12.5px; }
.f-hint { font-size: 11.5px; color: var(--mute); line-height: 1.45; }
.f-note { font-size: 12px; color: #aab0e0; line-height: 1.5; padding: 9px 11px; margin: 4px 0 10px; border-radius: 10px;
  background: #151a3c; border: 1px solid var(--line); }
.f-note.warn { color: var(--warn); border-color: #5a3d32; background: #241a1e; }
.f-block { margin: 0 0 12px; }
.f-btns { display: flex; gap: 6px; margin: 4px 0 10px; }
.f-btns--wrap { flex-wrap: wrap; }

/* сегменты, переключатели */
.seg { display: inline-flex; flex-wrap: wrap; background: #0f1330; border: 1px solid var(--line2); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { background: transparent; padding: 5px 9px; font-weight: 600; font-size: 12px; color: var(--ink2); border-radius: 7px; }
.seg button:hover { background: #222a5a; }
.seg button.on { background: #3a46a8; color: #fff; box-shadow: none; }
.f-row .seg { justify-self: end; max-width: 250px; }
.sw { position: relative; display: inline-block; width: 38px; height: 21px; justify-self: end; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: #2a305c; cursor: pointer; transition: background .2s; }
.sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #cfd3ff; transition: transform .2s; }
.sw input:checked + span { background: var(--acc); }
.sw input:checked + span::after { transform: translateX(17px); background: #fff; }
.chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--ink2); font-size: 12px; }
.chk input { accent-color: var(--acc); }

/* цвет */
.c-ctl { display: flex; align-items: center; gap: 5px; justify-self: end; }
.c-pick { position: relative; width: 30px; height: 26px; flex: none; }
.c-pick input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.c-sw { position: absolute; inset: 0; border-radius: 7px; border: 1px solid var(--line2);
  background: linear-gradient(var(--c), var(--c)), repeating-conic-gradient(#888 0 25%, #ddd 0 50%) 0 0 / 8px 8px; }
.c-sw.is-auto::after { content: "авто"; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); font-size: 8.5px; color: var(--mute); }
.c-alpha { width: 64px !important; accent-color: var(--acc); }
.c-text { width: 112px !important; padding: 5px 6px !important; font: 11px ui-monospace, Consolas, monospace !important; }
.c-text.bad { border-color: var(--err) !important; }
.c-reset { padding: 4px 7px; background: #232a55; border-radius: 7px; font-size: 12px; }

/* ассет */
.a-ctl { display: flex; align-items: center; gap: 5px; justify-self: end; }
.a-thumb { width: 30px; height: 30px; border-radius: 7px; flex: none; border: 1px solid var(--line2);
  background: #0f1330 center / contain no-repeat; }
.a-thumb.is-empty { background-image: repeating-conic-gradient(#1a1f45 0 25%, #131735 0 50%) !important; background-size: 8px 8px !important; }
.a-path { width: 130px !important; }

/* галереи */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chips--presets { grid-template-columns: repeat(2, 1fr); }
.chips--small { grid-template-columns: repeat(3, 1fr); }
.chips--pal { grid-template-columns: repeat(4, 1fr); }
.chips--icons { grid-template-columns: repeat(3, 1fr); }
.chip { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 7px; text-align: left;
  background: #161b3d; border: 1px solid #262c5c; border-radius: 11px; font-weight: 600; color: var(--ink2); white-space: normal; }
.chip:hover { background: #20275a; }
.chip.on { background: #2b3370; border-color: #7b86ff; color: #fff; box-shadow: none; }
.chip b { font-size: 11.5px; line-height: 1.2; }
.chip small { font-weight: 400; font-size: 10.5px; color: var(--mute); line-height: 1.3; }
.p-sw { display: block; height: 26px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); }
.chips--pal .p-sw { height: 20px; }
.sh-thumb { display: block; height: 34px; }
.sh-thumb svg { width: 100%; height: 100%; display: block; }
.ic-thumb { display: block; height: 34px; position: relative; }
.ic-thumb i { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.ic-circle i { border-radius: 50%; background: linear-gradient(160deg, #fff, #cfd8ff); box-shadow: 0 0 10px #8fb8ff; }
.ic-bubble i { border-radius: 50%; background: radial-gradient(circle at 32% 26%, #fff 0 12%, transparent 40%), radial-gradient(circle at 60% 72%, #8fb8ff, #eef3ff 80%); box-shadow: 0 0 0 1px #fff; }
.ic-glass i { border-radius: 50%; background: linear-gradient(160deg, rgba(255,255,255,.65), rgba(255,255,255,.12)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.ic-crystal i { clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); background: linear-gradient(135deg, #fff 0 22%, #cfe3ff 23%, #9b8cff); }
.ic-squircle i { border-radius: 30%; background: linear-gradient(160deg, #fff, #cfd8ff); }
.ic-square i { border-radius: 4px; background: linear-gradient(160deg, #fff, #cfd8ff); }
.ic-hex i { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, #fff, #cfd8ff); }
.ic-flat i { border: 1px dashed #5a62a8; border-radius: 50%; }
.ic-custom i { border: 1px dashed #5a62a8; border-radius: 6px; background: repeating-conic-gradient(#2a305c 0 25%, #1a1f45 0 50%) 0 0 / 8px 8px; }
.gl-thumb, .bd-thumb, .sd-thumb { display: block; height: 26px; border-radius: 9px; }
.gl-thumb { background: linear-gradient(160deg, rgba(255,255,255,.75), rgba(200,220,255,.35)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.gl-soft { background: linear-gradient(160deg, rgba(255,255,255,.8), rgba(220,232,255,.55)); }
.gl-crystal { background: linear-gradient(135deg, #fff, rgba(190,220,255,.6) 50%, #fff); }
.gl-milky { background: rgba(255,255,255,.85); }
.gl-dark { background: linear-gradient(160deg, rgba(60,64,90,.9), rgba(14,15,22,.9)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.gl-iridescent { background: linear-gradient(120deg, #ffd1ee, #d1e8ff, #e0d1ff, #d1fff4); }
.bd-thumb { background: #20264f; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.bd-none { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.bd-soft { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.bd-crystal { box-shadow: inset 0 0 0 1.5px #fff, inset 0 2px 6px rgba(190,220,255,.6); }
.bd-glow { box-shadow: inset 0 0 0 2px #cfd8ff, 0 0 10px #8fb8ff; }
.bd-neon { box-shadow: inset 0 0 0 2px #ff5ac8, 0 0 12px #ff5ac8; }
.bd-iridescent { border: 2px solid transparent; background: linear-gradient(#20264f, #20264f) padding-box, linear-gradient(120deg, #ffb3e6, #b3d9ff, #c9b3ff, #b3fff0) border-box; box-shadow: none; }
.sd-thumb { background: #cfd6f5; margin: 0 6px 6px; }
.sd-none { box-shadow: none; }
.sd-soft { box-shadow: 0 6px 12px rgba(0,0,0,.45); }
.sd-floating { box-shadow: 0 12px 18px -4px rgba(0,0,0,.55); }
.sd-deep { box-shadow: 0 8px 14px rgba(0,0,0,.85); }
.sd-glow { box-shadow: 0 0 16px #8fb8ff; }

/* замки, свои пресеты */
.locks { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 6px; }
.lock { background: #1b2045; font-weight: 600; font-size: 12px; padding: 5px 9px; }
.lock.on { background: #4a3a1e; color: #ffe2a8; box-shadow: inset 0 0 0 1px #8a6a30; }
.up-row { display: flex; gap: 4px; margin-bottom: 5px; }
.up-name { flex: 1; text-align: left; background: #1b2045; overflow: hidden; text-overflow: ellipsis; }

/* палитра акцентов */
.acc { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.acc input[type="color"] { width: 30px; height: 26px; padding: 0; border: 1px solid var(--line2); border-radius: 7px; background: #0f1330; cursor: pointer; }

/* блоки информации */
.items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.item { padding: 8px; border-radius: 12px; background: #141836; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.item.is-current { border-color: #6b78e6; box-shadow: 0 0 0 1px #6b78e6; }
.it-line { display: flex; align-items: center; gap: 6px; position: relative; }
.it-line input[type="text"] { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; background: #0f1330; border: 1px solid var(--line2); font-size: 12.5px; }
.it-line select { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; background: #0f1330; border: 1px solid var(--line2); font-size: 12.5px; }
.it-line input[type="color"] { width: 30px; height: 28px; padding: 0; border: 1px solid var(--line2); border-radius: 7px; background: #0f1330; flex: none; cursor: pointer; }
.it-num { width: 18px; text-align: center; color: var(--mute); font-weight: 800; flex: none; }
.it-iconbox { display: flex; gap: 2px; flex: none; position: relative; }
.it-icon { width: 74px !important; flex: none !important; text-align: center; }
.it-tag { width: 58px; flex: none; color: var(--mute); font-size: 11px; }
.it-more { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line2); }
.it-more .c-ctl, .it-more .a-ctl { justify-self: start; }
.it-flags { display: flex; gap: 14px; padding-left: 64px; }
.it-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.pop { position: absolute; z-index: 30; left: 0; top: calc(100% + 4px); width: 300px; padding: 8px; border-radius: 12px;
  background: #1a1f45; border: 1px solid var(--line2); box-shadow: 0 16px 40px rgba(0,0,0,.55); }
.pop__t { font-size: 11px; color: var(--mute); margin: 2px 0 5px; }
.pop__grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: 6px; }
.pop__grid button { padding: 5px; background: #232a55; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.ic-lib { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ic-lib__c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 9px; background: #161b3d; }
.ic-lib__c small { font-size: 10px; color: var(--ink2); }
.ic-lib__c code { font-size: 9.5px; }
.ic-lib__i { display: block; width: 20px; height: 20px; background: #cfe3ff;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.pop .ic-lib__i { width: 18px; height: 18px; }

/* декор, углы */
.decor { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.card { border-radius: 11px; background: #141836; border: 1px solid var(--line); padding: 7px 10px; }
.card.on { border-color: #3d4794; background: #161c42; }
.card__head { display: flex; align-items: center; gap: 8px; }
.card__head b { flex: 1; font-size: 12.5px; }
.card.on .card__head { margin-bottom: 8px; }
.card .f-row input[type="range"] { width: 150px; }
.dc-ico { width: 18px; height: 18px; flex: none; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff, #9fc0ff 70%); }
.dc-ico-stars, .dc-ico-sparkles { border-radius: 0; background: #fff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.dc-ico-stars { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: #ffe7a8; }
.dc-ico-hearts { border-radius: 0; background: #ff9bd3; clip-path: polygon(50% 100%, 6% 52%, 4% 22%, 22% 6%, 50% 22%, 78% 6%, 96% 22%, 94% 52%); }
.dc-ico-crystals { border-radius: 0; background: linear-gradient(150deg, #fff, #9fc0ff); clip-path: polygon(50% 0, 100% 34%, 76% 100%, 24% 100%, 0 34%); }
.dc-ico-droplets { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 40% 62%, #fff, #8fd0ff 70%); }
.dc-ico-glints { border-radius: 2px; width: 6px; margin: 0 6px; background: linear-gradient(90deg, transparent, #fff, transparent); transform: rotate(18deg); }
.dc-ico-circles { background: none; border: 1.5px solid #cfe3ff; }
.dc-ico-spots { background: radial-gradient(circle, #fff, transparent 70%); }
.dc-ico-particles { background: radial-gradient(circle, #fff 0 18%, transparent 22%) 0 0 / 6px 6px; border-radius: 0; }
.dc-ico-custom { border-radius: 4px; background: repeating-conic-gradient(#3a4180 0 25%, #252b5a 0 50%) 0 0 / 6px 6px; }
.cn-prev { width: 22px; height: 22px; flex: none; }
.cn-prev svg { width: 100%; height: 100%; display: block; }

/* слои */
.layers { display: flex; flex-direction: column; gap: 5px; }
.layer { display: grid; grid-template-columns: auto 1fr 120px 40px; align-items: center; gap: 8px; }
.layer b { font-weight: 600; font-size: 12.5px; color: var(--ink2); }
.layer input[type="range"] { width: 100%; accent-color: var(--acc); }
.order { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 9px; background: #161b3d; }
.order b { flex: 1; font-weight: 600; font-size: 12px; }
.order.is-body { background: #262d63; }

.io-text { width: 100%; 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; }
.gh-status { font-size: 12px; padding: 6px 0; color: var(--mute); white-space: pre-wrap; }
.gh-status.ok { color: var(--ok); } .gh-status.err { color: var(--err); }

/* ---- превью ---- */
.preview { display: flex; flex-direction: column; min-width: 0; background: #0b0d1e; }
.pv-bar, .pv-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.pv-ctl { border-bottom: 0; border-top: 1px solid var(--line); }
.pv-bar .seg button { padding: 4px 8px; font-size: 11.5px; }
.pv-src { color: var(--ink2); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.pv-src select, #customSize input { padding: 4px 6px; border-radius: 7px; background: #0f1330; border: 1px solid var(--line2); font-size: 12px; }
#customSize input { width: 70px; }
.pv-ctl button { padding: 6px 10px; font-size: 12px; }
.pv-ctl button.on { background: #3a46a8; }
.obs { color: var(--ink2); font-size: 12px; }
.obs b { color: #fff; font-variant-numeric: tabular-nums; }
.pv-stage { flex: 1; position: relative; overflow: hidden; }
.scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.scene[data-bg="transparent"] { background: repeating-conic-gradient(#cfd0dc 0 25%, #f4f4f8 0 50%) 0 0 / 24px 24px; }
.scene[data-bg="light"] { background: #eceaf6; }
.scene[data-bg="dark"] { background: #08080e; }
.scene[data-bg="game"] { background:
  radial-gradient(700px 360px at 26% 30%, #3a6ea5, transparent 60%),
  radial-gradient(640px 340px at 82% 78%, #7a3b6e, transparent 60%),
  linear-gradient(135deg, #12281c, #24402f 60%, #101c28); }
.scene[data-bg="colorful"] { background:
  radial-gradient(500px 300px at 15% 25%, #ffcf3a, transparent 60%),
  radial-gradient(520px 320px at 85% 20%, #ff3aa5, transparent 60%),
  radial-gradient(560px 340px at 60% 90%, #2fd4ff, transparent 60%),
  linear-gradient(120deg, #2a7a3a, #7a2a8a); }
.pv-wrap { position: relative; flex: none; transform-origin: 50% 50%; transition: width .3s, height .3s; }
.pv-wrap iframe { display: block; border: 0; background: transparent; }
.scene.safe .pv-wrap::after { content: ""; position: absolute; inset: -1px; pointer-events: none;
  outline: 1px dashed rgba(90,200,255,.55); }

/* ---- v3: галереи орнамента (customizer/ornament.js) ----
   Миниатюры красятся текущими цветами баннера: --orn-a… и --th-* ставит JS. */
.chips--orn { grid-template-columns: repeat(3, 1fr); }
.chips--themes { grid-template-columns: repeat(2, 1fr); }
.chips--themes .chip small { display: block; }
.oth { display: block; position: relative; height: 40px; overflow: hidden; border-radius: 8px;
  background: radial-gradient(120% 120% at 50% 0%, #2a3170, #151a3c); }
.oth--theme { height: 46px; }
.oth > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.oth .oth-body { fill: var(--th-g2); stroke: var(--th-bd); stroke-width: .8; }
.oth-pill { position: absolute; left: 25%; right: 25%; top: 9px; bottom: 9px; border-radius: 12px;
  background: linear-gradient(160deg, var(--th-g1), var(--th-g2)); border: 1px solid var(--th-bd); }
.oth-pill--big { left: 8%; right: 8%; top: 6px; bottom: 6px; overflow: hidden; border-radius: 14px; }
.oth-x { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 600 10px/1 system-ui, sans-serif;
  font-style: normal; color: rgba(255,255,255,.55); }
.oth-cap { position: absolute; top: 5px; height: 30px; }
.oth-cap.l { left: 25%; transform: translateX(-70%); }
.oth-cap.r { right: 25%; transform: translateX(70%); }
.oth--theme .oth-cap { top: 7px; height: 26px; }
.oth--theme .oth-cap.l { left: 18.75%; }
.oth--theme .oth-cap.r { right: 18.75%; }
.oth-cap svg { display: block; width: 100%; height: 100%; }
.oth-cap.r svg { transform: scaleX(-1); }
.oth--holder { display: flex; align-items: center; justify-content: center; }
.oth-ic { position: relative; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.oth-ic > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.oth-glyph { position: relative; display: block; background: var(--orn-a3);
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center; }
.oth--gl { display: flex; align-items: center; justify-content: center; }
.oth--gl > .oth-glyph { width: 22px; height: 22px; background: var(--orn-a); }
.oth-glyph-big { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.oth-glyph-big svg { width: 100%; height: 100%; }
.oth--div { display: flex; align-items: center; justify-content: center; gap: 5px; }
.oth-dico { width: 22px; height: 22px; border-radius: 50%; background: var(--icon-bg); box-shadow: 0 0 0 2px var(--orn-a2); }
.oth-sep { width: 7px; height: 30px; display: flex; align-items: center; justify-content: center; }
.oth-sep > svg { width: 100%; height: 100%; }
.oth-sep--line::before, .oth-sep--glow::before { content: ""; width: 1.5px; height: 22px; background: var(--orn-a); border-radius: 1px; }
.oth-sep--glow::before { box-shadow: 0 0 6px var(--orn-a); }
.oth-sep--dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--orn-a); }
.oth-sep--crystal::before { content: ""; width: 5px; height: 9px; background: var(--orn-a2); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.oth-sep--bubble::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--orn-a2); }
.oth-lines { display: flex; flex-direction: column; gap: 4px; }
.oth-lines i { display: block; width: 34px; height: 4px; border-radius: 2px; background: var(--th-tx); opacity: .75; }
.oth-lines i + i { width: 24px; opacity: .45; }
.oth--lab { display: flex; align-items: center; justify-content: center; }
.oth-lab { display: inline-block; font: 800 10px/1.9 system-ui, sans-serif; letter-spacing: .08em; color: #fff;
  background: linear-gradient(160deg, var(--orn-a2), var(--orn-a)); padding: 0 .9em; border-radius: 99px; }
.oth-lab--rounded { border-radius: 6px; }
.oth-lab--square { border-radius: 0; }
.oth-lab--crystal { border-radius: 3px; clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%); }
.oth-lab--bubble { border-radius: 99px; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.oth-lab--glass { background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.5); }
.oth--ul { display: flex; align-items: center; justify-content: center; }
.oth-ult { position: relative; font: 700 13px/1.2 system-ui, sans-serif; color: var(--th-tx); }
.oth-ult.has-end { margin-right: 10px; }
.oth-ul { position: absolute; left: 0; right: 0; bottom: -.34em; height: .42em; background: var(--orn-a); }
.oth-ule { position: absolute; right: -.8em; bottom: -.45em; width: .62em; height: .62em; background: var(--orn-a); }
.oth-hl, .oth-tx { position: absolute; inset: 0; pointer-events: none; }
.oth-hl { opacity: .75; }
.oth-acc { position: absolute; }
.oth-tx { overflow: hidden; --tx-d: 1100ms; --tx-h: 28px; }
.oth--qr, .oth--img { display: flex; align-items: center; justify-content: center; }
.oth-qr { position: relative; width: 24px; height: 24px; }
.oth-qrf { position: absolute; inset: 0; z-index: 0; }
.oth-qrc { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border-radius: 3px;
  background: #fff repeating-conic-gradient(#111 0 25%, #fff 0 50%) 0 0 / 6px 6px; box-shadow: inset 0 0 0 2px #fff; }
.oth-img { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #ffd1e8, #a9c8ff); }
.chips--icons .chip .oth { height: 34px; }

/* ---- v3: библиотека ассетов ---- */
.lib__bar { display: flex; gap: 6px; margin-bottom: 8px; }
.lib__bar select { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; background: #0f1330; border: 1px solid var(--line2); font-size: 12.5px; }
.lib { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow-y: auto; padding-right: 2px; }
.lib__row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; padding: 6px; border-radius: 10px;
  background: #141836; border: 1px solid var(--line); }
.lib__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lib__meta b { font-size: 12px; }
.lib__meta code { font-size: 10.5px; color: #9fb4ff; }
.lib__meta small { font-size: 10.5px; color: var(--mute); line-height: 1.3; }

/* ---- v3: тест содержимого в превью ---- */
.pv-test { color: var(--ink2); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.pv-test select { padding: 4px 6px; border-radius: 7px; background: #0f1330; border: 1px solid var(--line2); font-size: 12px; }

/* ---- Theme Designer (customizer/designer.js) ---- */
.chips--dz { grid-template-columns: repeat(3, 1fr); }
.dz-sw { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 34px; padding: 4px 5px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18); overflow: hidden; }
.dz-sw b { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.dz-emo { position: absolute; right: 5px; top: 3px; font-style: normal; font-size: 15px; }
.dz-accrow { display: flex; align-items: center; gap: 6px; }
.dz-acc { width: 34px; height: 26px; padding: 0; border: 1px solid var(--line2); border-radius: 7px; background: #0f1330; cursor: pointer; }
.dz-go { margin-top: 12px; }
.dz-status { margin: 6px 0; }
.dz-list { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 10px; }
.dz-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 9px; background: #141836; border: 1px solid var(--line); }
.dz-row b { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-row.is-wait { opacity: .6; }
.dz-stage { flex: 1; min-height: 0; overflow-y: auto; background: #0b0d1e; }
.dz-stage[hidden] { display: none; }
.dz-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: rgba(20,24,51,.96); border-bottom: 1px solid var(--line); }
.dz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; padding: 12px; }
.dz-tile { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 13px; background: #141836; border: 1px solid var(--line); min-width: 0; }
.dz-tile[hidden] { display: none; }
.dz-tile.is-loading, .dz-tile.is-checking { opacity: .75; }
.dz-tile.is-source { border-color: #7b86ff; box-shadow: 0 0 0 1px #7b86ff inset; }
.dz-tile.is-source .dz-head b::after { content: " · исходный"; color: var(--mute); font-weight: 600; }
.dz-head { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dz-head b { font-size: 13px; color: #fff; }
.dz-tags { font-size: 11px; color: var(--mute); }
.dz-view { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 4px; border-radius: 10px; overflow: hidden; background: #24402f; }
.dz-wrap { position: relative; overflow: hidden; flex: none; width: 360px; height: 120px; }
.dz-wrap iframe { position: absolute; left: 0; top: 0; display: block; border: 0; background: transparent; transform-origin: 0 0; width: 600px; height: 200px; }
.dz-info { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 11px; color: var(--ink2); }
.dz-info i { font-style: normal; color: var(--mute); }
.dz-checks { display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; color: var(--mute); }
.dz-checks .ok { padding: 1px 6px; border-radius: 6px; background: rgba(73,197,142,.14); color: var(--ok); }
.dz-checks .re { padding: 1px 6px; border-radius: 6px; background: rgba(255,201,168,.12); color: var(--warn); cursor: help; }
.dz-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-btns button { padding: 6px 10px; font-size: 12px; }
body.dz-on .pv-ctl { display: none; }

/* ---- textarea / поле стиля ---- */
.pp-card { padding: 10px; border-radius: 12px; background: #141836; border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.pp-card__h { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.pp-card__h b { color: #fff; font-size: 13px; }
.pp-card__h small { color: var(--mute); font-size: 10.5px; }
.pp-sw { display: flex; gap: 4px; margin-bottom: 4px; }
.pp-sw b { width: 22px; height: 16px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset; }
.pp-kv { display: grid; grid-template-columns: 78px 1fr; gap: 6px; font-size: 11.5px; }
.pp-kv i { font-style: normal; color: var(--mute); font-size: 10.5px; letter-spacing: .06em; }
.pp-desc { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 8px; }
.pp-desc .f-hint { flex: 1; color: var(--ink2); }
.pp-import { margin: 10px 0; padding: 8px; border-radius: 10px; background: #141836; border: 1px dashed var(--line2); display: flex; flex-direction: column; gap: 6px; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pp-tags span { padding: 1px 7px; border-radius: 6px; background: #232a55; font-size: 11px; color: var(--ink2); }
.pp-grid { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.pp-view { min-height: 100px; }
.pp-foot { padding: 0 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.pp-checks .bad { padding: 1px 6px; border-radius: 6px; background: rgba(255,143,163,.14); color: var(--err); cursor: help; }
.pp-report { padding: 8px 10px; border-radius: 10px; background: #141836; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--ink2); }
.pp-row i { font-style: normal; color: var(--mute); }

/* ---- v3.1: группы разделов и материалы ---- */
.nav__g { margin: 12px 8px 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.nav__g:first-child { margin-top: 2px; border-top: 0; padding-top: 0; }
.chips--mat { grid-template-columns: repeat(2, 1fr); }
.mt-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); }
@media (max-width: 1280px) { .nav__g { text-align: center; margin: 8px 0 2px; font-size: 9px; letter-spacing: 0; } }
@media (max-width: 900px) { .nav__g { display: none; } }

/* ---- тосты ---- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { padding: 10px 14px; border-radius: 11px; background: #1f2654; border: 1px solid #3d4794; box-shadow: 0 10px 30px rgba(0,0,0,.45);
  font-size: 12.5px; transition: opacity .35s, transform .35s; }
.toast.err { background: #3a1a2a; border-color: #7d2e3e; }
.toast.warn { background: #33281a; border-color: #7a5a30; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---- узкие экраны ---- */
@media (max-width: 1280px) {
  .app { grid-template-columns: 58px 390px 1fr; }
  .nav__t { display: none; }
  .nav__b { justify-content: center; padding: 9px 4px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 50vh auto; height: auto; }
  .nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav__b { width: auto; }
  .panel { max-height: none; }
  .preview { height: 70vh; }
  .top { flex-wrap: wrap; height: auto; padding: 8px 12px; }
}

/* v3.2: миниатюры индикаторов и предупреждение о весе */
.dotth { display: flex; gap: 5px; align-items: center; justify-content: center; height: 40px; --dt: rgba(150,160,200,.55); --da: #8fb8ff; }
.dotth i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--dt); }
.dotth i.on { background: var(--da); }
.dotth[data-ds="pill"] i.on { width: 16px; border-radius: 6px; }
.dotth[data-ds="dots"] i.on { transform: scale(1.25); box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 0 7px var(--da); }
.dotth[data-ds="tiny"] i { width: 8px; height: 4px; border-radius: 3px; } .dotth[data-ds="tiny"] i.on { width: 20px; box-shadow: 0 0 6px var(--da); }
.dotth[data-ds="pearls"] i { width: 8px; height: 8px; background: radial-gradient(circle at 34% 30%, #fff 0 14%, var(--dt) 52%, rgba(0,0,0,.25)); }
.dotth[data-ds="pearls"] i.on { width: 10px; height: 10px; background: radial-gradient(circle at 34% 30%, #fff 0 18%, var(--da) 58%, rgba(0,0,0,.3)); box-shadow: 0 0 8px var(--da); }
.dotth[data-ds="crystals"] i { width: 7px; height: 7px; border-radius: 1px; transform: rotate(45deg); }
.dotth[data-ds="crystals"] i.on { width: 9px; height: 9px; background: linear-gradient(135deg, #fff, var(--da) 60%); box-shadow: 0 0 8px var(--da); }
.dotth[data-ds="segments"] { gap: 3px; } .dotth[data-ds="segments"] i { width: 14px; height: 3px; border-radius: 1px; }
.dotth[data-ds="segments"] i.on { height: 4px; box-shadow: 0 0 7px var(--da); }
.chips--dots { grid-template-columns: repeat(3, 1fr); }
.f-hint--warn { color: #ffb86b; }

/* v3.3 */
.dotth[data-ds="capsules"] i { width: 10px; height: 5px; border-radius: 3px; } .dotth[data-ds="capsules"] i.on { width: 18px; height: 6px; background: linear-gradient(180deg, #fff 0 18%, var(--da) 20%); box-shadow: 0 0 7px var(--da); }
.dotth[data-ds="orbit"] { gap: 9px; } .dotth[data-ds="orbit"] i { width: 4px; height: 4px; position: relative; }
.dotth[data-ds="orbit"] i.on { width: 5px; height: 5px; box-shadow: 0 0 6px var(--da); } .dotth[data-ds="orbit"] i.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--da); }
.dotth[data-ds="nodes"] { gap: 0; } .dotth[data-ds="nodes"] i { width: 14px; height: 1px; border-radius: 0; position: relative; }
.dotth[data-ds="nodes"] i::before { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: #101420; border: 1px solid var(--dt); }
.dotth[data-ds="nodes"] i.on::before { background: var(--da); border-color: #fff; }
.dotth[data-ds="squares"] i { width: 5px; height: 5px; border-radius: 0; } .dotth[data-ds="squares"] i.on { width: 7px; height: 7px; }
.oth--layout { height: 40px; display: flex; align-items: center; justify-content: center; padding: 4px 8px; }
.chips--layouts { grid-template-columns: repeat(2, 1fr); }
