:root {
  --bg: #ffffff; --ink: #111827; --muted: #6b7280;
  --accent: #7c3aed; --accent-hover: #6d28d9; --surface: #f5f3ff;
  --border: #e0e7ff; --success: #16a34a; --danger: #dc2626;
  --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a; --ink: #e2e8f0; --muted: #94a3b8;
    --accent: #8b5cf6; --accent-hover: #a78bfa; --surface: #1e1b4b;
    --border: #312e81;
  }
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
a { color: var(--accent); }
.hero { text-align: center; padding: 4rem 1rem 2rem; }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.2; }
.hero p { color: var(--muted); max-width: 600px; margin: 0 auto 1.5rem; font-size: 1.125rem; }
.privacy-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: #f5f3ff; color: #7c3aed; padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem; }
@media (prefers-color-scheme: dark) { .privacy-badge { background: #1e1b4b; } }
.cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: var(--radius); font-weight: 600; text-decoration: none; cursor: pointer; border: none; font-size: 1rem; transition: background 0.15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--border); }
nav .logo { font-weight: 800; font-size: 1.1rem; color: var(--accent); text-decoration: none; }
nav .nav-links { display: flex; gap: 1rem; }
nav .nav-links a { color: var(--ink); text-decoration: none; font-size: 0.9rem; }
nav .nav-links a:hover { color: var(--accent); }

section { padding: 2rem 0; border-top: 1px solid var(--border); }
section h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.features ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.features li::before { content: '\2713 '; color: var(--success); font-weight: bold; }
.comparison-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.comparison-table th, .comparison-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
.comparison-table th { background: var(--surface); font-weight: 600; }
.comparison-table tr:nth-child(even) { background: var(--surface); }
.faq-item { margin-bottom: 1rem; padding: 0.75rem; background: var(--surface); border-radius: var(--radius); }
footer { text-align: center; padding: 2rem 0; color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--border); margin-top: 2rem; }

/* App Mode */
.app-mode { display: none; }
.app-mode.active { display: flex; flex-direction: column; min-height: 100vh; }
.landing-mode.hidden { display: none; }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.app-header h1 { font-size: 1.125rem; font-weight: 700; }
.app-header .cta-buttons { gap: 0.5rem; }
.app-header .btn { padding: 0.4rem 0.75rem; font-size: 0.875rem; }
.app-layout { display: flex; flex: 1; overflow: hidden; }
@media (max-width: 768px) { .app-layout { flex-direction: column; } }

.sidebar { width: 320px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; padding: 1rem; background: var(--surface); }
@media (max-width: 768px) { .sidebar { width: 100%; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--border); } }
.sidebar h3 { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.75rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--muted); }
.form-group input, .form-group select { width: 100%; padding: 0.5rem 0.625rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--ink); font-size: 0.95rem; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }
.error-msg { font-size: 0.75rem; color: var(--danger); margin-top: 0.25rem; }

.preview-area { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; align-items: center; }
.preview-label { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; width: 100%; max-width: 500px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); text-align: center; }
.preview-label canvas, .preview-label svg { max-width: 100%; height: auto; }
.preview-label .label-size-hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }

.actions { margin-top: 1rem; display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.status { margin-top: 0.75rem; padding: 0.5rem 1rem; border-radius: var(--radius); font-size: 0.875rem; }
.status.loading { background: var(--surface); color: var(--accent); }
.status.error { background: #fef2f2; color: var(--danger); }
.status.success { background: #f0fdf4; color: var(--success); }

/* Batch preview grid */
.batch-preview { display: grid; gap: 4px; padding: 0.5rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); max-width: 100%; }
.batch-preview canvas { image-rendering: pixelated; }

/* Nav link in hero */
.nav-cta { display: inline-block; margin-bottom: 1rem; }
