@charset "UTF-8";
/* --------------------------------------------
メイン
-------------------------------------------- */
html,
body {
  height: auto;
  overflow-x: hidden;
}

.red {
  color: red;
}

#quiz-container.play {
  background-image: url(../img/tatami.webp);
  background-attachment: fixed;
  height: auto;
  min-height: calc(100vh - 120px);
  overflow-y: visible;
}
@media (max-width: 1000px) {
  #quiz-container.play {
    min-height: calc(100vh - 143px);
  }
}

.main_about-main {
  min-height: calc(100vh - 120px);
  padding: 5px;
}
@media (max-width: 1000px) {
  .main_about-main {
    min-height: calc(100vh - 143px);
  }
}

.question-number {
  margin: 5px 10px;
  font-size: 16px;
  text-shadow: 0px 0px 4px #fff, 0px 0px 4px #fff, 0px 0px 4px #fff, 0px 0px 4px #fff, 0px 0px 4px #fff;
}

.quiz-controls-wrapper {
  display: flex;
  justify-content: center;
  gap: 40px;
  border: 1px solid #333;
  padding: 10px;
}

.quiz-controls {
  display: flex;
  flex-direction: column;
}
.quiz-controls p {
  font-size: 15px;
  margin-bottom: 5px !important;
}

#quiz-type-select,
#quiz-limit-select {
  height: 30px;
  font-size: 1.1rem;
  width: 190px;
  padding-left: 5px;
  color: #333;
}

.selection-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1em;
}

.next-button {
  width: 100px;
  height: 30px;
  margin: 10px auto;
  background-image: url(../img/next-question.svg);
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0px 0px 4px #fff, 0px 0px 4px #fff;
}

#start-button,
#replay-button,
#start-button_en {
  width: 100px;
  height: 30px;
  margin: 20px auto;
  background-image: url(../img/icon_start.svg);
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
}

#start-button_en {
  background-image: url(../img/icon_start_en.svg);
}

#share_button {
  display: none;
  width: 100px;
  height: 30px;
  margin: 1em auto;
  background-image: url(../img/xshare.svg);
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* No English version of xshare.svg exists (the JA icon has "Xでシェア" baked
   into the vector art), so the English share button is text-based instead. */
#share_button_en {
  display: none;
  width: fit-content;
  margin: 1em auto;
  padding: 6px 16px;
  border-radius: 20px;
  background: #000;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

/* 札（歌）のデザイン - 縦書き */
.card-id {
  position: absolute;
  bottom: 0px;
  left: 0px;
  font-size: 8px;
  color: #333;
  z-index: 5;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  padding: 2px 4px;
  background-color: #fff;
  border-right: 1px solid #4e3052;
  border-top: 1px solid #4e3052;
  letter-spacing: 0;
}

.kimariji-card {
  background-color: #fff;
  border: 2px solid #4e3052;
  letter-spacing: 0.1em;
  background-size: cover;
  padding: 11px 7px 9px;
  margin: 0;
  cursor: pointer;
  transition: transform 0.4s, background-color 0.3s;
  writing-mode: vertical-rl;
  text-orientation: upright;
  height: 210px;
  width: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
  white-space: nowrap;
  position: relative;
  background-image: url("/img/uragara2.webp");
}
.kimariji-card.matched {
  opacity: 0.6;
  cursor: default;
}

.kimariji-card p {
  font-family: "Kaisei HarunoUmi", serif;
  font-size: 24px;
  line-height: 1.6;
  margin: 0;
  text-align: left;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: #333;
  pointer-events: none;
  letter-spacing: 0.08em;
  text-shadow: 1px 1px 3px #fff, -1px 1px 3px #fff, 1px -1px 3px #fff, -1px -1px 3px #fff, 0 1px 3px #fff, 0 -1px 3px #fff, 1px 0 3px #fff, -1px 0 3px #fff;
}

/* 8文字以上のカードは字間を詰める */
.kimariji-card.dense p {
  letter-spacing: -0.05em;
}

/* 正解時の画像表示 */
.kimariji-card.correct-image::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background-image: url("../img/maru.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 10;
}

/* 不正解時の画像表示 */
.kimariji-card.incorrect-image::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background-image: url("../img/batsu.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 10;
}

/* 上の句の表示エリア - 縦書き */
.question-card {
  font-family: "Kaisei HarunoUmi", serif;
  letter-spacing: 0;
  background-image: url(../img/huda.webp);
  border: 2px solid #333;
  padding: 10px;
  margin: 0 auto;
  width: 190px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  position: relative;
}

.question-card p {
  font-size: 26px;
  line-height: 2;
  text-align: left;
  margin-bottom: 0 !important;
}
.question-card p rt {
  transform: translateX(-5px);
}

/* 選択肢を横並びにするためのコンテナ */
#choices-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* メッセージ表示用のスタイル */
#message-container {
  background-color: #fff;
  padding: 10px;
  margin: 0 auto;
  width: -moz-fit-content;
  width: fit-content;
  font-family: "Kaisei HarunoUmi", serif;
  text-align: left;
  font-size: 1.2em;
  min-height: 20px;
}
#message-container:empty {
  display: none;
}

.correct-message {
  color: #008000;
}

.incorrect-message {
  color: #333;
}

.letter-red {
  color: red;
}

/* --------------------
    メディアクエリ
-------------------- */
/* 画面幅が760px未満の場合 */
@media (max-width: 760px) {
  .quiz-controls-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  .question-number {
    font-size: 14px;
  }
  .question-card {
    height: 230px;
    width: 170px;
  }
  .question-card p {
    font-size: 24px;
    line-height: 2;
  }
  .kimariji-card {
    height: 230px;
    width: 170px;
    padding: 10px 5px 2px;
  }
  .kimariji-card p {
    font-size: 24px;
  }
  .kimariji-card.dense p {
    letter-spacing: -0.05em;
  }
  .kimariji-card.correct-image::after,
  .kimariji-card.incorrect-image::after {
    width: 80px;
    height: 80px;
  }
  #choices-container {
    gap: 10px;
  }
  #message-container {
    font-size: 1.2em;
  }
}
/* 画面幅が550px未満の場合（スマホ） */
@media (max-width: 550px) {
  .main_about-main {
    padding: 2px 0;
  }
  .breadcrumb {
    padding: 0 4px;
  }
  .title {
    padding: 0 4px;
  }
  .quiz-controls-wrapper {
    margin: 2px 4px 0;
    padding: 6px;
    gap: 6px;
  }
  .section {
    padding: 4px 2px;
  }
  .question-number {
    font-size: 11px;
    margin: 2px 4px;
  }
  #quiz-type-select {
    width: 180px;
  }
  .quiz-controls {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .quiz-controls p {
    font-size: 15px;
    margin: 0;
  }
  /* 上の句カード */
  .question-card {
    height: 240px;
    width: 165px;
    padding: 4px 2px 2px;
  }
  .question-card p {
    font-size: 23px;
    line-height: 1.85;
  }
  /* 選択肢コンテナ：画面幅いっぱいに */
  #choices-container {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2px;
    padding: 0 1px;
    width: 100%;
    box-sizing: border-box;
  }
  /* 選択肢カード：4枚並びで最大化 */
  .kimariji-card {
    width: calc((115vw - 8px) / 4);
    height: calc((100vw - 8px) / 4 * 1.75);
    padding: 1px;
    margin: 0;
    background-color: #2c5d3f;
  }
  .kimariji-card.back-pink {
    background-color: #ffc0cb;
  }
  .kimariji-card.back-yellow {
    background-color: #f0e68c;
  }
  .kimariji-card.back-green {
    background-color: #98fb98;
  }
  /* フォントサイズをカード幅に比例させる */
  .kimariji-card p {
    font-size: clamp(20px, (100vw - 8px) / 4 * 0.17, 22px);
    line-height: 1.5;
    letter-spacing: 0.08em; /* ← 通常カードのletter-spacingをここで明示 */
  }
  /* dense クラス：8文字以上は字間を詰める（通常のletter-spacingより必ず後に書く） */
  .kimariji-card.dense p {
    letter-spacing: -0.08em;
    line-height: 1.4;
  }
  .kimariji-card.correct-image::after,
  .kimariji-card.incorrect-image::after {
    width: 55px;
    height: 55px;
  }
  #message-container {
    font-size: 1.1em;
    padding: 6px;
  }
}/*# sourceMappingURL=bozumekuri.css.map */