:root {
  color-scheme: dark;
  --bg: #101414;
  --panel: #171d1c;
  --panel-2: #1f2826;
  --line: #31423e;
  --line-strong: #5aa18d;
  --text: #eef7f2;
  --muted: #a2b8af;
  --accent: #72e2bd;
  --accent-2: #f4c95d;
  --danger: #ff8f8f;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgb(114 226 189 / 13%), transparent 34rem),
    linear-gradient(315deg, rgb(244 201 93 / 10%), transparent 28rem),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0;
}

.ghost,
.download {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgb(114 226 189 / 10%);
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
  padding: 0 14px;
  text-decoration: none;
}

.ghost:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.workspace {
  display: grid;
  gap: 14px;
}

.drop-zone {
  display: grid;
  min-height: 290px;
  place-content: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgb(23 29 28 / 78%);
  cursor: pointer;
  padding: 32px;
  text-align: center;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.drop-zone.dragging,
.drop-zone:hover {
  border-color: var(--accent);
  background: rgb(31 40 38 / 92%);
  transform: translateY(-1px);
}

.drop-zone span {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drop-zone strong {
  font-size: 1.35rem;
}

.drop-zone small {
  color: var(--muted);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.privacy-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(23 29 28 / 72%);
  color: var(--muted);
  padding: 12px 14px;
}

.privacy-note strong {
  color: var(--accent);
}

.results {
  display: grid;
  gap: 10px;
}

.result-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.result-row.error {
  border-color: rgb(255 143 143 / 45%);
}

.preview {
  width: 76px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--panel-2);
}

.preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.result-copy strong,
.result-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .topbar,
  .privacy-note,
  .result-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .preview {
    width: 100%;
    max-height: 220px;
    aspect-ratio: 16 / 9;
  }
}

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10000; background: #111; color: #fff; padding: 8px 12px; border-radius: 4px; }
.skip-link:focus { left: 8px; }
