@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Serif+JP:wght@400;500;600&display=swap');


/* =========================================================
   ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   
   この物語専用設定
   
   物語ごとに変更したい場合は、
   基本的にここだけ見ればOK。
   
   ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   ========================================================= */


/* =========================================================
   ★ 背景
   ========================================================= */

.scene-backdrop {
  background-image:
    linear-gradient(
      90deg,
      rgba(4, 9, 14, .62),
      rgba(7, 12, 17, .10) 50%,
      rgba(4, 9, 14, .62)
    ),
    url('../image/古書店.png');
}


/* =========================================================
   ★ キャラクター
   ========================================================= */

/* 朔 */
.standing.saku {
  left: 3%;
  background-image: url('../image/saku.png');
}

/* 湊 */
.standing.minato {
  right: 2%;
  background-image: url('../image/minato.png');
}


/* =========================================================
   ★ スマホでのキャラクター位置
   ========================================================= */

@media (max-width: 650px) {

  /* 朔 */
  .standing.saku {
    left: -19%;
  }

  /* 湊 */
  .standing.minato {
    right: -21%;
  }

}


/* =========================================================
   ★ とても小さいスマホでのキャラクター位置
   ========================================================= */

@media (max-width: 380px) {

  /* 朔 */
  .standing.saku {
    left: -25%;
  }

  /* 湊 */
  .standing.minato {
    right: -27%;
  }

}


/* =========================================================
   ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   
   ここから下は共通設定
   
   基本的に触らない。
   
   ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   ========================================================= */


:root {
  --paper: #eee9dd;
  --ink: #262727;
  --night: #111b27;
  --blue: #1e3448;
  --gold: #b99973;
}


* {
  box-sizing: border-box;
}


body {
  margin: 0;
  color: var(--paper);
  background: #10161d;
  font-family: "Noto Serif JP", serif;
}


button {
  font: inherit;
  cursor: pointer;
}


.title-screen[hidden],
.novel-screen[hidden],
.ending-screen[hidden] {
  display: none;
}


/* =========================================================
   GAME SHELL
   ========================================================= */

.game-shell {
  min-height: 100vh;
  max-width: 1500px;
  margin: auto;
  position: relative;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 66% 20%,
      #344b63 0,
      #192939 35%,
      #101923 80%
    );
}


/* =========================================================
   HEADER
   ========================================================= */

.game-header {
  position: absolute;
  z-index: 5;
  top: 0;
  width: 100%;

  padding: 19px 28px;

  display: flex;
  justify-content: space-between;

  color: #d9d4c9;

  font: 12px "DM Mono", monospace;
  letter-spacing: .09em;
}


.game-header a {
  color: inherit;
  text-decoration: none;
}


.game-header p {
  margin: 0;
}


/* =========================================================
   TITLE / ENDING
   ========================================================= */

.title-screen{
  width: min(760px, calc(100% - 40px));
  min-height: 100vh;

  margin: auto;

  padding: 15vh 0 80px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
/* エンディングタイトルだけ小さくする */
.ending-screen h1 {
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: .08em;
}



.title-screen > p:first-child,
.ending-screen > p:first-child {
  color: #c3a17b;

  font: 12px "DM Mono", monospace;
  letter-spacing: .12em;
}


.title-screen h1,
.ending-screen h1 {
  margin: 12px 0;

  font-size: clamp(48px, 9vw, 102px);
  font-weight: 500;

  letter-spacing: .14em;
  line-height: 1.15;
}


.subtitle {
  max-width: 34em;
  color: #d2d1c9;
}


.title-screen dl {
  width: min(480px, 100%);

  margin: 34px 0;
  padding: 18px 0;

  border-top: 1px solid rgba(238, 233, 221, .35);
  border-bottom: 1px solid rgba(238, 233, 221, .35);
}


.title-screen dl div {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 15px;
}


.title-screen dt {
  color: #bba184;
  font-size: 13px;
}


.title-screen dd {
  margin: 0;
}


.title-screen button,
.ending-links button {
  padding: 15px 20px;

  color: #211b17;

  border: 0;
  background: #d8bb95;
}


.title-screen button span {
  margin-left: 24px;
}


/* =========================================================
   NOVEL SCREEN
   ========================================================= */

.novel-screen {
  min-height: 100vh;
  position: relative;
}


/* =========================================================
   背景
   ========================================================= */

.scene-backdrop {
  min-height: 100vh;

  position: relative;
  overflow: hidden;

  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}


.scene-backdrop::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      transparent 58%,
      rgba(0, 0, 0, .80)
    );

  pointer-events: none;
}


.bookcase,
.window-light {
  display: none;
}


/* =========================================================
   CHARACTERS
   ========================================================= */

.standing {
  width: min(43vw, 570px);
  height: 91vh;

  position: absolute;
  bottom: 0;

  z-index: 1;

  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: contain;

  filter: drop-shadow(0 12px 16px #000);

  transition:
    opacity .3s,
    filter .3s;
}


/* 喋っていない人物を暗くする */

.standing:not(.active) {
  opacity: .42;

  filter:
    brightness(.48)
    saturate(.45)
    drop-shadow(0 12px 16px #000);
}


/* =========================================================
   SCENE META
   ========================================================= */

.scene-meta {
  position: absolute;
  z-index: 3;

  top: 76px;
  left: 28px;

  display: flex;
  gap: 18px;

  color: #ddd6c9;

  font: 11px "DM Mono", monospace;
  letter-spacing: .08em;
}


.scene-meta span:first-child {
  color: #d2ad82;
}


/* =========================================================
   DIALOGUE BOX
   ========================================================= */

/*
  会話欄そのものは画面下に固定。
  中の文章は必ず上から開始する。

  重要：
  justify-content: flex-start
  によって、文章量が変わっても
  開始位置が上下に移動しない。
*/

.dialogue-box {
  min-height: 176px;
  width: min(1060px, calc(100% - 64px));

  position: absolute;
  z-index: 4;

  left: 50%;
  bottom: 30px;

  transform: translateX(-50%);

  padding: 26px 68px 26px 30px;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  color: #f2eee5;

  border: 1px solid rgba(235, 228, 214, .6);

  text-align: left;

  background: rgba(10, 17, 24, .86);

  backdrop-filter: blur(5px);
}


/* 話者名 */

.speaker {
  min-height: 24px;

  display: block;

  margin: 0 0 6px;

  color: #d8b28b;

  font-size: 15px;
}


/* 本文 */

.line {
  display: block;

  margin: 0;

  font-size: clamp(17px, 2vw, 22px);

  line-height: 1.7;

  letter-spacing: .02em;
}


/* 次へマーク */

.next-mark {
  position: absolute;

  right: 23px;
  bottom: 20px;

  color: #c9a176;

  font-size: 12px;

  animation: blink 1.3s infinite;
}


@keyframes blink {
  50% {
    opacity: .2;
  }
}


/* =========================================================
   CHOICES
   ========================================================= */

.choices {
  position: absolute;
  z-index: 5;

  left: 50%;
  bottom: 225px;

  width: min(640px, calc(100% - 64px));

  transform: translateX(-50%);

  display: grid;
  gap: 10px;
}


.choices button {
  padding: 15px 20px;

  color: #f3ede3;

  border: 1px solid rgba(233, 220, 203, .65);

  background: rgba(17, 27, 36, .92);

  text-align: left;
}


.choices button:hover {
  color: #1b1713;
  background: #ddc3a1;
}


/* =========================================================
   ENDING
   ========================================================= */

.ending-screen {
  text-align: center;
  align-items: center;
}


.ending-screen h1 {
  color: #e2c39f;
}


.ending-screen > p:nth-of-type(2) {
  max-width: 33em;
}


.ending-links {
  margin-top: 35px;

  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}


.ending-links a {
  padding: 14px 18px;

  color: #eee7dc;

  border: 1px solid rgba(238, 233, 221, .5);

  text-decoration: none;
}


/* =========================================================
   ENDING IMAGE
   ========================================================= */

.ending-image {
  display: block;

  width: min(100%, 900px);
  height: auto;

  margin: 32px auto;
}


/* =========================================================
   SMARTPHONE
   ========================================================= */

@media (max-width: 650px) {

  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }


  .game-shell {
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }


  .novel-screen {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }


  .scene-backdrop {
    height: 100svh;
    min-height: 100svh;
  }


  .game-header {
    padding: 14px;
    font-size: 10px;
  }


  .title-screen,
  .ending-screen {
    padding-top: 90px;
  }


  .scene-meta {
    top: 55px;
    left: 15px;
  }


  /* 背景 */

  .scene-backdrop {
    background-position: center center;
    background-size: cover;
  }


  /* =======================================================
     CHARACTERS
     
     ※ キャラクターの位置はファイル上部の
        「この物語専用設定」で指定しています。
     ======================================================= */


  .standing {
    width: 82vw;
    height: 78vh;
  }


  /* =======================================================
     DIALOGUE
     ======================================================= */

  .dialogue-box {
    width: calc(100% - 20px);

    min-height: 185px;

    bottom: 10px;

    padding: 20px 38px 20px 18px;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }


  .speaker {
    min-height: 22px;

    margin-bottom: 5px;

    font-size: 14px;
  }


  .line {
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: .03em;
  }


  .next-mark {
    right: 16px;
    bottom: 16px;
  }


  /* =======================================================
     CHOICES
     ======================================================= */

  .choices {
    width: calc(100% - 20px);
    bottom: 215px;
  }


  .choices button {
    padding: 14px 16px;
  }

}


/* =========================================================
   VERY SMALL SMARTPHONE
   ========================================================= */

@media (max-width: 380px) {

  .standing {
    width: 88vw;
    height: 75vh;
  }


  /*
    キャラクター位置はファイル上部の
    「この物語専用設定」で指定しています。
  */


  .dialogue-box {
    min-height: 180px;

    padding: 18px 38px 18px 16px;
  }


  .speaker {
    margin-bottom: 4px;
  }


  .line {
    font-size: 15px;
    line-height: 1.65;
  }

}