/* =========================================================
   夜送舟艇のプリン艇団
   無印版（挿絵なし）
========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;

  color: #25293a;

  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    "Hiragino Mincho Pro",
    "Noto Serif JP",
    serif;

  line-height: 1.9;

  background-color: #07122f;

  background-image:
    linear-gradient(
      rgba(4, 10, 35, 0.10),
      rgba(4, 10, 35, 0.23)
    ),
    url("yasou-novel-bg.png");

  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.site-wrapper {
  width: 100%;
  min-height: 100vh;
  padding: 60px 20px 50px;
}

/* 作品ヘッダー */

.novel-header {
  max-width: 920px;
  margin: 0 auto 30px;
  text-align: center;
  color: #f7f8ff;

  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.75),
    0 0 20px rgba(125, 145, 255, 0.25);
}

.novel-header__label {
  margin: 0 0 12px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: #c9d3ff;
}

.novel-header__title {
  margin: 0;

  font-size: clamp(1.85rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.novel-header__edition {
  margin: 12px 0 0;

  color: #c6cfea;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 0.65rem;
  letter-spacing: 0.23em;
}

.novel-header__author {
  margin: 16px 0 0;

  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: #e5e8fa;
}

/* 上部ナビゲーション */

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;

  max-width: 900px;
  margin: 0 auto 26px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 110px;
  padding: 8px 18px;

  border: 1px solid rgba(218, 225, 255, 0.65);
  border-radius: 999px;

  background: rgba(13, 25, 69, 0.78);
  color: #f4f6ff;

  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-decoration: none;

  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);

  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease;
}

.site-nav a:hover {
  background: rgba(50, 63, 125, 0.92);
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* 読書位置 */

.reading-memory {
  width: min(100%, 880px);
  margin: 0 auto 28px;
  padding: 17px 20px 13px;

  text-align: center;

  border: 1px solid rgba(215, 223, 255, 0.55);
  border-radius: 10px;

  background: rgba(10, 22, 61, 0.80);

  box-shadow: 0 8px 24px rgba(0, 0, 30, 0.25);

  backdrop-filter: blur(4px);
}

.reading-memory__text {
  margin: 0 0 12px;

  color: rgba(242, 245, 255, 0.92);

  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.reading-memory__buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 9px;
}

.reading-memory__button {
  appearance: none;

  border: 1px solid rgba(215, 223, 255, 0.75);
  border-radius: 999px;

  background: rgba(35, 50, 111, 0.92);
  color: #ffffff;

  padding: 9px 18px;

  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    "Noto Serif JP",
    serif;

  font-size: 0.78rem;
  letter-spacing: 0.05em;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.reading-memory__button:hover {
  background: rgba(66, 82, 154, 0.98);
  border-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.reading-memory__button--sub {
  background: rgba(15, 25, 65, 0.70);
  color: rgba(235, 239, 255, 0.86);
}

.reading-memory__status {
  min-height: 1.3em;
  margin: 9px 0 0;

  color: rgba(229, 234, 255, 0.82);

  font-size: 0.70rem;
}

/* 本文用紙 */

.novel-paper {
  position: relative;

  width: min(100%, 880px);
  margin: 0 auto;

  padding:
    clamp(38px, 7vw, 75px)
    clamp(22px, 7vw, 85px);

  background: rgba(247, 248, 252, 0.97);

  border: 1px solid rgba(220, 225, 241, 0.95);
  border-radius: 10px;

  box-shadow:
    0 18px 55px rgba(0, 0, 25, 0.52),
    inset 0 0 40px rgba(120, 135, 175, 0.06);
}

.novel-paper::before {
  content: "";
  position: absolute;
  inset: 12px;

  pointer-events: none;

  border: 1px solid rgba(104, 116, 158, 0.16);
  border-radius: 6px;
}

/* 章ヘッダー */

.chapter-header {
  position: relative;
  margin: 0 auto 50px;
  padding-bottom: 28px;
  text-align: center;
}

.chapter-header::after {
  content: "";
  display: block;

  width: 100px;
  height: 1px;

  margin: 24px auto 0;

  background:
    linear-gradient(
      to right,
      transparent,
      #7882ad,
      transparent
    );
}

.chapter-header__number {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: #69759d;
}

.chapter-header__title {
  margin: 12px 0 0;

  color: #252e55;

  font-size: clamp(1.65rem, 5vw, 2.35rem);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.chapter-header__ornament {
  margin-top: 19px;

  color: #848eb5;

  font-size: 0.78rem;
  letter-spacing: 0.6em;
}

/* ページ送り */

.page-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  gap: 16px;

  margin: 0 auto 55px;
  padding: 15px 0;

  border-top: 1px solid #d7dbea;
  border-bottom: 1px solid #d7dbea;
}

.page-nav__button {
  display: inline-block;

  color: #455485;

  font-size: 0.82rem;
  text-decoration: none;

  transition: color 0.2s ease;
}

.page-nav__button:first-child {
  text-align: left;
}

.page-nav__button:last-child {
  text-align: right;
}

a.page-nav__button:hover {
  color: #1f2d65;
  text-decoration: underline;
}

.page-nav__button--disabled {
  opacity: 0.28;
}

.page-nav__current {
  color: #777e99;

  font-size: 0.75rem;
  letter-spacing: 0.08em;

  white-space: nowrap;
}

/* 本文 */

.novel-text {
  position: relative;

  max-width: 720px;
  margin: 0 auto;

  color: #292d3a;

  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 2.15;
  letter-spacing: 0.035em;

  text-align: justify;
  text-justify: inter-ideograph;

  word-break: normal;
  overflow-wrap: anywhere;
}

.novel-text p {
  margin: 0 0 1.85em;
}

.novel-text p.dialogue {
  margin-bottom: 1em;
}

.scene-break {
  margin: 56px auto;

  text-align: center;

  color: #8a93b3;

  font-size: 0.82rem;
  letter-spacing: 0.7em;
}

/* 章末 */

.chapter-end {
  display: flex;
  justify-content: center;

  gap: 17px;

  margin: 70px auto 45px;

  color: #7c86ad;

  font-size: 0.8rem;
}

.page-nav--bottom {
  margin: 0 auto 40px;
}

/* 戻るリンク */

.return-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 12px;

  margin-top: 45px;
}

.return-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 155px;
  padding: 10px 18px;

  border: 1px solid #bcc4de;
  border-radius: 999px;

  background: #f2f4fa;
  color: #46517c;

  font-size: 0.78rem;
  text-decoration: none;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.return-links a:hover {
  background: #e6eafa;
  transform: translateY(-1px);
}

/* フッター */

.site-footer {
  max-width: 900px;
  margin: 35px auto 0;

  text-align: center;

  color: rgba(242, 245, 255, 0.82);

  font-size: 0.72rem;
  letter-spacing: 0.09em;

  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.site-footer p {
  margin: 5px 0;
}

/* スマートフォン */

@media screen and (max-width: 700px) {

  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .site-wrapper {
    padding: 28px 10px 35px;
  }

  .novel-header {
    margin-bottom: 22px;
  }

  .novel-header__title {
    letter-spacing: 0.07em;
  }

  .reading-memory {
    margin-bottom: 20px;
    padding: 14px 12px 10px;
  }

  .reading-memory__buttons {
    gap: 7px;
  }

  .reading-memory__button {
    padding: 8px 13px;
    font-size: 0.72rem;
  }

  .novel-paper {
    padding: 35px 20px 45px;
    border-radius: 6px;
  }

  .novel-paper::before {
    inset: 7px;
  }

  .chapter-header {
    margin-bottom: 35px;
  }

  .page-nav {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 40px;
  }

  .page-nav__current {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
  }

  .page-nav__button:first-child {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .page-nav__button:last-child {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .novel-text {
    font-size: 1rem;
    line-height: 2.05;
    letter-spacing: 0.02em;
    text-align: left;
  }

  .novel-text p {
    margin-bottom: 1.7em;
  }

  .return-links {
    flex-direction: column;
    align-items: stretch;
  }

  .return-links a {
    width: 100%;
  }
}

@media screen and (max-width: 390px) {

  .novel-paper {
    padding-left: 17px;
    padding-right: 17px;
  }

  .novel-text {
    font-size: 0.97rem;
  }

  .page-nav__button {
    font-size: 0.75rem;
  }
}
