body.reference-studio{background:#f7f2ee;color:#30323b}.reference-studio .shell{display:block}.reference-studio .sidebar,.reference-studio .topbar{display:none}.reference-studio .workspace{margin:0;width:100%;min-height:100vh}.reference-studio #main{padding:0;max-width:none}.st-nav{min-height:58px;display:flex;align-items:center;gap:28px;padding:10px 26px;border-bottom:1px solid #e7e4e0;background:#fff}.st-brand{font-size:20px;font-weight:800;color:#20233e;display:flex;gap:10px;align-items:center}.st-brand .st-icon{color:#f39400}.st-nav a{white-space:nowrap;font-size:14px}.st-nav .st-current{color:#eb9000;font-weight:700}.st-nav .st-nav-end{margin-left:auto}.st-icon{width:24px;height:24px;flex-shrink:0;display:inline-block;vertical-align:middle}.st-work{width:calc(100% - 36px);max-width:1320px;margin:24px auto}.st-grid{display:grid;grid-template-columns:300px minmax(320px,1fr) 300px;gap:24px;align-items:stretch}.st-settings,.st-output{background:#fff;border:1px solid #e5e2dd;border-radius:18px;min-width:0}.st-settings{padding:16px;display:flex;flex-direction:column;position:relative}.st-heading{font-size:14px;font-weight:600;display:flex;align-items:center;gap:8px;min-height:24px;margin:0}.st-heading:before{content:'';width:3px;height:14px;border-radius:3px;background:#f29700}.st-section{margin-top:26px}.st-section .st-heading{font-size:14px;font-weight:500;margin-bottom:9px}.st-heading .st-count{margin-left:auto;font-size:11px;color:#929cac}.st-mini{width:28px;height:28px;padding:5px!important;border:0!important;border-radius:7px!important;background:#fff8e8!important;color:#ef9400!important;display:inline-flex!important;justify-content:center;align-items:center;box-shadow:none!important}.st-mini .st-icon{width:15px;height:15px}.st-heading .st-mini:last-child{margin-left:auto}.st-heading .st-count+.st-mini{margin-left:0}.st-tiles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.st-tile{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:0!important;border:0!important;background:transparent!important;border-radius:0!important;font-size:10px!important;font-weight:400!important;line-height:1.25;color:#667385;box-shadow:none!important}.st-tile span.st-box{width:100%;aspect-ratio:1;display:flex;align-items:center;justify-content:center;border:2px solid #dfe3e9;background:#f7f8fa;border-radius:11px;position:relative;transition:border-color .12s,color .12s}.st-tile .st-icon{width:28px;height:28px}.st-tile:hover .st-box{border-color:#ffb349}.st-tile[aria-pressed=true]{color:#ec9100!important;font-weight:600!important}.st-tile[aria-pressed=true] .st-box{border-color:#f69b00;box-shadow:0 0 0 1px #f69b00;background:#fff8e9}.st-tile[aria-pressed=true] .st-box:after,.st-swatch[aria-pressed=true]:after{content:'✓';position:absolute;right:2px;bottom:2px;width:15px;height:15px;border-radius:50%;background:#f89b00;color:#fff;font:11px/15px sans-serif;text-align:center;border:1px solid #fff}.st-colors{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.st-swatch{padding:0!important;width:100%;aspect-ratio:1;border:1px solid #e0e3e7!important;border-radius:9px!important;position:relative;box-shadow:none!important}.st-swatch[aria-pressed=true]{outline:2px solid #f89b00;outline-offset:0}.st-swatch.st-palette{background:linear-gradient(135deg,#7131f7,#514be9)!important;color:white}.st-clothes .st-box{border-radius:7px}.st-clothes img{width:100%;height:100%;object-fit:contain;padding:1px}.st-clothes{row-gap:9px}.st-tools{row-gap:10px}.st-tools .st-box{border-radius:7px;color:#15191d}.st-tools .st-tile{min-height:70px}.st-tools .st-tile>span:last-child{max-width:51px;min-height:25px}.st-level{position:absolute;top:0;right:0;font:10px/16px sans-serif;background:#fff5df;border-radius:5px;color:#bb6e00;width:17px;z-index:1}.st-generate{margin-top:auto;padding-top:28px}.reference-studio .st-primary,.st-dialog .st-primary{background:#ef9700;border:1px solid #ef9700;color:white;font-weight:650;box-shadow:none;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:9px 18px}.reference-studio .st-primary:hover{background:#df8800}.reference-studio .st-primary:disabled{background:#f2c781;border-color:#f2c781;opacity:1;cursor:not-allowed}.st-generate .st-primary{width:100%;font-size:15px;min-height:46px}.st-stage{background:#1c203b;border-radius:13px;min-height:920px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:32px}.st-drop{width:350px;max-width:100%;min-height:428px;padding:40px 24px;border:2px dashed #42465f;border-radius:17px;background:#ffffff03;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:13px;color:#fff}.st-drop.st-drag{border-color:#f1a326;background:#f29a0020}.st-drop-badge{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;background:#343850;color:#acb4c4;margin:20px 0 15px}.st-drop-badge .st-icon{width:30px;height:30px}.st-drop h2{font-size:17px;font-weight:600;color:#fff;margin:0}.st-drop p{color:#98a4c3;font-size:13px;line-height:1.65;margin:0 0 6px}.st-drop kbd{font:11px monospace;background:#343a54;color:#e3e6ee;padding:3px 6px;border:1px solid #73798c;border-radius:4px}.st-dual-upload{position:absolute;bottom:7px;left:50%;transform:translateX(-50%);border:0!important;background:#3b3035!important;color:#f9ad08!important;font-size:12px!important;border-radius:5px!important;padding:10px 13px!important;white-space:nowrap;box-shadow:none!important}.st-dual-upload .st-icon{width:15px;height:15px}.st-output{padding:16px}.st-qr-card{background:#1c203b;color:#fff;padding:18px 16px 16px;border-radius:17px;box-shadow:0 10px 18px #1069a72e;position:relative;overflow:hidden}.st-qr-card:before,.st-qr-card:after{content:'';position:absolute;border-radius:50%;background:#ffffff0a;width:75px;height:75px;right:-15px;top:-18px;pointer-events:none}.st-qr-card:after{width:62px;height:62px;left:-18px;bottom:-18px;top:auto}.st-qr-title{display:flex;align-items:center;gap:12px}.st-qr-logo{width:44px;height:44px;border:1px solid #76798b;background:#4a4d65;border-radius:12px;display:grid;place-items:center}.st-qr-logo .st-icon{width:24px;height:24px}.st-qr-title b{font-size:13px;font-weight:600}.st-qr-title small{display:block;font-size:11px;line-height:1.6;margin:2px 0 0;color:#dde4f9}.st-qr-card button{margin-top:12px;min-height:40px;border:1px solid #808397!important;border-radius:11px!important;background:#ffffff20!important;color:#fff!important;width:100%;font-size:13px!important;box-shadow:none!important}.st-qr-card button .st-icon{width:14px;height:14px}.st-image-wrap{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:25px 0 50px;position:relative}.st-photo{max-width:100%;max-height:770px;object-fit:contain;box-shadow:0 14px 55px #0004;border-radius:2px;cursor:zoom-in}.st-stage-top{position:absolute;top:12px;left:12px;right:12px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:#c4c9d9;z-index:2;font-size:12px}.st-stage-top button{background:#ffffff12!important;border-color:#ffffff30!important;color:#eee!important;box-shadow:none;font-size:12px;padding:6px 10px}.st-stage-top .st-icon{width:15px;height:15px}.st-result-actions{display:flex;flex-direction:column;gap:10px;margin-top:25px}.st-result-actions h3{font-size:15px;margin:0 0 3px}.st-result-actions p{font-size:12px;line-height:1.55;margin:0;color:#7d8696}.st-result-preview{background:#f6f5f2;border-radius:10px;max-height:280px;object-fit:contain;width:100%;padding:12px}.st-result-actions button,.st-result-actions a{justify-content:center;text-align:center;font-size:13px}.st-compare{display:flex;padding:3px;border:1px solid #e5e6ea;background:#f5f6f8;border-radius:8px}.st-compare button{flex:1;border:0!important;background:transparent!important;padding:8px!important;font-size:12px!important;box-shadow:none!important}.st-compare button.active{background:#fff!important;color:#e58c00!important;box-shadow:0 1px 4px #0001!important}.st-caption{font-size:12px;color:#8b93a2}.st-pending{position:absolute;inset:0;background:#1c203be8;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:18px;color:#fff;padding:25px}.st-spinner{height:50px;width:50px;border:3px solid #ffffff25;border-top-color:#f89b00;border-radius:50%;animation:st-spin 1s linear infinite}@keyframes st-spin{to{transform:rotate(360deg)}}.st-pending p{font-size:13px;color:#c3c7d9;max-width:330px}.st-pending button{background:#ffffff15;color:#fff;border-color:#fff5}.st-recent{margin-top:26px}.st-recent-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:14px}.st-recent-head a{font-size:12px;color:#aa6800}.st-recent-grid{display:flex;gap:12px;overflow:auto;padding-bottom:10px}.st-recent-grid a{flex:0 0 110px;height:136px;background:white;border:1px solid #e4e1dc;border-radius:10px;overflow:hidden}.st-recent-grid img{width:100%;height:100%;object-fit:cover}.st-footer{display:flex;justify-content:space-between;padding:18px 0;font-size:11px;color:#91949e}.st-alert{background:#fff7e6;color:#795319;border:1px solid #f4ddb1;border-radius:8px;padding:12px;margin-top:14px;font-size:12px;line-height:1.6}.st-dialog{width:min(560px,94vw);padding:22px;border:1px solid #e2e3e7;border-radius:16px;max-height:92vh;overflow:auto;box-shadow:0 20px 80px #151a3433;background:white;color:#30323b}.st-dialog::backdrop{background:#151a3475;backdrop-filter:blur(2px)}.st-dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.st-dialog h2{font-size:18px;margin:0}.st-dialog-head button{padding:4px;border:0;background:transparent}.st-dialog label{display:flex;flex-direction:column;gap:6px;margin:12px 0;font-size:13px}.st-dialog input,.st-dialog textarea,.st-dialog select{font-family:inherit;width:100%;font-size:14px;min-height:38px}.st-dialog input[type=checkbox]{width:16px;min-height:16px}.st-dialog .st-check-row{display:flex;flex-direction:row;align-items:center;gap:9px;margin:0;padding:7px;border-radius:6px;cursor:pointer}.st-check-row:hover{background:#fff7e8}.st-manage-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px;max-height:65vh;overflow:auto}.st-check-row img{width:32px;height:32px}.st-check-row .st-icon{width:22px}.st-dialog .st-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.st-dialog-actions{margin-top:18px;display:flex;gap:10px;justify-content:flex-end}.st-dialog p{font-size:13px;color:#717d90;line-height:1.7}.st-options{display:flex;gap:8px}.st-options button{flex:1;border:1px solid #dedfe5;border-radius:8px;background:#f9fafb;padding:10px}.st-options button.active{background:#fff5df;color:#df8a00;border-color:#f89a00}.st-crop-area{height:330px;background:#1c203b;display:flex;align-items:center;justify-content:center;border-radius:10px;overflow:hidden}.st-crop-area canvas{max-width:100%;max-height:100%;touch-action:none;cursor:move}.st-qr-display{display:flex;justify-content:center;padding:20px;background:#fff}.st-qr-display img{margin:0!important}.st-size-presets{display:flex;gap:8px;flex-wrap:wrap}.st-size-presets button{font-size:12px;padding:7px;border:1px solid #e3e5e8}.st-popover{position:fixed;z-index:30;width:320px;max-height:80vh;overflow:auto;background:white;border:1px solid #e4e3df;border-radius:12px;padding:16px;box-shadow:0 10px 40px #1c203b33}.st-popover h3{margin:0 0 12px;font-size:14px}.st-popover .st-check-row{display:flex;align-items:center;gap:7px;font-size:12px;padding:7px 0;cursor:pointer;line-height:1.3}.st-popover input{width:15px;height:15px;margin:0;accent-color:#ed9400}.st-popover .st-check-row img{width:26px;height:26px}.st-popover .st-manage-grid{gap:0 8px}.st-popover .st-check-row .st-icon{width:20px;height:20px}.st-popover .st-options{margin-top:12px}.st-popover .st-options button{font-size:12px}.st-popover .st-close-pop{float:right;border:0;background:#fff7e8;color:#bf7600;padding:3px 7px}.st-adjust label{display:block;font-size:12px;margin:12px 0}.st-adjust input{width:100%;accent-color:#e99500}.st-mobile-tools{display:none}.st-status{font-size:11px;color:#728176;margin-top:10px}.st-work [hidden]{display:none!important}.st-dialog [hidden]{display:none!important}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #d78800;outline-offset:3px}
@media(min-width:1500px){.st-stage{min-height:920px}}
@media(max-width:1150px){.st-grid{grid-template-columns:278px minmax(280px,1fr) 255px;gap:16px}.st-work{width:calc(100% - 24px);margin:18px auto}.st-settings,.st-output{padding:13px}.st-stage{padding:20px;min-height:880px}.st-nav{gap:20px}.st-drop{padding:28px 15px}.st-qr-title{gap:7px}.st-qr-title b{font-size:12px}}
@media(max-width:950px){.st-grid{grid-template-columns:278px minmax(0,1fr)}.st-output{grid-column:2;grid-row:2}.st-settings{grid-row:1/3}.st-stage{min-height:660px;grid-column:2}.st-output{min-height:200px}.st-qr-card{max-width:360px}.st-result-actions{max-width:400px}.st-nav{flex-wrap:wrap;gap:10px 20px}.st-nav a{font-size:12px}.st-photo{max-height:550px}}
@media(max-width:620px){.st-work{margin:12px auto}.st-grid{display:flex;flex-direction:column;gap:14px}.st-settings{order:2}.st-stage{order:1;min-height:470px;padding:50px 18px}.st-output{order:3}.st-drop{min-height:350px;width:310px;padding:16px}.st-drop-badge{margin:6px 0 10px}.st-photo{max-height:480px}.st-stage:has(.st-photo){min-height:550px}.st-settings{padding:16px}.st-section{margin-top:22px}.st-colors{grid-template-columns:repeat(8,1fr)}.st-tiles{grid-template-columns:repeat(5,1fr);gap:9px}.st-clothes{grid-template-columns:repeat(5,1fr)}.st-clothes .st-box{max-height:62px}.st-tools .st-box{max-height:62px}.st-tools .st-tile>span:last-child{max-width:70px}.st-nav{padding:11px 14px;gap:10px 16px}.st-brand{width:100%;font-size:18px}.st-nav .st-nav-end{margin-left:0}.st-recent-grid a{flex-basis:90px;height:114px}.st-generate{padding-top:18px}.st-qr-card{max-width:none}.st-footer{gap:15px}.st-popover{left:16px!important;right:16px;width:auto;max-height:70vh}.st-image-wrap{padding:0 0 20px}}
@media(prefers-reduced-motion:reduce){.st-spinner{animation:none}}

.reference-studio #stFile,.reference-studio #stSecond{display:none!important}.st-qr-title b{font-size:12px;white-space:nowrap}.st-qr-title small{font-size:10px}

.st-qr-display svg{width:216px;height:216px;max-width:100%;fill:#1c203b}


/* =========================================================
   JR STUDIO — HIGH-TECH NEON UI MODEL
   VISUAL-ONLY OVERRIDE
   IMPORTANT: No JS/PHP/API/DOM functionality is changed here.
   Existing buttons, options, IDs and workflows remain untouched.
   ========================================================= */

body.reference-studio{
  --jr-bg:#061126;
  --jr-bg-2:#081a35;
  --jr-panel:#0b1a34;
  --jr-panel-2:#0e2142;
  --jr-line:#1d4f86;
  --jr-cyan:#18d9ff;
  --jr-blue:#2a73ff;
  --jr-purple:#8f55ff;
  --jr-pink:#ff4ec7;
  --jr-orange:#ff9a22;
  --jr-green:#31e6a1;
  --jr-text:#f4f8ff;
  --jr-muted:#9fb3d5;
  --jr-shadow:0 22px 60px rgba(0,0,0,.32);
  background:
    radial-gradient(circle at 50% -8%,rgba(42,115,255,.22),transparent 34%),
    radial-gradient(circle at 88% 15%,rgba(143,85,255,.13),transparent 26%),
    linear-gradient(180deg,#061126 0%,#07152b 48%,#050d1d 100%);
  color:var(--jr-text);
}

/* ---------- Top navigation / visual brand ---------- */
body.reference-studio .st-nav{
  min-height:68px;
  padding:10px 24px;
  gap:22px;
  background:linear-gradient(180deg,rgba(8,25,53,.98),rgba(6,18,39,.98));
  border-bottom:1px solid rgba(62,151,255,.32);
  box-shadow:0 10px 30px rgba(0,0,0,.2);
  position:sticky;
  top:0;
  z-index:15;
  backdrop-filter:blur(18px);
}
body.reference-studio .st-brand{
  min-width:210px;
  font-size:0;
  color:#fff;
  text-decoration:none;
  letter-spacing:.5px;
  text-shadow:0 0 18px rgba(24,217,255,.35);
}
body.reference-studio .st-brand::after{
  content:"JR STUDIO";
  font-size:25px;
  line-height:1;
  font-weight:900;
  letter-spacing:.6px;
  background:linear-gradient(90deg,#ffffff 4%,#67eaff 42%,#6d80ff 70%,#d565ff 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
body.reference-studio .st-brand .st-icon{
  width:31px;
  height:31px;
  color:#6cecff;
  filter:drop-shadow(0 0 9px rgba(24,217,255,.6));
}
body.reference-studio .st-nav a:not(.st-brand){
  color:#b8c9e6;
  padding:9px 12px;
  border-radius:10px;
  transition:.2s ease;
}
body.reference-studio .st-nav a:not(.st-brand):hover{
  color:white;
  background:rgba(34,118,255,.12);
}
body.reference-studio .st-nav .st-current{
  color:#fff!important;
  background:linear-gradient(135deg,rgba(38,118,255,.34),rgba(141,82,255,.32))!important;
  border:1px solid rgba(89,157,255,.45);
  box-shadow:0 0 0 1px rgba(24,217,255,.06) inset,0 0 24px rgba(48,114,255,.14);
}

/* ---------- Main layout ---------- */
body.reference-studio .st-work{
  width:calc(100% - 30px);
  max-width:1580px;
  margin:16px auto 30px;
}
body.reference-studio .st-grid{
  grid-template-columns:330px minmax(420px,1fr) 330px;
  gap:14px;
}
body.reference-studio .st-settings,
body.reference-studio .st-output{
  background:
    linear-gradient(180deg,rgba(13,32,65,.96),rgba(7,20,43,.97));
  border:1px solid rgba(72,146,244,.32);
  border-radius:17px;
  box-shadow:var(--jr-shadow),inset 0 1px 0 rgba(255,255,255,.035);
  color:var(--jr-text);
}
body.reference-studio .st-settings{padding:16px}
body.reference-studio .st-output{padding:14px}

/* ---------- Text, headings, sections ---------- */
body.reference-studio .st-heading{
  color:#f7fbff;
  font-weight:700;
}
body.reference-studio .st-heading::before{
  background:linear-gradient(180deg,var(--jr-cyan),var(--jr-purple));
  box-shadow:0 0 14px rgba(24,217,255,.7);
}
body.reference-studio .st-section{
  margin-top:22px;
  padding-top:1px;
}
body.reference-studio .st-section + .st-section{
  border-top:1px solid rgba(110,155,219,.10);
  padding-top:19px;
}
body.reference-studio .small,
body.reference-studio .muted,
body.reference-studio .st-caption,
body.reference-studio .st-result-actions p{
  color:var(--jr-muted)!important;
}
body.reference-studio .st-count{color:#7fdfff}
body.reference-studio .st-mini{
  color:#69dfff!important;
  background:rgba(42,115,255,.13)!important;
  border:1px solid rgba(84,159,255,.22)!important;
}

/* ---------- Provider / selectors / extra options ---------- */
body.reference-studio .st-id-safe{
  color:#d9e7fb;
}
body.reference-studio select,
body.reference-studio input[type="text"],
body.reference-studio input[type="number"],
body.reference-studio textarea{
  background:#071a37!important;
  color:#f5f9ff!important;
  border:1px solid rgba(87,151,235,.38)!important;
  border-radius:10px!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.015);
}
body.reference-studio .st-more-options{
  background:rgba(5,17,38,.58);
  border:1px solid rgba(79,145,232,.18);
  border-radius:12px;
  padding:10px 11px;
  margin-top:14px;
}
body.reference-studio .st-more-options summary{
  color:#8fdcff;
}
body.reference-studio .st-more-options a{color:#7fe5ff}

/* ---------- Tiles ---------- */
body.reference-studio .st-tile{
  color:#aebfdb!important;
}
body.reference-studio .st-tile span.st-box{
  background:linear-gradient(180deg,#0d2348,#091a35);
  border:1px solid rgba(88,145,223,.36);
  color:#d7e9ff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
body.reference-studio .st-tile:hover span.st-box{
  border-color:rgba(71,218,255,.75);
  box-shadow:0 0 18px rgba(24,217,255,.12),inset 0 0 18px rgba(30,116,255,.08);
  color:#fff;
}
body.reference-studio .st-tile[aria-pressed=true]{
  color:#7fe8ff!important;
}
body.reference-studio .st-tile[aria-pressed=true] span.st-box{
  border-color:#35d9ff;
  background:linear-gradient(145deg,rgba(32,115,255,.34),rgba(110,60,255,.22));
  box-shadow:
    0 0 0 1px rgba(24,217,255,.22),
    0 0 20px rgba(24,217,255,.2),
    inset 0 0 18px rgba(42,115,255,.16);
}
body.reference-studio .st-tile[aria-pressed=true] .st-box::after,
body.reference-studio .st-swatch[aria-pressed=true]::after{
  background:linear-gradient(135deg,#1cd8ff,#6b66ff);
  box-shadow:0 0 12px rgba(24,217,255,.5);
}
body.reference-studio .st-level{
  background:#10264b;
  color:#7fe8ff;
  border:1px solid rgba(67,203,255,.28);
}

/* garment image cards keep their images exactly as before */
body.reference-studio .st-clothes img{
  filter:none!important;
}

/* ---------- Background swatches ---------- */
body.reference-studio .st-swatch{
  border:1px solid rgba(182,210,245,.42)!important;
  box-shadow:0 3px 12px rgba(0,0,0,.18)!important;
}
body.reference-studio .st-swatch[aria-pressed=true]{
  outline:2px solid #38dcff;
  box-shadow:0 0 18px rgba(24,217,255,.35)!important;
}
body.reference-studio .st-swatch.st-palette{
  background:linear-gradient(135deg,#0fd5ff,#4f61ff 46%,#a74dff 78%,#ff5ac8)!important;
}

/* ---------- Primary actions ---------- */
body.reference-studio .st-primary,
.st-dialog .st-primary{
  color:white!important;
  border:1px solid rgba(106,207,255,.55)!important;
  background:
    linear-gradient(110deg,#6f45ff 0%,#2b6dff 47%,#0fd8ff 100%)!important;
  box-shadow:0 8px 24px rgba(42,115,255,.24),inset 0 1px 0 rgba(255,255,255,.22)!important;
  border-radius:10px!important;
  font-weight:800;
}
body.reference-studio .st-primary:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 30px rgba(42,115,255,.34),0 0 18px rgba(24,217,255,.12)!important;
}
body.reference-studio .st-primary:disabled{
  filter:saturate(.35);
  opacity:.55!important;
}

/* ---------- Main preview stage ---------- */
body.reference-studio .st-stage{
  min-height:920px;
  border:1px solid rgba(64,151,255,.42);
  border-radius:18px;
  background:
    radial-gradient(circle at 50% 34%,rgba(25,97,211,.18),transparent 27%),
    radial-gradient(circle at 50% 58%,rgba(124,63,255,.11),transparent 40%),
    linear-gradient(rgba(48,126,227,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(48,126,227,.045) 1px,transparent 1px),
    linear-gradient(180deg,#06152d 0%,#071a37 48%,#051027 100%);
  background-size:auto,auto,30px 30px,30px 30px,auto;
  box-shadow:
    0 26px 80px rgba(0,0,0,.28),
    inset 0 0 80px rgba(24,217,255,.03);
  overflow:hidden;
}
body.reference-studio .st-stage::before{
  content:"";
  position:absolute;
  width:72%;
  aspect-ratio:1;
  border-radius:50%;
  border:1px solid rgba(40,206,255,.16);
  box-shadow:
    0 0 0 36px rgba(104,70,255,.035),
    0 0 0 74px rgba(24,217,255,.025),
    0 0 90px rgba(36,120,255,.11);
  pointer-events:none;
  animation:jr-breathe 4.6s ease-in-out infinite;
}
@keyframes jr-breathe{
  0%,100%{transform:scale(.97);opacity:.64}
  50%{transform:scale(1.03);opacity:1}
}
body.reference-studio .st-photo{
  max-height:790px;
  border-radius:8px;
  box-shadow:
    0 0 0 1px rgba(62,193,255,.46),
    0 0 38px rgba(20,126,255,.24),
    0 28px 70px rgba(0,0,0,.38);
  position:relative;
  z-index:1;
}
body.reference-studio .st-stage-top{
  color:#d7e6ff;
}
body.reference-studio .st-stage-top button{
  color:#eaf5ff!important;
  background:rgba(7,25,53,.78)!important;
  border:1px solid rgba(89,159,248,.34)!important;
  backdrop-filter:blur(10px);
}
body.reference-studio .st-dual-upload{
  color:#ffd58d!important;
  background:rgba(32,24,47,.88)!important;
  border:1px solid rgba(255,162,43,.25)!important;
}

/* ---------- Empty upload state ---------- */
body.reference-studio .st-drop{
  border:1px dashed rgba(89,175,255,.55);
  background:
    radial-gradient(circle at 50% 38%,rgba(24,217,255,.07),transparent 35%),
    rgba(5,16,35,.55);
  color:#fff;
  box-shadow:inset 0 0 40px rgba(29,103,211,.05);
}
body.reference-studio .st-drop-badge{
  background:linear-gradient(145deg,#132b55,#0c1d3c);
  color:#58dcff;
  border:1px solid rgba(71,203,255,.28);
  box-shadow:0 0 25px rgba(24,217,255,.12);
}
body.reference-studio .st-drop p{color:#a8bad8}

/* =========================================================
   PROCESSING ANIMATION
   CSS-only: it never changes the actual AI job or progress.
   ========================================================= */
body.reference-studio .st-pending{
  background:
    radial-gradient(circle at 50% 45%,rgba(9,74,160,.26),transparent 28%),
    linear-gradient(180deg,rgba(4,15,34,.62),rgba(4,13,29,.78));
  backdrop-filter:blur(2px);
  gap:14px;
  overflow:hidden;
}
body.reference-studio .st-pending > *{
  position:relative;
  z-index:4;
}
body.reference-studio .st-pending::before{
  content:"";
  position:absolute;
  width:min(68%,620px);
  aspect-ratio:1;
  border-radius:50%;
  border:2px solid rgba(46,209,255,.48);
  box-shadow:
    0 0 0 18px rgba(53,99,255,.05),
    0 0 0 52px rgba(151,73,255,.04),
    0 0 52px rgba(24,217,255,.2),
    inset 0 0 46px rgba(42,115,255,.06);
  animation:jr-orbit 8s linear infinite;
  pointer-events:none;
}
body.reference-studio .st-pending::after{
  content:"";
  position:absolute;
  width:5px;
  height:72%;
  left:50%;
  top:14%;
  border-radius:10px;
  background:linear-gradient(180deg,transparent,#7cf3ff 18%,#3b76ff 52%,#ff73df 82%,transparent);
  box-shadow:
    0 0 12px #48ddff,
    0 0 36px rgba(48,118,255,.72),
    0 0 62px rgba(255,79,210,.28);
  animation:jr-scan 3.1s ease-in-out infinite;
  opacity:.95;
  pointer-events:none;
}
@keyframes jr-orbit{
  to{transform:rotate(360deg)}
}
@keyframes jr-scan{
  0%,100%{transform:translateX(-190px) skewX(-6deg);opacity:.22}
  50%{transform:translateX(190px) skewX(6deg);opacity:1}
}
body.reference-studio .st-spinner{
  width:72px;
  height:72px;
  border:3px solid rgba(97,155,255,.18);
  border-top-color:#16dcff;
  border-right-color:#7a59ff;
  border-bottom-color:#ff58c7;
  box-shadow:
    0 0 22px rgba(24,217,255,.3),
    inset 0 0 18px rgba(71,102,255,.16);
  animation:st-spin .92s linear infinite;
}
body.reference-studio .st-pending b{
  font-size:18px;
  color:#fff;
  letter-spacing:.2px;
  text-shadow:0 0 18px rgba(24,217,255,.28);
}
body.reference-studio .st-pending p{
  color:#b8cae7;
  max-width:520px;
  margin:0;
}
body.reference-studio #stProgressNote::after{
  content:"";
  display:block;
  width:min(360px,70vw);
  height:7px;
  margin:16px auto 0;
  border-radius:999px;
  background:
    linear-gradient(90deg,transparent 0 8%,#21dfff 28%,#5a6bff 50%,#b255ff 68%,transparent 92%) 0 0/50% 100% no-repeat,
    rgba(90,137,200,.16);
  box-shadow:inset 0 0 0 1px rgba(90,160,255,.18),0 0 16px rgba(24,217,255,.12);
  animation:jr-indeterminate 1.75s ease-in-out infinite;
}
@keyframes jr-indeterminate{
  0%{background-position:-55% 0,0 0}
  100%{background-position:155% 0,0 0}
}
body.reference-studio .st-pending button{
  color:#ddecff;
  background:rgba(8,26,56,.83)!important;
  border:1px solid rgba(89,159,248,.38)!important;
  border-radius:9px!important;
}

/* ---------- Output / QR panel ---------- */
body.reference-studio .st-qr-card{
  background:
    radial-gradient(circle at 86% 10%,rgba(126,83,255,.14),transparent 28%),
    linear-gradient(145deg,#0d2348,#08172f);
  border:1px solid rgba(78,157,255,.33);
  box-shadow:0 18px 42px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.03);
}
body.reference-studio .st-qr-logo{
  background:#10274c;
  border-color:rgba(104,172,255,.38);
  color:#6ee6ff;
}
body.reference-studio .st-qr-card button{
  background:rgba(22,50,92,.7)!important;
  border-color:rgba(106,170,255,.38)!important;
}
body.reference-studio .st-capture-info{
  background:linear-gradient(180deg,rgba(24,36,55,.98),rgba(19,27,43,.98));
  border-color:rgba(255,171,60,.34);
  color:#dfeaff;
}
body.reference-studio .st-result-actions h3{
  color:#f7fbff;
}
body.reference-studio .st-result-preview{
  background:#071932;
  border:1px solid rgba(83,155,246,.26);
  box-shadow:0 12px 30px rgba(0,0,0,.24);
}
body.reference-studio .st-compare{
  background:#081a35;
  border-color:rgba(85,147,226,.30);
}
body.reference-studio .st-compare button{
  color:#afc1df!important;
}
body.reference-studio .st-compare button.active{
  color:#fff!important;
  background:linear-gradient(135deg,rgba(64,116,255,.42),rgba(127,73,255,.32))!important;
  box-shadow:0 0 18px rgba(24,217,255,.1)!important;
}

/* ---------- Recent strip / footer ---------- */
body.reference-studio .st-recent{
  padding:16px;
  border:1px solid rgba(71,145,238,.20);
  border-radius:16px;
  background:rgba(8,23,48,.72);
  box-shadow:0 14px 40px rgba(0,0,0,.16);
}
body.reference-studio .st-recent-head{
  color:#edf6ff;
}
body.reference-studio .st-recent-head a{color:#6de6ff}
body.reference-studio .st-recent-grid a{
  background:#071830;
  border-color:rgba(85,151,235,.30);
}
body.reference-studio .st-footer{
  color:#8fa9cc;
  border-top-color:rgba(82,144,225,.18);
}
body.reference-studio .st-footer a{color:#71e2ff}

/* ---------- Popovers / dialogs ---------- */
body.reference-studio .st-popover,
.st-dialog{
  background:linear-gradient(180deg,#0c2041,#07172f)!important;
  color:#edf6ff!important;
  border:1px solid rgba(78,154,255,.36)!important;
  box-shadow:0 24px 80px rgba(0,0,0,.48)!important;
}
body.reference-studio .st-popover button,
.st-dialog button{
  color:inherit;
}
body.reference-studio .st-popover input,
.st-dialog input,
body.reference-studio .st-popover select,
.st-dialog select,
body.reference-studio .st-popover textarea,
.st-dialog textarea{
  background:#07182f!important;
  color:#fff!important;
  border-color:rgba(84,151,237,.32)!important;
}

/* ---------- Scrollbars ---------- */
body.reference-studio *{
  scrollbar-width:thin;
  scrollbar-color:#275ca0 #07162e;
}
body.reference-studio *::-webkit-scrollbar{width:9px;height:9px}
body.reference-studio *::-webkit-scrollbar-track{background:#07162e}
body.reference-studio *::-webkit-scrollbar-thumb{
  background:linear-gradient(#246bd5,#6a4ce8);
  border-radius:999px;
  border:2px solid #07162e;
}

/* ---------- Responsive: retain every option, only reflow ---------- */
@media (max-width:1180px){
  body.reference-studio .st-grid{
    grid-template-columns:290px minmax(360px,1fr);
  }
  body.reference-studio .st-output{
    grid-column:1/-1;
  }
}
@media (max-width:820px){
  body.reference-studio .st-nav{
    overflow-x:auto;
    gap:8px;
    padding:8px 10px;
  }
  body.reference-studio .st-brand{min-width:170px}
  body.reference-studio .st-brand::after{font-size:21px}
  body.reference-studio .st-grid{
    grid-template-columns:1fr;
  }
  body.reference-studio .st-settings,
  body.reference-studio .st-stage,
  body.reference-studio .st-output{
    grid-column:auto;
  }
  body.reference-studio .st-stage{
    min-height:650px;
  }
}
@media (prefers-reduced-motion:reduce){
  body.reference-studio .st-stage::before,
  body.reference-studio .st-pending::before,
  body.reference-studio .st-pending::after,
  body.reference-studio #stProgressNote::after{
    animation:none!important;
  }
}


/* =========================================================
   JR STUDIO readability + client-friendly progress patch
   Safe UI-only improvements: no workflow removal.
   ========================================================= */

body.reference-studio .st-popover h3,
body.reference-studio .st-dialog h2,
body.reference-studio .st-dialog h3,
body.reference-studio .st-dialog label,
body.reference-studio .st-popover .st-check-row,
body.reference-studio .st-popover .st-manage-grid,
body.reference-studio .st-popover,
body.reference-studio .st-dialog{
  color:#eef6ff!important;
}
body.reference-studio .st-popover .st-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
body.reference-studio .st-popover .st-options button{
  min-height:42px;
  padding:10px 8px!important;
  border-radius:11px!important;
  border:1px solid rgba(93,163,255,.38)!important;
  background:linear-gradient(180deg,#122a53,#0a1d3c)!important;
  color:#f3f8ff!important;
  font-weight:800!important;
  font-size:13px!important;
  letter-spacing:.1px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 6px 18px rgba(0,0,0,.14)!important;
}
body.reference-studio .st-popover .st-options button.active{
  background:linear-gradient(135deg,#ffb43c,#ff8d22)!important;
  color:#11213f!important;
  border-color:#ffc766!important;
  box-shadow:0 0 0 1px rgba(255,214,126,.35),0 10px 24px rgba(255,160,42,.24)!important;
}
body.reference-studio .st-popover .st-close-pop{
  color:#13264a!important;
  background:#ffd783!important;
  border-radius:10px!important;
  font-weight:700;
}
body.reference-studio .st-popover .st-check-row span,
body.reference-studio .st-popover .st-check-row,
body.reference-studio .st-dialog p,
body.reference-studio .st-status,
body.reference-studio .st-client-note{color:#c9d8f2!important}

/* Better pending / live processing panel */
body.reference-studio .st-pending{
  padding:26px 30px 34px;
}
body.reference-studio .st-client-card{
  position:relative;
  z-index:5;
  width:min(760px,92%);
  padding:22px 24px 20px;
  border-radius:24px;
  background:linear-gradient(180deg,rgba(6,18,40,.88),rgba(9,26,57,.92));
  border:1px solid rgba(93,168,255,.34);
  box-shadow:0 18px 60px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter:blur(10px);
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
body.reference-studio .st-client-kicker{
  font-size:12px;
  font-weight:800;
  letter-spacing:1.7px;
  color:#7fe8ff;
  margin-bottom:10px;
  text-transform:uppercase;
}
body.reference-studio .st-pending .st-spinner{margin-bottom:8px}
body.reference-studio .st-pending b#stProgress{
  font-size:34px;
  line-height:1.15;
  color:#fff;
  margin:2px 0 10px;
  text-shadow:0 0 26px rgba(66,222,255,.14);
}
body.reference-studio .st-client-percent{
  font-size:58px;
  line-height:1;
  font-weight:900;
  letter-spacing:-1px;
  background:linear-gradient(180deg,#e9fdff 0%,#70edff 42%,#6b7dff 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-shadow:0 0 28px rgba(43,159,255,.18);
  margin:4px 0 4px;
}
body.reference-studio .st-client-stage{
  font-size:24px;
  font-weight:800;
  color:#fff6de;
  margin:0 0 8px;
}
body.reference-studio .st-pending #stProgressNote{
  font-size:16px;
  line-height:1.7;
  color:#d8e8ff;
  max-width:640px;
  margin:0 0 16px;
}
body.reference-studio .st-client-bar{
  width:min(600px,100%);
  height:13px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(95,165,255,.18);
  overflow:hidden;
  box-shadow:inset 0 0 18px rgba(0,0,0,.14);
}
body.reference-studio .st-client-bar span{
  display:block;
  height:100%;
  width:10%;
  border-radius:inherit;
  background:linear-gradient(90deg,#21dcff 0%,#4875ff 45%,#a955ff 82%,#ff68cf 100%);
  box-shadow:0 0 22px rgba(31,223,255,.28);
  transition:width .35s ease;
}
body.reference-studio .st-client-steps{
  margin-top:14px;
  width:min(700px,100%);
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
body.reference-studio .st-client-step{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px 8px;
  border-radius:14px;
  border:1px solid rgba(100,157,231,.22);
  background:rgba(255,255,255,.04);
  color:#9db3d7;
  font-size:13px;
  font-weight:700;
}
body.reference-studio .st-client-step.active{
  color:#071a37;
  background:linear-gradient(135deg,#7af0ff,#88b5ff 55%,#d89aff 100%);
  border-color:rgba(146,231,255,.55);
  box-shadow:0 10px 26px rgba(74,164,255,.2);
}
body.reference-studio .st-client-step.done{
  color:#b9ffea;
  border-color:rgba(80,229,180,.34);
  background:rgba(37,217,150,.12);
}
body.reference-studio .st-client-step.error{
  color:#ffd2d2;
  background:rgba(255,89,116,.14);
  border-color:rgba(255,120,140,.34);
}
body.reference-studio .st-tech-note{
  order:10;
  margin:16px 0 0;
  font-size:12px;
  line-height:1.65;
  color:#8fa7cb!important;
  background:rgba(255,255,255,.045);
  border:1px dashed rgba(105,162,242,.16);
  border-radius:12px;
  padding:10px 12px;
  width:min(690px,100%);
}
body.reference-studio .st-pending-actions{
  display:flex;
  gap:12px;
  margin-top:15px;
  flex-wrap:wrap;
  justify-content:center;
}
body.reference-studio .st-pending-actions button{
  min-width:150px;
  min-height:42px;
  border-radius:12px!important;
  font-weight:700;
}
body.reference-studio .st-pending::after{
  top:10%;
  height:55%;
}
body.reference-studio .st-pending::before{
  width:min(64%,560px);
}

/* Improve small hidden/inactive label contrast around UI */
body.reference-studio .st-tile,
body.reference-studio .st-caption,
body.reference-studio .st-result-actions p,
body.reference-studio .st-capture-info p,
body.reference-studio .st-capture-info strong,
body.reference-studio .st-id-safe,
body.reference-studio .small.muted{
  text-shadow:none!important;
}

@media (max-width:920px){
  body.reference-studio .st-client-card{padding:18px 16px 16px;width:min(94%,700px)}
  body.reference-studio .st-pending b#stProgress{font-size:26px}
  body.reference-studio .st-client-percent{font-size:46px}
  body.reference-studio .st-client-stage{font-size:20px}
  body.reference-studio .st-client-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){
  body.reference-studio .st-pending{padding:16px}
  body.reference-studio .st-client-kicker{font-size:11px;letter-spacing:1.2px}
  body.reference-studio .st-pending b#stProgress{font-size:22px}
  body.reference-studio .st-client-percent{font-size:40px}
  body.reference-studio .st-client-stage{font-size:18px}
  body.reference-studio .st-pending #stProgressNote{font-size:14px}
  body.reference-studio .st-client-steps{grid-template-columns:1fr;gap:8px}
  body.reference-studio .st-tech-note{font-size:11px}
}


/* =========================================================
   JR STUDIO result reveal animation
   Safe visual-only animation when final image appears.
   ========================================================= */
body.reference-studio .st-photo.st-result-enter{
  animation:jr-result-photo-in 1.1s cubic-bezier(.18,.72,.18,1) both;
  transform-origin:center center;
}
@keyframes jr-result-photo-in{
  0%{opacity:.08;transform:scale(.92) translateY(22px);filter:blur(10px) brightness(.88) saturate(1.18)}
  42%{opacity:1;transform:scale(1.015) translateY(-4px);filter:blur(0) brightness(1.04) saturate(1.06)}
  70%{transform:scale(.996)}
  100%{opacity:1;transform:scale(1) translateY(0);filter:blur(0) brightness(1) saturate(1)}
}
body.reference-studio .st-stage.st-stage-result-glow{
  animation:jr-result-stage-glow 1.65s ease both;
}
@keyframes jr-result-stage-glow{
  0%{box-shadow:0 0 0 rgba(0,0,0,0), inset 0 0 80px rgba(24,217,255,.03)}
  30%{box-shadow:0 0 0 1px rgba(115,235,255,.24),0 0 34px rgba(24,217,255,.18),0 0 70px rgba(88,85,255,.12), inset 0 0 80px rgba(24,217,255,.06)}
  100%{box-shadow:0 26px 80px rgba(0,0,0,.28), inset 0 0 80px rgba(24,217,255,.03)}
}
body.reference-studio .st-result-actions.st-result-actions-enter{
  animation:jr-result-actions-in .85s ease both;
}
@keyframes jr-result-actions-in{
  0%{opacity:.2;transform:translateY(16px)}
  100%{opacity:1;transform:translateY(0)}
}
body.reference-studio .st-result-preview.st-result-card-enter{
  animation:jr-result-card-in 1s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes jr-result-card-in{
  0%{opacity:.05;transform:scale(.88) rotateX(10deg);filter:blur(8px) brightness(.9)}
  55%{opacity:1;transform:scale(1.03) rotateX(0);filter:blur(0) brightness(1.04)}
  100%{opacity:1;transform:scale(1);filter:blur(0) brightness(1)}
}
body.reference-studio .st-result-preview{
  transition:transform .28s ease,box-shadow .28s ease;
}
body.reference-studio .st-result-preview:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 34px rgba(39,123,255,.20);
}
@media (prefers-reduced-motion:reduce){
  body.reference-studio .st-photo.st-result-enter,
  body.reference-studio .st-stage.st-stage-result-glow,
  body.reference-studio .st-result-actions.st-result-actions-enter,
  body.reference-studio .st-result-preview.st-result-card-enter{
    animation:none!important;
  }
}


/* =========================================================
   JR STUDIO cinematic processing experience
   Visual-only: keeps logic intact, makes waiting feel alive.
   ========================================================= */
body.reference-studio .st-pending{
  justify-content:flex-end!important;
  align-items:stretch!important;
  text-align:left!important;
  gap:0!important;
  background:radial-gradient(circle at 50% 38%,rgba(51,124,255,.18),rgba(11,16,38,.72) 38%,rgba(10,14,31,.88) 100%)!important;
  backdrop-filter:blur(3px);
  overflow:hidden;
}
body.reference-studio .st-pending .st-spinner,
body.reference-studio .st-pending .st-client-card{display:none!important}
body.reference-studio .st-process-visual{
  position:absolute;inset:70px 62px 205px;pointer-events:none;display:block;
}
body.reference-studio .st-process-grid{
  position:absolute;inset:7% 18%;border-radius:28px;border:1px solid rgba(116,218,255,.48);
  box-shadow:0 0 0 1px rgba(69,165,255,.18),0 0 26px rgba(33,138,255,.22),inset 0 0 48px rgba(43,138,255,.12);
  background:
    linear-gradient(90deg,transparent 0 48%,rgba(255,255,255,.1) 49%,transparent 50%,transparent 100%),
    linear-gradient(rgba(87,181,255,.12) 1px,transparent 1px),
    linear-gradient(90deg,rgba(87,181,255,.12) 1px,transparent 1px);
  background-size:100% 100%,30px 30px,30px 30px;
  animation:jr-process-grid-pulse 3.1s ease-in-out infinite;
}
@keyframes jr-process-grid-pulse{0%,100%{transform:scale(1);opacity:.82}50%{transform:scale(1.015);opacity:1}}
body.reference-studio .st-process-scan{
  position:absolute;left:18%;right:18%;top:7%;bottom:7%;overflow:hidden;border-radius:28px;
}
body.reference-studio .st-process-scan::before{
  content:'';position:absolute;top:-18%;bottom:-18%;width:18%;left:-24%;
  background:linear-gradient(90deg,transparent,rgba(110,242,255,.06),rgba(255,255,255,.52),rgba(113,178,255,.08),transparent);
  filter:blur(2px);animation:jr-process-scan 2.25s linear infinite;
}
@keyframes jr-process-scan{0%{left:-28%}100%{left:110%}}
body.reference-studio .st-process-orbit{
  position:absolute;left:50%;top:49%;transform:translate(-50%,-50%);border-radius:50%;border:1px solid rgba(255,179,76,.28);
  box-shadow:0 0 18px rgba(255,183,64,.22),inset 0 0 18px rgba(255,183,64,.12);
}
body.reference-studio .st-orbit-a{width:68%;height:34%;animation:jr-orbit-a 7s linear infinite}
body.reference-studio .st-orbit-b{width:57%;height:46%;border-color:rgba(110,230,255,.28);box-shadow:0 0 20px rgba(110,230,255,.14),inset 0 0 18px rgba(110,230,255,.08);animation:jr-orbit-b 8.2s linear infinite}
@keyframes jr-orbit-a{from{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes jr-orbit-b{from{transform:translate(-50%,-50%) rotate(360deg)}to{transform:translate(-50%,-50%) rotate(0deg)}}
body.reference-studio .st-process-badge{
  position:absolute;left:50%;top:8%;transform:translateX(-50%);padding:10px 18px;border-radius:999px;
  background:linear-gradient(135deg,rgba(33,107,255,.82),rgba(75,216,255,.62));border:1px solid rgba(183,236,255,.38);
  box-shadow:0 12px 30px rgba(20,110,255,.22);font-size:12px;font-weight:800;letter-spacing:.14em;color:#fff;
}
body.reference-studio .st-process-chip{
  position:absolute;padding:10px 14px;border-radius:16px;background:rgba(15,23,54,.6);border:1px solid rgba(144,184,255,.24);
  color:#e6efff;font-size:13px;font-weight:700;box-shadow:0 10px 28px rgba(0,0,0,.18);backdrop-filter:blur(6px);opacity:.7;
  transition:transform .28s ease,opacity .28s ease,border-color .28s ease,box-shadow .28s ease,background .28s ease;
}
body.reference-studio #stFxAnalyze{left:8%;top:18%}
body.reference-studio #stFxBg{left:9%;top:46%}
body.reference-studio #stFxFace{right:9%;top:22%}
body.reference-studio #stFxHair{left:14%;bottom:16%}
body.reference-studio #stFxDress{right:10%;top:48%}
body.reference-studio #stFxFinal{right:11%;bottom:16%}
body.reference-studio .st-process-chip.is-active{
  opacity:1;transform:translateY(-3px) scale(1.03);border-color:rgba(255,215,130,.9);
  background:linear-gradient(135deg,rgba(255,170,64,.24),rgba(67,127,255,.35));
  box-shadow:0 0 0 1px rgba(255,205,120,.25),0 14px 34px rgba(47,120,255,.28),0 0 24px rgba(255,175,69,.18);
}
body.reference-studio .st-process-chip.is-done{opacity:.92;border-color:rgba(114,232,183,.55);background:rgba(28,74,66,.42)}
body.reference-studio .st-process-chip.is-hidden{display:none}
body.reference-studio .st-pending[data-fx="error"] .st-process-chip.is-active,
body.reference-studio .st-pending[data-fx="error"] .st-process-badge{
  background:linear-gradient(135deg,rgba(196,73,89,.82),rgba(255,150,78,.68));border-color:rgba(255,211,183,.4);
}
body.reference-studio .st-process-dock{
  position:relative;z-index:2;margin:0 8px 10px;padding:18px 20px 16px;border-radius:22px;
  background:linear-gradient(180deg,rgba(13,18,42,.72),rgba(13,18,42,.88));border:1px solid rgba(135,181,255,.16);
  box-shadow:0 26px 50px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.04);
}
body.reference-studio .st-process-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
body.reference-studio .st-client-kicker{display:inline-flex;align-items:center;gap:10px;padding:7px 12px;border-radius:999px;background:rgba(55,111,255,.16);border:1px solid rgba(135,181,255,.2);font-size:11px;font-weight:800;letter-spacing:.12em;color:#dbe7ff}
body.reference-studio .st-elapsed{font-size:12px;font-weight:700;color:#88e9ff;background:rgba(255,255,255,.06);padding:8px 10px;border-radius:999px;border:1px solid rgba(148,198,255,.18)}
body.reference-studio .st-pending b#stProgress{display:block;font-size:31px;line-height:1.16;margin:4px 0 6px;color:#fff}
body.reference-studio .st-pending #stClientStage{font-size:18px;font-weight:700;color:#8fe6ff;margin-bottom:6px}
body.reference-studio .st-pending #stProgressNote{max-width:none!important;font-size:15px;line-height:1.7;color:#d8dff2;margin:0}
body.reference-studio .st-tech-note{margin-top:10px;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.06);border:1px solid rgba(145,177,255,.12);font-size:12px;line-height:1.55;color:#adb8d6}
body.reference-studio .st-pending-actions{margin-top:12px;display:flex;gap:10px;justify-content:flex-end}
body.reference-studio .st-pending-actions button{border-radius:12px!important;padding:10px 16px!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(153,191,255,.18)!important}
body.reference-studio .st-pending[data-fx="bg"] .st-process-grid{box-shadow:0 0 0 1px rgba(45,190,255,.22),0 0 28px rgba(40,153,255,.24),inset 0 0 64px rgba(41,133,255,.1)}
body.reference-studio .st-pending[data-fx="face"] .st-process-grid{box-shadow:0 0 0 1px rgba(255,175,93,.18),0 0 26px rgba(255,156,89,.2),inset 0 0 64px rgba(255,149,78,.08)}
body.reference-studio .st-pending[data-fx="hair"] .st-process-grid{box-shadow:0 0 0 1px rgba(125,234,193,.18),0 0 26px rgba(91,220,184,.2),inset 0 0 64px rgba(91,220,184,.07)}
body.reference-studio .st-pending[data-fx="dress"] .st-process-grid{box-shadow:0 0 0 1px rgba(213,171,255,.2),0 0 26px rgba(168,118,255,.22),inset 0 0 64px rgba(156,115,255,.08)}
body.reference-studio .st-pending[data-fx="final"] .st-process-grid{box-shadow:0 0 0 1px rgba(255,208,97,.2),0 0 34px rgba(255,182,67,.24),inset 0 0 70px rgba(255,182,67,.08)}
@media (max-width:1100px){
  body.reference-studio .st-process-visual{inset:80px 32px 230px}
  body.reference-studio .st-pending b#stProgress{font-size:26px}
  body.reference-studio .st-pending #stClientStage{font-size:16px}
}
@media (max-width:760px){
  body.reference-studio .st-process-visual{inset:65px 16px 250px}
  body.reference-studio .st-process-chip{font-size:11px;padding:8px 10px}
  body.reference-studio #stFxAnalyze{left:4%;top:18%}
  body.reference-studio #stFxBg{left:3%;top:48%}
  body.reference-studio #stFxFace{right:3%;top:22%}
  body.reference-studio #stFxHair{left:7%;bottom:20%}
  body.reference-studio #stFxDress{right:4%;top:49%}
  body.reference-studio #stFxFinal{right:5%;bottom:19%}
  body.reference-studio .st-pending b#stProgress{font-size:22px}
  body.reference-studio .st-pending #stClientStage{font-size:14px}
  body.reference-studio .st-pending #stProgressNote{font-size:13px}
  body.reference-studio .st-process-dock{margin:0;padding:15px}
}
@media (prefers-reduced-motion:reduce){
  body.reference-studio .st-process-grid,
  body.reference-studio .st-process-scan::before,
  body.reference-studio .st-orbit-a,
  body.reference-studio .st-orbit-b{animation:none!important}
}



/* ===== center live-photo patch ===== */
body.reference-studio .st-stage.st-is-busy .st-image-wrap,
body.reference-studio .st-stage.st-is-busy .st-stage-top,
body.reference-studio .st-stage.st-is-busy .st-dual-upload{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
body.reference-studio .st-process-screen{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);width:220px;height:285px;padding:10px;border-radius:24px;background:linear-gradient(180deg,#4b8cff,#2348d9);border:1px solid rgba(173,225,255,.56);box-shadow:0 0 0 2px rgba(126,204,255,.12),0 0 36px rgba(47,126,255,.32),0 0 70px rgba(74,109,255,.16);z-index:3;overflow:hidden}
body.reference-studio .st-process-photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:18px;background:#dfe8ff}
body.reference-studio .st-process-screen-overlay{position:absolute;inset:10px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:10px;padding-bottom:20px;background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(5,14,35,.24) 58%,rgba(5,14,35,.44));color:#fff;font-size:14px;font-weight:800;text-shadow:0 1px 2px rgba(0,0,0,.4)}
body.reference-studio .st-process-mini-spinner{width:38px;height:38px;border-radius:50%;border:3px solid rgba(255,255,255,.24);border-top-color:#f7af2d;animation:st-live-mini-spin 1s linear infinite}
@keyframes st-live-mini-spin{to{transform:rotate(360deg)}}
body.reference-studio .st-process-head{justify-content:space-between;gap:12px}
body.reference-studio .st-client-kicker{display:inline-flex;align-items:center;gap:10px;position:relative;padding:8px 14px 8px 42px!important}
body.reference-studio .st-client-kicker::before,
body.reference-studio .st-client-kicker::after{content:'';position:absolute;top:50%;transform:translateY(-50%);width:10px;height:10px;border-radius:50%}
body.reference-studio .st-client-kicker::before{left:14px;background:#1eff88;box-shadow:0 0 10px rgba(30,255,136,.9);animation:st-green-blink 1.2s infinite}
body.reference-studio .st-client-kicker::after{left:28px;background:#ff4469;box-shadow:0 0 10px rgba(255,68,105,.9);animation:st-red-blink 1.2s infinite}
@keyframes st-green-blink{0%,45%{opacity:1}50%,100%{opacity:.18}}
@keyframes st-red-blink{0%,45%{opacity:.18}50%,100%{opacity:1}}
body.reference-studio .st-process-dock{text-align:center}
body.reference-studio .st-pending b#stProgress,
body.reference-studio .st-pending #stClientStage,
body.reference-studio .st-pending #stProgressNote,
body.reference-studio .st-tech-note{text-align:center!important;margin-left:auto;margin-right:auto}
body.reference-studio .st-pending-actions{justify-content:center!important}
body.reference-studio .st-process-dock{margin:0 8px 10px;padding-top:20px}
body.reference-studio .st-tech-note{max-width:620px}
@media (max-width:760px){
  body.reference-studio .st-process-screen{width:176px;height:228px;top:43%}
  body.reference-studio .st-process-screen-overlay{font-size:12px}
}

/* Small center processing photo position tweak only */
body.reference-studio .st-process-screen{
  left:50%!important;
  top:36%!important;
  width:160px!important;
  height:210px!important;
  transform:translate(-50%,-50%)!important;
}
@media (max-width:760px){
  body.reference-studio .st-process-screen{
    left:50%!important;
    top:35%!important;
    width:138px!important;
    height:182px!important;
    transform:translate(-50%,-50%)!important;
  }
}

/* Text block position tweak only */
body.reference-studio .st-process-dock > #stProgress{
  margin-top:-52px!important;
}
@media (max-width:760px){
  body.reference-studio .st-process-dock > #stProgress{
    margin-top:-42px!important;
  }
}


/* FINAL FIX: move the WHOLE processing text block upward only */
body.reference-studio .st-process-dock > #stProgress{
  margin-top:4px!important;
}
body.reference-studio .st-process-dock{
  position:relative!important;
  top:-88px!important;
}
@media (max-width:760px){
  body.reference-studio .st-process-dock > #stProgress{
    margin-top:4px!important;
  }
  body.reference-studio .st-process-dock{
    top:-68px!important;
  }
}

/* EXTRA UP FIX: move whole text block more upward and lift lower side labels */
body.reference-studio .st-process-dock{
  top:-138px!important;
}
body.reference-studio #stFxBg{top:43%!important}
body.reference-studio #stFxDress{top:43%!important}
body.reference-studio #stFxHair{bottom:24%!important}
body.reference-studio #stFxFinal{bottom:24%!important}

@media (max-width:760px){
  body.reference-studio .st-process-dock{
    top:-106px!important;
  }
  body.reference-studio #stFxBg{top:41%!important}
  body.reference-studio #stFxDress{top:41%!important}
  body.reference-studio #stFxHair{bottom:28%!important}
  body.reference-studio #stFxFinal{bottom:28%!important}
}

/* EXTRA MORE UP FIX 2 */
body.reference-studio .st-process-dock{
  top:-198px!important;
}
body.reference-studio #stFxBg{top:38%!important}
body.reference-studio #stFxDress{top:38%!important}
body.reference-studio #stFxHair{bottom:31%!important}
body.reference-studio #stFxFinal{bottom:31%!important}

@media (max-width:760px){
  body.reference-studio .st-process-dock{
    top:-146px!important;
  }
  body.reference-studio #stFxBg{top:36%!important}
  body.reference-studio #stFxDress{top:36%!important}
  body.reference-studio #stFxHair{bottom:34%!important}
  body.reference-studio #stFxFinal{bottom:34%!important}
}

/* ===== Tool manager hover readability fix only ===== */
body.reference-studio .st-popover .st-check-row:hover,
body.reference-studio .st-dialog .st-check-row:hover{
  background:rgba(42,115,255,.22)!important;
  color:#ffffff!important;
}
body.reference-studio .st-popover .st-check-row:hover span,
body.reference-studio .st-dialog .st-check-row:hover span{
  color:#ffffff!important;
}



/* ===== customer-link form only ===== */
.st-dialog.st-client-link-dialog{width:min(620px,94vw)!important;background:linear-gradient(180deg,#0c2041,#07172f)!important;border:1px solid rgba(78,154,255,.46)!important;box-shadow:0 24px 80px rgba(0,0,0,.50),0 0 36px rgba(42,115,255,.12)!important;color:#eef6ff!important}
.st-client-link-dialog .st-dialog-head{padding-bottom:12px;border-bottom:1px solid rgba(100,160,240,.18)}
.st-client-link-dialog .st-dialog-head h2{color:#f7fbff!important;font-weight:800}
.st-client-link-dialog .st-client-link-form label{color:#dbe9ff!important;font-weight:650}
.st-client-link-dialog .st-client-link-form input:not([type=checkbox]),.st-client-link-dialog .st-client-link-form select,.st-client-link-dialog .st-client-link-form textarea{background:#07182f!important;color:#fff!important;border:1px solid rgba(84,151,237,.42)!important;border-radius:10px!important}
.st-client-link-dialog .st-client-link-form input:focus,.st-client-link-dialog .st-client-link-form select:focus,.st-client-link-dialog .st-client-link-form textarea:focus{border-color:#45dfff!important;box-shadow:0 0 0 3px rgba(24,217,255,.10)!important;outline:none!important}
.st-client-link-dialog .st-client-private{display:flex!important;flex-direction:row!important;align-items:center;gap:9px;color:#b9cae7!important}
.st-client-link-dialog .st-client-private input{width:16px!important;min-height:16px!important;accent-color:#3edfff}
.st-client-link-dialog .st-client-form-error{margin:10px 0 0!important;padding:10px 12px!important;border-radius:10px;background:rgba(255,76,105,.13);border:1px solid rgba(255,102,125,.30);color:#ffd6dc!important}
.st-client-link-dialog #stClientCancel{background:rgba(255,255,255,.07)!important;border:1px solid rgba(140,180,235,.24)!important;color:#dbe8fb!important}
