/* Монтаж фото на сайте: те же стили, что у фото-редактора в программе (browser/app/ui/style.css). */
:root { --shadow-1: var(--sh-1); --shadow-2: var(--sh-2); --shadow-3: var(--sh-3); }
.modal .sect { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-top: 6px; }
.modal .hint { color: var(--muted); font-size: 12.5px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.icon-btn { border: 0; background: transparent; border-radius: 10px; min-width: 32px; height: 32px; cursor: pointer; color: inherit; font-size: 15px; }
.icon-btn:hover { background: var(--sunken); }
.modal.ed-modal.ph-modal { display: grid; }
.design-page .lead { max-width: 760px; }
.upd-bar { height: 10px; border-radius: 10px; background: var(--sunken); overflow: hidden; }
.upd-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.set-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px 22px; box-shadow: 0 1px 0 var(--line); }
.set-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.seg { display: inline-flex; background: var(--sunken); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.lchip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: var(--sunken); color: var(--ink-2); }
.lchip.good { background: rgba(46, 158, 91, .14); color: var(--ok); }
.lchip.info { background: rgba(79, 142, 247, .14); color: var(--info); }
.lchip.warn { background: rgba(224, 138, 0, .15); color: var(--warn); }
.lchip.bad { background: rgba(214, 69, 69, .13); color: var(--bad); }
.uniq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.uniq-grid .wide { grid-column: 1 / -1; }
.uniq-check { display: flex !important; gap: 10px; align-items: center; font-weight: 600; }
.modal.ed-modal { width: min(1500px, 100%); height: calc(91vh - 32px); padding: 14px 16px; gap: 10px; grid-template-rows: auto minmax(0, 1fr); outline: none; }
.ed-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: relative; }
.ed-top .ed-title { flex: 1 1 220px; width: auto; font-weight: 700; }
.ed-top select { width: auto; flex: 0 0 auto; }
.ed-top .upd-bar { position: absolute; left: 0; right: 0; bottom: -6px; height: 4px; }
.uniq-check.filler { background: var(--sunken); padding: 6px 10px; border-radius: 10px; }
.lchip, .pill { border-radius: 999px; }
.ph-main { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 10px; min-height: 0; }
.ph-main > .ph-list, .ph-main > .ph-empty, .ph-main > p { grid-column: 1 / -1; }
.ph-left, .ph-insp { overflow: auto; min-height: 0; background: var(--surface-2); border-radius: 14px; padding: 10px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; }
.ph-insp h3 { margin: 0 0 2px; font-size: 15px; }
.ph-insp textarea { width: 100%; resize: vertical; }
.ph-insp .uniq-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
.ph-insp label { font-size: 12px; display: grid; gap: 4px; }
.ph-insp input[type=color] { width: 100%; height: 30px; padding: 2px; border-radius: 10px; }
.ph-stage { display: grid; place-items: center; min-height: 0; overflow: hidden; border-radius: 16px; background: repeating-conic-gradient(rgba(127,127,127,.12) 0% 25%, transparent 0% 50%) 50% / 20px 20px, var(--surface-2); box-shadow: var(--shadow-1); }
.ph-canvas { border-radius: 4px; box-shadow: 0 8px 30px rgba(0,0,0,.22); touch-action: none; cursor: default; }
.ph-add { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-layers { display: grid; gap: 4px; }
.ph-layer { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 12px; background: var(--surface); cursor: pointer; box-shadow: var(--shadow-1); }
.ph-layer.on { box-shadow: inset 0 0 0 2px #F9B43F, var(--shadow-1); }
.ph-layer.off .ph-ln { opacity: .45; }
.ph-ln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ph-bgbtn { margin-top: auto; }
.ph-looks { display: flex; flex-wrap: wrap; gap: 4px; }
.ph-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; overflow: auto; align-content: start; }
.ph-card { display: grid; gap: 4px; text-align: left; padding: 10px; border-radius: 16px; background: var(--surface-2); box-shadow: var(--shadow-1); border: 0; cursor: pointer; color: inherit; }
.ph-card:hover { box-shadow: var(--shadow-2, 0 6px 22px rgba(0,0,0,.14)); }
.ph-card-th { aspect-ratio: 1; border-radius: 12px; overflow: hidden; display: grid; place-items: center; font-size: 42px; background: var(--surface); }
.ph-card-th img { width: 100%; height: 100%; object-fit: cover; }
.ph-empty { padding: 30px; text-align: center; }
.ph-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ph-preset { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 14px; border: 0; background: var(--surface-2); box-shadow: var(--shadow-1); cursor: pointer; color: inherit; }
.ph-preset.on { box-shadow: inset 0 0 0 2px #F9B43F, var(--shadow-1); }
.ph-preset small { opacity: .7; }
.modal.ph-new { width: min(820px, 100%); max-height: 88vh; overflow: auto; }
.modal.ph-pick { width: min(820px, 100%); max-height: 86vh; overflow: auto; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ph-tile { display: grid; gap: 4px; padding: 6px; border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow-1); cursor: pointer; color: inherit; }
.ph-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface); }
.ph-tile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal.ph-ava { width: min(940px, 100%); max-height: 90vh; overflow: auto; }
.ph-ava-top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; }
.ph-ava-photo { display: grid; gap: 8px; justify-items: center; }
.ph-ava-photo img, .ph-ava-empty { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-1); display: grid; place-items: center; font-size: 54px; background: var(--surface-2); }
.ph-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ph-tpl { display: grid; gap: 4px; justify-items: center; padding: 6px; border: 0; border-radius: 16px; background: var(--surface-2); box-shadow: var(--shadow-1); cursor: pointer; color: inherit; }
.ph-tpl canvas { width: 132px; height: 132px; border-radius: 12px; }
.ph-tpl.on { box-shadow: inset 0 0 0 2px #F9B43F, var(--shadow-1); }
.ph-nets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 10px; }
.lchip.muted { opacity: .75; }
.ph-browse { grid-column: 1 / -1; display: grid; gap: 10px; align-content: start; min-height: 0; overflow: auto; }
.ph-browse .set-btns input[type=search] { flex: 1 1 260px; min-width: 0; }
.ph-folders .btn.on { background: var(--surface); box-shadow: inset 0 0 0 2px #F9B43F, var(--shadow-1); }
.ph-align .btn { min-width: 34px; font-size: 16px; }

/* Фото-студия на сайте: поверх кабинета, но под окнами диалогов (.backdrop — 50) */
body .st-root { z-index: 45; }
