@charset "UTF-8";

body {
  background: #f7f5f2;
  font-family: "Noto Serif JP", serif;
  margin: 0;
  padding: 40px 0;
  color: #333;
}

header {
  background-color:#f0be89;
}
.logo {
  position: fixed;   /* ハンバーガーと同じく固定 */
  top: 20px;
  left: 20px;        /* 左上に配置 */
  width: 250px;       /* 好きなサイズに調整 */
  height: auto;      /* 縦横比を維持 */
  z-index: 30;       /* ハンバーガーより前面に出すなら大きめに */
}
@media screen and (max-width: 768px) {
  .menu {
    width: 85vw;          /* 画面幅に応じて */
    padding: 15px;
  }

  .menu ul {
    margin-top: 40px;
  }

  .menu li {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .menu {
    width: 100vw;         /* スマホは全幅 */
  }

  .menu li {
    font-size: 0.95rem;
  }
}

.menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100%;
  background-color: #eee8aa;
  color: #333;
  transition: right 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  z-index: 10;
  overflow-y: auto;
  box-shadow: -4px 0 12px rgba(0,0,0,0.2);
}

.menu.open {
  right: 0;
}

.hamburger {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 30px;
  cursor: pointer;
  z-index: 20;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #c9c9c9;
  margin: 5px 0;
  transition: 0.4s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.menu ul {
  list-style-type: none;
  padding: 0;
  margin-top: 50px;
}

.menu li {
  padding: 10px 0;
  border-bottom: 1px solid #444;
}

.menu li a {
  color: #333;
  text-decoration: none;
  display: block;
}

/* アコーディオン用 */
.sub-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 15px;
}



.category.open .sub-items {
  max-height: 1000px;
}

.toggle { cursor: pointer; font-weight: bold; }


.quiz-card {
  max-width: 680px;
  margin: 40px auto;
  padding: 40px 50px;
  background: #fffdfa;
  border: 1px solid #e6ded1;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
  font-family: "Noto Serif JP", serif;
}

.quiz-title {
  font-size: 1.8rem;
  border-bottom: 2px solid #c7b08a;
  padding-bottom: 10px;
  margin-bottom: 25px;
}


.quiz-intro {
  line-height: 1.8;
  margin-bottom: 30px;
}

.start-btn {
  padding: 12px 28px;
  font-size: 1.1rem;
  background: #b8934f;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.quiz-progress {
  margin-bottom: 20px;
}

.progress-text {
  font-size: 0.9rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e6ded1;
  border-radius: 3px;
  margin-top: 6px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #b8934f;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quiz-category {
  font-size: 0.95rem;
  color: #8a6f3d;
  margin-bottom: 8px;
}


.quiz-question {
  font-size: 1.2rem;
  margin-bottom: 25px;
  line-height: 1.8;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.option {
  padding: 12px 18px;
  font-size: 1rem;
  border: 1px solid #c7b08a;
  background: #fff8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.25s;
}

.option:hover {
  background: #f7eedd;
}

.option.correct {
  background: #d3f0c8;
  border-color: #6fb36b;
}

.option.wrong {
  background: #f8d0c8;
  border-color: #cc736b;
}

.quiz-result {
  font-size: 1.1rem;
  font-weight: bold;
  min-height: 1.4em;
}

.quiz-next-area {
  margin-top: 20px;
}

.next-btn {
  margin-top: 15px;
  padding: 10px 18px;
  font-size: 1rem;
  background: #b8934f;
  color: #fff;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
