/*
Theme Name: simple
Author: ChatGPT
Version: 1.0
Description: A bare-bones starter theme with 640px centered layout on desktops.
License: MIT
*/

html,body{
  margin:0;
  padding:0;
}
html {
  scroll-behavior: smooth;
}
body{
  font-family: "Helvetica Neue",
    Arial,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,
    sans-serif;
  line-height:1.6;
}
.wrapper{
  max-width:640px;
  margin:0 auto;
  padding:0 1rem;
}
img{
  max-width:100%;
  height:auto;
}

.container {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}
header {
  background: #000;
  color: white;
  position: relative;
  overflow-x: hidden; /* 横のはみ出し防止 */
  margin: 0 auto;
  max-width: 640px;
  text-align: center;
}
header#page {
  background: none;
}
footer {
  background: #000;
  color: white;
  position: relative;
  overflow-x: hidden; /* 横のはみ出し防止 */
  margin: 20px auto 0;
  max-width: 640px;
  text-align: center;
  overflow: hidden;
}

h1.topH1,p.h1 {
    margin: 0;
    padding: 3%;
    width: 30%;
}

p.h1 {
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

/* ラジオボタンを大きく */
top.input[type="radio"] {
  width: 24px;     /* 幅と高さを指定すると確実 */
  height: 24px;
}
/* 送信ボタンを押しやすく */
top.input[type="submit"] {
  font-size: 1rem;        /* スマホで文字が極小にならないように */
  padding: .6em 1.2em;    /* タッチ領域を広げる */
  border-radius: .3em;    /* 角丸はお好みで */
      width: 80%;
    margin: 10% 0 0 0;
}
* {
  box-sizing: border-box;
}

/* menu関連  */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  top: 2.4%;
  right: 4%;
  z-index: 1001;
  transition: all 0.3s ease;
  position: fixed;
}

.menu-toggle svg {
  width: 30px;
  height: 30px;
}
.menu-toggle svg rect {
  fill: white;
  transition: all 0.3s ease;
  transform-origin: center;
}
#page .menu-toggle svg rect {
  fill: black;  
}

.menu-toggle.scrolled svg rect {
  fill: black;
}

@media screen and (min-width: 768px) {
  .menu-toggle {
    left: 50%;                          /* 中央を基準に */
    transform: translateX(260px);       /* 640px/2 右へずらす */
    right: auto;                        /* 右基準は解除 */
  }
}

/* メニューの表示・非表示 */
.menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 40, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.menu ul {
  list-style: none;
  text-align: center;
  padding: 0;
}

.menu ul li {
  margin: 20px 0;
}

.menu ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 24px;
}

/* 開いた状態 */
.menu.open {
  display: flex;
}
/* バツ形状 */
.menu-toggle.open .bar1 {
  transform: rotate(45deg) translate(0px, 30px);
}
.menu-toggle.open .bar2 {
  opacity: 0;
}
.menu-toggle.open .bar3 {
  transform: rotate(-45deg) translate(0px, -30px);
}
.menu-toggle.open svg rect {
  fill: white !important;
}
スライダーの枠 */
.topSlide {
  overflow: hidden;
  width: 100%;
  height: 180px; /* 必要に応じて調整 */
  max-width: 640px; /* 安全策で念のため */  
  position: relative;
}

/* 横並び＆スライド */
.topSlide .slider-track {
  width: max-content; /* コンテンツ幅に合わせる */
  display: flex;
  animation: slideLeft 20s linear infinite;
}
@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
/* 各カード */
.topAnimals {
  flex: 0 0 auto;
  width: 240px; /* 各スライドの幅 */
  height: 310px; /* 統一された高さ */
  margin-right: 20px;
  background: #fff;
  border-radius: 8px;
  padding: 0px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #222;
}

.topAnimals img {
  height: 200px;
  object-fit: contain;
}

.topAnimalsName {
  font-weight: bold;
  margin: 8px 0 4px;
  z-index: 2;
}

.topAnimalsExp {
font-size: .8em;
    text-align: center;
    margin: 0;
    padding: 0;
    background-color: #eee;
    width: 240px;
    border-radius: 0 0 8px 8px;
    padding: 25px 5px 20px;
    margin-top: -18px;
}

/* アニメーション定義 */
@keyframes slideLeft {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

p.topAnimalsName {
    background-color: #ccc;
    border-radius: 999px;
    padding: 4px 15px;
    font-size: 0.8em;
}
span.ten {
    color: #ff0099;
    font-weight: bold;
    font-size: 1.5em;
}
span.tekisei {
    font-weight: bold;
}

p.title {
    font-weight: bold;
    font-size: 1.4em;
    color: #222;
    text-align: center;
    margin: 30px 0;
}
p.titleDescription {
  font-size: 0.9em;
  text-align: center;
}
a.linkbtm {
      display: block;
    text-decoration: none;
    color: #fff;
    background-color: #2275E1;
    width: 80%;
    padding: 10px;
    margin: 20px auto;
    text-align: center;
    border-radius: 999px;
    font-weight: bold;
    font-size: 1em;
}
main.page_wrapper {
    padding: 5%;
    font-size: 0.9em;
}
.page_wrapper h1 {
    font-size: 1.6em;
    margin: 0;
    padding: 0;
}
.Chara {
  display: flex;
  align-items: center; /* 縦中央寄せ */
  margin: 5% 0 0 0;
  gap: 2%; /* 画像とテキストの間隔 */
}

.CharaLeft {
  width: 30%;
}

.CharaLeft img {
  max-width: 100%;
  height: auto;
  display: block;
}

.CharaRight {
  width: 70%;
}

p.CharaTags {
  margin: 0;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

p.CharaTags span {
  font-size: 0.7em;
  background-color: #222;
  color: #fff;
  padding: 2px 10px;
  font-weight: bold;
}

p.CharaName {
  font-size: 1.2em;
  margin: 0.3em 0 0 0;
  padding: 0;
}
p.CharaExp {
    margin: 0;
    padding: 0;
    font-size: 0.9em;
}

.tag.neko { background-color: #5B3CBB; }
.tag.inu { background-color: #0066CC; }
.tag.syacho { background-color: #CC0033; }
.tag.sanbo { background-color: #2E8B57; }
.tag.gaiko { background-color: #E67E22; }
.tag.naiko { background-color: #555555; }

.question-block {
    font-size: 1em;
    line-height: 1.7;
}
.question-block input[type="radio"] {
    transform: scale(1.3);
    margin-right: 6px;
}
span.ranking {
    color: #ff0099;
    font-size: 1.4em;
    font-weight: bold;
}
span.rankingbikou {
    color: #aaa;
    font-weight: normal;
    font-size: 0.8em;
}
.rankDefinition {
    background-color: #F2E6E9;
    font-size: 0.85em;
    padding: 3%;
    color: #444;
    margin: 3%;
}
.charaRankComment {
    margin: 5% 0 0 0;
}
.charaRank {
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: #222;
    padding: 5% 0;
}

p.charaRankTitle {
    font-weight: 700;
    font-size: 1.2em;
    margin: 0 0 3%;
}
#chara h2 {
    text-align: center;
    margin: 10% 0;
    color: #C3221F;
}
p.charaAisho img {
    width: 20%;
}

main#chara {
    font-size: 1em;
    padding: 0 5% 5% 5%;
    line-height: 1.8;
}
main#chara h3 {
    text-align: center;
    margin: 10% 0;
}
main#chara li:before {
    content: '✔';
    color: green;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}
main#chara li {
    list-style: none;
    position: relative;
    padding-left: 1.4em;
    margin-bottom: 15px;
    line-height: 1.5;
}
main#chara ul,main#chara ol {
    background-color: #FFF8F7;
    padding: 5%;
    margin: 0 0 5% 0;
}
.charaHead {
    width: 100%;
    overflow: hidden;
    clear: both;
    position: relative;
}
p.point {
    position: absolute;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom right, #52006A 0%, #52006A 20%, #1593FF 100%);
    padding: 0% 6%;
    border-radius: 999px;
    font-weight: 700;
    color: #fff;
}
p.point span {
    font-size: 1.5em;
    margin: 0 2%;
    display: contents;
}
.charaHead img {
    width: 70%;
    margin: 0 15%;
}
main#chara ul.charaMatome {
    margin: 0 0 2% 0;
}
.charaAdvice {
  display: flex;
  align-items: center;
  gap: 2em;
}

.charaAdviceImg {
  flex: 0 0 15%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.charaAdviceImg img {
  max-width: 100%;
  height: auto;
  display: block;
}

.charaAdviceFukidasi {
  position: relative;
  background: #f0f8ff;
  padding: 1em 1.2em;
  border-radius: 10px;
  font-size: 1em;
  line-height: 1.6;
  flex: 1;
}

/* ふきだしの矢印 */
.charaAdviceFukidasi::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: #f0f8ff;
}


.charaForeverione {
    position: relative;
    padding: 5%;
    background: #fff;
    font-family: sans-serif;
    font-size: 1em;
    line-height: 1.6;
    color: #333;
}

.charaForeverione::before,
.charaForeverione::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border: solid #00aaff;
}

.charaForeverione::before {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px; /* 左上カギカッコ */
}

.charaForeverione::after {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0; /* 右下カギカッコ */
}

.charaForeverione p {
    margin: 0;
}

.Graph {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.MyGraph {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.graph-name {
  flex: 0 0 70px;
  font-size: 16px;
}

.graph-bar-container {
  flex: 1;
  background-color: #e0e0e0;
  height: 20px;
  margin: 0 8px;
  border-radius: 4px;
  overflow: hidden;
}

.graph-width {
  background: linear-gradient(to bottom right,#52006a 0%,#52006a 20%,#1593ff 100%);
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.graph-percent {
  flex: 0 0 auto;
  font-weight: bold;
}
#toggleExplanation {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #007bff; /* 青色リンク風 */
  text-decoration: underline;
  cursor: pointer;
}
#toggleExplanation:hover {
  text-decoration: none;
}
.button-wrapper {
  width: 100%;
  text-align: right;
}
ul.rankIndex {
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.rankIndex li {
    border-width: 1px 0;
    border-style: solid;
    border-color: #ddd;
    padding: 12px;
}
p.job-definition {
    margin: 20px 0;
    background-color: #eee;
    padding: 10px;
    font-size: 0.8em;
}
table.animal-ranking-table {
    font-size: 0.8em;
}

main#chara li:last-child {
  margin-bottom: 0;
}
.chara-chart p {
    background-color: #efefef;
    padding: 5%;
}
#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 64px;
  height: 64px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 1000;
  display: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#scrollTopBtn:hover {
  transform: scale(1.1);
}

#scrollTopBtn svg {
  display: block;
}
.sns-share-right {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 1em 0;
}

.sns-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sns-circle:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

.sns-circle.x {
  background-color: #000;
}

.sns-circle.line {
  background-color: #06C755;
}

.sns-circle.fb {
  background-color: #3b5998;
}


.speech-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 600px;
  margin: 20px auto;
  padding: 0 16px;
  flex-wrap: wrap;
}

.icon {
  width: 20%;
  flex-shrink: 0;
}

.speech-bubble {
  background-color: #f0f0f0;
  border-radius: 12px;
  padding: 12px 16px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  max-width: 75%;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -16px; /* 位置を調整 */
  width: 0;
  height: 0;
  border: 10px solid transparent; /* ← サイズ大きく */
  border-right-color: #f0f0f0; /* ← 吹き出し色 */
}

@media (max-width: 480px) {
  .speech-bubble {
    font-size: 13px;
  }
}
