/* Фото-студия (как Супа): экран на всё окно. Тот же файл на сайте — server/app/web/ph-studio.css (копия, автопроверка следит). */
.st-root { --st-bg: var(--surface-2, var(--bg, #f4f2ee)); --st-card: var(--surface, #ffffff); --st-sunk: var(--sunken, #efece6); --st-ink: var(--ink, #1e1f24); --st-ink2: var(--ink-2, var(--muted, #6b6e78)); --st-acc: #F9B43F; --st-sh: var(--shadow-1, 0 2px 8px rgba(20, 20, 30, .08));
  position: fixed; inset: 0; z-index: 15; display: grid; grid-template-rows: 56px minmax(0, 1fr); background: var(--st-bg); color: var(--st-ink); outline: none; font-size: 14px; }
.st-root .hint { color: var(--st-ink2); font-size: 12.5px; margin: 4px 0; }
.st-root .sect { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--st-ink2); margin: 12px 0 6px; }
.st-top { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--st-card); box-shadow: var(--st-sh); min-width: 0; overflow-x: auto; scrollbar-width: none; z-index: 2; }
.st-top::-webkit-scrollbar { display: none; }
.st-sp { flex: 1; }
.st-brand { display: grid; line-height: 1.15; } .st-brand small { color: var(--st-ink2); }
.st-title { min-width: 120px; max-width: 280px; flex: 0 1 240px; border: 0; background: transparent; font-weight: 700; font-size: 15px; padding: 7px 10px; border-radius: 12px; color: inherit; }
.st-title:hover, .st-title:focus { background: var(--st-sunk); outline: none; }
.st-grp { display: inline-flex; align-items: center; gap: 2px; background: var(--st-sunk); border-radius: 12px; padding: 2px; }
.st-top .btn { white-space: nowrap; }
.st-top .btn.on { background: rgba(249, 180, 63, .22); box-shadow: inset 0 0 0 2px var(--st-acc); }
.st-zoom { min-width: 58px; }
.st-saved { color: var(--st-ink2); white-space: nowrap; font-size: 12px; }
.st-body { min-height: 0; }
/* ---- главная ---- */
.st-home { overflow: auto; }
.st-home-in { max-width: 1240px; margin: 0 auto; padding: 22px 16px 60px; display: grid; gap: 26px; }
.st-home h2 { margin: 0 0 10px; font-size: 20px; }
.st-h2row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.st-h2row input[type=search] { flex: 0 1 320px; min-width: 0; }
.st-fmts { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.st-fmt { display: grid; justify-items: center; gap: 4px; padding: 14px 8px; border: 0; border-radius: 16px; background: var(--st-card); box-shadow: var(--st-sh); cursor: pointer; color: inherit; text-align: center; }
.st-fmt:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--st-acc), var(--st-sh); }
.st-fmt small { color: var(--st-ink2); }
.st-fmt-box { width: 60px; height: 60px; display: grid; place-items: center; }
.st-fmt-box i { display: block; border-radius: 6px; background: linear-gradient(135deg, var(--st-acc), #ff8a3d); }
.st-fmt-ic { width: 60px; height: 60px; display: grid; place-items: center; font-size: 26px; border-radius: 16px; background: rgba(249, 180, 63, .2); }
.st-fmt-own { cursor: default; }
.st-wh { display: flex; align-items: center; gap: 6px; } .st-wh input { width: 74px; min-width: 0; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.st-card { display: grid; gap: 4px; padding: 10px; border: 0; border-radius: 16px; background: var(--st-card); box-shadow: var(--st-sh); cursor: pointer; text-align: left; color: inherit; min-width: 0; }
.st-card:hover { box-shadow: inset 0 0 0 2px var(--st-acc), var(--st-sh); }
.st-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .st-card small { color: var(--st-ink2); }
.st-card-th { height: 150px; border-radius: 12px; background: var(--st-sunk); display: grid; place-items: center; overflow: hidden; font-size: 30px; }
.st-th { max-width: 100%; max-height: 150px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.st-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.st-chip { border: 0; background: var(--st-sunk); color: inherit; border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.st-chip:hover, .st-chip.on { background: rgba(249, 180, 63, .28); }
/* ---- редактор ---- */
.st-edit { position: relative; display: grid; grid-template-columns: 76px 300px minmax(0, 1fr) 290px; }
.st-rail { background: var(--st-card); display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; overflow-y: auto; box-shadow: 1px 0 0 rgba(0, 0, 0, .05); }
.st-rb { border: 0; background: transparent; color: var(--st-ink2); border-radius: 14px; padding: 8px 2px; display: grid; justify-items: center; gap: 2px; cursor: pointer; }
.st-rb small { font-size: 10.5px; font-weight: 600; }
.st-ri { font-size: 18px; width: 38px; height: 30px; display: grid; place-items: center; border-radius: 10px; font-weight: 800; }
.st-rb:hover { color: var(--st-ink); } .st-rb.on { color: var(--st-ink); } .st-rb.on .st-ri { background: rgba(249, 180, 63, .3); }
.st-panel { background: var(--st-card); padding: 12px 14px 20px; overflow-y: auto; min-height: 0; box-shadow: 1px 0 0 rgba(0, 0, 0, .05); display: flex; flex-direction: column; gap: 6px; }
.st-panel textarea { width: 100%; resize: vertical; min-height: 70px; }
.st-ph { display: flex; justify-content: space-between; align-items: center; font-size: 15px; margin-bottom: 4px; }
.st-wide { width: 100%; justify-content: center; }
.st-left { justify-content: flex-start; }
.st-stage { position: relative; overflow: auto; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; background-color: var(--st-bg); }
.st-stage.drop { box-shadow: inset 0 0 0 3px var(--st-acc); }
.st-canvas-wrap { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 24px; min-height: 0; min-width: max-content; }
.st-canvas-wrap figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.st-canvas-wrap figcaption { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--st-ink2); }
.st-canvas { display: block; box-shadow: 0 6px 30px rgba(20, 20, 30, .16); touch-action: none; cursor: default;
  background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-color: #fff; }
.st-tools { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 8px 12px 12px; flex-wrap: wrap; color: var(--st-ink2); font-size: 12px; }
.st-tog { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.st-insp { background: var(--st-card); padding: 12px 14px 24px; overflow-y: auto; min-height: 0; box-shadow: -1px 0 0 rgba(0, 0, 0, .05); display: flex; flex-direction: column; gap: 6px; }
.st-insp h3 { margin: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-insp textarea { width: 100%; resize: vertical; }
.st-ih { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-r { display: grid; gap: 2px; font-size: 12.5px; font-weight: 600; }
.st-r > span { display: flex; justify-content: space-between; } .st-val { color: var(--st-ink2); font-weight: 600; }
.st-r input[type=range] { width: 100%; accent-color: var(--st-acc); }
.st-c { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.st-c input[type=color] { width: 34px; height: 30px; border: 0; padding: 0; border-radius: 10px; background: none; cursor: pointer; }
.st-s { display: grid; gap: 3px; font-size: 12.5px; font-weight: 600; } .st-s select { width: 100%; min-width: 0; }
.st-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.st-togs { display: flex; gap: 12px; flex-wrap: wrap; }
.st-align { display: flex; gap: 4px; flex-wrap: wrap; } .st-align .icon-btn { background: var(--st-sunk); font-size: 16px; }
.st-looks { display: flex; gap: 5px; flex-wrap: wrap; }
.st-ai-mini { display: flex; gap: 6px; flex-wrap: wrap; }
/* ---- панели ---- */
.st-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-tpl { border: 0; background: var(--st-sunk); border-radius: 14px; padding: 8px; display: grid; justify-items: center; gap: 4px; cursor: pointer; color: inherit; }
.st-tpl canvas { max-width: 100%; max-height: 150px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.st-tpl:hover { box-shadow: inset 0 0 0 2px var(--st-acc); } .st-tpl small { font-size: 11.5px; font-weight: 600; text-align: center; }
.st-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.st-img { position: relative; border: 0; padding: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--st-sunk); cursor: pointer; }
.st-img img { width: 100%; height: 100%; object-fit: cover; display: block; } .st-img:hover { box-shadow: inset 0 0 0 2px var(--st-acc); }
.st-badge { position: absolute; right: 4px; top: 4px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 8px; font-size: 11px; padding: 1px 5px; }
.st-tx { border: 0; background: var(--st-sunk); color: inherit; border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; }
.st-tx:hover { box-shadow: inset 0 0 0 2px var(--st-acc); }
.st-tx1 { font: 800 22px "Arial Black", Arial, sans-serif; } .st-tx2 { font: 700 16px Arial, sans-serif; } .st-tx3 { font: 400 13px Arial, sans-serif; }
.st-combos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-combos button { border: 0; background: var(--st-sunk); border-radius: 12px; padding: 12px 6px; cursor: pointer; color: inherit; font-size: 15px; }
.st-combos button:hover { box-shadow: inset 0 0 0 2px var(--st-acc); }
.st-pill { background: var(--st-acc); color: #1e1f24; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 13px; } .st-pill-v { background: #6c4cff; color: #fff; }
.st-shadow { color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.st-fonts { display: grid; gap: 4px; } .st-fonts button { border: 0; background: transparent; text-align: left; padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: 16px; color: inherit; }
.st-fonts button:hover { background: var(--st-sunk); }
.st-shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.st-shapes button { border: 0; background: var(--st-sunk); border-radius: 12px; padding: 8px 2px; display: grid; justify-items: center; gap: 2px; cursor: pointer; color: inherit; }
.st-shapes button span { font-size: 22px; color: var(--st-acc); } .st-shapes button small { font-size: 10px; color: var(--st-ink2); }
.st-shapes button:hover, .st-emoji button:hover { box-shadow: inset 0 0 0 2px var(--st-acc); }
.st-emoji { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; } .st-emoji button { border: 0; background: var(--st-sunk); border-radius: 10px; font-size: 22px; padding: 4px 0; cursor: pointer; }
.st-sw { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.st-sw button, .st-sw-own { aspect-ratio: 1; border: 0; border-radius: 10px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.st-sw button:hover { transform: scale(1.06); }
.st-sw-g { grid-template-columns: repeat(4, 1fr); }
.st-sw-own { position: relative; display: grid; place-items: center; font-weight: 800; background: var(--st-sunk); overflow: hidden; }
.st-sw-own input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-rows { display: grid; gap: 6px; }
.st-ai-acts { display: grid; gap: 6px; } .st-ai-acts .btn { justify-content: center; } .st-ai-acts label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }
.st-ai-status { min-height: 18px; font-weight: 600; }
.st-sizes { display: grid; gap: 4px; }
.st-sz { display: flex; align-items: center; gap: 6px; border-radius: 12px; padding: 2px 6px; } .st-sz.on { background: rgba(249, 180, 63, .2); }
.st-sz-b { flex: 1; border: 0; background: transparent; display: flex; justify-content: space-between; gap: 8px; padding: 6px 4px; cursor: pointer; color: inherit; text-align: left; }
.st-sz-b small { color: var(--st-ink2); white-space: nowrap; }
.st-sticky { position: sticky; bottom: -20px; background: var(--st-card); padding: 10px 0; }
.st-layers { display: grid; gap: 4px; }
.st-layer { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 12px; background: var(--st-sunk); cursor: grab; }
.st-layer.on { box-shadow: inset 0 0 0 2px var(--st-acc); } .st-layer.off { opacity: .5; }
.st-ln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.st-menu { max-width: 440px; } .st-mi { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; background: var(--sunken, #efece6); border-radius: 14px; padding: 10px 14px; margin: 6px 0; cursor: pointer; color: inherit; }
.st-mi small { color: var(--ink-2, #6b6e78); } .st-mi:hover { box-shadow: inset 0 0 0 2px #F9B43F; }
.st-pick .st-imgs { padding: 14px 18px 18px; max-height: 60vh; overflow: auto; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
/* ---- планшет и телефон ---- */
@media (max-width: 1180px) { .st-edit { grid-template-columns: 70px 260px minmax(0, 1fr) 250px; } }
@media (max-width: 900px) {
  .st-root { grid-template-rows: 52px minmax(0, 1fr); }
  .st-edit { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; }
  .st-rail { order: 3; flex-direction: row; overflow-x: auto; padding: 4px; }
  .st-rb { flex: 0 0 64px; }
  .st-panel { position: absolute; left: 0; right: 0; bottom: 64px; max-height: 55vh; z-index: 3; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); }
  .st-insp { order: 2; max-height: 34vh; }
  .st-stage { order: 1; }
  .st-title { flex-basis: 140px; }
  .st-canvas-wrap { padding: 12px; gap: 10px; }
  .st-tools small { display: none; }
}
.st-root label.st-tog { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; } .st-root label.st-tog input { width: auto; margin: 0; }
/* ---- 0.46: папки, слои справа, свободный размер, мини-панель ---- */
.st-home { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.st-side-nav { background: var(--st-card); padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; box-shadow: 1px 0 0 rgba(0, 0, 0, .05); }
.st-side-nav input[type=search] { width: 100%; min-width: 0; }
.st-folds { display: grid; gap: 2px; }
.st-fold { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 12px; cursor: pointer; min-width: 0; }
.st-fold:hover { background: var(--st-sunk); } .st-fold.on { background: rgba(249, 180, 63, .25); font-weight: 700; } .st-fold.over { box-shadow: inset 0 0 0 2px var(--st-acc); }
.st-fold-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-fold .icon-btn { opacity: .5; } .st-fold:hover .icon-btn { opacity: 1; }
.st-home-in { overflow: auto; }
.st-aibar { background: var(--st-card); border-radius: 16px; box-shadow: var(--st-sh); padding: 14px 16px; display: grid; gap: 8px; }
.st-aibar-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.st-aibar textarea { width: 100%; resize: vertical; }
.st-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .st-row select, .st-row input[type=search] { flex: 1 1 160px; min-width: 0; }
.st-card { position: relative; } .st-card.drag { opacity: .5; }
.st-card-more { position: absolute; right: 8px; top: 8px; background: rgba(255, 255, 255, .92) !important; box-shadow: var(--st-sh); opacity: 0; transition: opacity .12s; }
.st-card:hover .st-card-more, .st-card:focus-within .st-card-more { opacity: 1; }
@media (hover: none) { .st-card-more { opacity: 1; } }
.st-card-f .st-card-th { font-size: 48px; background: rgba(249, 180, 63, .14); }
.st-crumb { border: 0; background: var(--st-sunk); border-radius: 10px; padding: 2px 10px; margin-right: 8px; cursor: pointer; color: inherit; font-size: 16px; }
.st-sizebox { display: inline-flex; align-items: center; gap: 4px; background: var(--st-sunk); border-radius: 12px; padding: 3px 4px 3px 10px; white-space: nowrap; }
.st-sizebox small { color: var(--st-ink2); font-weight: 600; } .st-sizebox input { width: 66px; border: 0; background: var(--st-card); border-radius: 8px; padding: 5px 6px; text-align: center; color: inherit; min-width: 0; }
.st-quick .icon-btn { font-weight: 800; }
.st-stage { position: relative; }
.st-float { position: absolute; transform: translateX(-50%); display: flex; gap: 2px; background: var(--st-card); border-radius: 12px; box-shadow: 0 4px 18px rgba(0, 0, 0, .18); padding: 3px; z-index: 2; }
.st-float button { border: 0; background: transparent; border-radius: 9px; min-width: 32px; height: 30px; cursor: pointer; font-size: 15px; color: inherit; }
.st-float button:hover { background: var(--st-sunk); }
.st-insp { padding: 0; gap: 0; }
.st-lbox { padding: 12px 12px 8px; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); display: grid; gap: 6px; }
.st-lhead { display: flex; justify-content: space-between; align-items: baseline; }
.st-lbox .st-layers { max-height: 30vh; overflow-y: auto; }
.st-ibox { padding: 12px 14px 24px; display: flex; flex-direction: column; gap: 6px; }
.st-layer { background: transparent; padding: 4px 6px; }
.st-layer:hover { background: var(--st-sunk); }
.st-layer.on { background: rgba(249, 180, 63, .22); box-shadow: none; }
.st-layer.grp { border-left: 3px solid rgba(108, 76, 255, .5); }
.st-layer.over { box-shadow: inset 0 2px 0 var(--st-acc); } .st-layer.drag { opacity: .4; }
.st-layer input { flex: 1; min-width: 0; padding: 3px 6px; border-radius: 8px; }
.st-lico { width: 22px; text-align: center; font-weight: 800; color: var(--st-ink2); }
.st-grip { cursor: grab; color: var(--st-ink2); letter-spacing: -3px; padding: 0 2px; }
.st-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.st-num { display: grid; gap: 2px; font-size: 11px; font-weight: 700; color: var(--st-ink2); } .st-num input { width: 100%; min-width: 0; padding: 5px 6px; }
.st-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-lines button { border: 0; background: var(--st-sunk); border-radius: 12px; padding: 8px 4px; display: grid; justify-items: center; gap: 2px; cursor: pointer; color: inherit; }
.st-lines button:hover { box-shadow: inset 0 0 0 2px var(--st-acc); } .st-lines small { font-size: 10.5px; color: var(--st-ink2); }
.st-pals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-pals button { border: 0; padding: 0; height: 34px; border-radius: 10px; overflow: hidden; display: flex; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.st-pals i { flex: 1; } .st-pals button:hover { transform: scale(1.03); }
.st-icons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.st-icons button { border: 0; background: var(--st-sunk); border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; }
.st-icons button:hover { box-shadow: inset 0 0 0 2px var(--st-acc); } .st-icons canvas { width: 30px; height: 30px; }
.st-variants { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
@media (max-width: 900px) {
  .st-home { grid-template-columns: minmax(0, 1fr); }
  .st-side-nav { max-height: 34vh; }
  .st-sizebox small { display: none; }
  .st-lbox .st-layers { max-height: 16vh; }
}
.st-pat { padding: 0; overflow: hidden; } .st-pat canvas { width: 100%; height: 100%; display: block; }
/* кусок с «Было» / «Образца» → на холст */
.st-c0 { position: relative; display: inline-block; line-height: 0; }
.st-cutbox { position: absolute; border: 2px dashed var(--st-accent, #F9B43F); background: rgba(249, 180, 63, .16); border-radius: 4px; pointer-events: none; }
.st-c0-btns { width: 0; min-width: 100%; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 8px; line-height: 1.3; }
