.tool-shell { max-width: 920px; }

.tool-head {
  max-width: 760px;
  padding: clamp(3.25rem, 8vw, 5.75rem) 0 clamp(1.75rem, 4vw, 2.5rem);
}

.tool-kicker {
  margin-bottom: 0.8rem;
  color: var(--berry);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-head h1 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.055em;
}

.tool-head > p:not(.tool-kicker) {
  max-width: 58ch;
  margin-top: 1rem;
  color: var(--text-mid);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.privacy-note::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.converter-card {
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--hairline);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 70px -52px rgba(29, 29, 31, 0.5);
}

.drop-zone {
  width: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.3rem;
  padding: 2rem;
  border: 1px dashed var(--hairline-strong);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 50% 12%, rgba(217, 44, 196, 0.07), transparent 38%),
    #f8f8fa;
  color: var(--text-mid);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: color-mix(in srgb, var(--berry) 60%, transparent);
  background: #fbf7fc;
  transform: translateY(-1px);
}

.drop-zone strong {
  margin-top: 0.85rem;
  color: var(--text);
  font-size: 1rem;
}

.drop-zone > span:last-child { font-size: 0.8rem; }

.upload-mark {
  position: relative;
  width: 54px;
  height: 34px;
  display: block;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 5px;
  background: #fff;
}

.upload-mark::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 8px;
  height: 8px;
  border-left: 1.5px solid var(--berry);
  border-top: 1.5px solid var(--berry);
  transform: translateX(-50%) rotate(45deg);
}

.upload-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 1.5px;
  height: 16px;
  background: var(--berry);
  transform: translateX(-50%);
}

.upload-mark i {
  position: absolute;
  left: 18px;
  bottom: -7px;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--hairline-strong);
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.85rem;
  flex-wrap: wrap;
}

.btn {
  min-height: 40px;
  padding: 0.58rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--berry); }
.btn-secondary { color: var(--text); background: var(--surface); border-color: var(--hairline); }
.btn-quiet { margin-left: auto; color: var(--text-mid); background: transparent; border-color: var(--hairline); }

.format-note {
  display: flex;
  gap: 0.5rem 1.2rem;
  margin-top: 1rem;
  padding: 0.85rem 0.1rem 0;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.72rem;
  flex-wrap: wrap;
}

.format-note b { color: var(--text-mid); font-weight: 600; }

.progress-section,
.results {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}

.progress-copy,
.results-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  color: var(--text-mid);
  font-size: 0.78rem;
}

.progress-copy span:first-child { color: var(--text); font-weight: 600; }
.progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: var(--bg-2); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--berry), var(--violet)); transition: width 0.22s; }

.results-head { align-items: baseline; margin-bottom: 0.8rem; }
.results-head h2 { font-size: 1rem; font-weight: 700; }
.results-head span { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.08em; }

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}

.image-item {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 0.95rem;
  background: var(--surface);
}

.image-item canvas { width: 100%; height: auto; display: block; background: #111; }
.image-item-info { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.7rem; }
.image-copy { min-width: 0; }
.image-name { overflow: hidden; color: var(--text); font-size: 0.76rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.image-size { color: var(--muted); font-size: 0.66rem; }
.image-item .btn { flex: none; min-height: 34px; padding: 0.38rem 0.65rem; font-size: 0.7rem; }

.error-message {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(185, 28, 28, 0.18);
  border-radius: 0.75rem;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.6);
  font-size: 0.8rem;
}

.hidden { display: none !important; }

@media (max-width: 600px) {
  .tool-head { padding-top: 2.75rem; }
  .drop-zone { min-height: 220px; }
  .btn-quiet { margin-left: 0; }
  .format-note { display: grid; gap: 0.25rem; }
  .image-grid { grid-template-columns: 1fr; }
}

