@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: 56px 20px 72px;
  color: #2E073F;
  font-family: Inter, "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 8% 12%, rgba(177, 115, 234, .18), transparent 26%), radial-gradient(circle at 94% 80%, rgba(130, 69, 202, .13), transparent 30%), #FAF6FE;
}
.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:disabled, .stretch-app input:disabled { cursor: not-allowed; opacity: .52; }
.stretch-app button:focus-visible, .stretch-app input:focus-visible, .stretch-app select:focus-visible, .stretch-app [tabindex]:focus-visible { outline: 3px solid rgba(117, 44, 183, .3); outline-offset: 3px; }

.stretch-app .stretch-shell { max-width: 1280px; margin: 0 auto; }
.stretch-app .stretch-hero { max-width: 850px; margin: 0 auto 34px; text-align: center; }
.stretch-app .stretch-hero h1 { margin: 0; color: #3B0270; font-size: 48px; font-weight: 800; letter-spacing: -1.7px; line-height: 1.1; }
.stretch-app .stretch-hero p { margin: 15px auto 0; color: #6C5B7B; font-size: 16px; line-height: 1.7; }
.stretch-app .stretch-card { overflow: hidden; border: 1px solid #EDE2F5; border-radius: 24px; background: #fff; box-shadow: 0 20px 55px rgba(80, 22, 126, .11); }
.stretch-app .stretch-card-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 28px; border-bottom: 1px solid #EDE2F5; }
.stretch-app .stretch-tool-title { display: flex; align-items: center; gap: 13px; }
.stretch-app .stretch-title-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; color: #6D21B4; background: #F3E9FB; }
.stretch-app .stretch-title-icon svg { width: 24px; height: 24px; }
.stretch-app h2, .stretch-app h3, .stretch-app p { margin-top: 0; }
.stretch-app .stretch-tool-title h2 { margin-bottom: 3px; color: #3B0270; font-size: 17px; }
.stretch-app .stretch-tool-title p { margin: 0; color: #6C5B7B; font-size: 13px; }
.stretch-app .stretch-actions { display: flex; gap: 10px; }
.stretch-app .stretch-btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 750; transition: transform .18s, box-shadow .18s, background .18s; }
.stretch-app .stretch-btn:not(:disabled):hover { transform: translateY(-1px); }
.stretch-app .stretch-btn-primary { border: 0; color: #fff; background: linear-gradient(135deg, #4F0A87, #8428CA); box-shadow: 0 8px 17px rgba(94, 23, 155, .24); }
.stretch-app .stretch-btn-primary svg { width: 17px; height: 17px; }
.stretch-app .stretch-btn-secondary { border: 1px solid #B98AE2; color: #5D1597; background: #fff; }
.stretch-app .stretch-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr); }
.stretch-app .stretch-preview-column { min-width: 0; padding: 25px 28px 28px; border-right: 1px solid #EDE2F5; }
.stretch-app .stretch-preview-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.stretch-app .stretch-preview-heading { color: #3B0270; font-size: 14px; font-weight: 800; }
.stretch-app .stretch-zoom-controls { display: flex; gap: 6px; }
.stretch-app .stretch-icon-btn { min-width: 34px; height: 31px; padding: 0 8px; border: 1px solid #E2D1EF; border-radius: 8px; color: #5D1597; background: #fff; font-size: 13px; font-weight: 800; }
.stretch-app .stretch-icon-btn:not(:disabled):hover { background: #F7F0FC; }
.stretch-app .stretch-canvas-wrap { position: relative; display: grid; min-height: 330px; place-items: center; overflow: hidden; border: 1px solid #EDE2F5; border-radius: 16px; background: linear-gradient(45deg, #FCF9FE 25%, #F8F2FC 25%, #F8F2FC 50%, #FCF9FE 50%, #FCF9FE 75%, #F8F2FC 75%); background-size: 22px 22px; }
.stretch-app .stretch-empty-preview { display: grid; gap: 9px; place-items: center; padding: 25px; color: #6C5B7B; text-align: center; }
.stretch-app .stretch-empty-preview svg { width: 58px; color: #9A69C6; }
.stretch-app .stretch-empty-preview strong { color: #3B0270; font-size: 15px; }
.stretch-app .stretch-empty-preview span { font-size: 13px; }
.stretch-app .stretch-preview-canvas { display: none; max-width: 100%; max-height: 500px; object-fit: contain; transform-origin: center; transition: transform .16s ease; }
.stretch-app .stretch-rendering { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #E0C9F1; border-radius: 8px; color: #4F147E; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 700; }
.stretch-app .stretch-rendering span { width: 12px; height: 12px; border: 2px solid #D7B6EC; border-top-color: #6D21B4; border-radius: 50%; animation: stretch-spin .8s linear infinite; }
@keyframes stretch-spin { to { transform: rotate(360deg); } }
.stretch-app .stretch-upload-panel { display: grid; gap: 5px; place-items: center; margin-top: 15px; padding: 20px; border: 1.5px dashed #BD94DC; border-radius: 14px; color: #6C5B7B; background: #FCF9FE; text-align: center; transition: .18s; }
.stretch-app .stretch-upload-panel:hover, .stretch-app .stretch-upload-panel.stretch-dragging { border-color: #7020AE; color: #531186; background: #F5EAFD; transform: translateY(-1px); }
.stretch-app .stretch-upload-panel svg { width: 29px; color: #7123AE; }
.stretch-app .stretch-upload-panel strong { color: #3B0270; font-size: 14px; }
.stretch-app .stretch-upload-panel span { font-size: 13px; }
.stretch-app .stretch-upload-panel small { margin-top: 3px; color: #806C90; font-size: 11px; }
.stretch-app .stretch-file-meta { display: flex; justify-content: space-between; gap: 12px; margin: 13px 2px 0; color: #6C5B7B; font-size: 12px; }
.stretch-app .stretch-file-name { overflow: hidden; color: #3B0270; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.stretch-app .stretch-image-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stretch-app .stretch-image-summary div, .stretch-app .stretch-export-summary { border: 1px solid #EDE2F5; border-radius: 10px; background: #FCF9FE; }
.stretch-app .stretch-image-summary div { padding: 10px 12px; }
.stretch-app .stretch-image-summary span { display: block; margin-bottom: 2px; color: #806C90; font-size: 11px; }
.stretch-app .stretch-image-summary strong { color: #3B0270; font-size: 13px; }
.stretch-app .stretch-controls { padding: 24px; background: #FEFCFF; }
.stretch-app .stretch-setting-card { margin-bottom: 14px; padding: 17px; border: 1px solid #EDE2F5; border-radius: 15px; background: #fff; }
.stretch-app .stretch-setting-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.stretch-app .stretch-setting-head h3 { margin: 0 0 3px; color: #3B0270; font-size: 15px; }
.stretch-app .stretch-setting-head span { color: #806C90; font-size: 11px; }
.stretch-app .stretch-range-row { display: block; margin: 0 0 14px; }
.stretch-app .stretch-range-row:last-child { margin-bottom: 0; }
.stretch-app .stretch-range-row > span { display: flex; justify-content: space-between; margin-bottom: 7px; color: #4A195D; font-size: 12px; font-weight: 700; }
.stretch-app output { color: #6D21B4; font-variant-numeric: tabular-nums; }
.stretch-app input[type="range"] { width: 100%; height: 6px; appearance: none; border-radius: 99px; outline: none; accent-color: #7020AE; background: #EBDD F5; }
.stretch-app input[type="range"]::-webkit-slider-thumb { width: 17px; height: 17px; appearance: none; border: 3px solid #fff; border-radius: 50%; background: #7020AE; box-shadow: 0 1px 5px rgba(68, 13, 110, .35); }
.stretch-app input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: #7020AE; box-shadow: 0 1px 5px rgba(68, 13, 110, .35); }
.stretch-app .stretch-lock-control { display: inline-flex; align-items: center; gap: 6px; color: #5D1597; font-size: 11px; font-weight: 800; cursor: pointer; }
.stretch-app .stretch-lock-control input { position: absolute; opacity: 0; }
.stretch-app .stretch-switch { position: relative; width: 31px; height: 18px; border-radius: 99px; background: #CDB2DF; transition: .2s; }
.stretch-app .stretch-switch::after { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; content: ""; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.stretch-app .stretch-ratio-lock:checked + .stretch-switch { background: #6D21B4; }
.stretch-app .stretch-ratio-lock:checked + .stretch-switch::after { transform: translateX(13px); }
.stretch-app .stretch-dimension-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stretch-app .stretch-dimension-grid > label, .stretch-app .stretch-select-label { color: #4A195D; font-size: 12px; font-weight: 750; }
.stretch-app .stretch-number-wrap { position: relative; display: block; margin-top: 6px; }
.stretch-app .stretch-number-wrap input, .stretch-app .stretch-format { width: 100%; border: 1px solid #E5D6EF; border-radius: 9px; color: #2E073F; background: #FAF6FE; }
.stretch-app .stretch-number-wrap input { height: 39px; padding: 7px 31px 7px 10px; font-size: 13px; }
.stretch-app .stretch-number-wrap b { position: absolute; top: 11px; right: 9px; color: #806C90; font-size: 11px; }
.stretch-app .stretch-validation { min-height: 15px; margin: 7px 0 0; color: #AD1E5C; font-size: 11px; line-height: 1.35; }
.stretch-app .stretch-text-btn { padding: 0; border: 0; color: #64189F; background: transparent; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.stretch-app .stretch-select-label { display: block; margin-top: 15px; }
.stretch-app .stretch-format { height: 40px; margin-top: 6px; padding: 0 10px; }
.stretch-app .stretch-hint { margin: 9px 0 11px; color: #806C90; font-size: 11px; line-height: 1.45; }
.stretch-app .stretch-export-summary { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; color: #4F147E; font-size: 11px; font-weight: 750; }
.stretch-app .stretch-compare-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 4px 3px; cursor: pointer; }
.stretch-app .stretch-compare-toggle input { position: absolute; opacity: 0; }
.stretch-app .stretch-checkmark { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border: 1px solid #B98AE2; border-radius: 6px; background: #fff; }
.stretch-app .stretch-compare-checkbox:checked + .stretch-checkmark { border-color: #6D21B4; background: #6D21B4; }
.stretch-app .stretch-compare-checkbox:checked + .stretch-checkmark::after { width: 8px; height: 4px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; content: ""; transform: rotate(-45deg) translateY(-1px); }
.stretch-app .stretch-compare-toggle strong, .stretch-app .stretch-compare-toggle small { display: block; }
.stretch-app .stretch-compare-toggle strong { color: #3B0270; font-size: 12px; }
.stretch-app .stretch-compare-toggle small { margin-top: 2px; color: #806C90; font-size: 11px; }
.stretch-app .stretch-live-message { min-height: 20px; margin: 0; padding: 0 28px 20px; color: #5D1597; font-size: 13px; font-weight: 700; }
.stretch-app .stretch-live-message.stretch-error { color: #AD1E5C; }
.stretch-app .stretch-compare-wrap { margin-top: 18px; }
.stretch-app .stretch-compare-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: #806C90; font-size: 11px; }
.stretch-app .stretch-compare-head strong { color: #3B0270; font-size: 13px; }
.stretch-app .stretch-compare-stage { position: relative; height: 265px; overflow: hidden; border: 1px solid #E5D6EF; border-radius: 14px; background: #F8F2FC; cursor: col-resize; touch-action: none; }
.stretch-app .stretch-compare-stage canvas { position: absolute; width: 100%; height: 100%; object-fit: contain; }
.stretch-app .stretch-compare-before-layer { position: absolute; inset: 0 auto 0 0; width: 50%; overflow: hidden; border-right: 0; }
.stretch-app .stretch-compare-before-layer canvas { width: 100%; max-width: none; }
.stretch-app .stretch-compare-label { position: absolute; top: 10px; z-index: 3; padding: 5px 8px; border-radius: 6px; color: #fff; background: rgba(47, 8, 72, .78); font-size: 10px; font-weight: 800; }
.stretch-app .stretch-before-label { left: 10px; }
.stretch-app .stretch-after-label { right: 10px; }
.stretch-app .stretch-compare-divider { position: absolute; top: 0; bottom: 0; left: 50%; z-index: 4; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(71,10,110,.25); transform: translateX(-1px); }
.stretch-app .stretch-compare-divider i { position: absolute; top: calc(50% - 17px); left: -12px; width: 24px; height: 34px; border: 2px solid #fff; border-radius: 14px; background: #6D21B4; }
.stretch-app .stretch-compare-divider i::after { position: absolute; top: 13px; left: 6px; width: 8px; height: 4px; border-top: 2px solid #fff; border-bottom: 2px solid #fff; content: ""; }

@media (max-width: 840px) {
  .stretch-app .stretch-layout { grid-template-columns: 1fr; }
  .stretch-app .stretch-preview-column { border-right: 0; border-bottom: 1px solid #EDE2F5; }
  .stretch-app .stretch-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .stretch-app .stretch-setting-card { margin-bottom: 0; }
  .stretch-app .stretch-setting-card:last-of-type, .stretch-app .stretch-compare-toggle { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .stretch-app { padding: 38px 13px 48px; }
  .stretch-app .stretch-hero { margin-bottom: 23px; }
  .stretch-app .stretch-hero h1 { font-size: 36px; letter-spacing: -1.2px; }
  .stretch-app .stretch-hero p { font-size: 14px; line-height: 1.6; }
  .stretch-app .stretch-card { border-radius: 18px; }
  .stretch-app .stretch-card-header { align-items: flex-start; padding: 18px; }
  .stretch-app .stretch-tool-title p { display: none; }
  .stretch-app .stretch-actions { flex-direction: column; }
  .stretch-app .stretch-btn { min-height: 37px; padding: 7px 10px; font-size: 12px; }
  .stretch-app .stretch-preview-column { padding: 18px; }
  .stretch-app .stretch-canvas-wrap { min-height: 235px; }
  .stretch-app .stretch-controls { display: block; padding: 18px; }
  .stretch-app .stretch-setting-card { margin-bottom: 13px; padding: 15px; }
  .stretch-app .stretch-compare-stage { height: 215px; }
  .stretch-app .stretch-live-message { padding: 0 18px 17px; }
}