:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1f2320;
  --muted: #6b7168;
  --accent: #2f6f4f;
  --border: #ddded8;
  --error: #b3423a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
}

header {
  background: var(--accent);
  color: #fff;
  padding: 1.5rem 1rem;
}

header h1 { margin: 0 0 0.25rem; font-size: 1.4rem; }
header p { margin: 0; opacity: 0.9; font-size: 0.95rem; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

.script-box {
  background: #fff8e6;
  border: 1px solid #e8d38c;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.section h2 {
  margin-top: 0;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.field { margin: 1.1rem 0; }
.field-label { display: block; font-weight: 600; margin-bottom: 0.4rem; }

.note {
  background: #eef4ef;
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.note-tag {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.intro-note { font-style: italic; }

.options { display: flex; flex-direction: column; gap: 0.4rem; }
.option-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.option-row label { cursor: pointer; }

.other-text {
  flex: 1 1 180px;
  min-width: 140px;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.other-text:disabled { background: #f0f0ee; }

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.scale-options { display: flex; gap: 1rem; }
.scale-option { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }

table.rating-grid { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.9rem; }
table.rating-grid th, table.rating-grid td { text-align: center; padding: 0.4rem 0.2rem; }
table.rating-grid .rating-item-label { text-align: left; font-weight: 500; }
table.rating-grid tbody tr:nth-child(odd) { background: #fafaf8; }

.text-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

button[type="submit"] {
  display: block;
  width: 100%;
  padding: 0.9rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
button[type="submit"]:hover { opacity: 0.92; }

.status { margin-top: 1rem; text-align: center; font-weight: 600; min-height: 1.2em; }
.status.error { color: var(--error); }
.status.success { color: var(--accent); }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1rem;
}
