.remix-page{--rx-bg:#fff;--rx-text:#111827;--rx-muted:#64748b;--rx-line:#d9e0e8;--rx-panel:#f8fafc;--rx-blue:#2563eb;--rx-shadow:0 10px 28px rgba(15,23,42,.08);background:var(--rx-bg);color:var(--rx-text)}
.remix-page *{box-sizing:border-box}.remix-page button,.remix-page select,.remix-page textarea,.remix-page input{font:inherit}
.remix-hero{padding:26px 18px 8px;text-align:center}.remix-hero-inner,.remix-main{max-width:1280px;margin:0 auto}.remix-hero h1{margin:0;font-size:34px;letter-spacing:-.03em}.remix-hero p{max-width:820px;margin:8px auto 0;color:var(--rx-muted);font-size:14px;line-height:1.6}
.remix-main{padding:12px 18px 54px}.remix-grid{display:grid;grid-template-columns:minmax(320px,.76fr) minmax(540px,1.24fr);gap:20px;align-items:start}.remix-reference,.remix-side{min-width:0}.remix-side{display:flex;flex-direction:column;gap:14px}

.remix-image-stage{position:relative;min-height:360px;height:min(520px,64vh);padding:10px;border:1px solid var(--rx-line);border-radius:16px;background:#eef2f6;overflow:hidden;display:flex;align-items:stretch;justify-content:stretch;cursor:pointer;box-shadow:0 1px 0 rgba(15,23,42,.02)}
.remix-stage-inner{position:relative;flex:1;display:flex;align-items:center;justify-content:center;border-radius:12px;overflow:hidden;background:rgba(255,255,255,.26)}
.remix-image-stage img{display:none;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}.remix-image-stage.has-image img{display:block}.remix-empty{padding:34px;text-align:center;color:var(--rx-muted);line-height:1.65}.remix-image-stage.has-image .remix-empty{display:none}
.remix-empty-upload{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-size:13px;font-weight:800;color:#526174}.remix-upload-icon{display:grid;place-items:center;width:46px;height:46px;color:#64748b}.remix-upload-icon svg{width:36px;height:36px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.remix-image-badge{position:absolute;top:10px;left:10px;z-index:15;display:none;padding:6px 9px;border-radius:999px;background:rgba(15,23,42,.88);color:#fff;font-size:11px;font-weight:800;line-height:1;letter-spacing:.02em;pointer-events:none}.remix-image-stage.has-image .remix-image-badge{display:block}

.remix-main-upload{display:flex;flex-direction:column;gap:12px;padding:14px;border:1px solid var(--rx-line);border-radius:16px;background:linear-gradient(180deg,#fbfdff 0%,#f7fafc 100%);box-shadow:0 1px 0 rgba(15,23,42,.02);min-height:190px;transition:min-height .18s ease,border-color .18s ease,box-shadow .18s ease}.remix-main-upload.has-images{min-height:300px}.remix-main-upload:hover{border-color:#bcc8d5;box-shadow:0 8px 22px rgba(15,23,42,.06)}
.remix-upload-chooser{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;min-height:150px;padding:22px;border:1px dashed #b8c4d1;border-radius:14px;background:#fff;color:#1f2937;cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease}.remix-upload-chooser:hover{transform:translateY(-1px);border-color:#8ea4bb;background:#f9fbff;box-shadow:0 10px 22px rgba(37,99,235,.08)}.remix-main-upload.has-images .remix-upload-chooser{flex-direction:row;justify-content:flex-start;min-height:52px;padding:10px 14px;gap:10px}
.remix-upload-chooser-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#eef3ff;color:#3158c9;flex:0 0 auto}.remix-upload-chooser-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.remix-upload-chooser-label{display:block;font-size:15px;font-weight:800;line-height:1.1;text-transform:lowercase}.remix-upload-chooser small{display:block;color:var(--rx-muted);font-size:12px;line-height:1.35}
.remix-main-gallery{display:none;gap:10px;align-items:stretch;justify-content:flex-start;min-height:0;overflow:hidden}.remix-main-upload.has-images .remix-main-gallery{display:grid;grid-template-columns:repeat(var(--gallery-count,1),minmax(0,1fr));height:222px}
.remix-main-tile{position:relative;display:flex;align-items:center;justify-content:center;border-radius:12px;overflow:hidden;background:transparent;min-width:0;min-height:0}.remix-main-tile img{display:block;width:100%;height:100%;object-fit:contain;border:0;background:transparent}.remix-main-meta{font-size:12px;line-height:1.55;color:var(--rx-muted)}

.remix-prompt{width:100%;min-height:170px;max-height:360px;padding:14px;border:1px solid var(--rx-line);border-radius:16px;outline:none;resize:vertical;line-height:1.6;background:#fff;color:var(--rx-text);box-shadow:0 1px 0 rgba(15,23,42,.02)}.remix-prompt:focus{border-color:#94a3b8;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.remix-smart-row[hidden]{display:none!important}.remix-generator{padding:0;border:0;background:transparent;box-shadow:none}
.remix-settings{display:grid;grid-template-columns:minmax(170px,1.35fr) repeat(3,minmax(100px,1fr));gap:8px;overflow:visible}.remix-settings select{width:100%;height:42px;min-width:0;padding:0 10px;border:1px solid var(--rx-line);border-radius:12px;background:#fff;color:var(--rx-text);font-size:12px}
.remix-start{width:100%;height:50px;margin-top:12px;border:0;border-radius:14px;background:var(--rx-blue);color:#fff;font-weight:850;letter-spacing:.01em;cursor:pointer;box-shadow:0 12px 24px rgba(37,99,235,.18)}.remix-start:disabled{opacity:.52;cursor:not-allowed}
.remix-credit{margin-top:9px;color:var(--rx-muted);font-size:12px;min-height:18px}.remix-status{min-height:20px;margin-top:8px;color:var(--rx-muted);font-size:12px;line-height:1.5}.remix-status.error{color:#b42318}.remix-status.success{color:#087443}

.remix-image-stage.t67-ict-card,.remix-main-tile.t67-ict-card,.remix-result-item.t67-ict-card{position:relative}.remix-image-stage:not(.has-image)>.t67-ict-tools,.remix-main-tile:not(.has-image)>.t67-ict-tools{display:none!important}.remix-result-item>.t67-ict-tools,.remix-main-tile>.t67-ict-tools,.remix-image-stage>.t67-ict-tools{z-index:35!important;gap:4px!important}.remix-result-item>.t67-ict-tools .t67-ict-btn,.remix-main-tile>.t67-ict-tools .t67-ict-btn,.remix-image-stage>.t67-ict-tools .t67-ict-btn{width:28px!important;height:28px!important;border-radius:8px!important;background:rgba(15,23,42,.88)!important;border:1px solid rgba(255,255,255,.16)!important;box-shadow:0 6px 14px rgba(15,23,42,.16)!important}.remix-result-item>.t67-ict-tools .t67-ict-btn svg,.remix-main-tile>.t67-ict-tools .t67-ict-btn svg,.remix-image-stage>.t67-ict-tools .t67-ict-btn svg{width:14px!important;height:14px!important}.remix-result-item:hover>.t67-ict-tools,.remix-main-tile:hover>.t67-ict-tools,.remix-image-stage:hover>.t67-ict-tools{opacity:1!important;pointer-events:auto!important}

html[data-theme="dark"] .remix-page,.remix-page.dark{--rx-bg:#0b1220;--rx-text:#e5e7eb;--rx-muted:#94a3b8;--rx-line:#334155;--rx-panel:#111827;background:#0b1220;color:#e5e7eb}
html[data-theme="dark"] .remix-image-stage{background:#111827;border-color:#334155}html[data-theme="dark"] .remix-stage-inner{background:rgba(15,23,42,.45)}html[data-theme="dark"] .remix-empty-upload{color:#aeb8c7}html[data-theme="dark"] .remix-upload-icon{color:#94a3b8}html[data-theme="dark"] .remix-main-upload{background:#111827;border-color:#334155}html[data-theme="dark"] .remix-upload-chooser{background:#0f172a;border-color:#475569;color:#e5e7eb}html[data-theme="dark"] .remix-upload-chooser:hover{background:#101b30;border-color:#6b86a5}html[data-theme="dark"] .remix-upload-chooser-icon{background:#172554;color:#bfd1ff}html[data-theme="dark"] .remix-prompt,html[data-theme="dark"] .remix-settings select{background:#0f172a;color:#e5e7eb;border-color:#334155}html[data-theme="dark"] .remix-credit,html[data-theme="dark"] .remix-status,html[data-theme="dark"] .remix-main-meta{color:#94a3b8}html[data-theme="dark"] .remix-result{background:#111827;border-color:#334155}html[data-theme="dark"] .remix-loading{color:#cbd5e1}html[data-theme="dark"] .remix-spinner{border-color:#475569;border-top-color:#e5e7eb}

@media(max-width:980px){.remix-grid{grid-template-columns:1fr}.remix-image-stage{height:min(440px,56vh)}.remix-main-upload.has-images .remix-main-gallery{height:200px}}
@media(max-width:760px){.remix-settings{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.remix-main{padding-left:13px;padding-right:13px}.remix-hero{padding-left:13px;padding-right:13px}.remix-hero h1{font-size:30px}.remix-image-stage{min-height:260px;height:min(340px,48vh)}.remix-settings{grid-template-columns:1fr 1fr}.remix-settings select:first-child{grid-column:1/-1}.remix-main-upload.has-images .remix-main-gallery{height:170px}}
/* 20260927r2 — compact single-layer upload strip */
.remix-main-upload{
  display:block;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  min-height:100px;
  height:100px;
  transition:height .18s ease,min-height .18s ease;
}
.remix-main-upload:hover{border-color:transparent;box-shadow:none}
.remix-upload-chooser{
  width:100%;
  height:100px;
  min-height:100px;
  padding:10px 18px;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  border:1px dashed #b8c4d1;
  border-radius:14px;
  background:#fff;
  color:#1f2937;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
.remix-upload-chooser:hover{transform:translateY(-1px);border-color:#8ea4bb;background:#f9fbff;box-shadow:0 8px 18px rgba(37,99,235,.07)}
.remix-upload-chooser-icon{width:44px;height:44px;border-radius:12px;flex:0 0 44px}
.remix-upload-chooser-icon svg{width:24px;height:24px}
.remix-upload-chooser-label{font-size:16px;font-weight:800;line-height:1;white-space:nowrap}
.remix-upload-chooser small{font-size:13px;line-height:1;color:var(--rx-muted);white-space:nowrap}
.remix-main-upload.has-images{height:300px;min-height:300px}
.remix-main-upload.has-images .remix-upload-chooser{display:none}
.remix-main-gallery{display:none;width:100%;height:100%;gap:10px;align-items:stretch;justify-content:flex-start;min-height:0;overflow:hidden;cursor:pointer;padding:10px;border:1px dashed #b8c4d1;border-radius:14px;background:#fff}
.remix-main-upload.has-images .remix-main-gallery{display:grid;grid-template-columns:repeat(var(--gallery-count,1),minmax(0,1fr));height:300px}
.remix-main-tile{height:100%;border-radius:0;overflow:hidden;background:transparent}
.remix-main-tile img{width:100%;height:100%;object-fit:contain}
.remix-main-meta{display:none!important}
html[data-theme="dark"] .remix-main-upload{background:transparent;border:0}
html[data-theme="dark"] .remix-main-gallery{background:#0f172a;border-color:#475569}
html[data-theme="dark"] .remix-upload-chooser{background:#0f172a;border-color:#475569;color:#e5e7eb}
html[data-theme="dark"] .remix-upload-chooser:hover{background:#101b30;border-color:#6b86a5}
@media(max-width:980px){.remix-main-upload.has-images,.remix-main-upload.has-images .remix-main-gallery{height:280px;min-height:280px}}
@media(max-width:560px){.remix-main-upload{min-height:88px;height:88px}.remix-upload-chooser{height:88px;min-height:88px;padding:8px 14px;gap:10px}.remix-upload-chooser-icon{width:40px;height:40px;flex-basis:40px}.remix-upload-chooser-label{font-size:14px}.remix-upload-chooser small{font-size:12px}.remix-main-upload.has-images,.remix-main-upload.has-images .remix-main-gallery{height:220px;min-height:220px}}

/* 20260927r6 — canonical Remix result gallery (single source of truth) */
.remix-result{
  margin-top:18px;
  padding:14px;
  border:1px solid var(--rx-line);
  border-radius:18px;
  background:#f6f8fb;
  overflow:visible;
}
.remix-result[hidden]{display:none!important}
.remix-results{
  --rx-result-gap:12px;
  width:100%;
  display:grid;
  gap:var(--rx-result-gap);
  align-items:stretch;
  justify-items:stretch;
  grid-auto-flow:row;
}
.remix-result-item,
.remix-result-item.ve-result-card{
  position:relative;
  width:100%;
  min-width:0;
  min-height:0;
  margin:0;
  padding:0;
  border:0!important;
  border-radius:12px;
  background:transparent!important;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.remix-result-item .ve-result-media{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:transparent!important;
}
.remix-result-item img,
.remix-result-item .ve-result-media img{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center;
  background:transparent!important;
}
.remix-loading{
  width:100%;
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
  color:#334155;
  background:transparent;
}
.remix-spinner{width:30px;height:30px;border:3px solid #cbd5e1;border-top-color:#475569;border-radius:50%;animation:rxspin .75s linear infinite}
@keyframes rxspin{to{transform:rotate(360deg)}}

/* PC: every finished image and every loading placeholder uses the exact same slot size. */
.remix-results[data-count="1"]{grid-template-columns:minmax(0,1fr)}
.remix-results[data-count="1"]>.remix-result-item{height:620px;max-width:1040px;justify-self:center}
.remix-results[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.remix-results[data-count="2"]>.remix-result-item{height:520px}
.remix-results[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.remix-results[data-count="3"]>.remix-result-item{height:420px}
.remix-results[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.remix-results[data-count="4"]>.remix-result-item{height:294px}
.remix-results[data-count="5"]{grid-template-columns:repeat(6,minmax(0,1fr))}
.remix-results[data-count="5"]>.remix-result-item{height:294px}
.remix-results[data-count="5"]>.remix-result-item:nth-child(-n+3){grid-column:span 2}
.remix-results[data-count="5"]>.remix-result-item:nth-child(4){grid-column:2/span 2}
.remix-results[data-count="5"]>.remix-result-item:nth-child(5){grid-column:4/span 2}
.remix-results[data-count="6"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.remix-results[data-count="6"]>.remix-result-item{height:294px}

html[data-theme="dark"] .remix-result{background:#111827;border-color:#334155}
html[data-theme="dark"] .remix-loading{color:#cbd5e1}
html[data-theme="dark"] .remix-spinner{border-color:#475569;border-top-color:#e5e7eb}

@media(max-width:900px){
  .remix-results[data-count="2"],
  .remix-results[data-count="3"],
  .remix-results[data-count="4"],
  .remix-results[data-count="5"],
  .remix-results[data-count="6"]{grid-template-columns:repeat(2,minmax(0,1fr))}
  .remix-results[data-count]>.remix-result-item{grid-column:auto;height:260px}
  .remix-results[data-count="1"]>.remix-result-item{grid-column:1/-1;height:500px}
}
@media(max-width:560px){
  .remix-results,
  .remix-results[data-count="2"],
  .remix-results[data-count="3"],
  .remix-results[data-count="4"],
  .remix-results[data-count="5"],
  .remix-results[data-count="6"]{grid-template-columns:1fr}
  .remix-results[data-count]>.remix-result-item{grid-column:1!important;height:260px}
  .remix-results[data-count="1"]>.remix-result-item{height:360px}
}

/* 20260927r7 — per-image network retry */
.remix-loading.is-error{gap:8px;text-align:center;padding:18px}
.remix-loading.is-error b{font-size:14px}
.remix-error-detail{max-width:320px;color:var(--rx-muted);font-size:12px;line-height:1.55}
.remix-retry-btn{min-width:78px;height:34px;margin-top:4px;padding:0 14px;border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#1e293b;font-size:12px;font-weight:700;cursor:pointer}
.remix-retry-btn:hover{border-color:#94a3b8;background:#f8fafc}
.remix-retry-btn:disabled{opacity:.55;cursor:wait}
html[data-theme="dark"] .remix-retry-btn{background:#0f172a;border-color:#475569;color:#e5e7eb}
html[data-theme="dark"] .remix-retry-btn:hover{background:#172033}
