* { box-sizing: border-box; }

:root {
  color: #342c22;
  background: #f7f3ea;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

body { margin: 0; }

button, input, textarea { font: inherit; }

.app-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 32px auto 48px;
}

.hero {
  margin-bottom: 16px;
  padding: 32px;
  border-radius: 20px;
  color: #fffaf1;
  background: linear-gradient(135deg, #76543a, #9a6542);
}

.hero h1 { margin: 6px 0 8px; font-size: clamp(2rem, 7vw, 4rem); }
.hero-subtitle { max-width: 650px; margin: 0; font-size: clamp(1.05rem, 3vw, 1.35rem); }

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 800;
}

.notice {
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid #d8b96e;
  border-radius: 12px;
  background: #fff4c9;
  color: #5d4a20;
}

.panel {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid #ddd3bd;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(84, 62, 38, 0.06);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2, .panel h2 { margin: 0; }

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

label { display: grid; gap: 7px; margin-bottom: 16px; font-weight: 700; }

input, textarea {
  width: 100%;
  border: 1px solid #bbaF95;
  border-radius: 8px;
  padding: 11px 12px;
  color: inherit;
  background: #fffdf8;
}

input:focus, textarea:focus, button:focus-visible {
  outline: 3px solid rgba(72, 107, 88, 0.25);
  outline-offset: 2px;
}

textarea { resize: vertical; }

button {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: #a44f28;
}

button:disabled { cursor: wait; opacity: 0.58; }

.primary-button { min-width: 150px; }
.secondary-button { background: #486b58; }
.status { min-height: 24px; margin: 14px 0 0; }
.helper-text { color: #766d60; }

.results { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.results .panel { height: 100%; }

.empty-state { color: #766d60; }

.text-cards { display: grid; gap: 12px; }
.text-card {
  padding: 14px;
  border: 1px solid #e8dfcb;
  border-radius: 10px;
  background: #fffdf8;
}
.text-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.text-card-heading h3 { margin: 0; font-size: 1rem; }
.text-card-heading button { padding: 7px 10px; background: #486b58; }
.text-card p { margin: 10px 0 0; white-space: pre-wrap; line-height: 1.55; }

.image-panel { min-height: 280px; }
.image-result { margin-top: 16px; }
.image-result img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 10px;
  background: #f2eee4;
}
.image-result .download { margin-top: 12px; }

.landing-preview {
  grid-column: 1 / -1;
  text-align: center;
  background: #f1dfb8;
}
.landing-preview h2 { margin: 8px 0 4px; }
.landing-preview #preview-product { font-weight: 800; }
.landing-preview #preview-offer { font-size: 1.05rem; }

footer {
  padding: 20px;
  text-align: center;
  color: #fdf8ed;
  background: #4d3a2b;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .app-shell { width: min(100% - 20px, 1080px); margin-top: 10px; }
  .hero, .panel { padding: 20px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .section-heading button { width: 100%; }
  .field-grid, .results { grid-template-columns: 1fr; }
  .landing-preview { grid-column: auto; }
  .text-card-heading { align-items: flex-start; }
}
