:root {
  --ink: #23004c;
  --accent: #7a00e6;
  --paper: #f2f1ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.card {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* --- Bottone pill --- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 14px 40px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.btn:hover,
.btn:focus,
.btn:focus-visible,
.btn:active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--ink);
  outline: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.preview {
  width: 100%;
  display: flex;
  justify-content: center;
}

.preview img {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  border-radius: 12px;
  background: #fff;
}

.dropzone {
  width: 100%;
  padding: 40px 20px;
  border: 2px dashed rgba(35, 0, 76, 0.4);
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
}

.dropzone.is-over {
  border-color: var(--accent);
  background: rgba(122, 0, 230, 0.06);
}

.dropzone input {
  display: none;
}

.status {
  min-height: 1.2em;
  font-size: 0.95rem;
  text-align: center;
  word-break: break-all;
}

.status a {
  color: var(--accent);
}
