* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: #f3f6fb;
  color: #1f2937;
}

.container {
  max-width: 980px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  padding: 28px;
}

h1, h2, h3 {
  margin-top: 0;
  color: #0f172a;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.nav-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
}

a.link-muted {
  color: #94a3b8;
}

a.link-muted:hover {
  color: #64748b;
}

.card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
  background: #fcfdff;
}

label {
  display: block;
  margin-bottom: 10px;
}

input, select, textarea, button {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  margin-top: 6px;
}

textarea {
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
}

button {
  border: none;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  min-width: 120px;
}

button:hover {
  background: #1d4ed8;
}

button.button-secondary {
  background: #64748b;
}

button.button-secondary:hover {
  background: #475569;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hint {
  color: #64748b;
  font-size: 13px;
  margin-top: 0;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th, td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
}

.message-success {
  color: #047857;
  font-weight: 600;
}

.message-error {
  color: #b91c1c;
  font-weight: 600;
}

.alert {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  line-height: 1.6;
}

.alert strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.alert-detail {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
}

fieldset {
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  margin-top: 14px;
  padding: 12px;
}

legend {
  font-weight: 700;
  padding: 0 6px;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
}

.radio-row input {
  width: auto;
  margin: 0;
}

.section-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-jump-list a {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.survey-section {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 2px solid #cbd5e1;
}

.survey-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.survey-section-title {
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
}

.section-top-link {
  font-size: 13px;
  white-space: nowrap;
}

.branch-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.question-block.is-branch {
  border-color: #93c5fd;
  background: #f8fbff;
}

.question-block.is-disabled {
  opacity: 0.55;
  background: #f1f5f9;
  border-color: #cbd5e1;
  pointer-events: none;
}

.question-block.is-disabled legend {
  color: #64748b;
}

.disabled-note {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
}

tr.is-selected td {
  background: #eff6ff;
}
