/* Lab.20「Array」 */
.start-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}
.start-page .catchphrase {
  font-size: 1.0em;
  margin: 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 .description {
  font-size: 1.1em;
  margin-bottom: 32px;
  padding: 0 24px;
  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 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;
}
.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;
}
.lab20-history {
  margin: 16px auto;
  max-width: 420px;
  width: fit-content;
  min-width: min(100%, 280px);
  box-sizing: border-box;
  text-align: center;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.95em;
  min-height: 5.5em;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 20px;
  line-height: 1.6;
}
.lab20-history:empty:before {
  content: '（まだ試行がありません）';
  display: block;
  color: #888;
  text-align: center;
}
.lab20-history-row {
  margin: 4px 0;
  text-align: center;
}
.lab20-lamp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 8px 0 24px;
  flex-wrap: nowrap;
}
.lab20-lamp {
  width: 40px;
  height: 52px;
  border-radius: 8px;
  background: #d3d6da;
  border: 2px solid #b0b4bb;
  box-sizing: border-box;
}
.lab20-lamp.correct {
  background: #6aaa64;
  border-color: #538d4e;
}
.lab20-lamp.present {
  background: #c9b458;
  border-color: #b59f3b;
}
.lab20-lamp.absent {
  background: #d3d6da;
  border-color: #b0b4bb;
}

/* Lab.20 クリアポップアップ（Lab.08 と同じ体裁：上段 X+TOP 横並び、下に案内＋RETRY） */
.lab20-clear-popup-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  max-width: 320px;
  width: 100%;
  margin: 16px auto 0;
  box-sizing: border-box;
}
.lab20-clear-popup-row > button {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0 !important;
  box-sizing: border-box;
}
#clearPopup .lab20-clear-popup-row > button:not(#tweetClearBtn),
#lab20MainSeguePopup .lab20-clear-popup-row > button:not(#lab20MainSegueTweetBtn) {
  background: #444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 32px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
#clearPopup .lab20-clear-popup-row > button:not(#tweetClearBtn):hover,
#lab20MainSeguePopup .lab20-clear-popup-row > button:not(#lab20MainSegueTweetBtn):hover {
  background: #222;
}
#lab20MainSeguePopup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.35);
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999;
}
#lab20MainSeguePopup .popup-content {
  margin: 0 !important;
  position: static !important;
}
#lab20MainSeguePopup img {
  max-width: 320px;
  width: 80vw;
  height: auto;
  display: block;
  margin: 0 auto 16px auto;
  border: 2px solid #333;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  padding: 6px;
}
#lab20MainSegueTweetBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 32px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background 0.2s;
  font-weight: bold;
}
#lab20MainSegueTweetBtn:hover {
  background: #333;
}
#lab20MainSegueTweetBtn svg {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  display: block;
}

/* Lab.08 の #extraMessage に近い下段（RETRY は幅自動・中央） */
.lab20-clear-popup-retry {
  margin: 32px auto 0;
  max-width: 320px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
.lab20-clear-popup-retry-lead {
  margin: 0 0 8px;
  font-size: 1em;
  line-height: 1.5;
  color: #000;
  text-align: center;
}
/* メイン用ポップ内の RETRY（#clearPopup 外なので #clearPopup button が当たらない） */
#lab20MainSeguePopup .lab20-clear-popup-retry button {
  display: inline-block;
  margin-top: 0;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 32px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1.2;
  height: auto;
  box-sizing: border-box;
}
#lab20MainSeguePopup .lab20-clear-popup-retry button:hover {
  background: #222;
}
#clearPopup .lab20-clear-popup-retry #lab20PlayAgainBtn {
  display: inline-block;
  margin-top: 0;
  width: auto;
}

.start-page .lab20-start-secondary {
  margin-top: 12px;
  background: #555;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 40px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.start-page .lab20-start-secondary:hover {
  background: #444;
}
