/* ------------  共通の設定【共通】 ------------  */

body {
  background-color: #FDF5E6;
   /*background-image: url("images/okumono_kumo4.png");*/
  /*背景画像 */
  background-size: cover;
  /* 画像を縦横比を保ちながら全体に拡大/縮小 */
  background-repeat: no-repeat;
  /*画像の繰り返しを無効にする */
  background-attachment: fixed;
  /**/
  background-position: center center;
  /*画像を中央に配置 */
  position: relative;
  width: 100%;
  /* ビューポートの幅を100% */
  height: 91vh;
  /* ビューポートの高さを100% */

  transition: background-image 0.3s ease-in-out;
  /* 強制的に横スクロールバーを削除 */
    overflow-x: hidden;
line-height: 1.7;
  box-sizing: border-box;


}

body.no-scroll {
  overflow: hidden;
}


body.lang-en {
  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

body.lang-jp {
    font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}


  .img_center img {
    width: 50%;
    text-align: center;
  }

#container {
  margin: 0px auto 30px;
  position: relative;

}


.hidden-text {
  opacity: 0;
  transition: opacity 1s ease;
  /*visibility: hidden;*/
}

body.font-loaded .hidden-text{
  opacity: 1;

}

body.font-fallback .hidden-text {
  font-family: 'Arial', 'Helvetica', sans-serif;
  opacity: 1;
}


.img_centertop{
  text-align: center;
  margin-bottom: 40px;
}

.img_centertop02{
  text-align: center;
  margin-bottom: 40px;
  margin-top: 30px;
}

  .hover-fade {
    transition: opacity 0.3s ease;
  }

  .hover-fade:hover {
    opacity: 0.7;
  }

.txt_center{
  text-align: center;
}

#languageToggle {

  position: absolute;
  top: 20px;
  right: 300px;
  z-index: 30;
  cursor: pointer;
}

  /* 初期状態：非表示 */
  #languageToggle {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
  }

  /* 表示状態：ふわっと */
  #languageToggle.visible {
    opacity: 1;
    visibility: visible;
  }


.img_center_banner{
  text-align: center;
  margin-bottom: 80px;
}



/*ハンバーガーメニュー*/

.conts-menu {
  position: fixed;
  top: 23px;
  left: 5px;
  font-size: 15px;
  z-index: 5;
}

.conts-body {
  margin: 0 auto;
  height: 20px;
  z-index: 50;

}

.hamburger {
  width: 40px;
  height: 32px;
  position: fixed;
  top: 10px;
  left: 5px;
  z-index: 100;
  border: none;
  background-color: #FFF;
    cursor: pointer;
}

.hamburger_bar {
  display: block;
  width: 100%;
  height: 4px;
  position: absolute;
  left: 0;

  background: #000;
  transition: top 0.24s, transform 0.24s, opacity 0.24s;

}

.hamburger_bar:nth-child(1) {
  top: 10%;
}

.hamburger_bar:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger_bar:nth-child(3) {
  top: 90%;
  transform: translateY(-100%);
}

.hamburger_bar.is_active:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(135deg);
}

.hamburger_bar.is_active:nth-child(2) {
  transform: translate(50%, -50%);
  opacity: 0;
}

.hamburger_bar.is_active:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-135deg);
}


.guide_link{
  text-align: center;
  margin-top: 50px;
}

.guide_link a{
  color: #0077cc;
  text-decoration: none;
}

.guide_link a:hover{
  text-decoration: underline;
}

/*ナビゲーションエリア*/

.nav {
  padding: 5px;
  width: 99%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 99;
  background: #FFF;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
    overflow-y: auto; /* ←縦スクロールを有効化 */

}

.nav.is_active {
  opacity: 1;
  pointer-events: auto;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  list-style-type: none;
  /* 追加部分 */
  overflow-y: auto;   /* 縦スクロールを有効化 */
  max-height: 92%;   /* 親要素の高さに収まるよう制限 */
overflow-x: hidden; /* 横スクロールを隠す */
}

.nav-list::-webkit-scrollbar {
  width: 4px;               /* 細くする */
}
.nav-list::-webkit-scrollbar-track {
  background: transparent;   /* 背景を透明に */
}
.nav-list::-webkit-scrollbar-thumb {
  background: #888;          /* グレー */
  border-radius: 2px;
}

.accordion-content-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  list-style: none;
    text-align: center;     /* テキストを中央寄せ */

    width: 300px;
}

.accordion-content-menu li{
  margin-top: 10px;
}

.accordion-header-menu.active02 .accordion-content-menu {
  max-height: 500px; /* 子要素の高さに合わせて十分大きめに */
}

.accordion-icon-menu {
  float: left;
  font-weight: bold;
  transition: transform 0.3s ease;
  margin-right: 5px;
}

.accordion-header-menu.active02 .accordion-icon-menu {
  transform: rotate(180deg);
}

/* アコーディオンの見出し部分にポインターを表示 */
.accordion-header-menu p {
  cursor: pointer;
    display: flex;
  justify-content: flex-start; /* 横方向の中央寄せ */
  align-items: center;     /* 縦方向の中央揃え */
  text-align: center;
  color: #1a1a1a;
margin: 0px;
}



/* 全体の横並び */
.lang-toggle {
  display: flex;
  gap: 7px;              /* さらに少し狭く */
  justify-content: center;
  margin-top: -10px;
}

/* input は非表示 */
.lang-toggle input[type="radio"] {
  display: none;
}

/* ボタンの見た目（さらに小さく） */
.lang-option {
  display: flex;
  align-items: center;
  gap: 5px;               /* 旗と文字の間も少し縮める */
  padding: 5px 8px;       /* ← さらに小さく */
  border-radius: 8px;     /* 少し丸みを減らしてコンパクト感 */
  border: 2px solid #ddd;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #fafafa;
  font-size: 13px;        /* ← 文字サイズも少し縮小 */
}

/* 国旗のサイズ（さらに小さく） */
.lang-option .flag {
  width: 18px;            /* 20 → 18 に縮小 */
  height: auto;
  border-radius: 3px;
}

/* ホバー時 */
.lang-option:hover {
  border-color: #aaa;
  background: #f0f0f0;
}

/* 選択されたときのスタイル（超シンプル） */
.lang-toggle input[type="radio"]:checked + .lang-option {
  border-color: #000;      /* 黒で明確に */
  background: #fff;        /* ほぼ無色に */
  color: #000;             /* 文字色も黒で統一 */
  box-shadow: none;        /* 装飾を排除 */
  transform: none;         /* 動きも排除 */
}

/*
a.btn_05 {
  display: block;
  text-align: center;
  vertical-align: middle;
  text-decoration: none;
  width: 170px;
  margin: 0px auto;
  padding: 1rem 2.5rem;
  border: 2px solid #27acd9;
  color: #27acd9;
  border-radius: 100vh;
  transition: 0.5s;
  font-size: 17px;
  font-weight:500;
}

a.btn_05:hover {
  color: #fff;
  background: #27acd9;
}

*/


a.btn_05 {
  display: block;
  text-align: left;
  vertical-align: middle;
  text-decoration: none;
  width: 300px;
  margin: 0px auto;
  color: #1a1a1a;
  transition: 0.5s;
  font-size: 16px;
}

a.btn_05:hover {
  color: #909090;
}


/*アコーディオンメニュー*/

.accordion {
  width: 800px;
  background-color: none;
  margin: 30px auto 30px;

}

.accordion-content {
  display: none;
}

.accordion-header {
  width: 480px;
  background-color: #ffa500;
  padding: 12px 20px 5px 20px;
  margin: 10px auto 0;
  transition: background .3s ease;
  cursor: pointer;
  position: relative;
  text-align: center;
  border-radius: 20px;
  color:#ffffff;
  border: 1px solid #000000;
}

.accordion-header::before,
.accordion-header::after {
  position: absolute;
  content: '';
  top: 1px;
  right: 20px;
  bottom: 0;
  width: 12px;
  height: 2px;
  margin: auto;
  background: #ffffff;
}

.accordion-header::after {
  transform: rotate(-90deg);
  transition: transform 0.3s;
}

.accordion-header.active::after {
  transform: rotate(0deg);
}

.accordion-content {

  padding: 12px 20px 10px;
}

.accordion-header span,
.accordion-content span {
  padding-left: 25px;
  position: relative;
}

.accordion-header span::before {
  position: absolute;

  top: 2px;
  left: 0;
  color: #151E2F;
  font-size: 17px;
}


.accordion-content span::before {
  position: absolute;

  top: 3px;
  left: 0;
  color: #151E2F;
  font-size: 17px;
}




/* hover */
.accordion-header:hover {
  background-color: #ffa500;
}



/* リセットCSS */



/* ------------  トップページの設定【共通】 ------------  */

#logo_area {
  position: absolute;
  top: -45px;
  left: -60px;
  transform: rotate(-15deg);
  width: 230px;
}

#msg3 {
  width: 70%;
  margin: 0 auto;
  background-color: #ffffff;
  /*背景色*/
  border: solid 2px #333333;
  /*線*/
  color: #333333;
  font-size: 32px;
  margin-top: 40px;
  border-radius: 15px;
  position: relative;
  text-align: center;
 /* 方眼紙模様に必須のスタイル */
  background-image: linear-gradient(0deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px)),
                    linear-gradient(90deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px));
  background-size: 16px 16px;
  background-repeat: repeat;
  background-position: left top;

  /* 以下任意のスタイル */
  padding: 20px;

}
 #msg3 h1{
  font-size: 32px;
  font-weight: normal;

  
 }

.top_txt{
  font-size: 14px;
  margin-bottom: 25px;
}

.top_txt_color{
  color: #547443;
}

.fukidashi-01-01 {
  position: relative;
  width: fit-content;
  padding: 15px 16px;
  margin: 0px auto 60px;
}
.fukidashi-01-01::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 100%;
  height: 50%;
  box-sizing: border-box;
  border: 2px solid #547443;
  border-top: none;
  border-bottom-right-radius: 50px; /* 左下の角丸 */
  border-bottom-left-radius: 50px; /* 右下の角丸 */
  translate: -50%;
}
.fukidashi-01-01::after {
  content: "";
  position: absolute;
  top: calc(100% + 8px); /* フキダシのサイズに応じて調整してください */
  left: 50%;
  width: 30px;
  height: 2px;
  box-sizing: border-box;
  background-color: #547443;
  box-shadow: 0 2px 0 #ffffff, 0 -2px 0 #ffffff;
  rotate: 50deg;
  translate: -50%;
}



#reading-selector{
  font-size: 16px;
  width: 470px;
    display: flex;
  justify-content: center; /* 水平方向の中央揃え */
  align-items: center;     /* 垂直方向の中央揃え（必要なら） */
}



.icon-text{
  text-align: center;
  margin-left: -20px;
  font-size: 14px;
}

.icon-text a {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  text-decoration: none; /* 必要ならリンクの下線を消す */
}


.point_message span.char {
  display: inline-block;
  transition: transform 0.35s ease;
}

.point_message span.char.animate {
  transform: translateY(-10px) rotate(-10deg);
}



.icon {
  width: 16px;              /* アイコンの横幅 */
  height: auto;             /* 高さは自動調整（縦横比維持） */
  margin-right: 5px;        /* テキストとの間隔 */
  vertical-align: middle;   /* テキストと垂直位置を揃える */
  text-align: left;
}

#kanji-top-image{
  margin-top: -150px;
    position: relative; /* ← これが必要！ */
  z-index: 10;

}

.img_wrapper {
  position: relative;
  width: 90%; /* ← ここを%指定に変更 */
  max-width: 1000px; /* 最大幅を指定すると安心 */
  margin: 0 auto;
  margin-top: 20px;
}

.base_img {
  width: 100%; /* 親の80%に合わせて伸縮 */
  display: block;
  border-radius: 13px;

}

.img_k_bg{

  position: absolute;
  top:-110px;
  left: 80px;
  z-index: -5;
    transform: rotate(-7deg); /* ← 少し左に傾ける */

}

.question_kaki{
  font-size: 16px;
}

#profile_area{
  width: 50%;
  background-color: #ffffff;
  margin: 0px auto;
  padding: 30px;
  border-radius: 15px;
  margin-top: 100px;
  margin-bottom: 100px;
  border:1px solid #000000;
    /* 方眼紙模様に必須のスタイル */
  background-image: linear-gradient(0deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px)),
                    linear-gradient(90deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px));
  background-size: 16px 16px;
  background-repeat: repeat;
  background-position: left top;
}

.profile_txt {
  font-size: 18px;
  color: #ffffff;
  background-color: #58535E;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  padding: 10px;
  border-radius: 10px;
}

#profile_area p {
  margin-bottom: 1.5rem;
}

#profile_area a {
  color: #0077cc;
  text-decoration: none;
}

#profile_area a:hover {
  text-decoration: underline;
}


.float-img {
  animation: float 4s ease-in-out infinite;
  animation-delay: 4s; /* ← 5秒後に開始 */
}

@keyframes float {
  0%, 100% {
    transform: translateY(0%);
  }
  50% {
    transform: translateY(10%);
  }
}


.move-left-to-right {
  position: absolute;
  animation: slideLR 30s linear infinite;
  width: 90px;
  height: auto;
  top: -17px;

}

@keyframes slideLR {
  0% {
    transform: translateX(60vw) translateY(-400px);
  }

  50% {
    transform: translateX(-10vw) translateY(-400px); /* 少し上に跳ねる */
  }

  100% {
    transform: translateX(-69vw) translateY(-400px);
  }
}



.kanji_study_heading {
	position: relative;
	font-size: 26px;
}

.kanji_study_heading::before {
	content: attr(data-number);
	display: inline-block;
	margin-right: 20px;
	color: #498ee0;
	font-size: 30px;
	border-bottom: 1px solid #498ee0;
}


.overlay {
  position: absolute;
  top: -125px;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  pointer-events: none;
  z-index: 2;
}

.overlay img {
  opacity: 0;
  transform: scale(0.9);

}


.kanji_allcharacters{
  font-size: 45px;
  text-align: center;
}

.list-kanji{
  font-size: 25px;
  color: #ffffff;
  width: 500px;
  margin: 0 auto 30px;
}

.img-h1 { max-height: 60%; }
.img-h2 { max-height: 40%; }
.img-h3 { max-height: 30%; }
.img-h4 { max-height: 30%; }
.img-h5 { max-height: 60%; }
.img-h6 { max-height: 40%; }


.kanji-fadein {
  opacity: 0;
  transform: translateY(50px);
}

.reading_area{
  margin: 100px 0px 100px;
}

.reading_area p{

  text-align: center;
}



.reading_area_coloum {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2列に分割 */
  gap: 0px;                             /* ボタン間の余白 */
  justify-items: center;                 /* 中央寄せ */
  width: 600px;
  margin: 0px auto 0px;
  font-size: 14px;
}

.reading_area_coloum a {
  display: block;
  padding: 10px 12px;
  background-color: #fff;       /* 白ベース */
  color: #4a90e2;               /* 文字色を青系に */
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  width: 100%;                  /* 列幅いっぱいに広げる */
  max-width: 250px;             /* 最大幅を制限してバランス調整 */
}

.reading_area_coloum a:hover {
  background-color: #4a90e2;
  color: #fff;
  transform: translateY(-2px);
}


.textcenter{
  text-align: center;
}

#kanji_choice_area{
position: relative;
width: 80%;
margin: 35px auto;
padding: 20px;
text-align: center;
}

.choice_schoolyear{
 
  width: 400px;
  height: 30px;
  background-color: #ffa500;
  margin: 30px auto;

}

.grade-button {
  display: inline-block;
  margin: 10px 8px;
  padding: 5px 5px;
  background: linear-gradient(135deg, #f0f9ff, #cce7ff);
  color: #333;
  font-size: 15px;
  border: 1px solid #000000;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  text-align: center;
  width: 400px;
}

.grade-button:hover {
  background: linear-gradient(135deg, #cce7ff, #a0c4ff);
  transform: translateY(-2px);
  box-shadow: 3px 3px 10px rgba(0,0,0,0.15);
}


#grade-buttons{
  
  margin-top: 40px;
}

#grade-buttons button{
  
  padding: 15px;
}


/*

.accordion-content span a {
font-weight:bold;
position: relative;
display: inline-block;
transition: .3s;
}
.accordion-content span a::after {
position: absolute;
bottom: 0;
left: 0;
content: '';
width: 0;
height: 1px;
background-color:#337ab7 ;
transition: .3s;
}
.accordion-content span a:hover::after {
width: 100%;
}

*/

.slant-bg {
    width: 100%;
    margin: 0;
    padding: 100px 0 50px;
    position: relative;
    top: 0px;
    left: -5px;
}


.slant-bg::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #BAC6B3;
    transform: skewY(-7deg);
    z-index: -1;
}

#totale_kanji_imgarea{
  background-image: url(images/1665_color.png);
  background-repeat: no-repeat;
  background-size: 380px;
  height: 210px;
  background-position: center top;
    margin-top: 30px;
  margin-bottom: 50px;
}

/*広告エリア*/

.advertisement {
  margin: 10px auto 80px;
  width: 850px;

  text-align:center;
  color: #000000;
  font-size: 15px;
  padding-bottom: 10px;
  position: relative;
  background-color: rgba(255, 255, 255, 0.5);
border-radius: 20px;
 padding: 30px 50px;
}

.advertisement a:hover {

  color: #ffffff;
}

.s_image{
  position: absolute;
  top:70px;
  left: 59%;
  transform: translateX(-540px);
}

.s_image2{
  position: absolute;
  top:110px;
  left: 50%;
  transform: translateX(150px);
}

.advertisement a{


  color: #2a5bd7;
  text-decoration: none;

  transition: 0.2s;
}
.advertisement a:hover{
  color: #1743a3;

}

.lang-en .advertisement {
  display: none;
}


/*広告エリア*/

#totale_kanji{
  width: 310px;
  margin: 0px auto;
  text-align: center;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2列 */
    gap: 10px; /* 要素間の間隔 */
    padding-top: 30px;

}

#languageToggle label {
  
  align-items: center;
  gap: 6px; /* inputと画像の間隔 */
  cursor: pointer;
}

.flag {
  width: 15px;
  height: auto;
}


  #totale_kanji p {
    margin: 0;
  }

#totale_kanji a {
  text-decoration: underline dotted; /* 点線の下線 */
  color: #000; /* 黒色 */
  text-underline-offset: 3px; /* 下線の位置調整（任意） */
}


/*
.accordion-content p{
  font-size: 17px;
  margin: 10px auto 0;
  cursor: pointer;
  text-align: center;
  border-radius: 20px;
  padding: 4px 0px;
  width: 400px;
  background-color: #934D10; 
  color: #ffffff;
}



.accordion-content a {
  color: inherit;       
  text-decoration: none;
}

*/


.accordion-content span a::before {
  content: "";
  margin-right: 0em;
}



.accordion-content span{
  display: block;
  margin: 10px 0px;
  text-decoration: none;
  color: #000;
}

.accordion-content a {
  text-decoration: none;
}



.setting_area{
  margin-bottom: 40px;
  text-align: center;
}

#image_zone{
  position: absolute; 
  top: 8%; 
  left: 0;
}

#image_zone img {
  /*animation: slideinRight04 1.8s 1;*/
  width: 180px;
}

@keyframes slideinRight04 {
  0% {
    transform: translateX(-200px);

  }

  100% {
    transform: translateX(0);

  }
}


/*以下、①背景色など*/
.line-bc2 {
  display: block;
  margin: 15px auto;
  width: 660px;
  position: relative;
}


/*以下、②左側のコメント*/
.balloon8 {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
}

.balloon8 .faceicon2 {
  margin-right: 0px;
  width: 100px;
}

.balloon8 .faceicon2 img {
  height: auto;
  width: 170px;
}

.balloon8 .chatting2 {
  width: 100%;
  text-align: left;
}


.chatting2 {
  margin-left: 50px;
  margin-bottom: 10px;
  margin-top: 0px;
}


.says2 {
  display: inline-block;
  position: relative;
  margin: 15px 0 0 50px;
  padding: 30px;
  max-width: 80%;
  font-size: 20px;
  border-radius: 12px;
  background: #ffffff;
  color: #757474;

}

.says2:after {
  content: "";
  display: inline-block;
  position: absolute;
  top: 25px;
  left: -19px;
  border: 8px solid transparent;
  border-right: 18px solid #ffffff;
  -webkit-transform: rotate(35deg);
  transform: rotate(35deg);
}

.says2 p {
  margin: 0;
  padding: 0;
  text-align:left;
}

.line_bg{
  position: absolute;
  top:120px;
  left: 20px;
}


/*吹き出し*/

.fuki {
  position: relative;
  padding: 4rem;
  border-radius: 30px;
  background-color: #DA7F8C;
  color: #ffffff;

  font-size: 23px;
  width: 58%;
  text-align: left;
  margin: 0px auto 0px;

}

.fuki:before {
  position: absolute;
  top: 100%;
  left: 46%;
  height: 0;
  width: 0;
  border-style: solid;
  border-color: transparent;
  border-top-color: #DA7F8C;
  border-width: 25px;
  content: "";
}

.txt_r img {
  display: block;
  margin: 0 auto;
  margin-top: 40px;
}

/* ボタンの指定 */
.js-backToTop2 {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 20px;
  bottom: 20px;
  width: 80px;
  height: 80px;
  font-size: 13px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
  color: #000000;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease-in-out;

  font-weight: lighter;
  z-index: 30;
}


.js-backToTop2:hover {
  background: #e8e8e8;
  color: #FFF;

}

.js-backToTop2 img {
  width: 65px;

}

/* クラス付与時の指定 */
.is-active {
  opacity: 1;
  visibility: visible;
}

.checkbox-2 {
  display: flex;
  flex-wrap: wrap;
  gap: .5em 2em;
  border: none;
  text-shadow: 2px 2px 0px #ffffff;
  width: 360px;
  margin: 0 auto;
}

.checkbox-2 label {
  display: flex;
  align-items: center;
  gap: 0 .5em;
  position: relative;
  cursor: pointer;
}

.checkbox-2 label::before {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #333333;
  background-color: #ffffff;
  content: '';
}

.checkbox-2 label:has(:checked)::after {
  position: absolute;
  top: 3px;
  left: 6px;
  transform: rotate(45deg);
  width: 5px;
  height: 10px;
  border: solid #575757;
  border-width: 0 3px 3px 0;
  content: '';
}

.checkbox-2 input {
  display: none;
  
}

.kanji_study {
  width: 60%;
  margin: 120px auto;
  padding: 2em;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 20px;
  font-size: 19px;

  border: 1px solid #000000;

  /* 方眼紙模様に必須のスタイル */
  background-image: linear-gradient(0deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px)),
                    linear-gradient(90deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px));
  background-size: 16px 16px;
  background-repeat: repeat;
  background-position: left top;
}


.kanji_study ul {
  list-style: "🟢 ";
  padding-left: 1.5em;
}

.kanji_study table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

.kanji_study th, td {
  border: 1px solid #ddd;
  background-color: #ffffff;
  padding: 0.6em;
  text-align: left;
}

.kanji_study th {
  background-color: #f0f0f0;
  font-weight: bold;
}

.closing {
  margin-top: 2em;
  font-weight: bold;
  font-size: 1.1em;
  color: #444;
}


/*  ------------ 問題エリアの設定【共通】 ------------  */



#kanji{
    font-size: 180px;
    text-align: center;
    background-color: #ffffff;
  /* 方眼紙模様に必須のスタイル */
  background-image: linear-gradient(0deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px)),
                    linear-gradient(90deg, transparent calc(100% - 1px), #f0f0f0 calc(100% - 1px));
  background-size: 16px 16px;
  background-repeat: repeat;
  background-position: left top;
  border: 1px #000 solid;
  /* 以下任意のスタイル */
  padding: 0px;
  font-family: sans-serif;

}
#example{
  text-align: center;
}

#bt_area {
  display: flex;
  justify-content: center;  /* 横方向中央揃え */
  align-items: center;      /* 高さを揃える（任意） */
  gap: 20px;                 /* 要素間のスペース（調整可能） */
  margin-top: 1em;          /* 上に少しスペース（調整可能） */
}


#bt_area2 {
  display: flex;
  justify-content: center;  /* 横方向中央揃え */
  align-items: center;      /* 高さを揃える（任意） */
  gap: 20px;                 /* 要素間のスペース（調整可能） */
  margin-top: 1em;          /* 上に少しスペース（調整可能） */
}

.choice-button {
  display: inline-block;
  margin: 8px;
  padding: 10px 20px;
  font-size: 16px;
}


#confirmModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
}
.modal-content button {
  margin: 10px;
}

#top_move a{
  color: inherit;       /* 親要素の文字色を継承 */
  text-decoration: none; /* 下線を消す */
}

#quiz, #bt_area, #timer {
  display: none;
}

#startScreen {
  width: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;

  color: #333;
}

.note{
  font-size: 12px;
  color: crimson;
  margin-top: 25px;
}

#startButton {
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  border: none;
  color: white;
  padding: 15px 30px;
  font-size: 20px;
  border-radius: 40px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 7px rgba(0,0,0,0.2);
  font-weight: bold;
  border: 1px solid #000;
}

#startButton:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

#top_move {
  border: none; /* 枠線をなくす */
  border-radius: 5px; /* 角丸をつける */
  padding: 5px 5px; /* ボタンの内側の余白 */
  background-color: white; /* ボタンの背景色 */
  color: inherit;       /* 親要素の文字色を継承 */
  color: #000000; /* ボタンの文字色 */
  text-align: center; /* ボタンのテキストを中央揃えにする */
  text-decoration: none; /* テキストに下線をつけない */
  cursor: pointer; /* マウスポインタを変更する */
  width: 140px;
  height: 20px;
  font-size: 13px;
  vertical-align:center;
  border: 1px #000 solid;
}

#resetButton {
  border: none; /* 枠線をなくす */
  border-radius: 5px; /* 角丸をつける */
  padding: 1px 5px; /* ボタンの内側の余白 */
  background-color: white; /* ボタンの背景色 */
  color: #000000; /* ボタンの文字色 */
  text-align: center; /* ボタンのテキストを中央揃えにする */
  text-decoration: none; /* テキストに下線をつけない */
  font-size: 15px; /* テキストのフォントサイズ */
  cursor: pointer; /* マウスポインタを変更する */
  width: 150px;
  height: 30px;
  font-size: 14px;
  font-weight: bold;
  border: 1px #000 solid;
}

#retryButton {
  border: none; /* 枠線をなくす */
  border-radius: 5px; /* 角丸をつける */
  padding: 1px 5px; /* ボタンの内側の余白 */
  background-color: white; /* ボタンの背景色 */
  color: #000000; /* ボタンの文字色 */
  text-align: center; /* ボタンのテキストを中央揃えにする */
  text-decoration: none; /* テキストに下線をつけない */
  font-size: 15px; /* テキストのフォントサイズ */
  cursor: pointer; /* マウスポインタを変更する */
  width: 150px;
  height: 30px;
  font-size: 14px;
  font-weight: bold;
  border: 1px #000 solid;
}

#choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2列にする */
  gap: 10px; /* ボタン間の余白 */
  justify-items: center; /* ボタンを中央揃え */
  margin-top: 20px;
  text-align: center;
  width: 350px;
  margin: 0 auto;
}

/* 白フェード背景 */
#whiteFade {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ローディングアニメーション（丸が回る） */
.loader {
  width: 60px;
  height: 60px;
  border: 6px solid #ddd;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* 回転アニメーション */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ローディング文字 */
.loading-text {
  margin-top: 15px;
  font-size: 16px;
  color: #555;
  font-weight: bold;
  letter-spacing: 1px;
}


#choices button {
  display: inline-block; /* ボタンを横並びにする */
  border: none; /* 枠線をなくす */
  border-radius: 5px; /* 角丸をつける */
  padding: 10px 15px; /* ボタンの内側の余白 */
  margin: 5px; /* ボタン同士の余白 */
  background-color: #2c3e50; /* ボタンの背景色 */
  color: #ffffff; /* ボタンの文字色 */
  text-align: center; /* ボタンのテキストを中央揃えにする */
  text-decoration: none; /* テキストに下線をつけない */
  font-size: 15px; /* テキストのフォントサイズ */
  cursor: pointer; /* マウスポインタを変更する */
  width: 160px;
  height: 60px;
  font-size: 16px;
  font-weight: bold;
}

#yomi{
  text-align: center;
}

#top_info_question4 img {
  width: 200px;
  z-index: 0;
}

#quiz{
  position: relative;
  margin-top: 5px;
}


#q_main{
  background-image: url(images/11316_color.png);
  background-repeat: no-repeat;
  background-size: 150px;
  height: 160px;
  background-position: right bottom;
    margin-top: 100px;
  margin-bottom: 50px;
  width: 350px;
  margin: 0 auto;
  position: relative;
}

#q_imgarea{
  position: absolute;
  left: 0px;
  top:60px;
}

#q_imgarea p{
color: #444444;
font-size: 12px;
}


/*吹き出し1*/

.balloon3-right-btm {
  position: absolute;
  top:250px;
  left: -70px;
  display: inline-block;
  margin: 0 0 1.5em 0;
  padding: 0 5px;
  width: 120px;
  height: 120px;
  line-height: 120px;
  text-align: center;
  color: #FFF;
  font-size: 17px;

  background: #a58eff;
  border-radius: 50%;
  box-sizing: border-box;
  vertical-align: top;

}

.balloon3-right-btm:before {
  content: "";
  position: absolute;
  bottom: -5px;
  right: -5px;
  margin-top: 0px;
  border: 15px solid transparent;
  border-left: 15px solid #a58eff;
  z-index: 0;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

#progress{
  position: absolute;
  top:10px;
  right: 30px;
}

#timer{
  position: absolute;
  top:270px;
  right: 30px;
}

/*------------ レビューページ【共通】----------*/

#reviewList{
  margin-bottom: 50px;
}

.review-card {
  background: #fff8f0;
  border: 2px solid #f2c98a;
  border-radius: 10px;
  padding: 15px;
  margin: 10px 0;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s ease;
}
.review-card:hover {
  transform: scale(1.01);
}

.review-info {
  font-size: 16px;
  line-height: 1.6;
}

.label {
  font-weight: bold;
  color: #d17c00;
}

.value {
  color: #333;
}

.review_list{
  width: 300px;
  text-align: center;
  margin: 0px auto 35px;
  font-size: 25px;
  font-weight: bold;
}

.delete-button {
  background-color: #ff6b6b;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  width: 80px;
  margin-left: 20px;
  transition: background-color 0.2s ease;
}
.delete-button:hover {
  background-color: #e04a4a;
}

.review_txt{
  text-align: center;
}

.review-button {
  background-color: #4e9af1;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  position: relative;
  letter-spacing: 0.5px;
  margin-top: 7px;
  margin-bottom: 7px;
}

.review-button:hover {
  background-color: #3a7fd9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.review-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.review-button.registered {
  background-color: #ccc;
  color: #666;
  cursor: default;
  box-shadow: none;
  transform: none;
}
.review-button.registered:hover {
  background-color: #ccc;
}

#bulkDeleteArea{
  text-align: center;
}

.bulk-delete-button {
  background-color: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Segoe UI', sans-serif;
  cursor: pointer;
  margin-top: 20px;
  margin-bottom: 40px;
  
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}
.bulk-delete-button:hover {
  background-color: #e04a4a;
  transform: translateY(-2px);
}

/* ------------ エンドページ【共通】------------ */

.quiz-history {
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 6px;
  border: 4px solid #ccc; /* 初期色はグレーにしておく */
  margin: 10px auto 10px;
  background-color: #ffffff;
  width: 90%;
}

.quiz-history.correct {
  border-color: #27acd9; /* 正解：緑 */
}

.quiz-history.incorrect {
  border-color: #E48492; /* 不正解：赤 */
}

@keyframes poyonPop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    opacity: 1;
    transform: scale(1.2);
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.pop-effect {
  animation: poyonPop 0.6s ease-out forwards;
}


#scoreDisplay {
  font-size: 20px;
  color: #333;
}

#result {
  font-size: 28px;
  color: #0078D4;
  background: linear-gradient(145deg, #f9f9f9, #e0e0e0);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  letter-spacing: 1px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  max-width: 300px;
  margin: 0px auto 0px;
}

.review-link-button {
  display: inline-block;
  background-color:#3498db;
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.review-link-button:hover {
  background-color:#2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

#nickname {
  width: 320px;
  padding: 10px;
  font-size: 16px;
  margin-bottom: 20px;
    margin-top: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
}

#submitButton {
  width: 170px;
  padding: 12px;
  background-color: #3498db;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#submitButton:hover {
  background-color: #2980b9;
}

#trophy {
  margin-top: 20px;
  font-size: 24px;
  text-align: center;
  color: #e67e22;
}

#ranking, #rankingArea {
  margin-top: 20px;
}

#pagination {
  margin-top: 20px;
  text-align: center;
}

#pagination button {
  margin: 0 4px;
  padding: 6px 12px;
  font-size: 14px;
  background-color: #ecf0f1;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
}

#pagination button:hover {
  background-color: #bdc3c7;
}


.share-area {
  margin: 40px 0 20px;
  text-align: center;
}

.share-title {
  font-weight: bold;
  margin-bottom: 10px;
}

.share-btn {
  display: inline-block;
  padding: 8px 14px;
  margin: 5px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

/*
.x-btn { background: #000; }
.line-btn { background: #06C755; }
.fb-btn { background: #1877F2; }
*/

.share-btn:hover {
  opacity: 0.8;
}



#end_area{
  text-align: center;
}

#end_area p{
  margin-top: 30px;
  margin-bottom: 30px;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: 'Segoe UI', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* 列の幅指定 */
.ranking-table th:nth-child(1),
.ranking-table td:nth-child(1) {
  width: 20%; /* 順位の列を広めに */
}

.ranking-table td:nth-child(2) {
  word-break: break-word;
  white-space: normal;
}


.ranking-table th:nth-child(3),
.ranking-table td:nth-child(3) {
  width: 25%; /* スコアの列をさらに広めに */
}

.ranking-table th {
  background-color: #2c3e50;
  color: #ffffff;
  padding: 12px;
  text-align: center;
}

.ranking-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #ccc;
  background-color: #f8f9fa;
}

.ranking-table tr:nth-child(even) td {
  background-color: #e9ecef;
}

.ranking-table tr:hover td {
  background-color: #d6e0f0;
  cursor: default;
}

.ranking-table td:first-child {
  font-weight: bold;
  color: #e67e22;
}

.headline{

  background-color:#e67e22;
  padding: 10px 0px 10px;
  font-size: 20px;
  width: 100%;
  color: #ffffff;
  border-radius: 5px;
}

.score-card {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 300px;
  margin: 20px auto;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

.score-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.label {
  font-weight: 600;
  color: #555;
}

.value {
  font-weight: 700;
  color: #0078D4; /* Microsoft blue */
}

/* ------------ 部首ページ【共通】------------ */

.study_content {
  max-width: 960px;
  margin: auto;
  padding: 2em;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 12px;
}



.study_content ul {
  padding-left: 1.2em;
  margin-bottom: 1.5em;
}

.study_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2em;
  background-color: #fafafa;
  border-radius: 6px;

}

.study_table td {
  border: 1px solid #ddd;
  padding: 0.8em;
  text-align: left;
}

.study_table th {
  border: 1px solid #ddd;
  padding: 0.8em;
  text-align: left;
}

.study_table th {
  background-color: #f0f0f5;
  color: #333;
}

.study_table tr {
  border-bottom: 2px solid #ccc;
}


#main h1 {
   color: #333; /* 文字色 */
   background-image: repeating-linear-gradient(-45deg,#eee 0 6px,transparent 6px 12px);
   padding-left: 30px;
   margin: 20px 0px 35px;
}

/* 背景をずらしたデザイン */
#main h2 {
   position: relative;
   border: 1px solid #333; /*枠線*/
   color:#333; /* 文字色（黒）*/  
      padding: 5px 30px;
         margin: 30px 0px;
}
#main h2:after {
   content: '';
   background: #a5c9c1;
   width: calc(100% + 1px);
   height: calc(100% + 1px);
   position: absolute;
   top: 5px;
   left: 5px;
   z-index: -1;
}

#main h3 {
   position:relative;
   padding:.5em 0; /* 内側余白　上下・左右*/   
   color:#333; /* 文字色（黒）*/  
         margin: 20px 0px;
}

#main h3:after{
   --stripe-color:#b2aba1; /*ストライプの色 */
   position:absolute;
   content: "";
   width: 100%;
   height: 5px;
   bottom:0;
   left:0;
   background: linear-gradient(135deg, transparent 25%,var(--stripe-color)  25%,var(--stripe-color)  50%,transparent 50%,transparent 75%,var(--stripe-color) 75%,var(--stripe-color));
   background-size: 4px 4px;
}



/*  ------------漢字リストエリアの設定【共通】 ------------  */

#main{
padding-top: 0px;
width: 750px;
margin: 0 auto;
padding-bottom: 40px;
}


    .kanji_table {
      width: 100%;
      border-collapse: collapse;
      font-family: 'Segoe UI', sans-serif;
      background-color: #fcfcfa;
      border: 1px solid #ccc;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      overflow: hidden;
    }
    .kanji_table td {
      border: 1px solid #ddd;
      padding: 10px;
      text-align: center;
      font-size: 1.1em;
    }
    .kanji_table tr:first-child {
      background-color: #f2f2f2;

    }
    .kanji_table tr:nth-child(even):not(:first-child) {
      background-color: #f9f9f9;
    }
    .kanji_table tr:hover {
      background-color: #e6f2ff;
    }
    .kanji_table td:nth-child(1) {
      font-size: 1.8em;
      font-weight: bold;
      color: #333;
    }

.scroll_hint {
  display: none;
}


/* 共通スタイル（PCではスクロールなし） */
.kanji_table_wrapper {
  overflow-x: visible;
  
}

#top_back{
  padding-bottom:60px;
}

#top_back a {
  display: inline-block;
  padding: 10px 18px;
  margin-top: 10px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #444;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  transition: all 0.25s ease;
}

#top_back a:hover {
  background: #f5f5f5;
  border-color: #b5b5b5;
  color: #222;
  transform: translateY(-1px);
}



/* ============================
   フッター全体
============================ */
#footer {
  background: #f7f7f7;
  padding: 40px 20px;
  border-top: 1px solid #ddd;
  font-size: 14px;
    text-align: left; /* ← PCも中央寄せ */

}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================
   カラム全体（PCは横並び）
============================ */
.footer-columns {
  display: flex;
  flex-wrap: wrap;
    justify-content: center; /* ← カラム全体を中央寄せ */
padding-left: 80px;
  gap: 30px;
}

/* ============================
   各セクション
============================ */
.footer-section {
  flex: 1 1 220px; /* 最低幅180pxで自動調整 */

    max-width: 220px; /* ← 横幅を整えて中央に */

}

.footer-section h4 {
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: bold;
  color: #333;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 6px;
    text-align: left; /* ← リンクも中央寄せ */

}

.footer-section ul li a {
  color: #333;
  text-decoration: none;
  transition: 0.2s;
}

.footer-section ul li a:hover {
  color: #0078ff;
  text-decoration: underline;
}

/* ============================
   コピーライト
============================ */
.footer-copy {
  text-align: center;
  margin-top: 30px;
  color: #666;
  font-size: 13px;
}


.footer-section h4 {

  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #ddd;
  color: #333;
}


/* ------------ ランキングページ【共通】------------ */

#rankinggrade{
  text-align: center;
  margin: 0px auto;
}

/*------------- ガイドページのスタイル---------------*/

.guide_img{
  text-align: center;
}


/*------------- 書き方のページのスタイル---------------*/

.question_area_top{

 margin-bottom: 250px; 
}

.question_peats {
  border: 1px solid #ccc;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  background-color: #fff;
}

.question_item{

  color: red;
}

.question {
  font-size: 18px;
  margin-bottom: 10px;
}

.show-answer-button{
  margin-top: 30px;
}

.question_area{
  margin-bottom: 50px;
  text-align: center;
}

.answer {
  font-weight: bold;
  color: #333;
  margin-top: 10px;
  font-size: 50px;
}

.question_area button {
  margin: 6px;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background-color: #4CAF50;
  color: white;
}

.question_area button:hover {
  background-color: #45a049;
}


.show-answer-button{
  margin: 20px auto 6px;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background-color: #ff6b6b;
  color: white;
  width: 100px;

}

.show-answer-button button:hover {
  background-color: #e04a4a;
}


.pad-wrapper {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.pad-wrapper.expanded {
  max-height: 500px;
  opacity: 1;
  margin-top: 10px;
}

.draw-canvas {
  border: 2px solid #333;
  background-color: #fff;
  touch-action: none;
  border-radius: 8px;
}

.copyright_txt{
  font-size: 10px;
  text-align: center;
}

.pad-wrapper div{
  font-size: 22px;
}


/*------------- マイページのスタイル---------------*/


.point_table {
  width: 80%;
  border-collapse: collapse;
  margin: 24px auto 24px;
  font-size: 1rem;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* ヘッダー */
.point_table th {
  background: linear-gradient(135deg, #5a6e8c, #58667a); /* 落ち着いたブルー */
  color: #fff;
  padding: 14px 18px;
  font-weight: 600;
  text-align: left;
  font-size: 1.1rem;
}

/* セル */
.point_table td {
  padding: 12px 18px;
  border-bottom: 1px solid #e5e8ec;
  color: #333;
}

/* 偶数行・奇数行の色分け */
.point_table tr:nth-child(odd) td {
  background: #fafbfc;
}

.point_table tr:nth-child(even) td {
  background: #f2f4f7;
}

/* ホバー時 */
.point_table tr:hover td {
  background: #e8eef5;
  transition: 0.2s;
}

/* 称号の強調 */
.point_table td.rank {
  font-weight: bold;
}

/* ポイント数の色 */
.point_table td.points {
  color: #3c4f6b;
  font-weight: bold;
}


.grade_badges {
  display: flex;
  justify-content: center; /* 横方向の中央寄せ */
  align-items: center;     /* 縦方向の中央寄せ（必要なら） */
  gap: 20px;               /* 学年バッジの間隔 */
  flex-wrap: wrap;         /* 折り返しも綺麗に */
  margin: 40px 0px 20px;
}

.grade_item {
  text-align: center;
  margin-bottom: 40px;
}

.grade_badge {
  width: 80px;
  height: auto;
    display: block;
  margin: 0 auto;
}





/*------------------------------------
  ログインエリア（マイページ上部）
------------------------------------*/

.login_area02 {
  width: 100%;
  max-width: 480px;          /* 横幅を整える */
  margin: 20px auto 0px;         /* ★中央寄せの決め手 */
  padding: 20px 0px 0px 0px;
  border-radius: 14px;
  text-align: center;        /* ★中の文字も中央寄せ */
}

/* 「ようこそ ○○ さん！」 */
.login_area_txt {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

/* ボタンを横並び＆垂直方向も中央揃え */
.login_beside,
.login_beside02 {
  display: flex;
  align-items: center;   /* ★ 垂直方向を中央揃え */
  justify-content: center;
  gap: 12px;
}

/* pタグの余白を消す（ズレの原因） */
.login_beside p,
.login_beside02 p {
  margin: 0;
  padding: 0;
}

/* form も inline にして高さを揃える */
.login_beside form,
.login_beside02 form {
  margin: 0;
  padding: 0;
  display: inline-block;  /* ★ ボタンと同じ高さに */
}

.point_txt{
  font-size: 20px;
  font-weight: bold;
}

.center_txt_m{
  text-align: center;
}

.syougo_txt{
  font-size: 30px;
}

.button-2_size{
  width: 240px;
}

/*------------------------------------
  シンプルボタン（小さめ）
------------------------------------*/

.button-2,
.button-3 {
  display: inline-block;
  padding: 6px 14px;          /* 小さめ */
  font-size: 0.9rem;          /* 小さめ文字 */
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;           /* 少し軽め */
  cursor: pointer;
  transition: 0.2s;
}

/*------------------------------------
  白基調のシンプルボタン
------------------------------------*/

.button-2,
.button-3 {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid #cfd6e3;   /* 薄いグレーの枠線 */
  background: #ffffff;         /* ★白基調 */
  color: #3c4f6b;              /* 落ち着いたブルーグレー */
  text-align: center;
}

/* ホバー時：淡いブルーに */
.button-2:hover,
.button-3:hover {
  background: #e8f0ff;         /* ほんのり青みの白 */
  border-color: #b8c7dd;
}

/* ログアウトボタンも同じ白基調で統一 */
.button-3 {
  color: #3c4f6b;
  padding: 9px 14px;
}


/* エラーメッセージ */
.login_area02 p[style*="color: red"] {
  margin-bottom: 12px;
  font-weight: bold;
}

/*------------------------------------
  ポイント表示エリア
------------------------------------*/

.point_box {
  width: 70%;
  max-width: 360px;
  margin: 20px auto;
  padding: 18px 20px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  text-align: center;
}

.point_box .point_value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #3c4f6b;
  margin-bottom: 6px;
}

.point_box .point_label {
  font-size: 1rem;
  color: #555;
}

.point_box .point_message {
  font-size: 1rem;
  font-weight: 600;
  color: #3c4f6b;
}

.point_message{
  text-align: center;
}

/*------------------------------------
  ログイン・登録フォームエリア
------------------------------------*/

.login_area {
  width: 100%;
  max-width: 480px;       /* フォームの横幅を整える */
  margin: 0 auto 40px;    /* ★中央寄せの決め手 */
  padding: 24px 28px;
  border-radius: 14px;
  text-align: center;     /* ★中の文字・ボタンも中央寄せ */
}

/* 入力欄のラベルと入力ボックス */
.login_area label{
  display: block;
  text-align: left;       /* ラベルは左寄せのままの方が読みやすい */
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #444;
}

/* 入力ボックス */
.input_d {
  width: 60%;
  padding: 8px 10px;
  margin-top: 6px;
  border: 1px solid #cfd6e3;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

/*お問い合わせページ*/

.contact-wrapper {
  max-width: 600px;
  margin: 0px auto;
  padding: 0px;
}

.contact-title {
  text-align: center;
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

.contact-input,
.contact-textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact-textarea {
  height: 150px;
}

.contact-error {
  color: red;
  text-align: center;
  margin-bottom: 20px;
}

.contact-success {
  color: #333;
  text-align: center;
  font-size: 18px;
  padding: 20px 0;
}

.contact-form button {
  display: block;
  margin: 20px auto 0;
}

.contact-wrapper p {
  text-align: center;
}

/*  ------------PC向けのスタイル ------------ */

@media screen and (min-width: 1200px) {

  /* ------------  共通の設定【PC】 ------------  */
  .const_txt {
    display: none;
  }


  
 /* ------------  トップの設定【PC】 ------------  */

  .line_bg{
    display: none;
  }

.kanji-section{
    display: none;
  }

#main{
padding-top: 20px;

}

.accordion-warapper{
margin-top: 90px;
margin-bottom: 0px;


}

/*広告エリア*/

  .s_image3{
  display: none;

}

/*広告エリア*/

 /* ------------  問題ページの設定【PC】 ------------  */

#q_main{
  display:none;
}

.score-card {

  max-width: 400px;

}

#scoreDisplay {
  font-size: 27px;
  color: #333;
  width:100%;
}


}
/*  ------------タブレット向けのスタイル ------------ */

@media screen and (min-width: 768px) and (max-width: 1199px) {

  /* ------------  共通の設定【タブレット】 ------------  */
  .const_txt {
    display: none;
  }

/* ------------  トップページの設定【タブレット】 ------------  */
  #msg3 {
    font-size: 20px;
  }
 #msg3 h1{
  font-size: 20px;
  font-weight: normal;
 }

  .fuki {
    padding: 3rem 3rem 3rem 3rem;
    font-size: 22px;
  }

    .line_bg{
    display: none;
  }

.kanji-section{
    display: none;
  }

#profile_area{
  width: 65%;

}

.kanji_study {
  width: 65%;
}

/*広告エリア*/

  .s_image{
  display: none;

}

  .s_image2{
  display: none;

}

  .advertisement {
    margin: 80px auto 80px;
    width: 60%;
    text-align: center;
    color: #7F4F21;
    font-size: 13px;
    padding: 30px 10px;
background-color: rgba(255, 255, 255, 0.5);
border-radius: 20px;
  }



/*広告エリア*/

/* ------------  問題ページ【タブレット】 ------------  */

#q_main{
  display:none;
}

}

/*  ------------スマートフォン向けのスタイル ------------ */

@media screen and (max-width: 767px) {

  /* ------------  共通の設定【スマホ】 ------------  */


body {

  width: 97%;

}



  #container {
  
    padding-top: 38px;
  }

  .const_txt {
    text-align: right;
    padding-right: 20px;
    margin-bottom: 15px;
    color: #575757;
  }

  /*ハンバーガーメニュー*/

  .conts-body {

    margin: 0 auto;
    width: 100%;
    background-color: #ffffff;
    height: 53px;
    z-index: 50;
    box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0px;
    left: 0px;

  }

    .conts-menu {
    display: none;
  }



  .nav-list {
    margin-left: -60px;
    width: 300px;
  }



  #languageToggle {
  width: 300px;
  position: fixed;
  top: 18px;
  left: 10px;
  z-index: 10;
  font-size: 12px;
}


#main h2 {
   font-size: 17px;
}


  #footer {
    padding: 30px 15px;
    text-align: center; /* ← 全体を中央寄せ */
  }

  .footer-columns {
    flex-direction: column;
    gap: 20px;
    align-items: center; /* ← カラム自体を中央寄せ */
    padding-left: 0px;
  }

  .footer-section {

    padding-bottom: 15px;
    max-width: 100%; /* ← スマホでは幅いっぱいに */
    flex-basis: 100%;

  }

  
  .footer-section h4 {
    font-size: 16px;
  }

  .footer-section ul li {
    text-align: center; /* ← リンクを中央寄せ */
  }

  .footer-copy {
    margin-top: 20px;
  }


/* ------------  トップページの設定【スマホ】 ------------  */

  body {
    background-color: #FDF5E6;
   /* background-image: url("images/bg_sp_k.png");*/
  /*背景画像 */
  background-repeat: no-repeat;
  /*画像の繰り返しを無効にする */
  background-attachment: scroll;
  background-position: top center;
  /*画像を中央に配置 */
  }

.img_centertop img{
  width:250px;
}

.img_centertop02 img{
  width:60px;
}

.img_center_banner img{
    width:80%;
    margin-top: 50px;
}


.icon-text{
  text-align: center;
  margin-left: 0px;
  font-size: 12px;
}

.icon-text span{

    font-size: 14px;
}

.fuki {

  width: 72%;

}

.img_wrapper{

  margin-top: 30px;
}

.img_k_bg{

     display: none;

}

/*広告エリア*/

  .advertisement {
    margin: 95px auto 0px;
    width: 80%;
    text-align: center;
    color: #7F4F21;
    font-size: 13px;
    padding: 30px 10px;
background-color: rgba(255, 255, 255, 0.5);
border-radius: 20px;
  }

  .s_image3 img{
  width: 260px;

}

  .s_image{
  display: none;

}

  .s_image2{
  display: none;

}

/*広告エリア*/

#kanji_choice_area{

width: 100%;
margin: 60px 0px;
padding: 0px;
text-align: center;
}


.list-kanji{
  color: #ffffff;
}


#profile_area{
  width: 75%;

}


.move-left-to-right {
  position: absolute;
  animation: slideLR 10s linear infinite;
    width: 80px;   /* ← ここでサイズを自由に変更できる */
  height: auto;   /* アスペクト比を保つ */

  top:-38px;
}

@keyframes slideLR {
  0% {
    transform: translateX(60vw); /* 左の画面外からスタート */
  }

  100% {
    transform: translateX(-69vw);  /* 右で停止（5秒待つ） */
  }
}

#grade-buttons a{
  display: inline-block;
  margin:0px 5px 14px;

}

.question_area_top{

 margin-top: 100px; 
}

.accordion-warapper{
  padding-top: 10px;
    padding-bottom: 10px;
  background-color: #ffffff;
border-radius: 15px;
margin-bottom: 50px;
margin-top: 70px;
  width: 96%;
  border: #000 1px solid;
position: relative;
background-color: #ffffff;
opacity: 1;
background-image:  linear-gradient(#f4f4f4 2px, transparent 2px), linear-gradient(90deg, #f4f4f4 2px, transparent 2px), linear-gradient(#f4f4f4 1px, transparent 1px), linear-gradient(90deg, #f4f4f4 1px, #ffffff 1px);
background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
}

.top_txt{

  width: 95%;
  margin-bottom: 20px;
}


.fukidashi-01-01 {
  position: relative;
  width: fit-content;
  padding: 15px 16px;
  margin: 0px auto 60px;
}
.fukidashi-01-01::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 98%;
  height: 50%;
  box-sizing: border-box;
  border: 2px solid #547443;
  border-top: none;
  border-bottom-right-radius: 50px; /* 左下の角丸 */
  border-bottom-left-radius: 50px; /* 右下の角丸 */
  translate: -50%;
}


.reading_area_coloum {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* 2列に分割 */
  gap: 0px;                             /* ボタン間の余白 */
  justify-items: center;                 /* 中央寄せ */
  width: 100%;
  margin: 0px auto 0px;
  font-size: 14px;
}


#kanji-top-image{
  margin-top: -85px;
  margin-bottom: 30px;
}

.list-kanji{
  font-size: 18px;
  color: #ffffff;
  width: 90%;
}


.overlay {
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  pointer-events: none;

}

.img-h1 { max-height: 60%; }
.img-h2 { max-height: 40%; }
.img-h3 { max-height: 45%; }
.img-h4 { max-height: 55%; }
.img-h5 { max-height: 50%; }
.img-h6 { max-height: 45%; }

.base_img {
  border-radius: 6px;

}

.grade-button {

  text-align: center;
  width: 90%;
}


.kanji_study {
  position: relative; /* または absolute / fixed / sticky */
  z-index: 5;
  margin-top: 70px;
  margin-bottom: 30px;
}

.kanji-section{
  position: absolute;
  top:-70px;
  right:5px;
  z-index: -2;
}

.kanji_study img{
  width: 280px;
}

#totale_kanji_imgarea{

  background-size: 350px;
  margin-top: 10px;
  margin-bottom: 10px;
}

#totale_kanji{
  width: 310px;
  margin: 0px auto;
  text-align: center;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2列 */
    gap: 10px; /* 要素間の間隔 */
    padding-bottom: 30px;

}

.qlevel{
margin-top: 20px;
}

  .fuki img {
    width: 100px;
  }

  .fuki {
    padding: 2rem 2rem 2rem 2rem;
    margin-top: 65px;
    font-size: 16px;
  }


  
  .faceicon2 img {
    margin-left: 12px;
    margin-top: 18px;
  }


/*以下、②左側のコメント*/
.balloon8 {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
}

.balloon8 .faceicon2 {
  margin-right: 0px;
  width:22%;
}

.balloon8 .faceicon2 img {
  height: auto;
  width: 130px;
}

.balloon8 .chatting2 {
  width: 80%;
  text-align: left;
}

.line-bc2 {
  display: block;
  margin: 15px auto;
  width: 90%;

}

.kanji_study {
  width: 75%;
  font-size: 14px;
}

.kanji_study table{
  font-size: 12px;
}

    .chatting2 {
    margin-left: 10px;
    margin-bottom: 30px;
    margin-top: 0px;
  }

  .says2 {
    display: inline-block;
    position: relative;
    margin: 20px 0 0 50px;
    padding: 25px 15px 25px;
    font-size: 12px;
    border-radius: 12px;
    background: #ffffff;
    width: 150px;
  }

  .says2:after {
  content: "";
  display: inline-block;
  position: absolute;
  top: 100px;
  left: -19px;
  border: 8px solid transparent;
  border-right: 18px solid #ffffff;
  -webkit-transform: rotate(35deg);
  transform: rotate(35deg);
}

  .const_txt {
    text-align: right;
    padding-right: 20px;
    margin-bottom: 15px;
    color: #575757;
  }

  .logo_color01 {
    color: #2EA2CB;
  }

  .logo_color02 {
    color: #F4A017;
  }

  .logo_color03 {
    color: #757474;
  }

  .logo_color04 {
    color: #958AC1;
  }

  .logo_color05 {
    color: #E48492;
  }

#logo_area {
  position: absolute;
  top: -23px;
  left: -30px;
  transform: rotate(-15deg);
  width: 110px;
}

.accordion-content p{
  font-size: 19px;
  width: 100%;
}

.kanji_study_heading {
	font-size: 19px;
}

.kanji_study_heading::before {

	font-size: 20px;
}

#reading-selector{
  font-size: 12px;
  width: 300px;
}

#reading-selector label{
  margin: 3px 0px 2px 0px;
}


  .img_center img {
    width: 90%;
    position: relative;
    z-index: -5;
  }

.accordion {
    width: 400px;
    margin-bottom: 30px;
  }

  .accordion-header {
    width: 80%;
    font-size: 15px;
  }

  .accordion-content {
    width: 100%;
    padding: 12px 0px 20px;
    margin: 0px auto;
  }

  .accordion-header span,
  .accordion-content span {
    padding-left: 0px;
    position: relative;
  }

  #msg3 {
    width: 80%;
    margin: 0 auto;
    padding: 10px;
    background-color: #ffffff;
    /*背景色*/
    border: solid 1px #333333;
    /*線*/
    color: #333333;
    font-size: 15px;
    margin-top: 55px;
  }
 #msg3 h1{
  font-size: 15px;
  font-weight: normal;
 }

/* ------------  問題エリアの設定【スマホ】 ------------  */






  #image_zone {

    margin-bottom: -30px;
    margin-top: 10px;
    top:50px;
  }

  #image_zone img {

    width: 120px;
    max-width: 400px;

  }

/*吹き出し1*/

.balloon3-right-btm {
  position: absolute;
  top:125px;
  left: -20px;
  display: inline-block;
  margin: 0 0 1.5em 0;
  padding: 0 5px;
  width: 80px;
  height: 80px;
  line-height: 80px;
  text-align: center;
  color: #FFF;
  font-size: 14px;

  background: #a58eff;
  border-radius: 50%;
  box-sizing: border-box;
  vertical-align: top;

}

.balloon3-right-btm:before {
  content: "";
  position: absolute;
  bottom: -8px;
  right: -8px;
  margin-top: 0px;
  border: 15px solid transparent;
  border-left: 15px solid #a58eff;
  z-index: 0;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}


#choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2列にする */
  gap: 5px; /* ボタン間の余白 */
  justify-items: center; /* ボタンを中央揃え */
  margin-top: 20px;
  text-align: center;
  width: 90%;
  margin: 0 auto;
}

#choices button {

  width: 130px;
  height: 60px;
  font-size: 14px;
  font-weight: bold;
}

 #kanji{
    font-size: 100px;
    text-align: center;
    background-color: #ffffff;
  
  /* 以下任意のスタイル */
  padding: 20px;
  width: 90%;
}

#progress{
  position: absolute;
  top:10px;
  right: 10px;
}

#timer{
  position: absolute;
  top:180px;
  right: 10px;
}

/* ------------  エンドエリアの設定【スマホ】 ------------  */

#scoreDisplay {
  font-size: 20px;
 
}

#result {
  font-size: 20px;
 
}

/*  ------------部首ページの設定【スマホ】 ------------  */

.study_content {
  width: 95%;
}

.study_table {
  width: 100%;

}

/*------------- ガイドページのスタイル【スマホ】---------------*/

.guide_img img{
  width: 350px;
}


/*  ------------漢字リストエリアの設定【スマホ】 ------------  */

#main{
padding-top: 35px;
width: 90%;
margin: 0 auto;
}

.kanji_table_outer {
  position: relative;
}

.kanji_table_wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.kanji_table_outer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(to left, white, transparent);
  pointer-events: none;
  z-index: 10;
}


  .scroll_hint {
    display: block;
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 4px;
  }

/*------------- マイページのスタイル---------------*/


.point_table {
  width: 95%;
}


/*------------------------------------
  ログインエリア（マイページ上部）
------------------------------------*/

.login_area02 {
  width: 90%;
  max-width: 480px;          /* 横幅を整える */
  margin: 20px auto 0px;         /* ★中央寄せの決め手 */
  padding: 20px 0px 0px;
  border-radius: 14px;
  text-align: center;        /* ★中の文字も中央寄せ */
}

/*------------------------------------
  ログイン・登録フォームエリア
------------------------------------*/

.login_area {
  width: 90%;
  max-width: 480px;       /* フォームの横幅を整える */
  margin: 0 auto 40px;    /* ★中央寄せの決め手 */
  padding: 24px 28px;
  border-radius: 14px;
  text-align: center;     /* ★中の文字・ボタンも中央寄せ */
}

/*------------------------------------
  ポイント表示エリア
------------------------------------*/

.point_box {
  width: 70%;
  max-width: 360px;
  margin: 15px auto 15px;
  padding: 10px 10px;

}

.point_box .point_message {
  font-size: 15px;
}

.point_table th:nth-child(3) { width: 60px; }  /* ベストスコア */
.point_table th:nth-child(4) { width: 30px; }  /* ベストスコア */

/* 入力ボックス */
.input_d {
  width: 100%;
  padding: 8px 10px;
  margin-top: 6px;
  border: 1px solid #cfd6e3;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

/*お問い合わせエリア*/

.contact-wrapper {
  max-width: 85%;
}

}