
/* =========================================================
   poem.css  (Clean version for download)
   堀剛研究室　詩ページ専用CSS
   ========================================================= */

/* ===== 全体コンテナ ===== */

.poem{
  max-width: 760px;
  margin: 0 auto;
}


/* ===== ページャー（上部） ===== */

.poem-pager{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  width: 360px;      /* ←ここが重要 */
  margin: 0.1em auto 4.5em;  /* ←autoで中央 */

  font-size: 0.75em;
}

.poem-pager a{
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}

.poem-pager a:hover{
  text-decoration: underline;
}

.poem-pager a:first-child{
  justify-self: start;
}

.poem-pager a:nth-child(2){
  justify-self: center;
}

.poem-pager a:last-child{
  justify-self: end;
}


/* ===== タイトル ===== */

.poem-title{
  width: 42ch;
  margin:0 auto 0.4em;

  text-align: left;
  text-indent: 4em;

  font-size: 1.3em;
  font-weight: normal;

  line-height: 1.6;
  letter-spacing: 0.05em;
}


/* ===== 作者名 ===== */

.poem-name{
  display: block;

  width: 42ch;
  margin: 0 auto 1.5em;

  text-align: left;
  text-indent: 12em; /* 数値up=名前を右へ */

  font-size: 0.98em;
  letter-spacing: 0.14em;
}


/* ===== 本文 ===== */

.poem-body{
  width: 48ch;
  margin: 0 auto;
  margin-left: calc(50% - 23ch);
}
/* ===== 連 ===== */

.poem-body .stanza{
  margin: 0 0 1.1em 0;
}


/* ===== 行 ===== */

.poem-body .stanza p{
  margin: 0;
  padding: 0;
  text-indent: 0;

  line-height: 1.25;
  font-size: 1em;
  letter-spacing: 0.01em;
}


/* ===== 出典 ===== */

.poem-source{
  width: 42ch;
  margin: 2em auto 1.2em;

  text-align: center;

  font-size: 0.9em;
  color: #444;
}

.poem-source:empty{
  display: none;
}


/* ===== 下部ページャー（本文から少し離す） ===== */

.poem .poem-pager:last-of-type{
  margin-top: 7em;
  margin-bottom: 2em;
}


/* ===== モバイル ===== */

@media (max-width: 640px){

  .poem-pager{
    margin-bottom: 1.6em;
    font-size: 0.9em;
  }

  .poem-title{
    width: min(24em, 100%);
    text-indent: 1.8em;
    font-size: 1.2em;
  }

  .poem-name{
    width: min(24em, 100%);
    text-indent: 5em;
    font-size: 0.9em;
  }

  .poem-body{
    width: min(20em, 100%);
  }

  .poem-body .stanza{
    margin-bottom: 0.6em;
  }

  .poem-body .stanza p{
    line-height: 1.2;
  }

}
