@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

.stretch-app {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  padding: 48px 20px;
  background: #FAF6FE;
  color: #2E073F;
  font-family: Inter, "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.stretch-app *, .stretch-app *::before, .stretch-app *::after { box-sizing: border-box; }
.stretch-app button, .stretch-app input, .stretch-app select { font: inherit; }
.stretch-app button { cursor: pointer; }
.stretch-app button:focus-visible, .stretch-app input:focus-visible, .stretch-app select:focus-visible, .stretch-app [tabindex]:focus-visible { outline: 3px solid rgba(112, 37, 183, .32); outline-offset: 3px; }
.stretch-app .stretch-shell { max-width: 1280px; margin: 0 auto; }
.stretch-app .stretch-hero { max-width: 720px; margin: 0 auto 30px; text-align: center; }
.stretch-app .stretch-hero h1 { margin: 0; color: #3B0270; font-size: 48px; line-height: 1.08; font-weight: 800; letter-spacing: -.045em; }
.stretch-app .stretch-hero p { margin: 13px 0 0; color: #6C5B7B; font-size: 16px; line-height: 1.6; }
.stretch-app .stretch-card { max-width: 1200px; margin: 0 auto; overflow: hidden; background: #FFFFFF; border: 1px solid #EDE2F5; border-radius: 24px; box-shadow: 0 20px 55px rgba(80, 19, 130, .10); }
.stretch-app .stretch-card-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; border-bottom: 1px solid #EDE2F5; }
.stretch-app .stretch-tool-heading { display: flex; align-items: center; min-width: 0; gap: 13px; }
.stretch-app .stretch-doc-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: #F1E7FA; color: #5D149C; font-size: 24px; font-weight: 800; }
.stretch-app h2, .stretch-app h3 { color: #3B0270; }
.stretch-app .stretch-tool-heading h2 { margin: 0; font-size: 18px; line-height: 1.25; }
.stretch-app .stretch-tool-heading p { margin: 4px 0 0; color: #6C5B7B; font-size: 13px; }
.stretch-app .stretch-header-actions, .stretch-app .stretch-actions-card { display: flex; align-items: center; gap: 10px; }
.stretch-app .stretch-btn { min-height: 42px; border-radius: 12px; padding: 10px 15px; border: 1px solid transparent; font-size: 14px; font-weight: 750; line-height: 1.2; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.stretch-app .stretch-btn:hover:not(:disabled) { transform: translateY(-1px); }
.stretch-app .stretch-btn:disabled { opacity: .48; cursor: not-allowed; }
.stretch-app .stretch-btn-primary { color: #FFFFFF; background: linear-gradient(135deg, #4D0A89, #7D2DCA); box-shadow: 0 8px 18px rgba(83, 16, 145, .22); }
.stretch-app .stretch-btn-secondary { color: #4E1083; background: #FFFFFF; border-color: #CFAFEA; }
.stretch-app .stretch-workspace { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr); gap: 0; }
.stretch-app .stretch-left-column { min-width: 0; padding: 26px; border-right: 1px solid #EDE2F5; }
.stretch-app .stretch-settings { min-width: 0; padding: 26px; background: #FDFCFF; }
.stretch-app .stretch-upload-zone { display: flex; min-height: 206px; flex-direction: column; align-items: center; justify-content: center; padding: 24px; border: 1.5px dashed #B98CDB; border-radius: 18px; background: #FAF6FE; text-align: center; transition: border-color .2s ease, background .2s ease; }
.stretch-app .stretch-upload-zone:hover, .stretch-app .stretch-upload-zone.is-dragging { border-color: #6517A8; background: #F6EEFC; }
.stretch-app .stretch-upload-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: #EBDCF7; color: #57108F; font-size: 25px; font-weight: 800; }
.stretch-app .stretch-upload-zone h3 { margin: 13px 0 5px; font-size: 17px; }
.stretch-app .stretch-upload-zone p { max-width: 420px; margin: 0; color: #6C5B7B; font-size: 14px; line-height: 1.55; }
.stretch-app .stretch-upload-zone span { margin-top: 12px; color: #5D149C; font-size: 12px; font-weight: 750; }
.stretch-app .stretch-loading { display: flex; align-items: center; gap: 9px; margin: 14px 0; color: #4E1083; font-size: 14px; font-weight: 700; }
.stretch-app .stretch-spinner { width: 18px; height: 18px; border: 2px solid #DCC7ED; border-top-color: #5D149C; border-radius: 50%; animation: stretch-spin .7s linear infinite; }
@keyframes stretch-spin { to { transform: rotate(360deg); } }
.stretch-app .stretch-empty-state { margin-top: 18px; padding: 28px 18px; border: 1px solid #EDE2F5; border-radius: 18px; text-align: center; }
.stretch-app .stretch-empty-state > div { color: #8F6BAA; font-size: 31px; }
.stretch-app .stretch-empty-state h3 { margin: 8px 0 4px; font-size: 16px; }
.stretch-app .stretch-empty-state p { margin: 0; color: #6C5B7B; font-size: 14px; }
.stretch-app .stretch-section-label, .stretch-app .stretch-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stretch-app .stretch-section-label { margin: 22px 0 11px; }
.stretch-app .stretch-section-label h3, .stretch-app .stretch-preview-header h3 { margin: 0; font-size: 16px; }
.stretch-app .stretch-add-more, .stretch-app .stretch-text-btn { border: 0; background: transparent; color: #591294; font-size: 13px; font-weight: 750; }
.stretch-app .stretch-file-queue { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.stretch-app .stretch-file-item { display: grid; grid-template-columns: 19px 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid #EDE2F5; border-radius: 14px; background: #FFFFFF; transition: border-color .18s ease, opacity .18s ease; }
.stretch-app .stretch-file-item.is-drag-over { border-color: #7824BD; background: #FAF6FE; }
.stretch-app .stretch-drag-handle { color: #89679F; cursor: grab; font-size: 18px; line-height: 1; user-select: none; }
.stretch-app .stretch-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 9px; background: #F3EAF9; }
.stretch-app .stretch-file-info { min-width: 0; }
.stretch-app .stretch-file-name { overflow: hidden; color: #2E073F; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.stretch-app .stretch-file-meta { margin-top: 3px; color: #6C5B7B; font-size: 11px; }
.stretch-app .stretch-queue-controls { display: flex; align-items: center; gap: 3px; }
.stretch-app .stretch-mini-btn, .stretch-app .stretch-icon-btn { display: grid; width: 29px; height: 29px; padding: 0; place-items: center; border: 1px solid #DEC9EC; border-radius: 8px; background: #FFFFFF; color: #54108B; font-weight: 800; }
.stretch-app .stretch-mini-btn:disabled, .stretch-app .stretch-icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.stretch-app .stretch-remove-btn { color: #78173D; border-color: #E9C9D4; }
.stretch-app .stretch-preview-panel { margin-top: 22px; padding: 15px; border: 1px solid #EDE2F5; border-radius: 18px; background: #FFFFFF; }
.stretch-app .stretch-preview-counter { margin: 3px 0 0; color: #6C5B7B; font-size: 12px; }
.stretch-app .stretch-preview-nav { display: flex; gap: 5px; }
.stretch-app .stretch-preview-stage { display: grid; min-height: 300px; margin-top: 13px; place-items: center; overflow: hidden; border-radius: 12px; background: #F1ECF5; }
.stretch-app .stretch-preview-canvas { display: block; max-width: 100%; max-height: 430px; box-shadow: 0 8px 20px rgba(41, 12, 63, .18); }
.stretch-app .stretch-setting-card { padding: 17px; border: 1px solid #EDE2F5; border-radius: 18px; background: #FFFFFF; }
.stretch-app .stretch-setting-card + .stretch-setting-card { margin-top: 13px; }
.stretch-app .stretch-setting-card h3 { margin: 0 0 15px; font-size: 15px; }
.stretch-app fieldset { min-width: 0; margin: 0 0 14px; padding: 0; border: 0; }
.stretch-app fieldset:last-child { margin-bottom: 0; }
.stretch-app legend, .stretch-app label { display: block; color: #4A235F; font-size: 12px; font-weight: 750; }
.stretch-app legend { margin-bottom: 7px; }
.stretch-app .stretch-segmented { display: flex; width: 100%; overflow: hidden; border: 1px solid #DFCBEF; border-radius: 10px; }
.stretch-app .stretch-segmented button { flex: 1; min-width: 0; padding: 8px 5px; border: 0; border-right: 1px solid #DFCBEF; background: #FFFFFF; color: #5B4767; font-size: 11px; font-weight: 750; white-space: nowrap; }
.stretch-app .stretch-segmented button:last-child { border-right: 0; }
.stretch-app .stretch-segmented button.is-selected { background: #5B1294; color: #FFFFFF; }
.stretch-app .stretch-field-help { margin: 7px 0 0; color: #6C5B7B; font-size: 11px; line-height: 1.45; }
.stretch-app .stretch-custom-size, .stretch-app .stretch-inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stretch-app .stretch-custom-size { grid-template-columns: 1fr 1fr .8fr; margin-top: -3px; }
.stretch-app .stretch-inline-fields { margin-top: 1px; }
.stretch-app .stretch-inline-fields > label:last-child { grid-column: span 2; }
.stretch-app input:not([type="checkbox"]):not([type="range"]), .stretch-app select { width: 100%; height: 38px; margin-top: 6px; padding: 0 10px; border: 1px solid #DDC8EB; border-radius: 9px; background: #FAF6FE; color: #2E073F; font-size: 13px; }
.stretch-app .stretch-switch-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; cursor: pointer; }
.stretch-app .stretch-switch-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.stretch-app .stretch-switch-ui { position: relative; width: 36px; height: 20px; flex: 0 0 36px; border-radius: 20px; background: #CDB8DD; transition: background .2s ease; }
.stretch-app .stretch-switch-ui::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #FFFFFF; content: ""; transition: transform .2s ease; }
.stretch-app .stretch-switch-row input:checked + .stretch-switch-ui { background: #6419A3; }
.stretch-app .stretch-switch-row input:checked + .stretch-switch-ui::after { transform: translateX(16px); }
.stretch-app .stretch-quality-row { margin: 14px 0; }
.stretch-app .stretch-quality-row label { display: flex; justify-content: space-between; }
.stretch-app .stretch-quality-value { color: #591294; }
.stretch-app .stretch-quality-slider { width: 100%; accent-color: #6419A3; }
.stretch-app .stretch-meta-fields { margin-top: 14px; }
.stretch-app .stretch-summary { display: grid; gap: 4px; margin-top: 15px; padding: 11px 12px; border-radius: 11px; background: #F7F1FB; color: #4A235F; font-size: 12px; line-height: 1.45; }
.stretch-app .stretch-summary strong { color: #3B0270; }
.stretch-app .stretch-summary-text { color: #6C5B7B; }
.stretch-app .stretch-actions-card { flex-wrap: wrap; margin-top: 14px; padding: 4px 1px; }
.stretch-app .stretch-actions-card .stretch-btn-primary { flex: 1 1 210px; }
.stretch-app .stretch-actions-card .stretch-btn-secondary { flex: 1 1 130px; }
.stretch-app .stretch-text-btn { flex-basis: 100%; padding: 7px 0 0; text-align: left; }
.stretch-app .stretch-status { min-height: 20px; margin-top: 12px; color: #4E1083; font-size: 13px; font-weight: 650; line-height: 1.45; }
.stretch-app .stretch-status.is-error { color: #9B153B; }
.stretch-app .stretch-status.is-success { color: #276344; }
.stretch-app .stretch-settings.is-busy { pointer-events: none; opacity: .72; }

@media (max-width: 920px) {
  .stretch-app .stretch-workspace { grid-template-columns: 1fr; }
  .stretch-app .stretch-left-column { border-right: 0; border-bottom: 1px solid #EDE2F5; }
}
@media (max-width: 640px) {
  .stretch-app { padding: 28px 12px; }
  .stretch-app .stretch-hero { margin-bottom: 22px; }
  .stretch-app .stretch-hero h1 { font-size: 31px; }
  .stretch-app .stretch-card { border-radius: 19px; }
  .stretch-app .stretch-card-header { align-items: flex-start; flex-direction: column; padding: 18px; }
  .stretch-app .stretch-header-actions { width: 100%; }
  .stretch-app .stretch-header-actions .stretch-btn { flex: 1; padding-inline: 8px; font-size: 12px; }
  .stretch-app .stretch-left-column, .stretch-app .stretch-settings { padding: 16px; }
  .stretch-app .stretch-preview-stage { min-height: 240px; }
  .stretch-app .stretch-file-item { grid-template-columns: 15px 43px minmax(0, 1fr); gap: 7px; }
  .stretch-app .stretch-thumb { width: 43px; height: 43px; }
  .stretch-app .stretch-queue-controls { grid-column: 2 / 4; justify-content: flex-end; }
  .stretch-app .stretch-custom-size { grid-template-columns: 1fr 1fr; }
  .stretch-app .stretch-custom-size > label:last-child { grid-column: span 2; }
}