/* Monochrome, framework-free layout. */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  color: #171717;
  background: #fff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, summary:focus-visible { outline: 2px solid #333; outline-offset: 3px; }
.hidden { display: none !important; }
.container { width: min(100% - 40px, 630px); margin: 0 auto; padding: 64px 0 50px; }
.page-header { margin-bottom: 36px; }
h1 { margin: 0 0 8px; font-size: clamp(26px, 5vw, 34px); line-height: 1.5; font-weight: 700; }
.game p { font-size: 14px; line-height: 1.9; color: #525252; }
.game { border-top: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9; padding: 32px 0; min-height: 250px; }
.game h2 { margin: 0 0 12px; font-size: clamp(20px, 4vw, 25px); font-weight: 650; line-height: 1.6; }
.game p { margin: 0 0 23px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 20px; border: 1px solid #222; border-radius: 3px; font-weight: 600; font-size: 14px; background: #fff; color: #222; }
.button:hover:not(:disabled) { background: #eee; }
.button-primary { background: #222; color: #fff; }
.button-primary:hover:not(:disabled) { background: #444; }
.button-secondary { background: #fff; }
.question-header { display: flex; justify-content: space-between; color: #666; font-size: 12px; margin-bottom: 22px; }
#question-text { margin-bottom: 10px; }
#question-help.help { color: #777; font-size: 12px; min-height: 28px; margin-bottom: 30px; }
.answers { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.answers .button { width: 100%; }
.answer-yes { background: #222; color: white; }
.answer-yes:hover:not(:disabled) { background: #444; }
.answer-unknown { background: #f1f1f1; color: #333; border-color: #bcbcbc; }
.text-button { border: 0; padding: 8px 0; background: none; color: #555; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: #111; }
#undo-button { margin-top: 20px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid #e3e3e3; }
.stats>div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stats span { font-size: 12px; color: #777; }
.stats strong { font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.history { padding: 15px 0; border-bottom: 1px solid #e3e3e3; }
.history summary { cursor: pointer; font-size: 13px; }
.history summary span { float: right; color: #777; }
.history ol { margin: 16px 0 0; padding-left: 22px; }
.history li { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; font-size: 12px; line-height: 1.7; border-top: 1px solid #eee; }
.history li span { flex: 1; }
.history li strong { white-space: nowrap; font-weight: 650; }
.section-label { font-size: 12px !important; color: #777; margin-bottom: 18px !important; }
.result-name { font-size: 34px !important; margin: 6px 0 12px !important; }
.result-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.result-actions .button { min-width: 120px; }
.result-detail { margin: 20px 0; border-top: 1px solid #e3e3e3; padding-top: 18px; font-size: 13px; line-height: 1.8; }
.result-detail p { margin: 8px 0; }
.ranking-list { margin: 12px 0; padding-left: 22px; display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; }
#restart-button { margin-top: 8px; }
@media (max-width: 520px) {
  .container { width: min(100% - 30px, 630px); padding-top: 36px; }
  .page-header { margin-bottom: 24px; }
  .game { padding: 26px 0; }
  .answers { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .answer-unknown { grid-column: span 2; }
  .stats { gap: 8px; }
  .stats strong { font-size: 15px; }
  .history li { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
