:root {
  --ink: #18130f;
  --muted: #6f5f52;
  --paper: #fffaf3;
  --paper-2: #f2e4d2;
  --line: #e5d3bf;
  --brand: #9a4508;
  --brand-dark: #733006;
  --brand-soft: #f3dfc8;
  --cocoa: #2c1b12;
  --cream: #fff6ea;
  --shadow: 0 22px 60px rgba(30, 22, 15, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 15% 14%, rgba(154, 69, 8, 0.18), transparent 28%),
    radial-gradient(circle at 92% 6%, rgba(44, 27, 18, 0.12), transparent 34%),
    linear-gradient(145deg, #fff6ea 0%, #f0dfcb 50%, #dbc0a1 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-width: 320px;
}

button,
input,
textarea {
  font: inherit;
}

.feedback-shell {
  min-height: 100vh;
  padding: 12px;
}

.feedback-card {
  background: var(--paper);
  border: 1px solid rgba(122, 95, 67, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 560px;
  overflow: hidden;
  position: relative;
}

.feedback-card::before {
  background:
    linear-gradient(90deg, var(--brand-dark) 0 38%, #f2d4a6 38% 44%, var(--brand) 44% 100%);
  content: "";
  display: block;
  height: 8px;
}

.feedback-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(154, 69, 8, 0.98), rgba(112, 48, 7, 0.96)),
    var(--brand);
  color: var(--cream);
  display: grid;
  gap: 20px;
  grid-template-columns: 132px 1fr;
  min-height: 158px;
  padding: 18px;
}

.logo-frame {
  background: var(--brand);
  border: 1px solid rgba(255, 246, 234, 0.28);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(44, 27, 18, 0.22);
  overflow: hidden;
}

.logo-frame img {
  aspect-ratio: 1;
  display: block;
  height: auto;
  width: 100%;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  color: #f4d7ac;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.feedback-hero h1 {
  font-size: clamp(30px, 7vw, 46px);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
  max-width: 320px;
}

.feedback-hero p:not(.hero-eyebrow) {
  color: rgba(255, 246, 234, 0.8);
  font-weight: 700;
  line-height: 1.35;
  margin: 10px 0 0;
}

.feedback-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.form-section {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.soft-section {
  background: #fbf1e4;
}

.question-title {
  align-items: center;
  display: flex;
  gap: 10px;
}

.question-title span {
  align-items: center;
  background: var(--brand);
  border-radius: 999px;
  color: var(--cream);
  display: flex;
  flex: 0 0 28px;
  font-size: 13px;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.question-title h2 {
  font-size: 17px;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}

.rating-row,
.choice-row,
.chip-row {
  display: grid;
  gap: 8px;
}

.rating-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.choice-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chip-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rating-row input,
.choice-row input,
.chip-row input {
  opacity: 0;
  position: absolute;
}

.rating-row span,
.choice-row span,
.chip-row span {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 8px;
  text-align: center;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.rating-row span {
  font-size: 20px;
}

.rating-row input:checked + span,
.choice-row input:checked + span,
.chip-row input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: translateY(-1px);
}

.choice-row input:checked + span {
  background: var(--cocoa);
  border-color: var(--cocoa);
}

.conditional-question[hidden],
.thanks-panel[hidden],
.review-prompt[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field textarea {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(154, 69, 8, 0.14);
}

.field textarea {
  min-height: 76px;
  resize: vertical;
}

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

.submit-btn {
  background: var(--cocoa);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(44, 27, 18, 0.24);
  color: var(--cream);
  cursor: pointer;
  font-weight: 950;
  min-height: 50px;
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.feedback-status {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  min-height: 18px;
}

.thanks-panel {
  display: grid;
  gap: 10px;
  padding: 34px 22px;
  text-align: center;
}

.thanks-panel strong {
  color: var(--brand);
  font-size: 30px;
  line-height: 1;
}

.thanks-panel p {
  color: var(--muted);
  margin: 0;
}

.review-prompt {
  align-items: center;
  background: rgba(24, 19, 15, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 10;
}

.review-prompt-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(24, 19, 15, 0.34);
  display: grid;
  gap: 14px;
  max-width: 390px;
  padding: 24px;
  text-align: center;
  width: 100%;
}

.review-prompt-card strong {
  color: var(--brand);
  font-size: 30px;
  line-height: 1;
}

.review-prompt-card p {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}

.review-prompt-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 4px;
}

.review-primary-btn,
.review-secondary-btn {
  border-radius: 8px;
  cursor: pointer;
  font-weight: 950;
  min-height: 46px;
}

.review-primary-btn {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: var(--cream);
}

.review-secondary-btn {
  background: #fffdf8;
  border: 1px solid var(--line);
  color: var(--ink);
}

@media (max-width: 560px) {
  .feedback-shell {
    padding: 8px;
  }

  .feedback-hero {
    align-items: stretch;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 16px;
  }

  .logo-frame {
    justify-self: start;
    width: 104px;
  }

  .feedback-form {
    padding: 12px;
  }

  .choice-row,
  .chip-row,
  .contact-grid,
  .review-prompt-actions {
    grid-template-columns: 1fr;
  }
}
