* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.8;
  color: #222;
  background: #fff;
}
.site-header, main, .site-footer { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.site-header { border-bottom: 1px solid #ccc; }
.site-header .logo { display: block; height: 38px; width: auto; margin-top: 16px; }
.site-header h1 { font-size: 1.2rem; margin: 8px 0 12px; }
.site-footer { border-top: 1px solid #ccc; margin-top: 40px; font-size: 0.85rem; color: #555; }
main { padding-top: 16px; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; margin: 20px 0 4px; }

table { border-collapse: collapse; width: 100%; margin: 12px 0; }
th, td { border: 1px solid #bbb; padding: 6px 8px; text-align: left; }
caption { text-align: left; margin-bottom: 4px; }
td:not(:first-child), th:not(:first-child) { text-align: center; white-space: nowrap; }

button { font: inherit; cursor: pointer; }
button.primary {
  display: block; width: 100%; max-width: 320px; margin: 20px 0;
  padding: 10px 16px; border: 1px solid #333; border-radius: 6px; background: #f4f4f4;
}
button.primary:disabled { cursor: default; color: #999; border-color: #ccc; }
button.link { border: none; background: none; padding: 0; text-decoration: underline; color: #333; }

.status, .source, .note { color: #555; font-size: 0.9rem; }
.quiz-head { display: flex; justify-content: space-between; border-bottom: 1px solid #ccc; padding-bottom: 4px; }
.stem { white-space: pre-wrap; margin: 12px 0; }
#q-image { display: block; max-width: 100%; margin: 8px 0 12px; }

.choices { list-style: none; padding: 0; margin: 0; }
.choices li { margin: 8px 0; }
.choices button {
  display: flex; gap: 8px; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid #bbb; border-radius: 6px; background: #fff;
  white-space: pre-wrap;
}
.choices button:disabled { cursor: default; color: inherit; }
.choices .num { flex: none; }
.choices .text { flex: 1; }
.choices .mark { flex: none; margin-left: auto; padding-left: 8px; }
.choices button.chosen { border: 2px solid #333; }

.feedback { border-top: 1px solid #ccc; margin-top: 16px; }
.result { font-size: 1.1rem; margin-bottom: 0; }
.lawnote { border: 1px solid #bbb; padding: 8px 10px; font-size: 0.9rem; }
#q-explanation { white-space: pre-wrap; }
.quit { margin-top: 32px; font-size: 0.9rem; }

.verdict { font-size: 1.3rem; }
