:root {
  color-scheme: light;
  --bg: #f5efe6;
  --bg-accent: #fdf8f0;
  --ink: #1d1c1a;
  --muted: #5d5853;
  --brand: #e0583e;
  --brand-dark: #b93f2a;
  --panel: #fffaf3;
  --line: rgba(29, 28, 26, 0.12);
  --shadow: 0 18px 50px rgba(29, 28, 26, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
}

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

body {
  font-family: "Space Grotesk", "Newsreader", serif;
  background: radial-gradient(circle at 10% 20%, #fffaf1 0%, transparent 40%),
    radial-gradient(circle at 80% 0%, #ffe6d9 0%, transparent 45%),
    linear-gradient(180deg, #f4ede4 0%, #f8f2ea 100%);
  color: var(--ink);
  min-height: 100vh;
  padding: 48px 20px 80px;
}

.app {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.hero-text {
  background: var(--bg-accent);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 12px;
}

h1 {
  font-family: "Newsreader", serif;
  font-size: clamp(2.1rem, 3vw, 3.1rem);
  line-height: 1.1;
  margin-bottom: 16px;
}

.subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-card {
  background: var(--ink);
  color: #fff8ee;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 20px;
  box-shadow: var(--shadow);
}

.card-top span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 248, 238, 0.7);
}

.card-top strong {
  display: block;
  font-size: 1.4rem;
  margin-top: 10px;
}

.card-body ol {
  list-style: none;
  display: grid;
  gap: 12px;
}

.card-body li {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.panel {
  background: var(--panel);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
}

.panel-title h2 {
  font-family: "Newsreader", serif;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.panel-title p {
  color: var(--muted);
}

.file-drop {
  border: 2px dashed rgba(29, 28, 26, 0.3);
  border-radius: var(--radius-md);
  padding: 26px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  background: #fff3e7;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.file-drop:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.file-drop input {
  display: none;
}

.file-drop-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.file-drop-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.form-grid input,
.form-grid select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1rem;
}

.toggle-row {
  display: flex;
  gap: 10px;
}

.toggle-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(224, 88, 62, 0.4);
  background: transparent;
  color: var(--brand);
  font-weight: 700;
}

.toggle-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.span-2 {
  grid-column: span 2;
}

.notice {
  background: #fff1e2;
  border: 1px solid rgba(29, 28, 26, 0.1);
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: none;
  cursor: pointer;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 1rem;
}

.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 30px rgba(224, 88, 62, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.primary:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid rgba(224, 88, 62, 0.4);
}

.status {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 10px 0 0;
}

.preview {
  min-height: 160px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: #1b1a18;
  color: #fbeedc;
  font-size: 0.9rem;
  overflow: auto;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  body {
    padding: 24px 16px 60px;
  }

  .panel,
  .hero-text,
  .hero-card {
    padding: 22px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
}
