body.image-compressor {
  background: #ffffff;
  color: #1c2b39;
}

body.image-compressor .site-main {
  padding-bottom: 64px;
}

body.image-compressor .hero {
  padding: 48px 0 32px;
}

body.image-compressor .hero .tool-hero {
  display: grid;
  gap: 16px;
}

.image-tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .image-tool-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}


.image-tool-card {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(15, 46, 77, 0.08);
}

.image-tool-card h2,
.image-tool-card h3 {
  margin: 0 0 12px;
}

.dropzone {
  position: relative;
  border: 1.5px dashed #9db5cc;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  background: #f5f8fc;
  color: inherit;
}

.dropzone:focus-within,
.dropzone:hover {
  border-color: #2c7be5;
  background: #e9f2ff;
}

.dropzone.drag {
  border-color: #4cd964;
  background: #e6f9ed;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item {
  border: 1px solid #d6e2f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  background: #f6f9fd;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.file-item.is-active {
  border-color: #2c7be5;
  background: #e9f2ff;
  box-shadow: 0 6px 16px rgba(44, 123, 229, 0.16);
}

.file-item button {
  appearance: none;
  background: none;
  border: none;
  color: #305376;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.file-item button:hover,
.file-item button:focus {
  background: rgba(48, 83, 118, 0.12);
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-meta small {
  color: #5a6f87;
}

.option-group {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.option-group fieldset {
  border: 1px solid #cdd9e8;
  border-radius: 14px;
  padding: 16px;
}

.option-group legend {
  padding: 0 8px;
  font-weight: 600;
  color: #1f4c75;
}

.range-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-control input[type="range"] {
  flex: 1;
  accent-color: #28c2ff;
}

.range-value {
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.95rem;
}

.toggle input {
  margin-top: 3px;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.dimension-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}


.dimension-grid input[type="number"] {
  background: #ffffff;
  border: 1px solid #c1cede;
  border-radius: 10px;
  padding: 8px 10px;
  color: #1c2b39;
  box-shadow: inset 0 1px 2px rgba(12, 27, 48, 0.06);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.actions .btn {
  flex: none;
}


.actions .btn.secondary {
  background: #eff4f9;
  border: 1px solid #c5d4e5;
  color: #1c2b39;
}

.status-box {
  margin-top: 16px;
  border: 1px dashed #aec4de;
  border-radius: 10px;
  padding: 12px;
  color: #3b4d63;
  font-size: 0.92rem;
  background: #f3f7fc;
}

.preview-shell {
  display: grid;
  gap: 16px;
}


.preview-stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f0f5fb;
  border: 1px solid #d2deea;
  min-height: 240px;
}

.preview-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fbff;
}

.preview-after {
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.12s ease;
}

.preview-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}


.preview-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(44, 123, 229, 0.9);
  left: 50%;
  pointer-events: none;
}


.metrics {
  display: grid;
  gap: 10px;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  padding: 12px 16px;
  background: #f8fbff;
}

.metrics dt {
  font-weight: 600;
  color: #234a72;
}

.metrics dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: #1c2b39;
}


.downloads-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.download-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #d4e0ef;
  border-radius: 12px;
  padding: 10px 14px;
  background: #f4f7fb;
}

.download-card .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}


.progress-line {
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(18, 52, 87, 0.1);
  overflow: hidden;
  margin-top: 8px;
}

.progress-line span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4cd964 0%, #2c7be5 100%);
  width: 0;
}


.badge-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-list .pill {
  background: #eef4fb;
  border: 1px solid #d2deeb;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #1f4c75;
}


.notice-box {
  border-left: 3px solid #2c7be5;
  background: #e9f2ff;
  padding: 12px 16px;
  border-radius: 12px;
  color: #1c2b39;
  font-size: 0.92rem;
}

.notice-box strong {
  color: #153a5d;
}


.faq-grid {
  display: grid;
  gap: 12px;
}

.faq-grid details {
  background: #f6f9fd;
  border: 1px solid #d6e2f0;
  border-radius: 12px;
  padding: 12px 16px;
}

.muted-link {
  color: #1f4c75;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

@media (max-width: 480px) {
  .dropzone {
    padding: 28px 18px;
  }

  .image-tool-card {
    padding: 20px;
  }

  .download-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .actions {
    flex-direction: column;
  }

  .actions .btn {
    width: 100%;
  }
}
