:root {
  --main-color: #f0b4ad;
  --sub1-color: #7bc3d0;
  --sub2-color: #fffaee;
  --sub3-color: #ffa500;
  --sub4-color: #70372c;
  --base-width: 750px;
}

button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
  appearance: none;
}

.display-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.base-btn {
  background-color: var(--sub1-color);
  color: white;
  font-size: 35px;
  font-weight: bold;
  border-radius: 10px;
}

.base-btn:hover {
  transform: scale(1.1);
}

.base-width {
  width: var(--base-width);
}

.main-container {
  background-color: white;
  border: solid 5px var(--main-color);
  border-radius: 20px;
  width: var(--base-width);
}

.empty-container {
  background-color: white;
  border: solid 5px var(--main-color);
  border-radius: 20px;  
}

.main-title-font {
  color: var(--sub1-color);
  font-weight: bold;
}

.main2-title-font {
  color: var(--main-color);
  font-weight: bold;
}

.sub-title-font {
  color: var(--sub1-color);
  font-weight: 600;
}

.sub2-title-font {
  color: var(--main-color);
  font-weight: 600;
}

.sub3-title-font {
  color: var(--sub3-color);
  font-weight: 600;
}

.sub4-title-font {
  color: var(--sub4-color);
  font-weight: 600;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

/* header */
header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  padding: 10px 20px;
  z-index: 1001;
  margin: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-area img {
  height: 50px;
}

.site-name {
  font-size: 24px;
  font-weight: bold;
  margin-left: 10px;
  color: black;
  text-decoration: none;
}

.paw {
  font-size: 24px;
  margin-left: 5px;
}

.nav-link {
  margin-left: clamp(10px, 2vw, 20px);
  font-size: clamp(14px, 2vw, 20px);
  text-decoration: none;
  color: black;
  font-weight: bold;
}

.sns-links {
  margin-left: clamp(10px, 2vw, 40px);
}

.sns-links img {
  width: 30px;
  height: 30px;
  margin: auto 5px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.sns-links img:hover {
  transform: scale(1.1);
}

body {
  font-family: Arial, sans-serif;
  text-align: center;
  background: var(--sub2-color);
  margin: 0;
  padding: 0;
}

body.modal-open {
  overflow: hidden;
}

.header-bar {
  position: relative;
  align-items: center;
  text-align: start;
  z-index: 1001;
  padding-left: 15px;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: var(--main-color);
}

.besttype-logo-area {
  justify-content: center;
  align-items: center;
  text-decoration: none;
  width: 100%;
}

h1 {
  margin: 0;
  margin-left: clamp(10px, 2vw, 20px);
  font-size: clamp(15px, 6vw, 50px);
  color: white;
}

.sub-header-button {
  width: 75px;
  height: 75px;
}

.sub-header-button img{
  width: 100%;
  height: 100%;
}

.sub-header-button:hover{
  transform: scale(1.1);
}

/* side-bar */
#sidebar {
  position: fixed;
  top: 0px;
  left: -200px;
  width: 200px;
  height: 100%;
  background-color: var(--sub1-color);
  color: white;
  padding-top: 170px;
  transition: left 0.5s ease;
  z-index: 1000;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

#sidebar.open {
  left: 0;
}

.sidebar-nav {
  gap: 10px;
  padding: 0 10px;
}

.sidebar-btn {
  background: transparent;
  border: none;
  color: white;
  padding: 10px;
  text-align: left;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-btn.active {
  font-size: 1.5em;
  font-weight: 600;
  /* background-color: rgba(255, 255, 255, 0.15); */
}

#sidebar-tab {
  position: absolute;
  top: clamp(160px, 22vw, 200px);
  left: 100%;
  width: 20px;
  height: 80px;
  background: var(--sub1-color);
  clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%);
  cursor: pointer;
  z-index: 1001;
}

/* main */
.key100-main-content-container {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: flex-start;
  margin: 40px 0;
}

.key100-hori-ads-region1 {
  display: none;
}

.key100-vert-ads-region1 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 300px;
  height: 900px;
  /* border: solid 1px red; */
}

.key100-title-container,
.ENC-title-container {
  height: 550px;
}

.FallGame-title-container {
  height: 480px;
}

.key100-ranking-container {
  height: 600px;
}

.key100-game-container {
  justify-content: center;
  align-items: center;
  text-align: center;
  width: var(--base-width);
  gap: 20px;
}

.key100-title,
.ENC-title {
  font-size: 52px;
}

.key100-sub-title {
  font-size: 40px;
}

.key100-ranking-sub-title {
  font-size: 30px;
  margin: 0;
}

.key100-ranking-sub-container {
  justify-content: flex-start;
  align-items: center;
  width: 45%;
  height: 400px;
}

.FallGame-stage-sub-container {
  justify-content: space-evenly;
  align-items: center;
  width: 45%;
  height: 540px; 
}

.FallGame-stage-container {
  height: 700px;
}

.key100-ranking {
  background-color: white;
  border: solid 3px var(--main-color);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.stage-words-list {
  background-color: white;
  border: solid 3px var(--main-color);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.key100-strt-btn {
  width: 450px;
  height: 70px;
  margin: 30px 0;
}

.key100-hint-toggle-container {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  /* border: solid 1px blue; */
  width: 50%;
  margin: 0 auto;
  color: var(--sub1-color);
  font-size: 25px;
  font-weight: 600;
}

.key100-typing-outer-container {
  width: var(--base-width);
  justify-content: space-between;
}

.key100-typing-container {
  background-color: white;
  border: solid 5px var(--main-color);
  border-radius: 20px;
  height: 430px;
  width: 75%
}

.ENC-container {
  background-color: white;
  border: solid 5px var(--main-color);
  border-radius: 20px;
  height: 430px;
  width: 100%
}

.key100-typing-sub-container {
  background-color: white;
  border: solid 5px var(--main-color);
  border-radius: 20px;
  height: 430px;
  width: 20%;
}

.ios-toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 28px;
}

.ios-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #e5e5e5;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: background-color 0.3s;
}

.slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.ios-toggle input:checked+.slider {
  background-color: var(--main-color);
}

.ios-toggle input:checked+.slider::before {
  transform: translateX(32px);
}

.question-wrapper {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.question-block {
  position: absolute;
  width: 100%;  
  left: 0;
  transition: all 0.3s ease;
  text-align: center;
}

#current-question {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  top: 30%;
  transform: translateY(-50%);
  opacity: 1;
  height: 150px;
  /* border: solid 1px red; */
  gap: 8px;
}

#current-question p {
  margin: 0;
}

#next-question {
  top: 85%;
  transform: translateY(-50%);
  opacity: 0.3;
  height: 80px;
  /* border: solid 1px red; */
  transition: top 0.3s ease, opacity 0.3s ease, height 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

#next-question.promote {
  height: 150px;
  /* border: solid 1px green; */
}

#next-question p {
  display: block;
  margin: 0;
  font-size: 25px;
  transition: font-size 0.3s ease;
  /* border: solid 1px blue; */
}

#next-question.promote #next-jp-word {
  font-size: 45px;
  /* border: solid 1px blue;   */
  transform: translateY(110%);
  box-sizing: border-box;
}

#next-question.promote #next-en-word-display {
  font-size: 45px;
  /* border: solid 1px blue;   */
  transform: translateY(-50%);
  box-sizing: border-box;
}

#next-question .inner {
  height: 80px;
  /* ✅ 固定高さ */
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

#next-question.promote .inner {
  height: 150px;
  /* ✅ アニメーション時も固定 */
}

#next-next-question {
  opacity: 0;
  top: 120%;
  transform: translateY(-50%);
  /* position: absolute;  */
  width: 100%;
}

#next-next-question .inner2 {
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

#next-next-question.promote #next-next-jp-word {
  transform: translateY(14%);
}

#next-next-question.promote #next-next-en-word-display {
  transform: translateY(-15%);
}

.question-block p {
  margin: 5px;
}

#jp-word {
  font-size: 45px;
  font-weight: bold;
  color: var(--sub4-color);
}

#next-jp-word,
#next-next-jp-word {
  font-size: 25px;
  font-weight: bold;
  height: 40px;
  line-height: 40px;
  color: var(--sub4-color);
}

#en-word-display {
  font-size: 45px;
  letter-spacing: 3px;
}

#next-en-word-display,
#next-next-en-word-display {
  font-size: 25px;
  letter-spacing: 3px;
}

#en-word-display span {
  font-size: 45px;
  color: rgba(0, 0, 0, 0.3);
}

#next-en-word-display,
#next-next-en-word-display span {
  font-size: 25px;
  color: rgba(0, 0, 0, 0.3);
}

#en-word-display .typed {
  color: var(--sub1-color);
  font-weight: bold;
}

#en-word-display .error {
  color: var(--main-color);
  font-weight: bold;
}

.hidden {
  display: none;
}

#progress {
  margin-top: 15px;
  font-weight: bold;
}

.hidden {
  display: none;
}

.typed {
  color: var(--sub1-color);
}

.error {
  color: var(--main-color);
}

.next {
  opacity: 0.3;
  top: 80%;
}

.game-sub-label1 {
  font-size: 25px;
  margin: 0;
  padding: 0;
}

.game-sub-label2 {
  font-size: 30px;
  margin: 0;
  padding: 0;
}

.keyboard-container {
  width: var(--base-width);
  height: 300;
  padding: 10px;
  box-sizing: border-box;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  margin: 5px 0;
}

.key {
  width: 45px;
  height: 45px;
  border: 4px solid #f3bbb5;
  border-radius: 8px;
  margin: 2px;
  font-size: 25px;
  font-weight: bold;
  color: #f3bbb5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.key.large {
  width: 70px;
}

.key.space {
  width: 200px;
}

.key.shift {
  width: 80px;
}

.key.active {
  background: #f3bbb5;
  color: white;
}

.key.next {
  background-color: var(--sub1-color);
  border: solid 4px var(--sub1-color);
  color: white;
  opacity: 1;
}

.key.hit {
  background-color: var(--sub1-color);
  border: solid 4px var(--sub1-color);
  color: white;
  transform: scale(0.9);
}

.key.miss {
  background-color: rgba(255, 0, 0, 0.5);
  transform: scale(0.9);
}

.result-list {
  padding: 2px 4px;
  font-size: 16px;  
}

.result-list-container {
  background-color: white;
  border: solid 3px var(--main-color);
  width: 90%;
  height: 100%;
  margin: 10px auto;
  overflow-y: auto;  
  padding: 5px;
  text-align: left;
  box-sizing: border-box;
}

@keyframes comboPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.combo-pop {
  animation: comboPop 0.25s ease;
}

#score {
  /* display: inline-block; */
  transition: transform 0.3s ease;
}

.countdown {     
  font-size: 100px;
  font-weight: bold;
  color: var(--main-color);
  z-index: 1000;
  /* background-color: rgba(255, 255, 255, 0.8); */ 
  padding: 40px 60px;  
  transition: opacity 0.3s ease;
  transform: translateY(50%);
}

.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 245, 211, 0.3);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: white;
    padding: 20px 30px;
    border-radius: 30px;
    border: 5px solid var(--main-color);
    display: flex;
    flex-direction: column;
    align-items: center;   
    overflow-y: auto; 
    gap: 20px;
    width: 550px;
    height: 700px;
}

.stage-section {
  margin-bottom: 30px;
}

.sub-stage-grid {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 15px;
    justify-items: flex-start;
}

.sub-stage-button {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background-color: white;
    font-weight: bold;
    color: var(--sub1-color);
    border: 3px solid var(--main-color);
    border-radius: 10px;
    width: 97px;
    height: 97px;    
    font-size: 20px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.sub-stage-button:hover {
    transform: scale(1.08);
}

.sub-stage-button .btn-stars .star { 
  width: 18px; 
  height: 18px; 
}

.sub-stage-button-EC {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background-color: white;
    font-weight: bold;
    color: var(--sub1-color);
    border: 3px solid var(--main-color);
    border-radius: 10px;
    width: 170px;
    height: 97px;    
    font-size: 20px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.sub-stage-button-EC:hover {
    transform: scale(1.08);
}

.sub-stage-button-EC .btn-stars .star { 
  margin: 5px 5px;
  width: 25px; 
  height: 25px; 
}

.sub-stage-label{ font-size:18px; line-height:1; }

.FallGameInput {
  font-size: 40px;
  font-weight: bold;
  letter-spacing: 3px;
  padding-left: 20px;
  color: var(--sub1-color);
  box-sizing: border-box;
}
.FallGameInput:focus {
  outline: none;
}

#canvas-container {
    position: relative;
}

#waiting-message {
    position: absolute;
    font-weight: bold;
    font-size: 36px;
    color: var(--main-color); /* JSで上書きされてもOK */

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    width: 78%;
    z-index: 2000;
}

/* === 共通・星の見た目 === */
.btn-stars .star{
  position: relative;
  display: inline-block;
  width: 50px; height: 50px;   /* 基本サイズ */
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.08));
  transform: translateX(var(--star-tx, 0)) scale(var(--star-sc, 1));
  transition: transform 0.3s ease;
}

/* 擬似要素で丸み＆グロスを共通化 */
.btn-stars .star::before,
.btn-stars .star::after {
  content:"";
  position:absolute; inset:0;
  clip-path: polygon(
    50% 0%, 68% 30%, 98% 35%, 76% 59%, 82% 91%,
    50% 76%, 18% 91%, 24% 59%, 2% 35%, 32% 30%
  );
  border-radius: 6px; /* ← “角に丸み” */
}

/* 状態（ロック/アンロック） */
.btn-stars .star.locked::before {
  background: linear-gradient(180deg,#d9d9d9,#bfbfbf);
}
.btn-stars .star.locked::after {
  background: radial-gradient(circle at 30% 30%,rgba(255,255,255,.7),transparent 60%);
  opacity:.6;
}

.btn-stars .star.unlocked::before {
  background: linear-gradient(180deg,#ffd34d,#ffb300); /* gold */
}

.btn-stars .star.unlocked::after {
  background: radial-gradient(circle at 30% 30%,rgba(255,255,255,.9),transparent 60%);
  opacity:.9;
}

/* ポップ演出（結果画面で使用） */
.btn-stars .star.pop {
  animation: starPop .3s ease;
}
@keyframes starPop { 0%{transform:scale(.9)} 70%{transform:scale(1.15)} 100%{transform:scale(1)} }

/* サイズユーティリティ */
.star-sm { width:20px; height:20px; }
.star-md { width:50px; height:50px; }
.star-lg { width:64px; height:64px; }

/* メイン画面の3つ星（ホルダー1個に統一したので幅だけ寄せる） */
#main-stage-stars.btn-stars {
  display:flex;
  gap:6px;
  align-items:center;
  justify-content:center;
}

/* スコアバー上の星は位置指定が必要なので、ホルダーを相対配置して中の星を絶対配置 */
#score-bar-wrapper { position: relative; } /* 既に relative なら不要 */
#score-bar-stars {
  position: absolute;     /* ← 相対ではなく絶対配置に */
  left: 0; 
  right: 0;               /* 親幅いっぱい */
  top: 0;                 /* 基準位置はバーの上端付近 */
  width: 100%;
  height: 0;              /* 自身の高さは0でOK（星を上に飛び出させる） */
  pointer-events: none;
}
#score-bar-stars .star {
  position: absolute;
  top: -55px;
  /* transform: translateX(-50%); */
  pointer-events: none;
}

/* バーが満点到達したときの色変化 */
#score-bar.fullscore {
  background: linear-gradient(90deg, gold, orange);
  box-shadow: 0 0 10px gold;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

@keyframes star-pop {
  0%   { transform: scale(0.85); }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1.0); }
}

@media (max-width: 1380px) {
  .key100-main-content-container {
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: 20px;
    margin: 20px 0;
  }
  .key100-vert-ads-region1 {
    display: none;
  }
  .key100-hori-ads-region1 {
    display: block;
    width: 728px;
    height: 90px;
    /* border: solid 1px red; */
  }
}

/* === LINE風 吹き出し === */
.question-wrapper{
  display: flex;
  flex-direction: column;   /* ← これがないと縦方向に効かない */
  justify-content: center;  /* ← 縦方向の中央寄せ */
  align-items: center;       /* ← 横方向の中央寄せ（任意） */              
  position: relative;
  overflow: visible;
}

/* 吹き出しのベース（あなたの定義を活かしつつ、しっぽ用の基準だけ追加） */
#ENC-current-question{
  position: relative;          /* ← 擬似要素の基準にする */
  padding: 12px 16px;
  max-width: calc(var(--base-width) - 80px);
  margin: 0 auto;
  background: transparent;  
  border-radius: 18px;    
}

#ENC-next-question {
  position: absolute;
  padding: 12px 16px;
  max-width: calc(var(--base-width) - 80px);
  margin: 0 auto;
  background: transparent;
  border-radius: 18px;  
}

#ENC-current-question > svg.bubble-svg,
#ENC-next-question    > svg.bubble-svg {
  position: absolute !important;
  top: 0; right: 0; bottom: 0; left: 0;  /* inset:0; と同義 */
  z-index: 0;
  pointer-events: none;
  overflow: visible;                      /* テールが外へ出られるように */
}

#ENC-en-word-display .revealed { font-weight: 600; }

#ENC-current-question > *,
#ENC-next-question > * {
  position: relative;
  z-index: 1;
}

:root{
  --bubble-stroke: 6;
  --bubble-radius: 22;
  --tail-width: 70;
  --tail-height: 60;
  --tail-offset: 64;
  --bubble-fill: #fff;
  --bubble-stroke-color: var(--main-color);
}

/* 吹き出しフレーム（SVG）を背面に固定 */
.bubble-svg{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

#ENC-current-question.bubble-left,
#ENC-next-question.bubble-left,
#ENC-current-question.bubble-right,
#ENC-next-question.bubble-right {
  margin: 0; /* ← 念のため margin の影響を消す */
}

#ENC-current-question,
#ENC-next-question {
  position: absolute;
  left: auto; right: auto;      /* 初期化 */
  /* 横幅はそのまま。必要なら max-width を維持 */
}

/* デフォルト（念のため） */
/* 左右の色を「ID＋クラス」で指定（IDより強くなる） */
#ENC-current-question.bubble-left,
#ENC-next-question.bubble-left {
  --bubble-fill: #fffcfc;
  --bubble-stroke-color: var(--main-color);
}

#ENC-current-question.bubble-right,
#ENC-next-question.bubble-right {
  --bubble-fill: #fbfeff;
  --bubble-stroke-color: var(--sub1-color);
}


/* 左レーン */
#ENC-current-question.bubble-left,
#ENC-next-question.bubble-left {
  left: 20px;
  right: auto;  
}

/* 右レーン */
#ENC-current-question.bubble-right,
#ENC-next-question.bubble-right {    
  right: 20px;
  left: auto;
}

#ENC-jp-word,
#ENC-next-jp-word { font-size: 22px; font-weight: bold; color: var(--sub4-color); }
#ENC-en-word-display,
#ENC-next-en-word-display { 
  font-size: 22px; 
  font-weight: bold;
  color: rgba(0, 0, 0, 0.3);
  letter-spacing: 2px; 
}

/* 文字はプロポーショナルのまま。スペースを潰さない */
#ENC-en-word-display .ch,
#ENC-next-en-word-display .ch {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  white-space: pre;
  line-height: 1.2;
}

/* いま打つべき頭文字を一時的に見せる */
#ENC-en-word-display .peek {
  color: inherit;
  font-weight: 600;
}

/* マスク：幅は実文字で決め、上に記号を重ねる */
#ENC-en-word-display .mask,
#ENC-next-en-word-display .mask {
  color: transparent;
}
/* “線”で下罫線を描くモード（必要なら置き換え） */
#ENC-en-word-display .mask::after,
#ENC-next-en-word-display .mask::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: .12em;            /* 線の縦位置。お好みで微調整 */
  border-bottom: .12em solid rgba(0, 0, 0, 0.3); /* 線の太さ/色 */
  z-index: 1;
  pointer-events: none;
  opacity: .95;
  margin: 0 1px;
  box-sizing: border-box;
}


/* スペース：実体は &nbsp; で幅を確保、見た目は置換記号（·など）を重ねる */
#ENC-en-word-display .space-mask,
#ENC-next-en-word-display .space-mask,
#ENC-en-word-display .space-hint,
#ENC-next-en-word-display .space-hint {
  color: transparent;
}
#ENC-en-word-display .space-mask::after,
#ENC-next-en-word-display .space-mask::after {
  content: var(--space-placeholder, "·");  /* ここを“·/␣/□”など好みで */
  position: absolute;
  left: 0; right: 0; top: 0;
  text-align: center;
  opacity: .7;
}

#ENC-en-word-display .hinted,
#ENC-next-en-word-display .hinted {
  opacity: 1;
}

/* 強調（任意） */
#ENC-en-word-display .initial,
#ENC-next-en-word-display .initial { font-weight: 600; }
#ENC-en-word-display .typed,
#ENC-next-en-word-display .typed   { font-weight: 600; }
#ENC-en-word-display .error,
#ENC-next-en-word-display .error {
  text-decoration-thickness: .12em;
  text-decoration-color: var(--sub1-color, #c33);
}


/* #ENC-en-word-display span.mask,
#ENC-next-en-word-display span.mask {
  display: inline-block;
  width: .65em;
  text-align: center;
}

#ENC-en-word-display .space-mask,
#ENC-next-en-word-display .space-mask {
  opacity: 0.7;
}

#ENC-en-word-display .initial,
#ENC-next-en-word-display .initial {
  font-weight: 600;
} */


/* 下からフワッと登場 */
@keyframes bubbleInUp {
  from { opacity: 0; transform: translateY(26px) scale(1); }
  to   { opacity: 1; transform: translateY(0px) scale(1); }
}
.bubble-in {
  animation: bubbleInUp 260ms ease both;
}

/* 既存の上下アニメと干渉しにくいよう軽めの指定 */
@media (prefers-reduced-motion: reduce) {
  .bubble-in { animation: none !important; }
}

/* フッター */
.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: var(--main-color);
  color: white;
  height: clamp(60px, 10vw, 150px);
  font-size: clamp(12px, 2vw, 22px);
  font-weight: 600;
}

.footer a {
  color: white;
  text-decoration: none;
}