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

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --accent: #c8102e;
  --accent-hover: #a30d25;
  --accent-subtle: rgba(200,16,46,0.07);
  --success: #059669;
  --error: #dc2626;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-left { display: flex; align-items: center; gap: 16px; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); text-decoration: none;
  font-size: 13px;
}
.back-link svg { width: 16px; height: 16px; fill: currentColor; }
.back-link:hover { color: var(--text); }

.app-title { font-size: 14px; font-weight: 600; color: var(--text-muted); }

.header-right { display: flex; align-items: center; gap: 10px; }

.help-link {
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.help-link:hover { border-color: rgba(200,16,46,0.35); }
.help-link.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ── Help Slide-Out Panel ─────────────────────────────────────────── */
.help-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px;
  max-width: 100vw;
  background: #fff; z-index: 1000;
  transform: translateX(100%); transition: transform 0.25s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  display: flex; flex-direction: column;
}
.help-panel.open { transform: translateX(0); }
.help-panel-header {
  padding: 14px 16px; font-size: 14px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.help-panel-header button {
  background: none; border: none; cursor: pointer; font-size: 22px;
  color: #888; padding: 2px 8px; border-radius: 4px; line-height: 1;
}
.help-panel-header button:hover { background: #eee; color: #333; }
.help-panel iframe { flex: 1; width: 100%; border: none; }

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 28px 64px;
}

h1 {
  font-size: 32px; font-weight: 800; letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.lede {
  font-size: 15px; color: var(--text-muted); line-height: 1.55;
  margin-bottom: 28px;
}

.dropzone {
  background: var(--surface);
  border: 2px dashed rgba(0,0,0,0.18);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.dropzone-inner { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.dropzone-inner strong { font-size: 16px; }
.dropzone-hint { font-size: 13px; color: var(--text-muted); }
.dropzone-file {
  margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent);
}

.status {
  margin-top: 18px; font-size: 13px; min-height: 18px;
}
.status.error { color: var(--error); }
.status.ok { color: var(--success); }

.email-list {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}
.email-list h2 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  margin-bottom: 10px;
}
.campaign-line {
  font-size: 14px; color: var(--text); margin-bottom: 12px;
}
.campaign-line strong { color: var(--text-muted); margin-right: 6px; font-weight: 600; }
.email-list ol {
  margin: 0; padding-left: 22px;
  font-size: 14px; line-height: 1.7;
}

.primary-btn {
  margin-top: 28px;
  display: block; width: 100%;
  padding: 14px 24px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fff; background: var(--accent);
  border: none; border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.primary-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.primary-btn:disabled {
  background: #c4c4c4; cursor: not-allowed;
}
