.spt-crop {
  box-sizing: border-box;
  max-width: 860px;
  margin: 2rem auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #d9dde3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  color: #172033;
}
.spt-crop *, .spt-crop *::before, .spt-crop *::after { box-sizing: inherit; }
.spt-crop [hidden] { display: none !important; }
.spt-crop__header { margin-bottom: 1.25rem; text-align: center; }
.spt-crop__title { margin: 0 0 0.5rem; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; }
.spt-crop__intro { max-width: 700px; margin: 0 auto; color: #526076; line-height: 1.65; }
.spt-crop__dropzone {
  display: flex; min-height: 250px; padding: 2rem 1rem; align-items: center; justify-content: center;
  flex-direction: column; gap: 0.65rem; border: 2px dashed #8b98aa; border-radius: 16px;
  background: #f8fafc; cursor: pointer; text-align: center;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.spt-crop__dropzone:hover, .spt-crop__dropzone:focus, .spt-crop__dropzone.is-drag-over { border-color: #3157d5; background: #eef3ff; outline: none; }
.spt-crop__dropzone.is-drag-over { transform: scale(1.01); }
.spt-crop__drop-title { font-size: 1.25rem; font-weight: 700; }
.spt-crop__drop-subtitle, .spt-crop__limits, .spt-crop__file-meta, .spt-crop__help, .spt-crop__result-meta { color: #667085; }
.spt-crop__limits { margin: .75rem 0 0; text-align: center; font-size: .9rem; }
.spt-crop__workspace { margin-top: 1.5rem; }
.spt-crop__file-card, .spt-crop__result {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem;
  border: 1px solid #d9dde3; border-radius: 12px; background: #f8fafc;
}
.spt-crop__file-details, .spt-crop__result-details { min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.spt-crop__file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spt-crop__file-meta, .spt-crop__result-meta { font-size: .88rem; }
.spt-crop__scope, .spt-crop__mode { margin: 1.25rem 0 0; padding: 1rem; border: 1px solid #d9dde3; border-radius: 12px; }
.spt-crop__scope legend, .spt-crop__mode legend { padding: 0 .35rem; font-weight: 700; }
.spt-crop__scope-option, .spt-crop__mode-option { display: flex; align-items: flex-start; gap: .65rem; padding: .65rem 0; cursor: pointer; }
.spt-crop__scope-option + .spt-crop__scope-option, .spt-crop__mode-option + .spt-crop__mode-option { border-top: 1px solid #edf0f4; }
.spt-crop__scope-option input, .spt-crop__mode-option input { margin-top: .25rem; }
.spt-crop__scope-option span, .spt-crop__mode-option span { display: flex; flex-direction: column; gap: .1rem; }
.spt-crop__scope-option small, .spt-crop__mode-option small { color: #667085; line-height: 1.45; }
.spt-crop__pages-field, .spt-crop__equal-field, .spt-crop__custom-fields { margin-top: 1rem; }
.spt-crop__pages-field > label, .spt-crop__equal-field > label { display: block; margin-bottom: .4rem; font-weight: 700; }
.spt-crop__pages, .spt-crop__unit-input input {
  min-height: 46px; padding: .7rem .8rem; border: 1px solid #aeb7c5; border-radius: 10px; background: #fff; color: #172033; font: inherit;
}
.spt-crop__pages { width: 100%; }
.spt-crop__pages:focus, .spt-crop__unit-input input:focus { border-color: #3157d5; outline: 3px solid rgba(49,87,213,.18); outline-offset: 1px; }
.spt-crop__help { margin: .45rem 0 0; font-size: .88rem; line-height: 1.5; }
.spt-crop__help code { padding: .1rem .3rem; border-radius: 4px; background: #eef1f5; color: #172033; }
.spt-crop__unit-input { display: inline-flex; align-items: center; gap: .45rem; }
.spt-crop__unit-input input { width: 120px; }
.spt-crop__unit-input > span { color: #667085; font-size: .9rem; }
.spt-crop__margin-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem 1rem; }
.spt-crop__margin-grid > label { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem; border: 1px solid #d9dde3; border-radius: 10px; background: #f8fafc; font-weight: 700; }
.spt-crop__measurement-help { text-align: center; }
.spt-crop__notice { max-width: 680px; margin: 1rem auto 0; padding: .8rem .95rem; border: 1px solid #d9dde3; border-radius: 10px; background: #f8fafc; color: #526076; font-size: .9rem; line-height: 1.55; text-align: center; }
.spt-crop-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.spt-crop-button:hover:not(:disabled) { transform: translateY(-1px); }
.spt-crop-button:focus-visible { outline: 3px solid rgba(49,87,213,.28); outline-offset: 2px; }
.spt-crop-button:disabled { cursor: not-allowed; opacity: .48; }
.spt-crop-button--primary { min-width: 200px; padding: .85rem 1.25rem; background: #3157d5; color: #fff; }
.spt-crop-button--secondary { margin-top: .35rem; padding: .75rem 1.1rem; background: #172033; color: #fff; }
.spt-crop-button--text { padding: .5rem; background: transparent; color: #3157d5; }
.spt-crop-button--download { flex: 0 0 auto; padding: .65rem .9rem; background: #3157d5; color: #fff; }
.spt-crop__actions { display: flex; justify-content: center; margin-top: 1.35rem; }
.spt-crop__result { margin-top: 1.5rem; background: #fff; }
.spt-crop__status { min-height: 1.5em; margin-top: 1rem; text-align: center; line-height: 1.5; }
.spt-crop__status--success { color: #176b3a; }
.spt-crop__status--error, .spt-crop__error { color: #a61b1b; }
@media (max-width: 600px) {
  .spt-crop { margin: 1rem auto; border-radius: 14px; }
  .spt-crop__dropzone { min-height: 210px; }
  .spt-crop__file-card, .spt-crop__result { align-items: stretch; flex-direction: column; }
  .spt-crop__margin-grid { grid-template-columns: 1fr; }
  .spt-crop__margin-grid > label { align-items: flex-start; flex-direction: column; }
  .spt-crop__unit-input, .spt-crop__unit-input input, .spt-crop-button--download { width: 100%; }
}
