:root {
  --ink: #1c1b19;
  --paper: #faf8f3;
  --card: #ffffff;
  --line: #e3ded2;
  --accent: #0f6e56;
  --accent-light: #e1f5ee;
  --muted: #7a776e;
  --danger: #993c1d;
  --lock: #8a5a17;
  --lock-light: #faeeda;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
}
h1, h2, h3, .brand { font-family: 'Space Grotesk', sans-serif; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 10px;
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.free-counter {
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 20px;
}
.free-counter b { color: var(--ink); }

.wrap { max-width: 780px; margin: 0 auto; padding: 40px 20px 80px; }

.hero { text-align: center; margin-bottom: 32px; }
.hero h1 { font-size: 30px; margin: 0 0 8px; }
.hero p { color: var(--muted); font-size: 15px; margin: 0; }

.email-gate {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  max-width: 480px;
  margin: 0 auto;
}
.email-gate label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
.email-row { display: flex; gap: 10px; }
.email-row input {
  flex: 1;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.email-hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

#dropzone {
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--card);
}
#dropzone.drag { border-color: var(--accent); background: var(--accent-light); }
#dropzone .big { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
#dropzone p { margin: 0; color: var(--muted); font-size: 13px; }
input[type=file] { display: none; }

.panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 20px 0;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.field { display: flex; align-items: center; gap: 10px; }
.field label { font-size: 13px; color: var(--muted); white-space: nowrap; }
select {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.field.grow { flex: 1; min-width: 180px; }
.field.grow input[type=range] { width: 100%; accent-color: var(--accent); }
.qval { font-weight: 700; min-width: 40px; text-align: right; font-size: 13px; }

#fileList { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
.item img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #eee; }
.item .meta { flex: 1; min-width: 0; }
.item .name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sizes { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item .sizes .down { color: var(--accent); font-weight: 700; }
.item a.dl {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 6px 12px;
  border-radius: 8px;
  flex-shrink: 0;
}
.item a.dl:hover { background: var(--accent-light); }

.empty-hint { font-size: 13px; color: var(--muted); text-align: center; padding: 24px 0; }

.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:disabled { background: #b7c9c3; border-color: #b7c9c3; cursor: not-allowed; }
button:not(.primary):hover { background: #f2f0ea; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  margin: 18px auto 0;
  padding: 4px;
}

#upgradeBlock {
  display: none;
  margin-top: 28px;
  background: var(--lock-light);
  border: 1px solid #f0dca8;
  border-radius: 14px;
  padding: 22px 24px;
}
#upgradeBlock h3 { margin: 0 0 6px; font-size: 17px; color: var(--lock); }
#upgradeBlock p { margin: 0 0 14px; font-size: 14px; color: #6b4a10; line-height: 1.6; }
.upgrade-steps { font-size: 13px; color: #6b4a10; margin: 0 0 16px; padding-left: 18px; line-height: 1.8; }
.contact-btn {
  display: inline-block;
  background: var(--lock);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 10px;
}

.premium-badge {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 20px;
}

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
