:root{
  --maincolor: #4169e1;
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.fade-in-left {
  animation: fadeInLeft 0.6s ease;
}

.result-image-caption{
  display: block;
  color: #ffffff;
  background-color: var(--maincolor);
  text-align: right;
  padding-right: 10px;
}

.result-image-caption a{
  display: inline-block;
  color: #ffffff;
  background-color: var(--maincolor);
  text-align: right;
  padding: 5px 0px;
}

h3 {
    display: block;
    margin: auto;
    font-size: 1em;
    margin-top: 0px;
    width: 80%;
    border-top: var(--maincolor) solid 2px;
    border-bottom: var(--maincolor) solid 2px;
    color: var(--maincolor);
    font-weight: bold;
    font-family: "Noto Sans JP", sans-serif;
    margin-bottom: 20px;
}


.result-summary figure{
  max-width: 300px;
  align-items: right;
  justify-content: right;
}
#result-image {
    display: inline-block;
    position:relative;
    left: 50px;
    max-width: 100%;
    max-height: 100%;
    padding-top: 10%;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  #result-score-container{
    display: block;
    width: 100%;
  }
  #result-score {
    display: block;
    border-radius: 5px;
    padding-top: 20px;
    width: 100%;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    color: var(--maincolor);
    font-size: 3em;
    font-weight: bold;
  }

  #result-hitokoto {
    position:relative;
    grid-column: 2 / 3;
    border-radius: 5px;
    grid-row: 1/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(255, 255, 255);
    border: #888888 solid 2px;
    margin-bottom: auto;
    margin-top: 10%;
    margin-right: 10%;
    padding: 30px 10px;
    font-size: 1em;
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 700;
    color: var(--maincolor);
  }

#result-hitokoto:after, #result-hitokoto:before {
	right: 100%;
	top: 50%;
	border: solid transparent;
	content: "";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
}

#result-hitokoto:after {
	border-color: rgba(255, 255, 255, 0);
	border-right-color: #ffffff;
	border-width: 20px;
	margin-top: -20px;
}
#result-hitokoto:before {
	border-color: rgba(54, 52, 92, 0);
	border-right-color: #888;
	border-width: 23px;
	margin-top: -23px;
}

  #result-total-score{
    width: 100%;
    display: block;
    grid-column: 2;
    grid-row: 1;
    margin: auto;
    margin-bottom: 0;
    align-items: center;
    justify-content: center;
  }
  .highscore{
    background-color: #ffeedc;
        background-color: rgb(255, 253, 249); /* 背景の色 */
    background-image: 
      linear-gradient(90deg,#e7e7e7, 1px, transparent 1px), /* 縦線 */
      linear-gradient(#e7e7e7, 1px, transparent 1px); /* 横線 */
    background-size: 40px 40px; /* 方眼紙のサイズ */;
}

.lowscore{
    border-bottom:#929292 solid 1rem;
    background: linear-gradient(to top, #ccc, #888888);
}

.lowscore #result-score{
  color: white;    
  background: #bdbdbd;
  box-shadow: 10px 10px 4px #777777 ;
}

.hidden {
  color: rgb(255, 255, 255);
}

#character-kousin{
  width: 50px;        /* アイコンサイズ */
  height: 50px;
  opacity: 1;
  margin-right: auto;
}

#character-kousin-container{
  position: fixed;
  left: 20px;
  bottom: 20px;
  cursor: pointer;
  opacity: 1;
  z-index: 9999;
}

/* ツールチップ */
#character-kousin-tips {
    position: relative;
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 30px;
    background-color: #333;
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 16px;
}

#character-kousin-tips:before {
    position: absolute;
    top: 100%;
    left: 85px;
    height: 0;
    width: 0;
    border-style: solid;
    border-color: transparent;
    border-top-color: #333;
    border-width: 8px;
    content: "";
}

#next-indicator {
    position: absolute;
    display: none;
    bottom: 4px;
    right: 4px;
    font-size: 1rem;
    animation: blink 5s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}