.image-resizer [hidden],
.resizer-page [hidden] {
  display: none !important;
}

.resizer-page {
  padding-block: 24px 56px;
}

.resizer-intro {
  margin-block: 18px 24px;
}

.resizer-intro h1 {
  max-width: 920px;
}

.resizer-intro p {
  max-width: 900px;
}

.resizer-intro__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.resizer-intro__chips span {
  border: 1px solid color-mix(in srgb, var(--fmf-mint) 42%, var(--fmf-border));
  background: color-mix(in srgb, var(--fmf-mint) 11%, white);
  color: var(--fmf-navy);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: .86rem;
  font-weight: 700;
}

.image-resizer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 22px;
  align-items: start;
  margin-block: 28px 38px;
}

.resizer-main,
.resizer-side-card,
.resizer-result-card {
  background: white;
  border: 1px solid var(--fmf-border);
  border-radius: 22px;
}

.resizer-main {
  padding: clamp(18px, 3vw, 28px);
  min-width: 0;
}

.resizer-side {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.resizer-side-card,
.resizer-result-card {
  padding: 20px;
}

.resizer-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.resizer-section-heading--compact {
  margin-bottom: 18px;
}

.resizer-section-heading h2,
.resizer-side-card h2,
.resizer-result-card h2,
.resizer-info-grid h2,
.resizer-pro-notes h2,
.resizer-faq h2 {
  color: var(--fmf-navy);
  letter-spacing: -.025em;
  margin: .08em 0 0;
}

.resizer-section-heading h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.resizer-link-button {
  appearance: none;
  border: 1px solid var(--fmf-border);
  background: white;
  color: var(--fmf-navy);
  min-height: 42px;
  border-radius: 11px;
  padding: 8px 13px;
  font-weight: 700;
  cursor: pointer;
}

.resizer-link-button:hover {
  background: var(--fmf-pale-blue);
}

.resizer-link-button--block {
  width: 100%;
  margin-top: 10px;
}

.resizer-dropzone {
  min-height: 250px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  text-align: center;
  border: 2px dashed color-mix(in srgb, var(--fmf-cyan) 60%, var(--fmf-border));
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--fmf-cyan) 12%, transparent), transparent 32%),
    radial-gradient(circle at 82% 84%, color-mix(in srgb, var(--fmf-mint) 12%, transparent), transparent 34%),
    white;
  padding: 30px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.resizer-dropzone:hover,
.resizer-dropzone.is-dragging {
  border-color: var(--fmf-cyan);
  background-color: #f7feff;
}

.resizer-dropzone.is-dragging {
  transform: translateY(-2px);
}

.resizer-dropzone__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--fmf-sky), var(--fmf-mint));
  color: var(--fmf-navy);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 8px;
}

.resizer-dropzone strong {
  color: var(--fmf-navy);
  font-size: 1.12rem;
}

.resizer-dropzone > span:not(.resizer-dropzone__icon),
.resizer-dropzone small {
  color: var(--fmf-muted);
}

.resizer-dropzone small {
  max-width: 600px;
}

.resizer-source-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--fmf-border);
  border-radius: 18px;
  background: #fbfdff;
  padding: 14px;
}

.resizer-source-preview {
  aspect-ratio: 4 / 3;
  border-radius: 13px;
  overflow: hidden;
  background:
    linear-gradient(45deg, #edf0f4 25%, transparent 25%),
    linear-gradient(-45deg, #edf0f4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf0f4 75%),
    linear-gradient(-45deg, transparent 75%, #edf0f4 75%),
    #fff;
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.resizer-source-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.resizer-source-info {
  min-width: 0;
}

.resizer-source-info > strong {
  display: block;
  color: var(--fmf-navy);
  overflow-wrap: anywhere;
  font-size: 1.02rem;
}

.resizer-source-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.resizer-source-metrics span {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef6fb;
  color: #33415f;
  font-size: .79rem;
  font-weight: 500;
}

.resizer-source-info p {
  margin: 8px 0 0;
  color: var(--fmf-muted);
  font-size: .83rem;
}

.resizer-settings {
  margin-top: 22px;
  display: grid;
  gap: 20px;
}

.resizer-control-section {
  border-top: 1px solid var(--fmf-border);
  padding-top: 20px;
}

.resizer-live-result {
  border: 1px solid color-mix(in srgb, var(--fmf-mint) 42%, var(--fmf-border));
  background: color-mix(in srgb, var(--fmf-mint) 9%, white);
  border-radius: 12px;
  padding: 8px 11px;
  white-space: nowrap;
  color: #31415a;
  font-size: .86rem;
}

.resizer-live-result strong {
  color: var(--fmf-navy);
}

.resizer-scale-control {
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--fmf-cyan) 28%, var(--fmf-border));
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfeff, #f6fbfe);
  padding: 15px 16px 14px;
}

.resizer-scale-control.is-disabled {
  opacity: .62;
}

.resizer-scale-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.resizer-scale-heading > div {
  display: grid;
  gap: 2px;
}

.resizer-scale-heading > div > span {
  color: var(--fmf-navy);
  font-weight: 800;
  font-size: .92rem;
}

.resizer-scale-heading small,
.resizer-scale-note {
  color: var(--fmf-muted);
  font-size: .78rem;
}

.resizer-scale-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 40px;
  border-radius: 11px;
  padding: 5px 10px;
  background: white;
  border: 1px solid color-mix(in srgb, var(--fmf-cyan) 35%, var(--fmf-border));
  color: var(--fmf-navy);
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.resizer-scale-slider-wrap {
  position: relative;
  padding: 4px 2px 25px;
}

.resizer-scale-slider {
  --scale-progress: 15.79%;
  --scale-track: linear-gradient(90deg, var(--fmf-cyan) 0 var(--scale-progress), #dce6ef var(--scale-progress) 100%);
  width: 100%;
  height: 10px;
  margin: 4px 0 0;
  appearance: none;
  border-radius: 999px;
  background: var(--scale-track);
  outline: none;
  cursor: pointer;
}

.resizer-scale-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: var(--scale-track);
}

.resizer-scale-slider::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: #dce6ef;
}

.resizer-scale-slider::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--fmf-cyan);
}

.resizer-scale-slider::-webkit-slider-thumb {
  appearance: none;
  width: 25px;
  height: 25px;
  margin-top: -7.5px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--fmf-navy);
  box-shadow: 0 3px 10px rgba(16, 32, 96, .24);
}

.resizer-scale-slider::-moz-range-thumb {
  width: 19px;
  height: 19px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--fmf-navy);
  box-shadow: 0 3px 10px rgba(16, 32, 96, .24);
}

.resizer-scale-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--fmf-cyan) 25%, transparent), 0 3px 10px rgba(16, 32, 96, .24);
}

.resizer-scale-marks {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 18px;
}

.resizer-scale-marks span {
  position: absolute;
  left: var(--mark);
  transform: translateX(-50%);
  color: var(--fmf-muted);
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.resizer-scale-marks span::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: 1px;
  height: 6px;
  background: #b9c9d8;
  transform: translateX(-50%);
}

.resizer-scale-note {
  margin: 2px 0 0;
  line-height: 1.4;
}

.resizer-dimension-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.resizer-dimension-link {
  display: grid;
  place-items: center;
  min-height: 48px;
  color: var(--fmf-cyan);
  font-weight: 700;
  font-size: 1.15rem;
}

.resizer-options-grid,
.resizer-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.resizer-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.resizer-field--wide {
  grid-column: 1 / -1;
}

.resizer-field > span:first-child {
  color: var(--fmf-navy);
  font-weight: 700;
  font-size: .88rem;
}

.resizer-field > span small {
  color: var(--fmf-muted);
  font-weight: 500;
}

.resizer-field input[type="number"],
.resizer-field input[type="text"],
.resizer-field select {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #ccd7e5;
  background: white;
  color: var(--fmf-text);
  padding: 9px 12px;
  font-size: 1rem;
}

.resizer-field input[type="number"]:focus,
.resizer-field input[type="text"]:focus,
.resizer-field select:focus {
  border-color: var(--fmf-cyan);
}

.resizer-field input[type="range"] {
  width: 100%;
  accent-color: var(--fmf-cyan);
}

.resizer-field > small {
  color: var(--fmf-muted);
  font-size: .77rem;
  line-height: 1.4;
}

.resizer-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 14px;
  border-radius: 13px;
  background: #f7fafc;
  border: 1px solid var(--fmf-border);
  padding: 12px 13px;
}

.resizer-check input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--fmf-cyan);
}

.resizer-check span {
  display: grid;
  gap: 2px;
}

.resizer-check strong {
  color: var(--fmf-navy);
}

.resizer-check small {
  color: var(--fmf-muted);
  font-size: .78rem;
}

.resizer-check.is-disabled {
  opacity: .55;
}

.resizer-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid #ccd7e5;
  border-radius: 12px;
  padding: 6px 10px;
  background: white;
}

.resizer-color-row input[type="color"] {
  width: 44px;
  min-width: 44px;
  height: 34px;
  padding: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.resizer-color-row code {
  color: var(--fmf-navy);
}

.resizer-privacy-strip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  border: 1px solid color-mix(in srgb, var(--fmf-mint) 38%, var(--fmf-border));
  background: color-mix(in srgb, var(--fmf-mint) 8%, white);
  border-radius: 14px;
  padding: 13px 14px;
}

.resizer-privacy-strip > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--fmf-mint);
  color: var(--fmf-navy);
  font-weight: 800;
}

.resizer-privacy-strip strong {
  color: var(--fmf-navy);
}

.resizer-privacy-strip p {
  color: var(--fmf-muted);
  margin: 2px 0 0;
  font-size: .82rem;
}

.resizer-validation {
  min-height: 1.4em;
  margin: 12px 2px 8px;
  color: #ad2944;
  font-size: .88rem;
  font-weight: 500;
}

.resizer-validation.is-success {
  color: #117147;
}

.resizer-validation a {
  color: var(--fmf-blue);
  font-weight: 700;
}

.resizer-action {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--fmf-navy), #234c9b);
  color: white;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(16, 32, 96, .16);
}

.resizer-action span {
  font-weight: 700;
  font-size: 1rem;
}

.resizer-action small {
  opacity: .78;
  font-size: .74rem;
}

.resizer-action:hover {
  filter: brightness(1.05);
}

.resizer-action:disabled {
  cursor: wait;
  opacity: .72;
}

.resizer-preview-stage,
.resizer-result-preview {
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  margin-top: 12px;
  background:
    linear-gradient(45deg, #edf0f4 25%, transparent 25%),
    linear-gradient(-45deg, #edf0f4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf0f4 75%),
    linear-gradient(-45deg, transparent 75%, #edf0f4 75%),
    #fff;
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  border: 1px solid #d8e0ea;
}

.resizer-preview-stage img,
.resizer-result-preview img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.resizer-preview-empty {
  text-align: center;
  padding: 26px 18px;
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--fmf-muted);
}

.resizer-preview-empty > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--fmf-pale-blue);
  color: var(--fmf-blue);
  font-size: 1.65rem;
}

.resizer-preview-empty strong {
  color: var(--fmf-navy);
  max-width: 220px;
}

.resizer-preview-empty small {
  max-width: 240px;
}

.resizer-preview-stats,
.resizer-result-stats {
  display: grid;
  gap: 0;
  margin: 13px 0 0;
}

.resizer-preview-stats div,
.resizer-result-stats div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #edf0f5;
}

.resizer-preview-stats dt,
.resizer-result-stats dt {
  color: var(--fmf-muted);
  font-size: .8rem;
}

.resizer-preview-stats dd,
.resizer-result-stats dd {
  margin: 0;
  color: var(--fmf-navy);
  font-size: .82rem;
  font-weight: 700;
  text-align: right;
}

.resizer-result-card {
  border-color: color-mix(in srgb, var(--fmf-mint) 48%, var(--fmf-border));
}

.resizer-result-check {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--fmf-mint);
  color: var(--fmf-navy);
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.resizer-result-preview {
  min-height: 150px;
}

.resizer-download {
  min-height: 50px;
  border-radius: 13px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  background: var(--fmf-navy);
  color: white;
  font-weight: 700;
  margin-top: 14px;
}

.resizer-side-card--links {
  display: grid;
  gap: 9px;
}

.resizer-side-card--links h2 {
  margin-bottom: 4px;
  font-size: 1.2rem;
}

.resizer-side-card--links a {
  display: grid;
  gap: 2px;
  text-decoration: none;
  border: 1px solid var(--fmf-border);
  border-radius: 12px;
  padding: 10px 11px;
  background: #fbfdff;
}

.resizer-side-card--links a:hover {
  border-color: var(--fmf-cyan);
}

.resizer-side-card--links strong {
  color: var(--fmf-navy);
}

.resizer-side-card--links span {
  color: var(--fmf-muted);
  font-size: .76rem;
}

.resizer-info-grid,
.resizer-pro-notes,
.resizer-faq {
  margin-block: 42px;
}

.resizer-info-grid {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  gap: 26px;
  align-items: start;
}

.resizer-info-copy p:last-child {
  color: var(--fmf-muted);
  max-width: 520px;
}

.resizer-info-cards,
.resizer-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.resizer-info-cards article,
.resizer-notes-grid article {
  border: 1px solid var(--fmf-border);
  background: white;
  border-radius: 16px;
  padding: 18px;
}

.resizer-info-cards h3,
.resizer-notes-grid h3 {
  color: var(--fmf-navy);
  margin: 0 0 6px;
  font-size: 1rem;
}

.resizer-info-cards p,
.resizer-notes-grid p {
  color: var(--fmf-muted);
  margin: 0;
  font-size: .9rem;
}

.resizer-pro-notes > h2,
.resizer-faq > h2 {
  margin-bottom: 16px;
}

.resizer-faq details {
  background: white;
  border: 1px solid var(--fmf-border);
  border-radius: 14px;
  padding: 0 16px;
  margin-bottom: 10px;
}

.resizer-faq summary {
  cursor: pointer;
  color: var(--fmf-navy);
  font-weight: 700;
  padding: 15px 0;
}

.resizer-faq details p {
  color: var(--fmf-muted);
  margin: 0;
  padding: 0 0 16px;
}

.resizer-footnote {
  color: var(--fmf-muted);
  font-size: .8rem;
  margin-top: -18px;
}

@media (max-width: 960px) {
  .image-resizer {
    grid-template-columns: 1fr;
  }

  .resizer-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resizer-result-card {
    grid-column: 1 / -1;
  }

  .resizer-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .resizer-page {
    padding-block: 16px 40px;
  }

  .resizer-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .resizer-live-result {
    width: 100%;
    white-space: normal;
  }

  .resizer-source-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .resizer-source-card > .resizer-link-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .resizer-options-grid,
  .resizer-output-grid,
  .resizer-info-cards,
  .resizer-notes-grid,
  .resizer-side {
    grid-template-columns: 1fr;
  }

  .resizer-result-card {
    grid-column: auto;
  }

  .resizer-dimension-grid {
    grid-template-columns: 1fr;
  }

  .resizer-dimension-link {
    min-height: 22px;
    transform: rotate(90deg);
  }

  .resizer-quick-scales button {
    min-height: 44px;
  }

  .resizer-dropzone {
    min-height: 220px;
    padding: 24px 18px;
  }
}

@media (max-width: 520px) {
  .resizer-main,
  .resizer-side-card,
  .resizer-result-card {
    border-radius: 16px;
  }

  .resizer-main {
    padding: 15px;
  }

  .resizer-source-card {
    grid-template-columns: 1fr;
  }

  .resizer-source-preview {
    width: 100%;
    max-height: 210px;
  }

  .resizer-source-preview img {
    max-height: 210px;
  }

  .resizer-quick-scales {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .resizer-quick-scales > span {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resizer-dropzone {
    transition: none;
  }
}


.resizer-transparent-option {
  margin-top: 0;
  min-height: 48px;
  align-self: start;
}
