/* Trendyfy Professional Mode v3 — native Trendyfy typography and palette. */
.tf-pro-banner[hidden]{display:none!important}
.tf-pro-banner{position:relative;isolation:isolate;overflow:hidden;border-radius:29px;margin:20px 0 25px;padding:24px 22px;background:linear-gradient(115deg,#17289c 0%,#3524a7 55%,#5825e7 100%);box-shadow:0 16px 33px rgba(53,36,167,.16);color:white}
.tf-pro-banner__art{position:absolute;z-index:-1;right:-14px;top:-10px;width:56%;height:115%;background:url('/app/pro-banner-art-v1.webp') center/cover no-repeat;opacity:.9;mask-image:linear-gradient(90deg,transparent 0%,#000 25%);-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 25%)}
.tf-pro-banner__content{max-width:390px}.tf-pro-banner__eyebrow{display:inline-block;padding:7px 10px;border:1px solid #ffffff52;border-radius:30px;background:#ffffff14;font-size:11px;font-weight:800;letter-spacing:.03em}
.tf-pro-banner h2{font-family:Montserrat,'Golos Text',sans-serif;font-size:clamp(21px,5.9vw,31px);line-height:1.1;letter-spacing:-.045em;margin:14px 0 9px;max-width:310px;color:white}
.tf-pro-banner p{margin:0 0 20px;color:#e5dfff;font-size:13px;line-height:1.55;max-width:265px;font-weight:500}
.tf-pro-banner__cta,.tf-pro-bottom button{border:0;border-radius:17px;background:linear-gradient(100deg,#ff328e,#bc32e8);color:white;font:800 14px 'Golos Text',sans-serif;padding:15px 18px;box-shadow:0 10px 25px #b233ec42;cursor:pointer}
.tf-pro-banner__cta span{padding-left:8px}
.tf-pro-page{position:fixed;inset:0;z-index:45;background:linear-gradient(180deg,#f7f5ff,#f4f0ff 65%,#fff);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;color:#18172c}
.tf-pro-page__wrap{width:min(100%,720px);margin:0 auto;padding:15px 15px 26px;box-sizing:border-box}
.tf-pro-page__top{display:flex;align-items:center;gap:11px;margin:0 0 15px;font-weight:850;font-size:17px}.tf-pro-page__top button{border:0;border-radius:13px;background:#eae6ff;color:#5f37e2;font-size:25px;line-height:1;width:39px;height:39px;cursor:pointer}
.tf-pro-page__hero{isolation:isolate;position:relative;overflow:hidden;border-radius:25px;background:radial-gradient(ellipse at 83% 10%,#aa47f8 0%,transparent 47%),linear-gradient(112deg,#172bb0 0%,#3a22aa 51%,#5921cb 100%);color:white;padding:24px 22px;margin-bottom:13px;box-shadow:0 12px 28px #3221aa1d}
.tf-pro-page__hero::before{content:"";position:absolute;right:-34px;bottom:-80px;width:70%;aspect-ratio:1.5/1;transform:rotate(-23deg);border:1px solid #dfa6ff88;border-radius:50%;background:radial-gradient(ellipse at center,#e46dfa33,transparent 67%);z-index:-1}
.tf-pro-page__hero::after{content:"✧";position:absolute;right:25px;top:13px;font-size:28px;color:#fff9;z-index:-1}
.tf-pro-page__hero span{font-size:10px;letter-spacing:.11em;font-weight:800;color:#eee5ff}.tf-pro-page__hero h1{font:850 clamp(21px,5.8vw,28px)/1.15 Montserrat,'Golos Text',sans-serif;letter-spacing:-.04em;margin:11px 0;max-width:540px}.tf-pro-page__hero p{font-size:13px;line-height:1.45;color:#e7dfff;margin:0;max-width:430px}
.tf-pro-panel{border:1px solid #eee8ff;border-radius:23px;padding:17px;margin:11px 0;background:#fff;box-shadow:0 7px 26px rgba(78,56,172,.055)}
.tf-pro-label{display:flex;flex-direction:column;gap:8px;font-weight:800;font-size:13px;color:#211c3c}
.tf-pro-label select,.tf-pro-label textarea{width:100%;border:1px solid #e2d6ff;background:#fff;color:#27213d;border-radius:14px;padding:13px 12px;font-family:inherit;font-size:14px;outline:none;box-sizing:border-box;resize:vertical}
.tf-pro-label select{appearance:none;-webkit-appearance:none;padding-right:46px;background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236541ce' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 19px center;background-size:16px}
.tf-pro-label :is(select,textarea):focus{border-color:#966bff;box-shadow:0 0 0 3px #966bff24}
.tf-pro-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-top:13px}
.tf-pro-help{font-size:12px;color:#87809a;line-height:1.5;margin:7px 0 12px}.tf-pro-photos-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.tf-pro-photos-title strong{font-size:16px}.tf-pro-photos-title small{font-size:12px;color:#8667d6}
.tf-pro-photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;align-items:stretch}.tf-pro-photo-grid--empty{grid-template-columns:1fr}
.tf-pro-photo{aspect-ratio:3/4;border-radius:14px;overflow:hidden;position:relative;background:#f6f2ff;border:1px solid #f0e9ff}.tf-pro-photo img{width:100%;height:100%;object-fit:cover;display:block}.tf-pro-photo button{position:absolute;right:5px;top:5px;border:0;background:#fff;color:#6138db;border-radius:50%;width:28px;height:28px;font-size:20px;line-height:24px;box-shadow:0 2px 10px #28207726;cursor:pointer}
.tf-pro-upload-tile{cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:16px 9px;min-height:166px;border:2px dashed #b9a3ff;border-radius:17px;color:#6338db;background:radial-gradient(circle at 90% 0,#eddbff 0,transparent 43%),radial-gradient(circle at 2% 100%,#dfe0ff 0,transparent 40%),linear-gradient(140deg,#fffaff,#f8f5ff);font-family:inherit;font-weight:800;box-sizing:border-box}
.tf-pro-upload-icon{display:grid;place-items:center;width:68px;height:65px;color:#7540ed;filter:drop-shadow(0 5px 8px #8252f43d)}.tf-pro-upload-label{font-size:15px}.tf-pro-upload-hint{font-size:11px;color:#9388ab;font-weight:500}.tf-pro-upload-tile--compact{min-height:0;aspect-ratio:3/4;padding:8px 2px;gap:1px}.tf-pro-upload-tile--compact .tf-pro-upload-icon{width:46px;height:43px}.tf-pro-upload-tile--compact .tf-pro-upload-icon svg{width:39px;height:39px}.tf-pro-upload-tile--compact .tf-pro-upload-label{font-size:11px;text-align:center}.tf-pro-upload-tile:disabled{opacity:.5}
.tf-pro-status{min-height:23px;color:#6c45dd;font-size:13px;padding:4px 8px}.tf-pro-status:empty{min-height:0;padding:0}.tf-pro-status[data-kind=error]{color:#d13b67}
.tf-pro-bottom{border:1px solid #e2d4ff;box-shadow:0 10px 29px #5831bb21;position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(110deg,#fff 0%,#f4eeff 62%,#eee3ff 100%);border-radius:24px;margin:12px 0 10px;padding:18px}
.tf-pro-bottom::before{content:"";position:absolute;z-index:-1;right:-25px;top:-36px;width:140px;height:110px;background:radial-gradient(circle,#d6b2ff88,transparent 70%);border-radius:50%}
.tf-pro-bottom h2{font-size:18px;margin:0 0 12px;font-weight:850;color:#1e1c3b}.tf-pro-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.tf-pro-summary-chip{display:flex;flex-direction:column;gap:4px;border:1px solid #e0d5ff;background:#ffffffb8;padding:9px 11px;border-radius:13px;min-width:0}.tf-pro-summary-chip:first-child{grid-column:1/-1}.tf-pro-summary-chip span{font-size:10px;color:#766e96}.tf-pro-summary-chip strong{color:#28213c;font-size:12px;overflow-wrap:anywhere;font-weight:800}
.tf-pro-bottom__foot{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #e5d9ff;margin-top:13px;padding-top:13px}.tf-pro-bottom__foot>strong{font-weight:850;font-size:16px;color:#1e1d38}.tf-pro-bottom__foot button{flex-shrink:0;font-size:13px}.tf-pro-bottom button:disabled{opacity:.55}
@media(min-width:520px){.tf-pro-banner{min-height:220px;padding:28px 30px}.tf-pro-banner p{max-width:300px}.tf-pro-page__wrap{padding:20px 24px 35px}.tf-pro-summary{grid-template-columns:repeat(5,minmax(0,1fr))}.tf-pro-summary-chip:first-child{grid-column:auto}}
@media(max-width:370px){.tf-pro-banner__art{width:52%;opacity:.55}.tf-pro-banner__content{max-width:245px}.tf-pro-banner p{max-width:235px}.tf-pro-banner__cta{font-size:12px;padding:14px}.tf-pro-fields{gap:7px}.tf-pro-page__wrap{padding:12px}.tf-pro-bottom__foot{align-items:stretch;flex-direction:column}.tf-pro-bottom button{width:100%}.tf-pro-photo-grid{gap:6px}}


/* v3: explicit chevrons instead of background-image; reliable in Telegram WebView. */
.tf-pro-page .tf-pro-label--select{position:relative}
.tf-pro-page .tf-pro-label--select select{
  -webkit-appearance:none!important;appearance:none!important;
  background-image:none!important;background-color:#fff!important;
  padding-right:52px!important;min-height:49px;
}
.tf-pro-page .tf-pro-chevron{
  position:absolute;right:16px;bottom:0;height:49px;width:30px;
  display:grid;place-items:center;pointer-events:none;
  color:#5b3ad2;z-index:1;
}
.tf-pro-page .tf-pro-chevron svg{display:block;flex:none}
.tf-pro-page__top button{
  width:44px;height:44px;display:inline-grid;place-items:center;
  padding:0;flex:none;border-radius:14px;
  transition:background-color .15s ease-out;
}
.tf-pro-page__top button:active{background-color:#ddd5ff}
.tf-pro-page__top button svg{display:block}
.tf-pro-page :is(button,select,textarea):focus-visible{
  outline:2px solid #6b41e9;outline-offset:2px;
}
/* Photo upload: the status cannot float between the upload card and total. */
.tf-pro-photos-panel .tf-pro-status{
  margin-top:12px;padding:12px 14px;min-height:0;
  border-radius:12px;border:1px solid #e1d7ff;
  background:#f8f5ff;color:#6041bc;font-size:13px;line-height:1.4;
}
.tf-pro-photos-panel .tf-pro-status[hidden]{display:none!important}
.tf-pro-photos-panel .tf-pro-status[data-kind=error]{
  background:#fff5f8;border-color:#ffd2df;color:#b8325b;
}
.tf-pro-upload-progress{
  min-height:130px;aspect-ratio:3/4;border:1px solid #e0d4ff;
  border-radius:17px;background:#f7f2ff;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:12px;
  padding:10px;text-align:center;font-size:12px;font-weight:650;color:#6947bf;
}
.tf-pro-upload-spinner{
  width:28px;height:28px;border-radius:50%;border:3px solid #ded0ff;
  border-top-color:#7040e8;animation:tfProUploadSpin .7s linear infinite;
}
@keyframes tfProUploadSpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.tf-pro-upload-spinner{animation:none;border-top-color:#7040e8}}

/* Compact totals: quiet parameter rows, emphatic standalone price. */
.tf-pro-page .tf-pro-bottom{
  background:linear-gradient(160deg,#fff 0%,#faf8ff 62%,#f6f0ff 100%);
  border:1px solid #e2d9fb;box-shadow:0 8px 28px rgba(75,49,138,.075);
  padding:20px;border-radius:24px;
}
.tf-pro-page .tf-pro-bottom::before{opacity:.28}
.tf-pro-page .tf-pro-bottom h2{
  font-size:19px;letter-spacing:-.015em;font-weight:800;margin:0 0 10px;
}
.tf-pro-page .tf-pro-summary{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:20px;row-gap:0;margin:0;padding:0;
  border-top:1px solid #eae5f5;
}
.tf-pro-page .tf-pro-spec{
  display:flex;align-items:baseline;justify-content:space-between;
  gap:10px;padding:12px 0;border-bottom:1px solid #eae5f5;
  min-width:0;
}
.tf-pro-page .tf-pro-spec--model{grid-column:1/-1}
.tf-pro-page .tf-pro-spec dt{
  font-size:12px;color:#7c748f;font-weight:500;line-height:1.35;flex:none;
}
.tf-pro-page .tf-pro-spec dd{
  margin:0;color:#282044;font-size:13px;font-weight:750;
  line-height:1.35;text-align:right;overflow-wrap:break-word;min-width:0;
}
.tf-pro-page .tf-pro-spec--model dd{max-width:70%;font-size:14px}
.tf-pro-page .tf-pro-bottom__foot{
  border-top:none;display:flex;justify-content:space-between;
  align-items:center;gap:16px;margin-top:18px;padding:0;
}
.tf-pro-page .tf-pro-total{
  display:flex;flex-direction:column;gap:5px;min-width:0;
}
.tf-pro-page .tf-pro-total__label{
  color:#756988;font-size:12px;font-weight:650;
}
.tf-pro-page .tf-pro-total__amount{
  display:flex;align-items:baseline;gap:7px;white-space:nowrap;
}
.tf-pro-page .tf-pro-total__amount strong{
  font-size:clamp(29px,5vw,36px);line-height:1;letter-spacing:-.055em;
  color:#4324b1;font-weight:850;
}
.tf-pro-page .tf-pro-total__amount span{font-size:13px;color:#473879;font-weight:750}
.tf-pro-page .tf-pro-bottom__foot button{
  flex:none;min-height:48px;padding:14px 20px;
  font-size:14px;font-weight:800;border-radius:15px;
  text-wrap:nowrap;box-shadow:0 7px 18px #b233ec2b;
}
.tf-pro-page .tf-pro-bottom__foot button span{padding-left:7px}
.tf-pro-order-status{
  margin-top:14px;padding:11px 12px;background:#f1edff;
  border:1px solid #e4dbff;border-radius:12px;
  color:#5c42ac;font-size:13px;line-height:1.45;
}
.tf-pro-order-status[data-kind=error]{background:#fff5f8;border-color:#ffd4df;color:#b8325b}
.tf-pro-page .tf-pro-order-status[hidden]{display:none!important}
@media (max-width:460px){
  .tf-pro-page .tf-pro-bottom__foot{align-items:stretch;flex-direction:column;gap:14px}
  .tf-pro-page .tf-pro-total{flex-direction:row;align-items:baseline;justify-content:space-between}
  .tf-pro-page .tf-pro-bottom__foot button{width:100%}
}
@media (max-width:340px){
  .tf-pro-page .tf-pro-summary{column-gap:12px}
  .tf-pro-page .tf-pro-spec{flex-direction:column;align-items:flex-start;gap:4px}
  .tf-pro-page .tf-pro-spec dd{text-align:left}
  .tf-pro-page .tf-pro-spec--model dd{max-width:100%}
}


/* Trendyfy Pro v4: ONE scrolling surface, no duplicate background scrollbar.
   Leaves the global navbar/header interactive, only locks the background page. */
html.tf-pro-mode-active,
html.tf-pro-mode-active body{overflow:hidden!important;overscroll-behavior:none!important}
html.tf-pro-mode-active #appShell #main{
  overflow:hidden!important;touch-action:none!important;pointer-events:none!important
}
.tf-pro-page{
  overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
}
/* One vertical scrollbar even with long, pasted user prompts. */
.tf-pro-page #tfProPrompt{
  font-family:'Golos Text',-apple-system,BlinkMacSystemFont,sans-serif!important;
  font-weight:450!important;line-height:1.6!important;font-size:14px!important;
  overflow-y:hidden!important;resize:none!important;min-height:142px;
}
.tf-pro-page .tf-pro-label{font-weight:650!important;letter-spacing:0}
.tf-pro-page .tf-pro-label select{
  font-family:'Golos Text',-apple-system,BlinkMacSystemFont,sans-serif!important;
  font-weight:600!important;line-height:1.35!important;
}
.tf-pro-page .tf-pro-page__top strong{font-weight:750!important}
.tf-pro-page .tf-pro-page__hero h1{font-weight:800!important}
.tf-pro-page .tf-pro-page__hero p{font-weight:450!important}
.tf-pro-page .tf-pro-page__hero span{font-weight:700!important}
.tf-pro-page .tf-pro-spec dd{font-weight:650!important}
.tf-pro-page .tf-pro-photos-title strong{font-weight:750!important}
.tf-pro-page .tf-pro-total__amount strong{font-weight:800!important}
/* Pro-only history tile: fits same square dimensions as ordinary images. */
.history-card .order-thumb.tf-pro-history-cover{
  display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at 24% 18%,#f4e4ff,transparent 66%),
    linear-gradient(145deg,#ebe4ff 0%,#f5f2ff 100%);
  border:1px solid #eee5ff;overflow:hidden
}
.tf-pro-history-cover svg{
  display:block;width:46px;height:46px;color:#7043e7;
  max-width:48%;max-height:48%;flex:none
}
@media(prefers-reduced-motion:reduce){.tf-pro-history-cover svg{animation:none}}


/* TF Pro v5: square placeholder strictly aligned to the result-card thumbnail column. */
.history-card .order-thumb.tf-pro-history-cover{
  width:100%!important;height:auto!important;aspect-ratio:1 / 1!important;
  max-width:120px!important;min-width:0!important;min-height:0!important;
  align-self:center!important;justify-self:center!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  margin:0!important;box-sizing:border-box!important;
}
.history-card .order-thumb.tf-pro-history-cover svg{
  display:block!important;width:clamp(38px,43%,52px)!important;height:auto!important;
  max-width:none!important;max-height:none!important;flex:none;
}
@media(max-width:430px){
  .history-card .order-thumb.tf-pro-history-cover{max-width:110px!important}
  .history-card:has(.tf-pro-history-cover) .order-title{font-size:clamp(16px,4.1vw,19px)!important;line-height:1.13!important}
}
/* Compact long titles cannot escape the progress sheet. */
.progress-sheet .create-progress-v2 .progress-copy h2{
  overflow-wrap:anywhere!important;max-width:100%;text-wrap:balance;
  font-size:clamp(26px,7vw,44px)!important;line-height:1.14!important;
}
