:root {
  --sand: #f6f1e9;
  --card: #fffdf9;
  --ink: #2b2420;
  --muted: #6b5f57;
  --line: #e4d9cb;
  --accent: #b5532f;
  --accent-dark: #8f3f22;
  --focus: #1f6f78;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(246, 241, 233, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
}

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

.langs button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.langs button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--sand);
  border-color: var(--ink);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 18px 80px;
}

.card, .question {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  margin: 0 0 18px;
}

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.2;
  margin: 0 0 12px;
}

h1 { font-size: 2.3rem; }
h2 { font-size: 1.35rem; margin-top: 24px; }

.subtitle { color: var(--muted); font-size: 1.1rem; margin: 0; }

.consent p { margin: 0 0 12px; }

.consent .note {
  border-left: 4px solid var(--accent);
  padding-left: 14px;
}

.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 20px 0;
  font-weight: 600;
  cursor: pointer;
}

.agree input { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--accent); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover:not(:disabled) { background: var(--accent-dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.question { border: 1px solid var(--line); }

.question legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 1.05rem;
}

.question legend + * { clear: both; }

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--accent-dark);
  font-size: 0.85rem;
}

.hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }

.option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  cursor: pointer;
}

.option input { margin-top: 6px; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }

input[type="text"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

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

.other { margin: 4px 0 0 27px; width: calc(100% - 27px); }

.scale { display: flex; gap: 8px; flex-wrap: wrap; }

.scale label {
  flex: 1;
  min-width: 48px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 0;
  cursor: pointer;
  font-weight: 600;
}

.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale label:has(input:checked) { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.scale label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.scale-ends {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.submit-row { text-align: center; margin-top: 8px; }
.status { min-height: 1.5em; color: var(--muted); margin-top: 12px; }

@media (max-width: 520px) {
  h1 { font-size: 1.9rem; }
  .card, .question { padding: 22px 18px; }
  .top { padding: 10px 14px; }
  .brand { font-size: 0.95rem; }
  .langs button { padding: 4px 9px; }
}
