:root {
  --bg: #f6f2ea;
  --paper: #fffaf1;
  --ink: #11100b;
  --muted: #5e5a4c;
  --line: rgba(17, 16, 11, 0.12);
  --shadow: rgba(17, 16, 11, 0.12);
  --accent: #19a974;
  --accent2: #ffb300;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(900px 420px at 14% 10%, rgba(25, 169, 116, 0.16), transparent 55%),
    radial-gradient(900px 520px at 86% 12%, rgba(255, 179, 0, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg), #efe8dc);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  letter-spacing: -0.01em;
}

.wrap {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  background: rgba(246, 242, 234, 0.7);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}

.mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: conic-gradient(from 90deg, var(--accent), var(--accent2), var(--accent));
  box-shadow: 0 10px 18px var(--shadow);
  outline: 1px solid rgba(17, 16, 11, 0.12);
}

.brandTitle {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brandSub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.hero {
  padding: 34px 0 20px;
}

h1 {
  font-family: "Fraunces", ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: clamp(36px, 4.3vw, 58px);
  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.02em;
}

.lede {
  margin: 14px 0 18px;
  max-width: 74ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.86), rgba(255, 250, 241, 0.72));
  border-radius: var(--radius);
  box-shadow: 0 22px 44px rgba(17, 16, 11, 0.08);
  padding: 16px;
  overflow: hidden;
}

.upload {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.dropzone {
  border: 1px dashed rgba(17, 16, 11, 0.28);
  border-radius: calc(var(--radius) - 6px);
  background: rgba(255, 255, 255, 0.55);
  padding: 18px;
  cursor: pointer;
  position: relative;
}

.dropzone::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 16, 11, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 16, 11, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.35;
  pointer-events: none;
  border-radius: inherit;
}

.dropzone:focus {
  outline: 3px solid rgba(25, 169, 116, 0.28);
  outline-offset: 3px;
}

.dzTitle {
  position: relative;
  font-weight: 700;
}

.dzMeta {
  position: relative;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.file {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  appearance: none;
  border: 1px solid rgba(17, 16, 11, 0.25);
  background: linear-gradient(180deg, rgba(25, 169, 116, 0.98), rgba(25, 169, 116, 0.9));
  color: #0b130f;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(25, 169, 116, 0.25);
}

.btn:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btnGhost {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.status {
  font-size: 13px;
  color: var(--muted);
}

.previews {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.previewCard {
  border: 1px solid rgba(17, 16, 11, 0.12);
  background: rgba(255, 255, 255, 0.6);
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
}

.cardHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(17, 16, 11, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.54));
}

.cardTitle {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cardMeta {
  color: var(--muted);
  font-size: 12px;
}

.cardBody {
  position: relative;
  padding: 12px;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(94, 90, 76, 0.85);
  font-size: 13px;
  padding: 0 18px;
  text-align: center;
}

.orig {
  max-width: 100%;
  max-height: 360px;
  border-radius: 14px;
  display: none;
  box-shadow: 0 14px 30px rgba(17, 16, 11, 0.1);
}

.out {
  width: min(420px, 100%);
  height: auto;
  border-radius: 16px;
  outline: 1px solid rgba(17, 16, 11, 0.16);
  background: #0e0e0d;
  image-rendering: pixelated;
  display: block;
}

.copy {
  padding: 14px 0 28px;
}

.copy h2 {
  margin: 18px 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.copy p {
  margin: 0 0 10px;
  max-width: 80ch;
  color: var(--muted);
  line-height: 1.6;
}

details {
  border: 1px solid rgba(17, 16, 11, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  padding: 10px 12px;
  margin: 10px 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--line);
}

.footTitle {
  font-weight: 800;
}

.footMeta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(17, 16, 11, 0.28);
}

.link:hover {
  border-bottom-color: rgba(17, 16, 11, 0.6);
}

@media (min-width: 900px) {
  .panel {
    padding: 18px;
  }

  .upload {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .actions {
    justify-content: flex-end;
  }

  .previews {
    grid-template-columns: 1fr 1fr;
  }
}
