/* Lab16固有のスタイル */
.start-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}
.start-page h1 {
  font-size: 2em;
  margin-bottom: 16px;
  font-weight: bold;
}
.start-page .catchphrase {
  font-size: 1.0em;
  margin: 16px auto 16px auto;
  color: #333;
  font-weight: bold;
  line-height: 1.8;
  padding: 0 24px;
  word-break: keep-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
}
.start-page .catchphrase .no-break {
  white-space: nowrap;
}
@media (min-width: 601px) {
  .start-page .catchphrase {
    font-size: 1.15em;
  }
}
.start-page .difficulty {
  font-size: 1.2em;
  margin-bottom: 8px;
  padding: 0 24px;
  box-sizing: border-box;
}
.start-page .description {
  font-size: 1.1em;
  margin-bottom: 32px;
  padding: 0 24px;
  box-sizing: border-box;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.start-page .description .no-break {
  white-space: nowrap;
}
.start-page .notice-section {
  text-align: left;
  background: #f8f9fa;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 32px;
  border: 2px solid #e9ecef;
}
.start-page .notice-section h2 {
  font-size: 1.5em;
  margin-bottom: 16px;
  text-align: center;
}
.start-page .notice-section h3 {
  font-size: 1.2em;
  margin-bottom: 12px;
  text-align: center;
}
.start-page .notice-section .subsection {
  margin-bottom: 24px;
}
.start-page .notice-section .subsection:last-child {
  margin-bottom: 0;
}
.start-page .notice-section ul {
  list-style: none;
  padding: 0;
  line-height: 2;
}
.start-page .notice-section li {
  margin-bottom: 8px;
  padding-left: 24px;
  position: relative;
}
.start-page .notice-section li:before {
  content: "・";
  position: absolute;
  left: 0;
}
#rulePopup .popup-content h3 {
  font-size: 1.2em;
  margin-bottom: 12px;
  text-align: center;
}
#rulePopup .popup-content .subsection {
  margin-bottom: 24px;
}
#rulePopup .popup-content .subsection:last-child {
  margin-bottom: 0;
}
.start-page .start-button {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 16px 48px;
  font-size: 1.3em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.start-page .start-button:hover {
  background: #444;
}
.problem-section {
  display: none;
}
.mobile-only {
  display: none;
}
@media (max-width: 600px) {
  .start-page p {
    font-size: 1.5em !important;
  }
  .start-page p:last-child {
    font-size: 1.2em !important;
  }
  .mobile-only {
    display: block;
  }
}
@media (min-width: 601px) {
  .start-page p:first-of-type {
    font-size: 2.5em;
  }
  .start-page p:last-child {
    font-size: 1.8em;
  }
}

/* ルールポップアップ用のスタイル */
#rulePopup .popup-content,
#colorCodePopup .popup-content {
  line-height: 1.8;
  margin-left: 8px;
  margin-right: 8px;
  max-width: 600px;
}
#rulePopup .popup-content h2,
#colorCodePopup .popup-content h2 {
  margin-bottom: 16px;
  font-size: 1.5em;
}
#rulePopup .popup-content p,
#colorCodePopup .popup-content p {
  margin-bottom: 12px;
  text-align: left;
}
#rulePopup .popup-content ul,
#colorCodePopup .popup-content ul {
  list-style: none;
  padding-left: 0;
  margin: 16px 0;
}
#rulePopup .popup-content li,
#colorCodePopup .popup-content li {
  margin-bottom: 8px;
  padding-left: 24px;
  position: relative;
}
#rulePopup .popup-content li:before,
#colorCodePopup .popup-content li:before {
  content: "";
  position: absolute;
  left: 0;
}
#rulePopup button,
#colorCodePopup button {
  background: #444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 32px;
  font-size: 1.2em;
  margin-top: 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-weight: bold;
  height: auto;
  line-height: 1.2;
  box-sizing: border-box;
}
#rulePopup button:hover,
#colorCodePopup button:hover {
  background: #222;
}

/* ルールを再度見るボタンと色の識別が難しい方へボタンのスタイル */
.button-group {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#showRuleBtn,
#showColorCodeBtn {
  font-size: 1em;
  padding: 10px 24px;
  border-radius: 6px;
  background: #666;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
  font-family: 'BIZ UDPGothic', 'Segoe UI', 'Meiryo', sans-serif;
  white-space: nowrap;
}
#showRuleBtn:hover,
#showColorCodeBtn:hover {
  background: #444;
}
/* スマホ表示では縦並びにする */
@media (max-width: 600px) {
  .button-group {
    flex-direction: column;
    gap: 12px;
  }
  #showRuleBtn,
  #showColorCodeBtn {
    width: 100%;
    max-width: 300px;
  }
}
