/* ============================================================
   tryon.css — «Примерка на модели» (/tryon). Самодостаточно.
   ============================================================ */

body[data-page="tryon"] .studio-empty,
body[data-page="tryon"] .composer-wrap { display: none !important; }
/* «Новый чат» на примерке не нужен (это не чат) */
body[data-page="tryon"] #studio-new,
body[data-page="tryon"] .new-btn { display: none !important; }
/* нерабочие фильтры image-шаблона (стиль/размер/качество) на примерке не нужны */
body[data-page="tryon"] .settings-panel { display: none !important; }

/* Селектор модели генерации (шейп → модалка, как на image) */
.to-genmodel {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 14px; padding: 11px 13px; color: var(--text, #fff); font-family: inherit;
  transition: border-color .14s, background .14s;
}
.to-genmodel:hover { background: rgba(255,255,255,.07); border-color: var(--line-strong, rgba(255,255,255,.14)); }
.to-gm-prev { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: #222; }
.to-gm-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.to-gm-body b { font-size: 14.5px; font-weight: 700; }
.to-gm-body small { font-size: 12px; color: var(--text-3, #8a8a93); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.to-gm-cost { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--accent, #E4F482); background: rgba(228,244,130,.1); padding: 4px 9px; border-radius: 8px; }
.to-coin { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; display: inline-block;
  background: linear-gradient(160deg, #f0d97a, #c79a2e); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.vmc-tag { display: inline-flex; align-items: center; gap: 5px; }
#to-go .to-coin { width: 14px; height: 14px; }
.to-gm-caret { width: 18px; height: 18px; flex: none; color: var(--text-3, #8a8a93); }

.to-root { display: flex; flex-direction: column; gap: 15px; max-width: 640px; margin: 0 auto; width: 100%; padding: 8px 0 40px; }

/* загрузка одежды */
.to-drop {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  border: 1.5px dashed var(--line, rgba(255,255,255,.16)); border-radius: 20px;
  padding: 44px 24px; transition: border-color .15s, background .15s;
}
.to-drop.drag { border-color: var(--accent, #E4F482); background: rgba(228,244,130,.05); }
.to-drop-ic { width: 54px; height: 54px; color: var(--accent, #E4F482); }
.to-drop-ic svg { width: 100%; height: 100%; }
.to-drop h2 { margin: 6px 0 0; font-family: var(--font-display, inherit); font-size: 19px; font-weight: 700; }
.to-drop p { margin: 0; color: var(--text-3, #8a8a93); font-size: 13.5px; max-width: 400px; line-height: 1.5; }
.pc-pick {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 8px;
  background: #ffffff; color: var(--accent-ink, #1a1f05);
  border: 0; border-radius: 13px; padding: 13px 24px;
  font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 10px 26px -12px var(--accent-ring, rgba(228,244,130,.5));
}
.pc-pick:hover { filter: brightness(1.05); }
.pc-pick svg { width: 18px; height: 18px; }

/* строка: одежда + сцена */
.to-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; }
.to-garment { display: flex; flex-direction: column; gap: 8px; }
.to-garment img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 13px; border: 1px solid var(--line, rgba(255,255,255,.08)); background: rgba(255,255,255,.03); }
.to-change { background: none; border: 0; color: var(--text-3, #8a8a93); font-family: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }
.to-change:hover { color: var(--text, #fff); }
.to-stage-wrap { position: relative; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.22); min-height: 220px; display: flex; align-items: center; justify-content: center; }
.to-stage-empty { color: var(--text-3, #8a8a93); font-size: 13px; text-align: center; padding: 20px; }
.to-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; padding: 18px; background: rgba(10,10,14,.74); backdrop-filter: blur(4px); z-index: 5; }
.to-overlay span { color: var(--text-2, #c7c7cf); font-size: 13px; }
.to-ov-sub { color: var(--text-3, #8a8a93) !important; font-size: 11.5px !important; max-width: 240px; }

/* модели */
.pc-label { font-family: var(--font-ui, inherit); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3, #8a8a93); }
.to-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px; max-height: 340px; overflow-y: auto; padding: 2px; margin: 0 -2px; }
.to-models::-webkit-scrollbar { width: 8px; }
.to-models::-webkit-scrollbar-thumb { background: var(--surface-3, rgba(255,255,255,.15)); border-radius: 99px; }
.to-model {
  position: relative; aspect-ratio: 3/4; border-radius: 12px; cursor: pointer;
  background-size: cover; background-position: center top;
  border: 2px solid var(--line, rgba(255,255,255,.08)); padding: 0;
  transition: border-color .14s, transform .1s;
}
.to-model:hover { transform: translateY(-2px); }
.to-model.active { border-color: var(--accent, #E4F482); }
.to-model-up {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: rgba(255,255,255,.04); color: var(--text-2, #c7c7cf); font-family: inherit; font-size: 11px; font-weight: 600;
}
.to-model-up svg { width: 20px; height: 20px; }
.to-uploaded { display: flex; align-items: center; gap: 9px; color: var(--text-2, #c7c7cf); font-size: 13px; }
.to-uploaded img { width: 36px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--accent, #E4F482); }

/* результат */
.to-result { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.to-result img { max-width: 100%; max-height: 66vh; border-radius: 16px; border: 1px solid var(--line, rgba(255,255,255,.08)); }

/* ---------- общие .ie-* ---------- */
.ie-apply {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: #ffffff; color: var(--accent-ink, #1a1f05);
  border: 0; border-radius: 13px; padding: 14px 22px;
  font-family: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer;
  box-shadow: 0 10px 26px -12px var(--accent-ring, rgba(228,244,130,.5));
  transition: filter .15s, transform .1s, opacity .15s;
}
.ie-apply:hover { filter: brightness(1.05); }
.ie-apply:active { transform: scale(.98); }
.ie-apply:disabled { opacity: .5; cursor: default; box-shadow: none; }
.ie-apply svg { width: 18px; height: 18px; }
.ie-result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ie-rbtn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.05); color: var(--text, #fff);
  border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 12px;
  padding: 11px 18px; font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.ie-rbtn:hover { background: rgba(255,255,255,.09); }
.ie-rbtn.primary { background: #ffffff; color: var(--accent-ink, #1a1f05); border-color: transparent; }
.ie-rbtn svg { width: 16px; height: 16px; }
.ie-spin { width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--accent, #E4F482); border-radius: 50%; animation: ie-spin 1s linear infinite; }
@keyframes ie-spin { to { transform: rotate(360deg); } }
.ie-err { color: #ff6b8a; font-size: 13px; text-align: center; padding: 4px 0; }

@media (max-width: 820px) {
  .to-root { padding-bottom: 30px; }
  .to-drop { padding: 34px 18px; }
  .to-row { grid-template-columns: 120px 1fr; }
}
