/* Layout B: full-height mode rail, four stacked input panels, large preview. */
.studio-layout{gap:16px}
.studio-rail{display:flex;min-height:626px}
.preset-rail{width:100%;display:flex;flex-direction:column;padding:20px 9px 18px}
.preset-rail .rail-title{margin-bottom:24px}
.preset-rail>div{gap:15px}
.studio-rail .mode{min-height:66px;gap:9px;border-radius:8px}
.studio-rail .mode svg{width:20px;height:20px}
.mode-rail-note{margin-top:auto;padding-top:22px;display:flex;flex-direction:column;align-items:center;gap:10px;font-size:9px;line-height:1.9;color:#ab9db8}
.mode-rail-note svg{width:16px;color:#beadd3}
.studio-controls{grid-template-rows:170px 116px minmax(206px,auto) 98px;gap:12px}
.upload-card,.prompt-card{padding:13px 17px}
.studio-card-heading{margin-bottom:9px}

.prompt-card textarea{min-height:120px;font-size:12px;line-height:1.8}
.suggestions-header{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:8px;font-size:9px;color:#9b8caa}
.suggestions-header>span:first-child{color:#79628e;font-weight:600}
.prompt-suggestions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:7px}
.prompt-suggestions button{display:inline-flex;align-items:center;justify-content:flex-start;flex:0 0 auto;width:auto;min-width:0;border-radius:9999px;padding:4px 12px;min-height:30px;font-size:12px;line-height:20px;color:#7b6592;gap:6px;text-align:left}
.prompt-suggestions button>span:first-child{white-space:nowrap}
.prompt-suggestions .capsule-symbol{font-size:14px;flex:none;color:#9477b9}
.prompt-suggestions button.added{background:#eee7fa;border-color:#cdbbe9;color:#6c48b8}
.inline-style-card{padding:11px 16px}
.inline-style-card .studio-card-heading{margin-bottom:7px}
.inline-style-card .style-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
.inline-style-card .style{min-width:0;border-radius:6px}
.inline-style-card .style img,.inline-style-card .custom-style>div{width:100%;height:43px;object-fit:cover;object-position:50% 35%;border-radius:4px 4px 0 0}
.inline-style-card .style>span{font-size:9px;line-height:1.4;padding:3px 1px;white-space:nowrap}
.inline-style-card .style b{width:13px;height:13px;font-size:8px;right:3px;top:3px}
.inline-style-card .custom-style>div{display:grid;place-items:center;background:#f5f0fa}
.inline-style-card .custom-style svg{width:17px;height:17px}
.parameters-card{padding:10px 16px}
.parameter-top{margin-bottom:9px}
.studio-preview{height:auto;min-height:626px}
@media(max-width:1150px){.studio-layout{gap:12px}.upload-card,.prompt-card{padding-inline:14px}.inline-style-card{padding-inline:12px}.inline-style-card .style-grid{gap:5px}.parameters-card{padding-inline:13px}}
@media(max-width:900px){.studio-rail{grid-row:1;grid-column:1}.studio-preview{grid-column:2;height:530px;min-height:0}.studio-preview .studio-canvas{min-height:0}.inline-style-card .style img,.inline-style-card .custom-style>div{height:43px}}
@media(max-width:650px){.studio-rail{display:block;grid-column:1;min-height:0}.preset-rail{padding:10px 12px}.preset-rail .rail-title{margin-bottom:8px}.preset-rail>div{gap:5px}.studio-rail .mode{min-height:48px;gap:5px}.studio-rail .mode svg{width:17px;height:17px}.mode-rail-note{display:none}.studio-controls{grid-column:1;grid-template-rows:178px 159px 112px 103px}.upload-card,.prompt-card{padding:13px 14px}.inline-style-card{padding:11px 10px}.inline-style-card .style-grid{gap:4px}.inline-style-card .style img,.inline-style-card .custom-style>div{height:42px}.inline-style-card .style>span{font-size:8px}.parameters-card{padding:12px 14px}.studio-preview{grid-column:1;min-height:425px;height:425px}.studio-preview .studio-canvas{min-height:0}}
@media(max-width:650px){.studio-controls{grid-template-rows:178px 140px minmax(218px,auto) 103px}.suggestions-header{font-size:8px}}

.style-details{border-top:1px solid #eee7f4;margin-top:10px;padding-top:8px}
.style-details .suggestions-header{margin-top:0}
/* Five-mode workspace. Long preset names wrap without clipping. */
.studio-controls{grid-template-rows:170px minmax(236px,auto) 116px 104px}
.studio-rail,.studio-preview{min-height:662px}
.preset-rail>div{gap:10px}
.studio-rail .mode{min-height:62px}
.inline-style-card .style>span{white-space:normal;min-height:32px;display:flex;align-items:center;justify-content:center;line-height:1.45;padding:3px 2px}
.inline-style-card .style img,.inline-style-card .custom-style>div{height:48px}
.style-details{margin-top:10px}
.prompt-suggestions button{min-height:30px}
.suggestions-header>span:first-child{min-width:0;overflow-wrap:anywhere}
.suggestions-header>span:last-child{flex-shrink:0}
#reset-parameters{font-size:9px;white-space:nowrap;padding:3px 5px;color:var(--purple);border-radius:4px}
#reset-parameters:hover{background:var(--purple-light)}
#similarity:disabled{opacity:.55;cursor:not-allowed}
.parameter-top{gap:10px}
.parameter-top>label{gap:7px}
.output-picker select{width:78px}
.canvas-grid.two-images{grid-template-rows:1fr}
.canvas-grid .result-card img{object-fit:contain;background:#eeeae3}
.canvas-grid .result-card>span{font-size:10px;line-height:1.4}
@media(max-width:900px){.studio-preview{height:530px;min-height:0}}
@media(max-width:650px){.studio-rail{min-height:0}.studio-rail .mode{min-height:50px;font-size:9px!important}.studio-rail .mode svg{width:16px}.preset-rail>div{gap:3px}.studio-controls{grid-template-rows:178px minmax(334px,auto) 130px 106px}.inline-style-card .style-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.inline-style-card .style img,.inline-style-card .custom-style>div{height:58px}.inline-style-card .style>span{font-size:10px;min-height:28px}.studio-preview{height:425px;min-height:425px}.parameter-top{gap:6px}.parameter-top>label{font-size:9px;gap:5px}.parameter-top output{font-size:9px}}

#generation-status{font-size:12px;line-height:1.7;color:#79628e;text-align:left;margin-top:12px;overflow-wrap:anywhere}#generation-status a{color:var(--purple);text-decoration:underline;margin-left:10px}.studio-controls button:disabled{opacity:.55;cursor:wait}.studio-disclaimer{line-height:1.7}

/* Independent preview views share one fixed canvas and selection. */
.brand .brand-mark{width:36px;height:36px;flex-shrink:0;background:transparent;border-radius:10px}
.brand .brand-mark img{width:100%;height:100%;object-fit:contain}
.brand-name{letter-spacing:-.7px}
.brand-s{color:var(--purple)}
@media(max-width:650px){.brand .brand-mark{width:30px;height:30px;border-radius:8px}.header .brand{font-size:16px}.header .brand-name{letter-spacing:-.6px}}
.studio-preview [hidden]{display:none!important}
.preview-heading{flex-shrink:0}
.studio-preview .view-switch{flex-shrink:0}
.studio-preview .view-switch button{display:flex;align-items:center;justify-content:center;gap:5px;width:auto;padding:0 9px;height:29px;font-size:11px;white-space:nowrap}
.view-switch button:disabled{opacity:.38;cursor:not-allowed}
.studio-rail .mode:disabled{cursor:not-allowed;color:#b2a8bc;background:transparent}
.studio-rail .mode:disabled:hover{background:transparent}
.mode-coming-soon{display:block;font-size:8px;line-height:1.4;color:#9b88ae;border:1px solid #e9e1ef;border-radius:4px;padding:2px 4px;margin-top:2px;white-space:nowrap}
.feature-coming-soon{display:inline-block;color:#94849f;font-size:11px;border:1px solid #e5ddec;border-radius:5px;padding:5px 9px}
.grid-availability{flex-shrink:0;margin:-5px 0 10px;font-size:10px;line-height:1.5;color:#998ba6;text-align:right}
.grid-availability button{color:var(--purple);font-size:10px;margin-left:10px;white-space:nowrap;text-decoration:underline;text-underline-offset:3px}
.studio-preview button:focus-visible{outline:2px solid #8b5cf6;outline-offset:3px}
.studio-preview .canvas-image-label{right:auto;max-width:calc(100% - 112px);bottom:14px;padding:7px 11px;border-radius:999px;line-height:1.5;background:#241f2b99;backdrop-filter:blur(12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.canvas-actions{position:absolute;right:14px;bottom:14px;display:flex;gap:7px}
.canvas-actions button{display:grid;place-items:center;width:32px;height:32px;border:1px solid #ffffff26;border-radius:9px;background:#241f2b99;backdrop-filter:blur(12px);color:white}
.canvas-actions button:hover{background:#241f2bcc}
.canvas-actions svg{width:16px;height:16px}
.split-preview{position:absolute;inset:0;background:#e6e2d9;overflow:hidden;touch-action:none;user-select:none;cursor:ew-resize}
.split-preview>img,.compare-original,.compare-original>img{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.split-preview img{object-fit:cover;user-select:none;-webkit-user-drag:none}
.compare-original{background:#e6e2d9;clip-path:inset(0 50% 0 0)}
.compare-label{position:absolute;top:18px;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:6px;background:#24231f8c;backdrop-filter:blur(8px);padding:6px 10px;color:white;font-size:11px;line-height:1.5;pointer-events:none}
.original-label{left:18px}.result-label{right:18px}
.compare-divider{position:absolute;top:0;bottom:0;left:50%;width:2px;transform:translateX(-50%);background:#ffffffb3;pointer-events:none}
.compare-handle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;background:#fff;box-shadow:0 3px 18px #0003;display:grid;place-items:center;color:#514569;pointer-events:auto;cursor:ew-resize;touch-action:none}
.compare-handle svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.compare-hint{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);border-radius:999px;padding:6px 12px;background:#24231f91;backdrop-filter:blur(8px);color:white;font-size:10px;white-space:nowrap;pointer-events:none}
.studio-preview .canvas-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;padding:0;background:#f7f4fa}
.studio-preview .canvas-grid .result-card{position:relative;min-width:0;min-height:0;overflow:hidden;border:0;border-radius:9px;background:#e6e2d9}
.studio-preview .canvas-grid .result-card img{width:100%;height:100%;object-fit:contain;display:block}
.studio-preview .canvas-grid .result-card:after{display:none}
.studio-preview .canvas-grid .result-card:hover>img{transform:none}
.studio-preview .result-card>.result-number{position:absolute;top:9px;right:9px;bottom:auto;left:auto;padding:4px 7px;border-radius:6px;background:#241f2b8c;color:white;font-size:11px;line-height:1.4;backdrop-filter:blur(8px)}
.grid-actions{position:absolute;inset:auto 0 0;padding:28px 8px 10px;display:flex;justify-content:center;flex-wrap:wrap;gap:6px;background:linear-gradient(transparent,#17121d99);opacity:0;transition:opacity .15s}
.result-card:hover .grid-actions,.result-card:focus-within .grid-actions{opacity:1}
.grid-actions button{display:flex;align-items:center;gap:4px;padding:6px 8px;border-radius:6px;background:#fffffff2;color:#534166;font-size:11px;line-height:1.4}
.grid-actions svg{width:13px;height:13px}
.filmstrip-slot{height:64px;flex-shrink:0}
.preview-filmstrip{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 4px 4px;overflow-x:auto}
.filmstrip-item{width:48px;height:48px;flex:0 0 48px;border-radius:7px;overflow:hidden;border:2px solid transparent;padding:0;background:#eee9e3}
.filmstrip-item img{width:100%;height:100%;object-fit:cover;display:block}
.filmstrip-item[aria-pressed="true"]{border-color:white;box-shadow:0 0 0 2px #9333ea}
.preview-footer{flex-shrink:0}
.preview-footer button{font-size:10px;color:var(--purple);padding:7px 0;white-space:nowrap}
@media(hover:none),(pointer:coarse){.grid-actions{opacity:1}.grid-actions button{min-height:34px}}
@media(max-width:650px){.studio-preview{padding:12px 12px 0}.preview-heading{gap:6px}.preview-heading #preview-title{font-size:11px}.studio-preview .view-switch button{padding:0 6px;font-size:10px;gap:3px}.view-switch svg{width:12px}.compare-label{top:12px}.original-label{left:12px}.result-label{right:12px}.grid-actions{padding:12px 5px 7px;gap:4px}.grid-actions button{font-size:10px;padding:5px}.grid-actions svg{display:none}}
@media(prefers-reduced-motion:reduce){.grid-actions{transition:none}}
.generation-progress{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(ellipse at 50% 32%,#eee6ff 0,transparent 66%),#faf8fd;text-align:center}
.generation-progress-content{width:min(100%,300px);display:flex;flex-direction:column;align-items:center}
.generation-progress-symbol{display:grid;place-items:center;width:58px;height:58px;margin-bottom:22px;border:1px solid #e4d5fb;border-radius:18px;background:#fff9;box-shadow:0 8px 30px #8b5cf612;color:var(--purple);font-size:29px}
.generation-progress #generation-progress-title{margin:0;color:#38294b;font-size:17px;line-height:1.5;font-weight:600}
.generation-progress p{margin:8px 0 24px;font-size:12px;line-height:1.6;color:#80718f}
.generation-progress-track{position:relative;width:100%;height:7px;overflow:hidden;border-radius:999px;background:#e8dff3}
.generation-progress-track>span{position:absolute;inset:0 auto 0 0;width:0;border-radius:inherit;background:linear-gradient(90deg,#b89aef,#8854db);transition:width .3s ease-out}
.generation-progress-detail{margin-top:16px;max-width:235px;color:#94849f;font-size:10px;line-height:1.7}
@media(prefers-reduced-motion:reduce){.generation-progress-track>span{transition:none}}
@media(max-width:650px){.generation-progress{padding:20px}.generation-progress-content{max-width:260px}.generation-progress-symbol{width:46px;height:46px;margin-bottom:16px}.generation-progress #generation-progress-title{font-size:15px}}

.removal-help{font-size:11px;line-height:1.65;color:#857895;margin:0 0 14px}.removal-help[hidden]{display:none}
.credit-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;font-size:12px;color:#78698b}
.credit-status a{color:var(--purple);font-weight:600;text-decoration:none}
.pricing-section{
  padding-block:clamp(40px,6vw,76px);
  text-align:center;
}
.pricing-header{margin-bottom:34px}
.pricing-header h1{
  margin:0 0 10px;
  font-size:clamp(30px,5vw,52px);
  letter-spacing:-.045em;
  line-height:1.12;
}
.pricing-intro{margin:0;color:#64596d;font-size:15px;line-height:1.65}
.pricing-terms{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px 20px;
  margin:15px 0 0;
  padding:0;
  list-style:none;
}
.pricing-terms li{display:flex;align-items:center;gap:6px;color:#54485f;font-size:12px}
.pricing-terms svg,.pack-credits svg{width:15px;height:15px;color:var(--purple);flex:none}
.credit-packs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  text-align:left;
}
.credit-pack{
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:24px 18px 18px;
  background:#fff;
  border:1px solid #e3daef;
  border-radius:16px;
  box-shadow:0 8px 22px #3e296009;
}
.credit-pack.featured{
  border-color:var(--purple);
  background:linear-gradient(165deg,#f6efff 0%,#fff 70%);
  box-shadow:0 0 0 1px var(--purple),0 12px 24px #7654cd1c;
}
.credit-pack.best-value{background:#fcfaff;border-color:#cdb7ef}
.pack-badge{
  position:absolute;
  top:-12px;
  right:15px;
  padding:4px 9px;
  border-radius:999px;
  background:#ede4fa;
  color:#6040a0;
  font-size:11px;
  font-weight:650;
  line-height:1.4;
}
.featured .pack-badge{background:var(--purple-dark);color:#fff}
.credit-pack h2{margin:0 0 10px;font-size:15px}
.pack-price{
  margin:0;
  color:var(--ink);
  font-size:clamp(30px,3.3vw,42px);
  font-weight:700;
  letter-spacing:-.055em;
  line-height:1.05;
  font-variant-numeric:tabular-nums;
}
.pack-price span{color:#726580;font-size:10px;font-weight:600;letter-spacing:0}
.pack-saving{
  align-self:flex-start;
  margin-top:9px;
  padding:3px 7px;
  border-radius:5px;
  background:#efe6fa;
  color:#5f4193;
  font-size:11px;
  font-weight:600;
  line-height:1.4;
}
.pack-summary{
  margin:12px 0;
  padding:12px;
  border-radius:9px;
  background:#f5f0fa;
}
.credit-pack:first-child .pack-summary{margin-top:42.4px}
.pack-credits{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0;
  color:#352645;
  font-size:17px;
  font-weight:700;
  line-height:1.3;
}
.pack-unit{margin:4px 0 0;color:#675675;font-size:12px}
.pack-buy{
  width:100%;
  min-height:42px;
  justify-content:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid #cbb9e4;
  background:#fff;
  color:var(--purple-dark);
  box-shadow:none;
  font-size:12px;
}
.pack-buy:hover:not(:disabled){background:#f1e8fc;color:#4c2e8e}
.featured .pack-buy{background:var(--purple-dark);border-color:var(--purple-dark);color:#fff}
.featured .pack-buy:hover:not(:disabled){background:#4c2e8e;color:#fff}
.pack-buy:disabled{opacity:.55;cursor:not-allowed}
.pack-estimate{margin:16px 0 0;padding-top:13px;border-top:1px solid #e9e0f1}
.pack-estimate p{margin:0 0 10px;color:#64556f;font-size:11px;font-weight:600}
.pack-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:0}
.pack-results div{padding:0 2px}
.pack-results div+div{padding-left:10px;border-left:1px solid #e9e0f1}
.pack-results dt{color:#726580;font-size:11px}
.pack-results dd{margin:4px 0 0;color:#352645;font-size:16px;font-weight:650}
.pricing-rules{margin:16px auto;color:#675a73;font-size:12px;line-height:1.6}
.pricing-rules p{margin:4px 0}
.pricing-access{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  max-width:760px;
  margin:20px auto 0;
  border:1px solid #e5dcec;
  border-radius:12px;
  background:var(--paper);
  text-align:left;
}
.pricing-access > div{padding:14px 18px}
.pricing-access > div+div{border-left:1px solid #e5dcec}
.pricing-access-title{margin:0 0 4px;font-size:13px;font-weight:550}
.pricing-access p{margin:0;color:#675a73;font-size:12px;line-height:1.55}
.checkout-status{margin:16px auto 6px;color:#63449a;font-size:13px;line-height:1.6}
.billing-browser-note{color:#675a73;font-size:11px;line-height:1.6}
.resolution-options .resolution-locked{opacity:.65}
@media(max-width:920px){
  .credit-packs{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}
}
@media(max-width:490px){
  .credit-packs,.pricing-access{grid-template-columns:minmax(0,1fr)}
  .credit-pack{padding:22px 18px 17px}
  .credit-pack:first-child .pack-summary{margin-top:12px}
  .pricing-access > div+div{border-top:1px solid #e5dcec;border-left:0}
}

.export-settings{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin:4px 0 18px}
.export-size,.export-resolution legend{font-size:12px;font-weight:500;color:#463b55}
.export-size{display:flex;flex-direction:column;gap:8px;min-width:0}
.export-size select{width:100%;height:40px;padding:0 10px;border:1px solid #e3daef;border-radius:8px;background:#fff;color:#514360;font:inherit;cursor:pointer}
.export-resolution{border:0;padding:0;margin:0;min-width:0}
.export-resolution legend{padding:0;margin-bottom:8px}
.resolution-options{display:flex;gap:4px;padding:3px;border:1px solid #e3daef;border-radius:8px;height:40px;box-sizing:border-box}
.resolution-options button{flex:1;min-width:0;border:0;border-radius:5px;background:transparent;color:#847493;font-size:12px;white-space:nowrap}
.resolution-options button[aria-pressed="true"]{background:#eee7fb;color:#7450cd;font-weight:600}
.resolution-options button:disabled{cursor:not-allowed;opacity:.55}
.export-size select:focus-visible,.resolution-options button:focus-visible{outline:2px solid #8156df;outline-offset:2px}
@media(max-width:380px){.export-settings{grid-template-columns:1fr;gap:12px}}
