:root {
  --font-sans: "Plus Jakarta Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  --bg-top: #f7f4ea;
  --bg-bottom: #eee7d5;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #111827;
  --text-muted: #374151;
  --border: #d7deea;
  --header-start: #5e4600;
  --header-end: #8c6a03;
  --brand-gold: #7b5d00;
  --brand-gold-hover: #5e4600;
  --danger: #b3261e;
  --success: #1e7a3a;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 44px rgba(23, 49, 79, 0.12);
}

* {
  box-sizing: border-box;
}

body.page-ui {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
  line-height: 1.5;
}

.brand-top {
  padding: 1.4rem 1rem 0;
  display: flex;
  justify-content: center;
}

.brand-top img {
  width: 10rem;
  max-width: 10rem;
  height: auto;
  display: block;
}

.card,
main.site-main {
  width: min(960px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.header,
.page-header {
  padding: 1.25rem 1.5rem;
  color: #fff;
  background: linear-gradient(110deg, var(--header-start), var(--header-end));
  text-align: center;
}

.header img,
.page-header img {
  max-width: 260px;
  width: 100%;
  height: auto;
  display: block;
}

.header h1,
.page-header h1 {
  margin: 0.7rem 0 0;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.2;
}

.header p,
.page-header p,
.page-subtitle {
  margin: 0.45rem 0 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92);
}

form {
  padding: 1.35rem 1.5rem 1.6rem;
  display: grid;
  gap: 14px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(123, 93, 0, 0.16);
}

.small {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

button,
.btn {
  border: 0;
  background: var(--brand-gold);
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover,
.btn:hover {
  background: var(--brand-gold-hover);
}

button:disabled,
.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.btn-secondary {
  background: #6b7280;
}

.btn-secondary:hover {
  background: #4b5563;
}

.msg {
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.msg.error {
  color: var(--danger);
}

.msg.success {
  color: var(--success);
}

.reviews {
  margin: 0 1.5rem 1.4rem;
  padding: 1.35rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
}

.reviews-shell {
  margin-top: 1.25rem;
}

.reviews-shell .reviews {
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 1.5rem 1.6rem 1.5rem;
}

.reviews h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reviews-carousel {
  overflow: hidden;
}

.reviews-track {
  position: relative;
  min-height: 180px;
}

.reviews-track .review-card {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  padding: 1rem 1rem 0.9rem;
}

.reviews-track .review-card.active {
  opacity: 1;
  pointer-events: auto;
}

.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 6px;
}

.reviews-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: #c7cfda;
  cursor: pointer;
  padding: 0;
}

.reviews-dots .dot.active {
  background: var(--brand-gold);
}

.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.review-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.review-name {
  font-weight: 700;
  color: #222;
  display: inline-block;
  max-width: 100%;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(123, 93, 0, 0.14);
  color: #6b5100;
  border: 1px solid rgba(123, 93, 0, 0.28);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.review-rating {
  color: #8f6c00;
  font-weight: 700;
  white-space: nowrap;
}

.review-text {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: #1f2937;
  line-height: 1.62;
}

.review-date {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.review-photo-count {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.review-media {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.review-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.reviews-link {
  display: inline-block;
  margin-top: 0.7rem;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.reviews-link:hover {
  text-decoration: underline;
}

.reviews-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 0.7rem;
}

.content-wrap {
  padding: 1.5rem;
  text-align: center;
}

.question,
.thank-you,
.form-section {
  margin-bottom: 1.8rem;
}

.section-copy {
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 1.2rem;
}

.qr-code img {
  max-width: 280px;
  width: 55%;
  min-width: 180px;
  height: auto;
  display: block;
  margin: 0.75rem auto 0;
}

.feedback-input {
  width: min(700px, 88%);
  min-height: 130px;
  margin: 0 auto;
  display: block;
}

#feedbackForm {
  padding: 0;
  display: block;
}

.inline-link {
  color: #1e3a5f;
  text-decoration: underline;
  word-break: break-all;
}

.hidden {
  display: none;
}

@media (max-width: 700px) {
  .row,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .card,
  main.site-main {
    width: calc(100% - 1rem);
    margin: 1rem auto;
  }

  form,
  .content-wrap {
    padding: 1rem;
  }

  .reviews {
    margin: 0 1rem 1rem;
  }

  .reviews-shell .reviews {
    margin: 0;
    padding: 1rem;
  }

  .reviews-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  button,
  .btn {
    width: 100%;
    margin: 0.4rem 0;
  }

  .actions {
    gap: 6px;
  }
}
