:root {
  --lime: #c6e85a;
  --lime-btn: #c5e44d;
  --lime-border: #b6e04a;
  --ink: #1f1f1f;
  --muted: #8a8a8a;
  --card: #ffffff;
  --bg: #f3f6ef;
  --drop: #f4f7f0;
  --howto: #f3f6ea;
  --gray-btn: #9c9c9c;
  --radius: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 50% 28%, #f7faef 0%, var(--bg) 62%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: 36px 16px 48px;
}

.page {
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  text-align: center;
  margin-bottom: 22px;
  width: 100%;
}

.logo {
  display: block;
  width: min(220px, 70vw);
  height: auto;
  margin: 0 auto 14px;
}

h1 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.card {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(40, 55, 20, 0.08);
  padding: 22px 22px 20px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 78px;
  border: 1.5px dashed #d7dcd0;
  border-radius: 14px;
  background: var(--drop);
  cursor: pointer;
  text-align: center;
  padding: 16px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.dropzone span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--lime-border);
  background: #f5fae8;
}

.preview-wrap {
  margin: 22px 0 6px;
  text-align: center;
}

.preview-ring {
  width: min(300px, 78%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--lime-border);
  overflow: hidden;
  background: #111;
  touch-action: none;
  cursor: default;
}

.preview-ring.has-photo {
  cursor: grab;
}

.preview-ring.has-photo.is-dragging {
  cursor: grabbing;
}

#preview {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.preview-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.zoom {
  margin: 18px 0 20px;
}

.zoom-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

#zoom-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.zoom input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 0;
  accent-color: var(--lime-border);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 13px 12px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

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

.btn-primary {
  background: var(--lime-btn);
}

.btn-primary:not(:disabled):hover {
  filter: brightness(0.97);
}

.btn-secondary {
  background: var(--gray-btn);
}

.btn-secondary:not(:disabled):hover {
  filter: brightness(0.95);
}

.howto {
  margin-top: 18px;
  padding: 16px 16px 14px;
  background: var(--howto);
  border-radius: 12px;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #2a2a2a;
}

.howto-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.howto p {
  margin: 0 0 8px;
}

.howto ol {
  margin: 0 0 10px;
  padding-left: 1.2em;
}

.howto li {
  margin: 3px 0;
}

.fb-link {
  color: #7cb52a;
  font-weight: 700;
  text-decoration: none;
}

.fb-link:hover {
  text-decoration: underline;
}

.privacy {
  margin: 18px 0 0;
  text-align: center;
  color: #9aa196;
  font-size: 0.78rem;
  line-height: 1.4;
  max-width: 22em;
}

@media (max-width: 480px) {
  body {
    padding: 24px 12px 36px;
  }

  .card {
    padding: 18px 16px 16px;
  }

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