:root { --accent: #b4475a; --text: #222; --muted: #666; --line: #ddd; --tint: #f6f6f6; }
body { font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; line-height: 1.8; margin: 0; color: var(--text); }
main, footer, .site { max-width: 40rem; margin: 0 auto; padding: 1rem; }
.site { padding-bottom: 0; }
.site-name { margin: 0; font-weight: 700; }
.site-name a { color: var(--text); text-decoration: none; }
footer { color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--line); }
h1 { line-height: 1.3; }
a { color: var(--accent); }
.tagline { font-size: 1.125rem; }
.button, button, input[type=submit] { display: inline-block; padding: 0.5rem 1.25rem; border: 0; border-radius: 0.375rem; background: var(--accent); color: #fff; font: inherit; text-decoration: none; cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.25rem 0.5rem; border-bottom: 1px solid var(--line); }
.notice, .alert { padding: 0.5rem; background: var(--tint); border-left: 4px solid var(--muted); }
.alert { border-left-color: var(--accent); }
.field { margin-bottom: 0.75rem; }
.field label { display: block; font-weight: 600; }
.field input[type=text], .field input[type=number], .field textarea { width: 100%; padding: 0.25rem; }
.field_with_errors input, .field_with_errors textarea { border: 1px solid var(--accent); }
#error_explanation { border: 1px solid var(--accent); padding: 0.5rem 1rem; margin-bottom: 1rem; }
form.button_to { display: inline; }
[hidden] { display: none !important; }

/* The questionnaire (assessments/new) */
.consent { padding: 0.75rem 1rem; margin-bottom: 1.5rem; background: var(--tint); border-radius: 0.375rem; }
.consent-label { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 600; }
.consent-label input { margin-top: 0.45rem; flex: none; }
.consent .note { color: var(--muted); font-size: 0.875rem; }
.attributes .field select { width: 100%; max-width: 20rem; padding: 0.25rem; font: inherit; }
.prompt { font-size: 1.125rem; margin-top: 2rem; }
.progress { color: var(--muted); font-weight: 600; margin: 1.5rem 0 0; }
.question { border: 1px solid var(--line); border-radius: 0.375rem; margin: 0 0 1rem; padding: 0.75rem 1rem 1rem; }
.question legend { font-weight: 600; padding: 0 0.25rem; }
.question.is-missing { border: 2px solid var(--accent); background: #fdf3f5; }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; margin-top: 0.5rem; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.25rem 0.125rem; text-align: center; font-size: 0.75rem; line-height: 1.4; border-radius: 0.25rem; cursor: pointer; }
.choice:hover { background: var(--tint); }
.choice input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--accent); }
.choice-na { grid-column: 1 / -1; flex-direction: row; justify-content: center; margin-top: 0.25rem; border-top: 1px dashed var(--line); padding-top: 0.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.actions .back { background: #fff; color: var(--accent); border: 1px solid var(--accent); margin-right: auto; }
@media (max-width: 36rem) {
  .scale { grid-template-columns: 1fr; gap: 0; }
  .choice, .choice-na { flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.75rem; padding: 0.5rem 0.25rem; text-align: left; font-size: 0.9375rem; }
  .choice + .choice { border-top: 1px solid var(--tint); }
  .choice-na { border-top: 1px dashed var(--line); margin-top: 0.25rem; }
}

/* The result page (results/show) */
.kicker { color: var(--muted); font-weight: 600; margin-bottom: 0; }
.profile-ja { display: block; font-size: 1.25rem; color: var(--muted); }
.shape-name { color: var(--accent); font-weight: 600; margin-top: -0.5rem; }
.top { padding-left: 1.5rem; }
.top-score { font-weight: 700; color: var(--accent); margin-left: 0.5rem; }
.insufficient { padding: 0.75rem 1rem; background: var(--tint); border-radius: 0.375rem; }
.chart { margin: 1rem 0; padding: 0 2.5rem; }
.radar { display: block; width: 100%; max-width: 26rem; height: auto; margin: 0 auto; overflow: visible; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-value { fill: var(--accent); fill-opacity: 0.25; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.radar-label { fill: var(--text); font-size: 15px; }
.scores td.score { font-weight: 700; }
.scores thead th { white-space: nowrap; }
.scores th .summary { display: block; font-weight: normal; font-size: 0.875rem; color: var(--muted); }
.notes { margin-top: 2rem; font-size: 0.9375rem; color: var(--muted); }
.versions { font-size: 0.875rem; }
.share-url { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.share-url label { flex-basis: 100%; font-weight: 600; }
.share-url input { flex: 1; min-width: 12rem; padding: 0.375rem; font: inherit; border: 1px solid var(--line); border-radius: 0.25rem; }
.share-links { display: flex; gap: 1rem; }
.save-note { font-size: 0.9375rem; color: var(--muted); }
.delete { margin-top: 2rem; }
.delete-note { font-size: 0.9375rem; color: var(--muted); }
.again { margin-top: 2rem; text-align: center; }
.delete .danger { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
