:root {
  --bg: #f6f5f1;
  --card-bg: #ffffff;
  --border: #e4e1d8;
  --text: #2c2a26;
  --text-muted: #6b675e;
  --accent: #3a6f66;
  --accent-dark: #2c554d;
  --star: #d9a441;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
}

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

.page-header {
  text-align: center;
  margin-bottom: 24px;
}

.clinic-name {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.page-header h1 {
  font-size: 22px;
  margin: 0 0 12px;
}

.lead {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

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

.question-block label.q-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.question-block .q-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.star-row {
  display: flex;
  gap: 6px;
}

.star-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfaf7;
  font-size: 22px;
  color: var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.05s ease;
}

.star-btn:active { transform: scale(0.95); }

.star-btn.filled {
  color: var(--star);
  border-color: var(--star);
  background: #fdf6e8;
}

.q-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  background: #fbfaf7;
}

.q-textarea:focus, .star-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn-primary {
  width: 100%;
  margin-top: 28px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

#thanks-view {
  text-align: center;
}

.thanks-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#thanks-view h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.review-invite {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

.error-msg {
  color: #a33;
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
}
