* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;

  background: white;
  color: #111;

  font-family: sans-serif;

  display: flex;
  flex-direction: column;

  text-align: center;
}


/* -------------------------
   ヘッダー
------------------------- */

.site-header {
  width: 100%;
  padding: 20px 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid #ddd;
}

.site-title {
  color: inherit;
  text-decoration: none;

  font-weight: bold;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: inherit;
  text-decoration: none;
}

/* -------------------------
   ドロップダウン
------------------------- */

.dropdown {
  position: relative;
}

.dropdown-button {
  margin: 0;
  padding: 0;

  border: none;
  border-radius: 0;

  background: none;
  color: inherit;

  font: inherit;

  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
}

.dropdown-menu {
  display: none;

  position: absolute;
  top: calc(100%);
  left: 20%;

  transform: translateX(-50%);

  min-width: 180px;

  padding: 8px 0;

  background: white;
  border: 1px solid #ddd;

  text-align: left;

  z-index: 100;
}

.dropdown-menu a {
  display: block;

  padding: 10px 16px;

  color: #111;
  text-decoration: none;

  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: #eee;
}


/* PCではマウスを乗せても開く */
.dropdown:hover .dropdown-menu {
  display: block;
}


/* タップ・クリック時 */
.dropdown.open .dropdown-menu {
  display: block;
}


/* -------------------------
   メイン部分
------------------------- */

main {
  width: 100%;
  max-width: 600px;

  margin: 0 auto;
  padding: 200px 24px 0;
}


/* -------------------------
   再生部分
------------------------- */

.player {
  text-align: center;
}

h1 {
  width: 100%;
  /*margin: 0 auto;*/
  margin-bottom: 100;

  text-align: center;
}

#start-button {
  width: 100%;
  max-width: 200px;

  margin-top: 24px;
  padding: 16px;

  background: white;
  color: #111;

  border: 1px solid #777;
  border-radius: 0;

  appearance: none;
  -webkit-appearance: none;

  font-family: inherit;
  font-size: 1rem;

  cursor: pointer;
}


/* -------------------------
   説明部分
------------------------- */

.description {
  margin-top: 200px;

  text-align: center;
}

.description p {
  margin: 0;

  line-height: 2;
}

.description h3 {
  margin-top: 48px;
  margin-bottom: 24px;
}

.description h3:first-child {
  margin-top: 0;
}


/* -------------------------
   広告
------------------------- */

.ad-area {
  width: 100%;
  max-width: 600px;

  margin: 64px auto 0;
  padding: 0 24px;

  text-align: center;
}


/* -------------------------
   フッター
------------------------- */

footer {
  width: 100%;
  max-width: 600px;

  margin: 64px auto 0;
  padding: 0 24px 40px;

  text-align: center;

  font-size: 0.8rem;

  opacity: 0.6;
}

.footer-nav {
  margin-bottom: 16px;

  display: flex;
  justify-content: center;

  gap: 20px;
}

.footer-nav a {
  color: inherit;
}


/* -------------------------
   スマホ
------------------------- */

@media (max-width: 600px) {

  .site-header {
    display: block;
  }

  .site-title {
    display: block;

    margin-bottom: 16px;
  }

  .site-nav {
    justify-content: center;

    gap: 16px;

    font-size: 0.85rem;
  }

  main {
    padding-top: 80px;
  }
}


/* -------------------------
   OSがダークモードの場合
------------------------- */

@media (prefers-color-scheme: dark) {

  body {
    background: #111;
    color: #ddd;
  }

  .site-header {
    border-bottom-color: #333;
  }

  #start-button {
    background: #222;
    color: #ddd;

    border-color: #555;
  }

  .dropdown-menu {
    background: #111;
    border-color: #333;
  }

  .dropdown-menu a {
    color: #ddd;
  }

  .dropdown-menu a:hover {
    background: #222;
  }
}


/* -------------------------
   音声再生中
------------------------- */

body.playing {
  background: #000;
  color: #111;
}


/* 再生中はプレイヤー以外を消す */
body.playing .site-header,
body.playing .description,
body.playing .ad-area,
body.playing footer {
  display: none;
}


/* ヘッダーが消えるので位置を調整 */
body.playing main {
  padding-top: 120px;
}


/* 読み上げ中の単語をかなり暗くする */
body.playing #word-display {
  color: #0a0a0a;
}


/* 停止ボタンも暗くする */
body.playing #start-button {
  background: #050505;
  color: #222;

  border: 1px solid #151515;

  border-radius: 0;
}


/* -------------------------
   記事ページ
------------------------- */

.article-page {
  padding-top: 72px;
  text-align: left;
}

.article {
  width: 100%;
}


/* 記事タイトル */
.article-header {
  margin-bottom: 64px;
  text-align: center;
}

.article-header h1 {
  margin: 0 0 24px;
}

.article-lead {
  margin: 0;
  line-height: 2;
}


/* 各項目 */
.article section {
  margin-top: 56px;
}

.article section h2 {
  margin: 0 0 24px;
  font-size: 1.2rem;
}

.article section p {
  margin: 16px 0;
  line-height: 2;
}


/* 手順・箇条書き */
.article ol,
.article ul {
  margin: 16px 0;
  padding-left: 24px;
  line-height: 2;
}

.article li {
  margin: 8px 0;
}


/* 参考資料 */
.references {
  padding-top: 32px;
  border-top: 1px solid #ddd;
}

.references a {
  color: inherit;
}


/* ダークモード */
@media (prefers-color-scheme: dark) {
  .references {
    border-top-color: #333;
  }
}