/* ═══════════════════════════════════════════════════════════════
   Витрина пресета (оверлей): эталоны слева, справа имя, стата,
   совет и фото юзера, «Save preset» и «Use preset». Генерация — в gen.css.
   ═══════════════════════════════════════════════════════════════ */
.ov{position:fixed;inset:0;z-index:20;display:flex;background:var(--bg)}
/* открыт слой — страница под ним не скроллится */
body:has(.ov:not([hidden]),.mo:not([hidden])){overflow:hidden}
.ov-card{position:relative;flex:1;display:flex;flex-direction:column}

/* медиа: эталоны листаются поверх размытой подложки */
.ov-media{position:relative;flex:1;background:linear-gradient(150deg,#7b2ff7,#f107a3);overflow:hidden}
.ov-bb{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
       transform:scaleX(-1) scale(1.3);filter:blur(34px) brightness(.5) saturate(.9)}
.ov-shot{position:absolute;inset:0;z-index:2;width:100%;height:100%;object-fit:contain}
.ov-ex{position:absolute;inset:0;z-index:2}
.ov-ex .ex{object-fit:contain}
/* формат — в углу медиа, только под курсором */
.ov-media .fmt{position:absolute;top:10px;left:10px;z-index:6;padding:3px 7px;border-radius:7px;background:#00000080;
               backdrop-filter:blur(8px);font-size:11px;font-weight:600;opacity:0;transition:opacity .15s}
.ov-media:hover .fmt{opacity:1}

.ov-panel{position:relative;z-index:3;margin-top:-26px;background:var(--panel);border-top:1px solid var(--line);   /* шит наезжает на медиа — под углами кадр, а не фон */
          border-radius:26px 26px 0 0;padding:14px var(--pad) calc(env(safe-area-inset-bottom) + 18px);
          display:flex;flex-direction:column;gap:12px}
.ov-grab{display:block;width:38px;height:4px;border-radius:2px;background:#ffffff2e;border:0;margin:0 auto 4px;cursor:pointer}
.ov svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* имя · тип выхода капсом; стата серой строкой */
.ov-head{display:flex;align-items:center;gap:12px}
.ov-name{font-size:24px;flex:1;min-width:0}
.ov-kind{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#6b5a8a;white-space:nowrap}
.ov-stat{display:flex;gap:14px;font-size:13px;font-weight:600;color:var(--dim);margin-top:-4px}
.ov-stat span{display:inline-flex;align-items:center;gap:5px;cursor:default}
.ov-stat svg{width:14px;height:14px}

/* фото юзера здесь же: совет по фото + дропзона; выбрано — плашка с превью и Change */
.ov-tip{font-size:13px;color:var(--dim);line-height:1.5}
.ov-drop{border:2px dashed var(--line);border-radius:14px;padding:16px 14px;display:grid;justify-items:center;gap:10px;color:var(--dim);cursor:pointer;transition:border-color .15s}
.ov-drop:hover,.ov-drop.drag{border-color:var(--dim)}
.ov-drop svg{width:24px;height:24px}
.ov-drop .ch{height:36px;padding:0 14px;border-radius:11px;background:#ffffff14;border:1px solid var(--line);display:inline-flex;align-items:center;font-weight:700;font-size:13px;color:#fff}
.ov-drop.has{border-style:solid;grid-template-columns:auto 1fr auto;justify-items:start;align-items:center;gap:12px;padding:10px 12px}
.ov-drop.has img{width:44px;height:44px;border-radius:10px;object-fit:cover}
.ov-drop.has b{color:#fff;font-size:14px;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ov-drop.has a{font-size:13px;text-decoration:underline}

/* действия */
.ov-btns{margin-top:auto;display:grid;gap:10px}
.ov-btns .btn:disabled{opacity:.45;cursor:default;box-shadow:none;transform:none}
.ov-btns .btn{border-radius:14px}
.ov-btns .btn.ghost{display:flex;align-items:center;justify-content:center;gap:8px}
.ov-btns .btn.ghost.on{border-color:var(--acc);color:var(--acc);background:#ff2fd014}
.ov-btns .btn.ghost.on svg{fill:currentColor}

@media (min-width:900px){
  .ov{align-items:center;justify-content:center;background:#05010ad1;backdrop-filter:blur(3px);padding:40px}
  .ov-card{flex:0 0 auto;height:700px;flex-direction:row;background:var(--panel);
           border:1px solid var(--line);border-radius:24px;overflow:hidden}
  /* колонка медиа под формат пресета: 700 × формат, в границах 300–560 */
  .ov-media{flex:none;width:clamp(300px,calc(700px * var(--ar,.5625)),560px)}
  .ov-panel{flex:none;width:400px;margin:0;border:0;border-radius:0;padding:24px}
  .ov-grab{display:none}
  .ov-name{font-size:26px}
}
