.tool-page {
  padding-block: 25px 65px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 34px;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}
.tool-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 30px;
}
.tool-heading h1 {
  font-size: clamp(2.3rem, 5vw, 3.3rem);
  margin: 12px 0 16px;
}
.tool-heading > p {
  max-width: 590px;
  margin: 0 auto 16px;
  color: var(--muted);
  font-size: 16px;
}
.tool-promise {
  color: var(--green);
  font-size: 14px;
}
.tool-workspace {
  max-width: 820px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  background: white;
  box-shadow: var(--shadow);
}
.tool-workspace fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.drop-zone {
  text-align: center;
  border: 1.5px dashed #a9c7b2;
  border-radius: 12px;
  background: #f6faf6;
  padding: 33px 20px 24px;
}
.drop-zone.is-dragging {
  background: #e3f2e6;
  border-color: var(--green);
}
.drop-zone:has(input:focus-visible) {
  outline: 3px solid #ad7130;
  outline-offset: 4px;
}
.drop-icon {
  width: 49px;
  height: 54px;
  margin: 0 auto 16px;
  border: 1px solid #d6e6d9;
  border-radius: 12px;
  background: white;
  color: var(--green);
  display: grid;
  place-items: center;
}
.drop-icon .icon {
  width: 28px;
  height: 28px;
}
.drop-zone h2 {
  font-size: 19px;
  margin-bottom: 6px;
}
.drop-zone > p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.drop-zone .file-limits {
  font-size: 11px;
  margin: 14px 0 0;
}
.file-button {
  cursor: pointer;
}
.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  color: var(--green);
}
.privacy-note .icon {
  width: 27px;
  height: 27px;
}
.privacy-note strong {
  font-size: 12px;
  display: block;
}
.privacy-note span {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}
.section-label h2,
.tool-options h2 {
  font-size: 17px;
  margin: 0;
}
.selection {
  margin-top: 25px;
}
.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.file-number {
  color: var(--muted);
  background: var(--surface);
  border-radius: 6px;
  min-width: 30px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.file-detail {
  flex: 1;
  min-width: 0;
}
.file-name {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
}
.file-size {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.file-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.file-actions button {
  min-width: 34px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--muted);
  padding: 5px 8px;
}
.file-actions button:hover {
  color: var(--green);
  background: var(--green-soft);
}
.tool-options {
  margin-top: 25px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.tool-options h2 {
  margin-bottom: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}
.field input:not([type='range']):not([type='color']),
.field select {
  width: 100%;
  border: 1px solid #cdd8ce;
  border-radius: 7px;
  min-height: 44px;
  padding: 9px 12px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}
.field input[type='color'] {
  width: 100%;
  max-width: 150px;
  height: 40px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
}
.field-help {
  font-size: 12px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--muted);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.four-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}
.check-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}
.range-field > span:first-of-type {
  display: flex;
  align-items: center;
  gap: 18px;
}
.range-field input {
  width: 100%;
  accent-color: var(--green);
  min-height: 30px;
}
.range-field output {
  min-width: 44px;
  text-align: center;
  padding: 4px;
  background: var(--green-soft);
  border-radius: 5px;
}
.process-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 24px;
}
.local-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.local-label .icon {
  width: 14px;
  height: 14px;
}
.status {
  color: var(--green);
  font-size: 13px;
  margin-top: 16px;
}
.status:empty {
  margin: 0;
}
.error-message,
.notice {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #e5c7b6;
  background: #fff7f1;
  color: #843d1c;
  border-radius: 8px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.results {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.result-note {
  color: var(--muted);
  font-size: 12px;
}
.result-list {
  display: grid;
  gap: 15px;
}
.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.result-image {
  width: 100px;
  height: 90px;
  object-fit: contain;
  border-radius: 6px;
  background: repeating-conic-gradient(#f0f0ed 0 25%, white 0 50%) 50% / 16px 16px;
}
.result-info {
  flex: 1;
  min-width: 0;
}
.result-info h3 {
  font-size: 13px;
  overflow-wrap: anywhere;
  margin-bottom: 6px;
  letter-spacing: 0;
}
.result-info p {
  font-size: 11px;
  margin: 0 0 9px;
  color: var(--muted);
}
.result-info a {
  font-size: 12px;
}
.result-failure {
  background: #fff7f1;
}
.crop-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 22px;
  line-height: 0;
  touch-action: none;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}
.crop-stage img {
  display: block;
  max-height: 440px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.crop-outline {
  position: absolute;
  border: 2px solid #fff;
  outline: 1px solid var(--green);
  background: #176a4a18;
  box-shadow: 0 0 0 1200px #14251966;
  pointer-events: none;
}
.tool-help {
  max-width: 760px;
  margin: 40px auto 0;
}
.tool-help > h2 {
  font-size: 20px;
  margin-bottom: 12px;
}
.tool-help > p {
  color: var(--muted);
  font-size: 14px;
}
.faq-list {
  margin-top: 24px;
}
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.faq-list summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding-right: 15px;
}
.faq-list details p {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 4px;
}
.related-tools {
  margin-top: 55px;
}
.section-heading h2 {
  font-size: 24px;
  margin: 8px 0 22px;
}
.section-heading > a {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.section-heading .icon {
  width: 16px;
  height: 16px;
}
.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 650px) {
  .tool-page {
    padding-top: 20px;
  }
  .breadcrumbs {
    margin-bottom: 28px;
    font-size: 10px;
  }
  .tool-workspace {
    padding: 17px;
  }
  .drop-zone {
    padding: 25px 10px 20px;
  }
  .tool-heading > p {
    font-size: 14px;
  }
  .tool-promise {
    font-size: 12px;
  }
  .privacy-note {
    align-items: flex-start;
    justify-content: flex-start;
  }
  .privacy-note span {
    line-height: 1.6;
  }
  .field-grid {
    gap: 12px;
  }
  .four-fields {
    grid-template-columns: 1fr 1fr;
  }
  .file-row {
    gap: 7px;
  }
  .file-actions {
    gap: 4px;
  }
  .file-actions button {
    min-width: 30px;
    padding: 4px;
  }
  .file-name {
    font-size: 12px;
  }
  .result-card {
    gap: 12px;
    padding: 12px;
  }
  .result-image {
    width: 72px;
    height: 76px;
  }
  .section-label {
    flex-wrap: wrap;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .related-grid .tool-card {
    display: grid;
    grid-template-columns: 43px 1fr;
    column-gap: 16px;
  }
  .related-grid .tool-icon {
    grid-row: 1/4;
    margin: 0;
  }
  .related-grid .tool-card p {
    max-width: none;
    margin-bottom: 12px;
  }
  .related-grid .card-link {
    grid-column: 2;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .local-label {
    font-size: 10px;
  }
}
