:root{
  --ttryon-primary:#111;
  --ttryon-bg:#fff;
  --ttryon-accent:#111;
}
.tenshi-tryon__btn{
  background:var(--ttryon-primary);color:#fff;border:none;border-radius:12px;
  padding:12px 16px;font-weight:800;cursor:pointer;transition:.2s;
  box-shadow:0 8px 24px rgba(0,0,0,.12)
}
.tenshi-tryon__btn:hover{ transform:translateY(-1px); }

.tenshi-tryon__modal{ position:fixed; inset:0; background:rgba(0,0,0,.55); display:none; z-index:9999; -webkit-overflow-scrolling:touch; }
.tenshi-tryon__modal.open{ display:block; }
.tenshi-tryon__dialog{
  background:var(--ttryon-bg); max-width:760px; margin:40px auto; border-radius:16px; padding:18px;
  box-shadow:0 24px 80px rgba(0,0,0,.25); position:relative;
  max-height:85vh; overflow:auto;
}
.tenshi-tryon__modal .tenshi-tryon__dialog .tenshi-tryon__close{ position:absolute; right:12px !important; left:auto !important; top:10px; background:transparent; border:none; font-size:22px; cursor:pointer; color:#111; line-height:1; z-index:2; }
.tenshi-tryon__title{ margin:0 0 8px; font-size:22px; font-weight:900; color:#111; }
.tenshi-tryon__note{ color:#666; margin:0 0 12px; font-size:13px; }
.tenshi-tryon__form{ display:grid; gap:12px; }
.tenshi-tryon__file input[type=file], .tenshi-tryon__poses select{
  width:100%; padding:12px; border:1px solid #e5e7eb; border-radius:12px; background:#fff;
}
.tenshi-tryon__actions{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tenshi-tryon__consent{ font-size:12px; color:#444; display:flex; gap:8px; align-items:center; }
.tenshi-tryon__submit{
  background:var(--ttryon-accent); color:#fff; border:none; border-radius:12px; padding:10px 16px; font-weight:800; cursor:pointer;
}
.tenshi-tryon__submit[disabled]{ opacity:.5; cursor:not-allowed; }

.tenshi-tryon__progress{ display:flex; align-items:center; gap:10px; margin-top:10px; }
.spinner{ width:16px;height:16px;border:3px solid #ddd;border-top-color:var(--ttryon-primary);border-radius:50%;display:inline-block;animation:spin 1s linear infinite; }
@keyframes spin { to{ transform:rotate(360deg) } }

.tenshi-tryon__toolbar{ display:flex; gap:10px; margin:8px 0; }
.tenshi-tryon__save,.tenshi-tryon__buy{
  background:#f7f7f7; border:1px solid #e5e7eb; border-radius:12px; padding:10px 14px; font-weight:800; cursor:pointer;
}
.tenshi-tryon__buy{ background:var(--ttryon-primary); color:#fff; border-color:var(--ttryon-primary); }

.tenshi-tryon__gallery{ display:grid; grid-template-columns:1fr; gap:12px; }
.tenshi-tryon__item img{
  width:100%; height:auto; border-radius:14px; box-shadow:0 12px 36px rgba(0,0,0,.10); cursor:zoom-in;
}
.tenshi-tryon__disclaimer{ color:#666; font-size:12px; display:block; margin-top:6px; }

/* viewer full-screen */
.tenshi-tryon__viewer{ position:fixed; inset:0; background:rgba(0,0,0,.9); display:flex; align-items:center; justify-content:center; z-index:10000; }
.tenshi-tryon__viewer[hidden]{ display:none; }
.tenshi-tryon__viewer img{ max-width:90vw; max-height:90vh; transition:transform .2s ease; }
.tenshi-tryon__viewer.panning{ cursor:grabbing; }
.tenshi-tryon__viewer-close{
  position:absolute; right:16px; top:10px; background:#fff; border:none; border-radius:50%; width:34px; height:34px; font-size:22px; cursor:pointer; line-height:34px;
}

/* Mobile refinements */
@media (max-width: 640px){
  .tenshi-tryon__dialog{ margin:0; width:100vw; height:100vh; max-height:100vh; border-radius:0; padding:18px; }
  .tenshi-tryon__title{ font-size:20px; }
  .tenshi-tryon__note{ font-size:14px; line-height:1.45; }
  .tenshi-tryon__form{ gap:14px; }
  .tenshi-tryon__file input[type=file]{ padding:16px; border-radius:14px; font-size:16px; }
  .tenshi-tryon__poses select{ padding:14px; border-radius:12px; font-size:16px; }
  .tenshi-tryon__actions{ flex-direction:column; align-items:stretch; gap:12px; }
  .tenshi-tryon__submit{ padding:16px 18px; border-radius:14px; font-size:17px; }
  .tenshi-tryon__consent{ font-size:13px; line-height:1.4; }
  .tenshi-tryon__modal .tenshi-tryon__dialog .tenshi-tryon__close{ top:12px; right:12px; font-size:26px; }
  .tenshi-tryon__gallery{ gap:10px; }
  .tenshi-tryon__item img{ border-radius:12px; }
}
