:root {
  color-scheme: dark;
  --paper: #10100f;
  --paper-deep: #181816;
  --surface: #141413;
  --surface-soft: #1c1b19;
  --ink: #f3efe7;
  --muted: #a7a197;
  --line: #34312d;
  --accent: #c5a176;
  --danger: #ff8b8b;
  --ok: #8bc9a8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
.serif {
  font-family: Didot, "Bodoni 72", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--accent);
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.page-wide {
  max-width: 1080px;
}

.hero h1 {
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.02;
  margin: 14px 0 16px;
}

.hero p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 6px;
  font-size: 14px;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

/* ---------- survey ---------- */

.question {
  margin: 0 0 30px;
}

.question-index {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.question-index .req {
  color: var(--danger);
  margin-left: 4px;
}

.question-title {
  font-size: 17px;
  font-weight: 700;
  margin: 6px 0 2px;
}

.question-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.stars {
  display: flex;
  gap: 6px;
}

.star {
  background: none;
  border: none;
  padding: 4px;
  font-size: 34px;
  line-height: 1;
  color: var(--line);
  transition: color 120ms ease, transform 120ms ease;
}

.star:active {
  transform: scale(1.15);
}

.star.filled {
  color: var(--accent);
}

.star:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.stars-value {
  align-self: center;
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  min-width: 3ch;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 15px;
}

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

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

::placeholder {
  color: #6f6a61;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

.question.invalid .field-error {
  display: block;
}

.question.invalid .stars .star:not(.filled) {
  color: #5a3a3a;
}

.submit-button {
  width: 100%;
  background: var(--accent);
  color: #17130d;
  border: none;
  border-radius: 999px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: opacity 120ms ease;
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin: 14px 0 0;
  display: none;
}

.form-error.visible {
  display: block;
}

/* ---------- thanks ---------- */

.thanks {
  display: none;
  text-align: center;
  padding: 24vh 0 0;
}

.thanks h2 {
  font-size: clamp(36px, 10vw, 56px);
  margin: 16px 0 18px;
}

.thanks p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

body.submitted .thanks {
  display: block;
}

body.submitted .survey {
  display: none;
}

/* ---------- admin ---------- */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.topbar .who {
  color: var(--muted);
  font-size: 13px;
}

.topbar a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0 28px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.metric .label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.metric .value {
  font-family: Didot, "Bodoni 72", Georgia, serif;
  font-size: 30px;
  margin-top: 6px;
}

.metric .stars-small {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.feedback-list {
  display: grid;
  gap: 14px;
}

.feedback-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}

.feedback-card .head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 10px;
}

.feedback-card .guest {
  font-weight: 700;
}

.feedback-card .date {
  color: var(--muted);
  font-size: 12px;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 16px;
  font-size: 13px;
  color: var(--muted);
}

.rating-grid b {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.feedback-card .comment {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.7;
}

.feedback-card .comment .label {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin-bottom: 2px;
}

.feedback-card .email {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 60px 0;
  font-size: 14px;
}

.load-more {
  margin: 24px auto 0;
  display: block;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 28px;
  font-size: 14px;
}

.load-more:hover {
  border-color: var(--accent);
}
