/* ==========================================================================

基本設定
メニュー画面
バトル画面
ステータスエリア
アクションエリア（キャラクター）
ダメージエフェクト
クイズエリア
ゲームオーバー画面
スキルパネル
アイテム表示


/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
   基本設定(base)
========================================================================== */

html,
body,
button,
input,
select,
textarea {
font-family: "Hiragino Mincho ProN", "ヒラギノ明朝 ProN W3", "MS Mincho", "MS 明朝", "serif";
}

/* =======================
   body 設定
==========================*/

body {
  box-sizing: border-box;
  background-color: #1f1f1f;
  color: #ffffff;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===========================
   gameCanvas（ゲーム画面全体）
==============================*/

#gameCanvas {
  aspect-ratio: 9 / 16;
  width: min(100vw, calc(100vh * 9 / 16));
  height: auto;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
  padding: 0;
  background-color: #1f1f1f;
  overflow: hidden;
  container-type: size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ===========================
   ローディング画面
=============================*/

#loadingArea {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1f1f1f;
  color: #ffffff;
  font-size: 8cqw;
  pointer-events: none;
}

.mute-btn {
  position: absolute;
  top: 2cqw;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  width: 8cqw;
  height: 8cqw;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 4cqw;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
}

.mute-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
   メニュー画面
========================================================================== */

#uiWrapper {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* display: flex; などを削除して、ただの土台にする */
  pointer-events: auto;
}

/* --- 画像の設定を修正 --- */
#uiWrapper img {
  position: absolute; /* 絶対配置にして浮かせる */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 比率を維持して全画面を埋める */
  z-index: -1;       /* ボタンより後ろに配置 */
}

/* ============================
   メニューコンテナ
===============================*/

.menu-container {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 8cqh 0;            /* 上下の適度な余白 */
  
  /* スクロールをここで発生させる */
  overflow-y: auto;           
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* 必ず上詰めに */

  /* スクロールバー非表示 */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Chrome, Safari用のスクロールバー非表示設定 */
.menu-container::-webkit-scrollbar {
  display: none;
}

/* メインメニュー用のスタイル例 */
.main-menu-btn {
  display: block;
  position: relative;
  width: 70cqw;
  height: 15cqw;
  margin: 2cqw;

  font-size: 5cqw;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 3px solid #d4af37; /* 金色 */
  border-radius: 8px;
  transition: all 0.3s;
  flex-shrink: 0; /* スクロール時に潰れないように固定 */
}

.menu-badge {
  position: absolute;
  top: -1.2cqw;
  right: -1.8cqw;
  padding: 0.5cqw 1.2cqw;
  border-radius: 999px;
  background: #d40000;
  color: #ffffff;
  font-size: 2.4cqw;
  line-height: 1;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0.8cqw rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.main-menu-btn:hover {
  background: #d4af37;
  color: black;
  transform: scale(1.05);
}

/* ============================
   モードボタン（ステージ選択）
===============================*/
.button-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;

  /* --- 追記：ボタン群全体を下にぐっと押し下げる --- */
  margin-top: 80cqw;
}

.donate-link {
  position: absolute;
  left: 50%;
  bottom: 4cqw;
  transform: translateX(-50%);
  z-index: 2;
  color: #f3e6b3;
  text-decoration: none;
  font-size: 3.2cqw;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.donate-link:hover {
  color: #ffd86a;
  text-decoration: underline;
}

.mode-btn {
  width: 70%;
  padding: 15px 30px;
  border-radius: 10cqw;
  background: #1f1f1f;
  color: #ffffff;
  font-size: 4cqw;
  font-weight: bold;
  box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0.5);
  border: 1px solid #ffffff;
  cursor: pointer;
  transition: transform 0.1s;
  font-family: inherit;
  margin-top: 4cqw;
  flex-shrink: 0; /* スクロール時に潰れないように固定 */
}

.mode-btn:active {
  transform: scale(0.95);
}

.mode-btn:hover {
  background: #333333;
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.7);
}


/* ==================================
   カテゴリタイトル
=====================================*/

.category-title {
  font-size: 5cqw;
  font-weight: bold;
  margin-bottom: 2cqw;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  flex-shrink: 0;
}

/* ==================================
   戻るボタン
====================================*/

.back-btn {
  width: 70%;
  min-height: 60px;
  padding: 15px 30px;
  border-radius: 10cqw;
  background: #8B0000;
  color: #ffffff;
  font-size: 4cqw;
  font-weight: bold;
  box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0.5);
  border: 1px solid #ffffff;
  cursor: pointer;
  transition: transform 0.1s;
  font-family: inherit;
  margin-top: 4cqw;
  flex-shrink: 0; /* スクロール時に潰れないように固定 */
}

.back-btn:active {
  transform: scale(0.95);
}

.back-btn:hover {
  background: #A52A2A;
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.7);
}

/* ======================================
   空メッセージ（ステージなし）
========================================*/

.empty-message {
  font-size: 4cqw;
  color: #ffffff;
  text-align: center;
  margin: 3cqw 0;
}


/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
   バトル画面全体
========================================================================== */

#battleScreen {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  background: #1f1f1f url("../assets/images/backGround.webp") center center / cover no-repeat;
}

#battleScreen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.35));
  pointer-events: none;
  z-index: 0;
}

.battle-home-btn {
  position: absolute;
  top: 1.5cqw;
  right: 1.5cqw;
  z-index: 250;
  min-width: 20cqw;
  min-height: 10cqw;
  padding: 0 2.5cqw;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 4cqw;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  text-shadow: 0 1px 2px #000000;
}

.battle-home-btn:active {
  transform: scale(0.96);
}

.battle-stats-btn {
  position: absolute;
  top: 1.5cqw;
  left: 1.5cqw;
  z-index: 250;
  min-width: 20cqw;
  min-height: 10cqw;
  padding: 0 2.5cqw;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 4cqw;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  text-shadow: 0 1px 2px #000000;
}

.battle-stats-btn:active {
  transform: scale(0.96);
}

.battle-stats-panel {
  position: absolute;
  inset: 0;
  z-index: 260;
  padding: 10cqw 3cqw 3cqw;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.battle-stats-dialog {
  width: min(92cqw, 760px);
  max-height: 82%;
  margin: 0 auto;
  padding: 3cqw;
  box-sizing: border-box;
  border: 1px solid rgba(255, 215, 0, 0.78);
  border-radius: 6px;
  background: rgba(9, 9, 9, 0.94);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.68);
  overflow: auto;
}

.battle-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  margin-bottom: 2cqw;
}

.battle-stats-header h2 {
  margin: 0;
  color: #ffd700;
  font-size: 5cqw;
  line-height: 1.1;
}

.battle-stats-close {
  min-width: 16cqw;
  min-height: 6cqw;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  background: #2b2b2b;
  color: #ffffff;
  font-size: 3cqw;
  font-weight: bold;
  cursor: pointer;
}

.battle-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2cqw;
}

.battle-stats-card {
  padding: 2cqw;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.battle-stats-card h3 {
  margin: 0 0 1.5cqw;
  color: #ffffff;
  font-size: 3.7cqw;
  line-height: 1.1;
}

.battle-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  min-height: 4cqw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 2.8cqw;
  line-height: 1.2;
}

.battle-stats-row span {
  color: rgba(255, 255, 255, 0.72);
}

.battle-stats-row strong {
  color: #ffd700;
  font-weight: bold;
}

.battle-stats-card.rank-S .battle-stats-row strong,
.battle-stats-card.rank-S .battle-stats-durability {
  color: #ffd700;
}

.battle-stats-card.rank-A .battle-stats-row strong,
.battle-stats-card.rank-A .battle-stats-durability {
  color: #ff4d4f;
}

.battle-stats-card.rank-B .battle-stats-row strong,
.battle-stats-card.rank-B .battle-stats-durability {
  color: #4dabf7;
}

.battle-stats-card.rank-C .battle-stats-row strong,
.battle-stats-card.rank-C .battle-stats-durability {
  color: #40c057;
}

.battle-stats-note,
.battle-stats-empty {
  margin-top: 1.6cqw;
  color: rgba(255, 255, 255, 0.78);
  font-size: 2.5cqw;
  line-height: 1.35;
}

.battle-stats-equipment-list {
  margin-top: 1.6cqw;
  display: flex;
  flex-direction: column;
  gap: 0.9cqw;
}

.battle-stats-equipment-line,
.battle-stats-note-row {
  margin: 0;
  padding: 0;
  line-height: 1.35;
  font-size: 2.5cqw;
  color: rgba(255, 255, 255, 0.82);
}

.battle-stats-equipment-label {
  color: rgba(255, 255, 255, 0.62);
  margin-right: 0.8cqw;
}

.battle-stats-equipment-name {
  color: #ffffff;
  font-weight: 700;
}

.battle-stats-equipment-effect {
  color: rgba(255, 255, 255, 0.82);
}

.battle-stats-durability {
  font-weight: 700;
}

.rank-growth-list {
  margin-top: 10cqw;
  padding: 1.5cqw 2cqw;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 5cqw;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.rank-growth-list .growth-row {
  display: flex;
  align-items: center;
  gap: 1cqw;
}

.rank-growth-list .growth-label {
  min-width: 7cqw;
  color: rgba(255, 255, 255, 0.76);
}

.rank-growth-list .growth-before {
  color: rgba(255, 255, 255, 0.72);
}

.rank-growth-list .growth-arrow,
.rank-growth-list .growth-after {
  font-weight: 900;
}

.rank-growth-list.rank-S .growth-arrow,
.rank-growth-list.rank-S .growth-after {
  color: #ffd700;
}

.rank-growth-list.rank-A .growth-arrow,
.rank-growth-list.rank-A .growth-after {
  color: #ff4d4f;
}

.rank-growth-list.rank-B .growth-arrow,
.rank-growth-list.rank-B .growth-after {
  color: #4dabf7;
}

.rank-growth-list.rank-C .growth-arrow,
.rank-growth-list.rank-C .growth-after {
  color: #40c057;
}

.practice-bonus-preview {
  margin-top: 1.4cqw;
  padding-top: 1cqw;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.practice-bonus-title {
  margin: 0 0 0.8cqw;
  color: rgba(255, 255, 255, 0.78);
  font-size: 2.8cqw;
}

.empty-stage-list {
  margin: 2cqw 0 3cqw;
  color: rgba(255, 255, 255, 0.72);
  font-size: 3.5cqw;
}

.stage-rank-S,
.rank-S {
  color: #ffd700;
  font-weight: 900;
}

.stage-rank-A,
.rank-A {
  color: #ff4d4f;
  font-weight: 900;
}

.stage-rank-B,
.rank-B {
  color: #4dabf7;
  font-weight: 900;
}

.stage-rank-C,
.rank-C {
  color: #40c057;
  font-weight: 900;
}

#player-ui .level-text[data-rank="S"] { color: #ffd700; }
#player-ui .level-text[data-rank="A"] { color: #ff4d4f; }
#player-ui .level-text[data-rank="B"] { color: #4dabf7; }
#player-ui .level-text[data-rank="C"] { color: #40c057; }

#player-ui .level-text .level-number {
  color: inherit;
}

@media (max-width: 640px) {
  .rank-growth-list {
    font-size: 3.6cqw;
  }
}

@media (max-width: 640px) {
  .battle-stats-grid {
    grid-template-columns: 1fr;
  }
}

.quit-confirm-modal {
  position: absolute;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.58);
  pointer-events: auto;
}

.quit-confirm-dialog {
  width: 78%;
  padding: 5cqw;
  box-sizing: border-box;
  border: 1px solid rgba(255, 215, 0, 0.85);
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.94);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.72);
}

.quit-confirm-dialog h2 {
  margin: 0 0 2cqw;
  font-size: 6cqw;
  line-height: 1.15;
}

.quit-confirm-dialog p {
  margin: 0 0 4cqw;
  font-size: 3.8cqw;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

.quit-confirm-actions {
  display: flex;
  gap: 2cqw;
  justify-content: center;
}

.quit-confirm-btn {
  width: 34cqw;
  min-height: 9cqw;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: #ffffff;
  font-size: 4cqw;
  font-weight: bold;
  cursor: pointer;
}

.quit-confirm-btn.cancel {
  background: #333333;
}

.quit-confirm-btn.confirm {
  background: #8b0000;
}

.stage-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  left: 0;           /* 左端から */
  top: 38%;
  font-size: 4cqw;
  z-index: 300;
  width: 100%;       /* 横幅いっぱい */
  max-width: 100%;   /* 制限を解除 */
  padding: 4cqw 0;   /* 左右のパディングは不要なので0に */
  transform: translateY(-50%) scale(0.96); /* 左右中央寄せのtranslate(-50%)は不要に */
  border-top: 1px solid rgba(255, 215, 0, 0.85);
  border-bottom: 1px solid rgba(255, 215, 0, 0.85);
  background: rgba(0, 0, 0, 0.7); /* 少し濃くすると白文字が映えます */
  color: #fff41a;
  font-weight: bold;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 2px 4px #000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* 表示時の位置合わせ（translateの修正） */
.stage-intro.is-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.stage-intro.is-hiding {
  opacity: 0;
  transform: translateY(-50%) scale(1.03);
}

/* ★追加：ステージ名だけ白くする */
.intro-name {
  font-size: 5cqw;
  color: #ffffff; /* 白色に変更 */
}

.intro-line {
  width: 60%; /* 画面いっぱいなので、線は少し短めが綺麗です */
  height: 1px;
  background: rgba(255, 215, 0, 0.6);
  margin: 1.5cqw 0;
}


/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
   アクションエリア（キャラクター表示）
========================================================================== */

#actionArea {
  position: relative;
  height: 47%;
  width: 100%;
  overflow: hidden; /* 枠からはみ出さないようにする */
  background: transparent; /* 背景は透明にする */
  box-sizing: border-box;

    /* --- 背景の土台設定を追加 --- */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-position: bottom center;

  /* --- 追加：ドットをくっきりさせる --- */
  image-rendering: pixelated; 
  /* ブラウザ互換用（必要に応じて） */
  image-rendering: crisp-edges;
  z-index: 1;
}

#actionArea::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.2) 72%,
    rgba(0, 0, 0, 1) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* ======================
   キャラクターコンテナ
=========================*/

.character-container {
  position: absolute;
  isolation: isolate;
  z-index: 1;
}

/* =======================
   キャラクタースプライト
==========================*/

.character-sprite {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;


  /*filter: 
  /*小さな影を4方向に配置して縁取りにする（ブラーは0）
  drop-shadow(1px 1px 1px rgba(0,0,0,0.8))
  drop-shadow(-1px -1px 1px rgba(0,0,0,0.8))
  drop-shadow(1px -1px 1px rgba(0,0,0,0.8))
  drop-shadow(-1px 1px 1px rgba(0,0,0,0.8)); */
}

/* ====================
   プレイヤーキャラ位置
========================*/

#player {
  position: absolute;
  bottom: 0%;
  /* 左端から20%の位置に「中心」を置く設定 */
  left: 20%; 
  transform: translateX(-50%); 
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 10;
}

/* =====================
   敵キャラ位置
=======================*/
#enemy {
  position: absolute;
  bottom: 0%;
  /* 右端から20%の位置に「中心」を置く設定 */
  right: 20%;
  transform: translateX(50%); 

  z-index: 9;
  transition: opacity 0.5s ease, transform 1s ease !important;
  opacity: 1;
}

/* =====================
   敵退場エフェクト
=======================*/

.fade-out {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ================
   HPテキスト
===================*/

.hp-text {
  color: white;
  font-size: 3.5cqw;
  text-align: center;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
  margin-top: 0cqw;
  margin-bottom: 1cqw;
}

/* =================
   HPバー（全体）
===================*/

#statusArea .battle-status-ui .hp-bar-container,
#actionArea .battle-status-ui .hp-bar-container
{
  position: relative;
  left: auto;
  bottom: auto;
  display: block;
  width: 70%;
  height: var(--stat-bar-height, 2cqw);
  min-height: var(--stat-bar-min-height, 2.2cqw);
  background-color: #4d4d4d;
  border: 1px solid #111;
  overflow: hidden;
  box-sizing: border-box;
}

/* ===================
   HPバー（内部・色）
=====================*/

.hp-bar-inner {
  width: 80%;
  height: 100%;
  background-color: #2ecc71;
  transition: width 0.3s ease-out;
}



/* ===============================
   actionArea用 ステータスUI位置
=================================*/

#actionArea .battle-status-ui {
  position: absolute;
  bottom: 4%;
  width: 32%;
  z-index: 30;
  pointer-events: none;
}

#actionArea #player-ui {
  left: 6%;
}

#actionArea #enemy-ui {
  right: 6%;
}

/* =============================
   actionArea用 レベルテキスト
==============================*/

#actionArea .battle-status-ui .level-text {
  position: absolute;
  font-size: 1cqw;
  left: 0;
  top: 0cqw;
  bottom: 0cqw;
  width: 100%;
  line-height: 1;
  text-align: left;
}



/* ==========================
   ダメージポップアップ
============================*/

.damage-popup {
  position: absolute;
  bottom: 50cqw;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--damage-popup-size, 5cqw);
  font-family: inherit;
  pointer-events: none;
  z-index: 50;
  text-shadow: 0 0 5px #000000, 0 0 15px #000000;
  animation: damageJump 1.5s ease-out forwards;
}

.damage-popup.damage-popup--world {
  left: var(--popup-left, 50%);
  bottom: var(--popup-bottom, auto);
  top: auto;
  z-index: 120;
}

.damage-popup.damage-popup--world.critical,
.damage-popup.damage-popup--world.evade-popup {
  font-size: var(--damage-popup-size, 5cqw);
}

/* ============================
   クリティカルヒット（ダメージ）
===============================*/

.damage-popup.critical {
  color: #ffd700;
  font-weight: 900;
  font-family: inherit;
  text-shadow: 0 0 5px #000000, 0 0 15px #000000;
  z-index: 50;
}

/* ========================
   回避エフェクト（MISS）
===========================*/

.damage-popup.evade-popup {
  color: #8fd3ff;
  font-weight: 900;
  text-shadow: 0 0 6px #000000, 0 0 14px #2aa8ff;
}

/* =======================
   レベルアップエフェクト
==========================*/

.damage-popup.level-up-popup {
  bottom: auto !important;
  top: 5cqw;
  color: #f1c40f;
  font-size: 5cqw;
  font-weight: 800;
  text-shadow: 0 0 5px #000000, 0 0 12px #f1c40f;
  animation: levelUpPop 2s ease-out forwards;

  /* --- 追加：折り返しを禁止する --- */
  white-space: nowrap;
  /* --- 追加：念のため幅を自動にする --- */
  width: auto;
}

/* ==========================
   ダメージ数字アニメーション
============================*/

@keyframes damageJump {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -40px);
  }
  30% {
    transform: translate(-50%, -20px);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

/* ==========================
   レベルアップアニメーション
=============================*/

@keyframes levelUpPop {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -8px);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -12px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

/* ==============================
   フラッシュレイヤー（会心の一撃）
=================================*/

#flash-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ===========================
   フラッシュアニメーション
==============================*/

.flash-active {
  animation: flash-anime 0.2s ease-out;
}

@keyframes flash-anime {
  0% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
  }
}

/* ===========================
   bossバトル移行時のフラッシュ
==============================*/
/* style.css 等に追加 */
.black-out-overlay {
  position: absolute; /* 親要素(#actionArea)を基準にする */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0, 0, 0);
  opacity: 0;
  pointer-events: none; /* 下のボタンが押せるように */
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.black-out-active {
  opacity: 1;
}

/* ボス戦中だけ表示される赤いレイヤー */
#actionArea.boss-active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  /* 暗い赤のグラデーション（周辺を特に暗くするとボス感が出ます） */
  background: radial-gradient(circle, rgba(139, 0, 0, 0.7) 0%, rgba(50, 0, 0, 0.7) 100%);
  
  /* 乗算モード：画像の色を活かしつつ暗い赤を合成する */
  mix-blend-mode: multiply;
  
  pointer-events: none; /* クリックを邪魔しない */
  z-index: 5;          /* 背景画像より上で、キャラクターより下 */
  animation: boss-flash 3s infinite alternate; /* 軽く明滅させるとさらに雰囲気が出ます */
}

/* 鼓動のようにじわじわ明滅させるアニメーション（任意） */
@keyframes boss-flash {
  from { opacity: 0.7; }
  to { opacity: 1.0; }
}

/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
   ステータスエリア（プレイヤー・敵 HP/レベル表示）
===========================================================================*/

#statusArea {
  position: relative;
  height: 12%;
  width: 100%;
  display: flex !important;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.6cqw 1cqw 0.4cqw;
  box-sizing: border-box;
  z-index: 50;
  background: transparent;
  --stat-bar-height: 1.5cqw;
  --stat-bar-min-height: 0px;
}

#statusArea::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 5%,
    rgba(0, 0, 0, 0.5) 30%,
    rgba(0, 0, 0, 0.3) 65%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* =======================================
   ステータスUIコンテナ（プレイヤー・敵共通）
==========================================*/

#statusArea .battle-status-ui {
  position: relative;
  top: -20%;
  bottom: auto;
  left: auto;
  right: auto;
  width: 38%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  pointer-events: none;
  z-index: 1;
}

/* ===========================
   プレイヤーUI（左側）
==============================*/

#player-ui {
  align-items: flex-start;
  text-align: left;
}

/* ===========================
   敵UI（右側）
=============================*/

#enemy-ui {
  text-align: right;
  align-items: flex-end;
}

/* =======================
   レベルテキスト
==========================*/

#statusArea .level-text {
  position: relative;
  margin-top: -1cqw;
  margin-bottom: 0.2cqw;
  font-size: 4cqw;
  font-weight: bold;
  color: #ffd700;
}

/* =================================
   パラメータコンテナ（ATK、DEF等の親）
====================================*/
.param-container {
  display: flex;
  flex-direction: column;
  width: 50%; /* 幅を少し広げて文字が溢れないように調整 */
  margin-top: -3cqw;
  gap: 1cqw;
}

/* ★プレイヤー側専用の設定（左に寄せる、左に動かす調整用） */
#player-ui .param-container {
  align-items: flex-start;
  margin-left: 0cqw;  /* ここの数値を 2cqw などにするとプレイヤーだけ右に動かせます */
  margin-right: auto;
}

/* ★敵側専用の設定（右に寄せる、右に動かす調整用） */
#enemy-ui .param-container {
  align-items: flex-end;
  margin-right: 0cqw; /* ここの数値を 2cqw などにすると敵だけ左に動かせます */
  margin-left: auto;
}


/* =================
   バフアイコン
===================*/

#statusArea #player-ui .player-buff-icons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5cqw;
  width: 80%;
  min-height: 4.6cqw;
  margin-top: 2cqw;
  margin-bottom: 0.1cqw;
  pointer-events: none;
}

#statusArea #player-ui .player-buff-icon {
  width: 7cqw;
  min-height: 8cqw;
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.15cqw;
  gap: 0.15cqw;
}

#statusArea #player-ui .player-buff-icon-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1cqw;
}

#statusArea #player-ui .player-buff-icon-sprite {
  width: 4.3cqw;
  height: 4.3cqw;
  margin-top: 0.5cqw;
  flex: 0 0 auto;
}

#statusArea #player-ui .player-buff-durability {
  color: #ffffff;
  font-size: 2cqw;
  line-height: 1.5;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

#statusArea #player-ui .player-buff-icon.rarity-common {
  border-color: #ffffff;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

#statusArea #player-ui .player-buff-icon.rarity-uncommon {
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(74, 228, 255, 0.45);
}

#statusArea #player-ui .player-buff-icon.rarity-rare {
  border-color: #ff2a2a;
  box-shadow: 0 0 6px rgba(255, 42, 42, 0.45);
}

#statusArea #player-ui .player-buff-icon.rarity-legendary {
  border-color: #fbff00;
  box-shadow: 0 0 7px rgba(255, 255, 48, 0.55);
}

#statusArea #player-ui .player-buff-icon.rarity-mythic {
  border-color: #ffffff;
  animation: item-rainbow-border 1.2s linear infinite;
}

/* ===================
   極アイコンコンテナ
=====================*/
#kiwami-container {
  display: none;
  /* ★ここを 15cqw から 80cqw（画面の80%）に大きくしました！ */
  width: 80cqw;
  
  /* 縦幅は自動で比率（横80cqwに対する56/200）を計算するので、そのままでOK */
  height: calc(80cqw * 56 / 200);
  
  margin: 0 auto;
  overflow: hidden;
  position: absolute;
  left: 50%;
  top: 1cqw; /* 上からの位置も、大きさに合わせて少し調整（お好みで） */
  transform: translateX(-50%);
  z-index: 100;
}

/* ==================
   極アイコン画像
====================*/
#kiwami-image,
#kiwami-bg {
  height: 100%;
  /* コンテナ（80cqw）の10倍の横幅にするので、1000%のままでOK */
  width: 1000%;
  max-width: none;
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
  border: 0;
  outline: 0;
}

#kiwami-bg {
  display: none;
  left: 0;
  z-index: 1;
}


#kiwami-image {
  left: 0;
  z-index: 2;
}

#kiwami-image.is-rainbow {
  animation: rainbowShift 1s linear infinite;
}

.kiwami-action-label {
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: 5;
  display: none;
  width: 8cqw;
  height: 6cqw;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  font-size: 8cqw;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  text-align: center;
}

.kiwami-heal-label {
  left: 49.5%;
  color: #64ff7a;
  text-shadow: 0 0 0.8cqw #00c853, 0 0 1.6cqw #003d16;
}

.kiwami-finisher-label {
  left: 49.5%;
  color: #ffffff;
  text-shadow: 0 0 1cqw #000000;
  animation: kiwamiTextRainbow 2s linear infinite;
}

.kiwami-action-label.is-visible {
  display: block;
}

@keyframes kiwamiTextRainbow {
  0% { color: #ff3b3b; }
  20% { color: #ffd43b; }
  40% { color: #63e6be; }
  60% { color: #4dabf7; }
  80% { color: #da77f2; }
  100% { color: #ff3b3b; }
}

@keyframes rainbowShift {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
   クイズエリア
========================================================================== */

#quizArea {
  position: relative;
  height: 40%;
  width: 100%;
  overflow: hidden; /* ★重要：ボタンがはみ出してもエリア外には出さない */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  padding: 2cqw 0 3cqw;
  background: transparent;
  z-index: 1;
}

/* ========================
   問題文コンテナ
==========================*/

.question-container {
  flex-shrink: 0;
  height: 40%;
  width: 98%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden; /* はみ出しをカット */
  padding: 1cqw 8cqw 1cqw;
  box-sizing: border-box;
  border-bottom: none;
  background-image: url("../assets/images/QuizBox.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  
}

.question-container h2 {
  width: 100%;
  font-size: 4.4cqw;
  line-height: 1.2;
  margin: 0;
  font-family: inherit;
  color: #000000;
  overflow-wrap: anywhere;
  font-weight: 1000;
}

.question-container p {
  width: 100%;
  font-size: 3.6cqw;
  line-height: 1.2;
  color: rgba(191, 255, 139, 0.92);
  margin: 1cqw 0 0;
  font-family: inherit;
  overflow-wrap: anywhere;
  
}

/* ===========================
   回答ボタンコンテナ（グリッド）
=============================*/

.button-container {
  height: 100%;
  width: 90%;
  display: grid;
  margin: 0 auto;
  margin-bottom: 0;
  margin-top: 1cqw;
  align-content: stretch;
}

/* =================
   回答ボタン
===================*/

#optionArea button {
  position: relative;
  isolation: isolate;
  height: 100%;
  width: 100%;
  padding: 1.2cqw 2cqw;
  background-image: url("../assets/images/AnswerBox.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  background-color: transparent;
  border-radius: 0;
  color: #000000;
  font-size: 5cqw;
  font-weight: 1000;
  line-height: 1.15;
  cursor: pointer;
  box-shadow: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0; /* グリッド内で潰れるのを防ぐ */
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
  transition: transform 0.08s ease, filter 0.15s ease, background-image 0.15s ease;
}

#optionArea button:hover:not(:disabled) {
  filter: brightness(1.08);
}

#optionArea button:disabled {
  cursor: default;
}

#optionArea .hiragana-text{
  width: 100%;
  max-height: 100%;
  display: block; /* 縦に並べたい場合は block、横なら inline-block */
  text-align: center;
  overflow: hidden;
  overflow-wrap: anywhere;
  
  /* --- ここで緑色を指定 --- */
  color: #f6ff00; /* 明るめの緑（暗い背景に映えます） */
  font-size: 0.58em; /* 漢字より少し小さくする */
  margin-bottom: 1cqw;  /* 漢字との間に少し隙間を作る */
}

#optionArea .answer-wrapper {
  width: 100%;
  padding: 0 0.8cqw;
}

#optionArea .kanji-text {
  display: block;
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.1;
}

#optionArea button:active {
  transform: scale(0.98);
}

/* ===============
   正解ボタン
=================*/

.correct-answer {
  background-image:
    linear-gradient(rgba(55, 185, 92, 0.68), rgba(55, 185, 92, 0.68)),
    url("../assets/images/AnswerBox.webp") !important;
  background-blend-mode: multiply !important;
  color: #ffffff !important;
  filter: saturate(1.08) brightness(1.02);
}

/* ================
   不正解ボタン
=================*/

.wrong-answer {
  background-image:
    linear-gradient(rgba(208, 58, 58, 0.72), rgba(208, 58, 58, 0.72)),
    url("../assets/images/AnswerBox.webp") !important;
  background-blend-mode: multiply !important;
  color: #ffffff !important;
  filter: saturate(1.08) brightness(1.02);
}

/* =============
   勝利画面
===============*/

.battle-result-overlay {
  position: absolute;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 7cqw 5cqw;
  background: rgba(0, 0, 0, 0.72);
}

.announcement-area {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  gap: 5cqw;
}

.victory-message-area h2,
.game-over-area h2 {
  line-height: 4;
  margin: 0;
  font-size: 8cqw;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.victory-message-area p {
  margin: 2cqw 0 0;
  font-size: 4.5cqw;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
}

.next-stage-development .victory-message-area {
  width: 86%;
  text-align: center;
}

.next-stage-development .victory-message-area h2 {
  font-size: 6.5cqw;
  line-height: 1.2;
  margin-bottom: 3cqw;
}

.next-stage-development .victory-message-area p {
  margin: 0 0 5cqw;
  font-size: 4.5cqw;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.86);
}

/* ==================
   リトライボタン
====================*/

.retry-btn {
  min-width: 44cqw;
  min-height: 11cqw;
  padding: 2.2cqw 4cqw;
  box-sizing: border-box;
  font-size: 4.2cqw;
  line-height: 1.15;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.38);
  color: #ffffff;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.22);
  white-space: normal;
}

.result-actions {
  gap: 2.5cqw;
}

.retry-btn:active {
  transform: scale(0.95);
}

.highlight-word {
  color: #ffd700;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(255,215,0,0.8);
}

/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ============================
   ゲームオーバー画面レイアウト
=============================*/

.game-over-area h2 {
  color: #ff5252;
  margin-top: 0.5cqw;      /* ★ 上のマージンを消す */
  margin-bottom: 0.5cqw; /* ★ 下との間隔も少し詰める */
  line-height: 1;    /* ★ 行間を詰めるとさらに上がります */
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/*missed words内の設定*/
.announcement-area--gameover {
  width: 100%;
  height: 100%;
  justify-content: flex-start;
  align-items: center;
  gap: 2.5cqw;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.announcement-area--gameover h2 {
  flex: 0 0 auto;
  margin: 0;
  color: #ff6666;
  font-size: 8cqw;
  line-height: 1.05;
  text-shadow: 0 0 16px rgba(255, 82, 82, 0.35);
}

.announcement-area--gameover .retry-btn {
  flex: 0 0 auto;
}

/* ================
   誤答リスト
===================*/

.game-over-review {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 3cqw;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.34);
}

/* Missed wordsの文字*/
.game-over-review-title {
  margin: 0 0 1.6cqw;
  font-size: 4.3cqw;
  font-weight: 700;
  color: #ffca28;
  text-align: left;
  
}

/* リスト番号の色*/
.game-over-review-list {
  list-style: decimal;
  margin: 0;
  padding-left: 1.15em;
  overflow-y: auto;
  flex: 1 1 auto;
  max-height: none;
  font-size: 4.3cqw;
  color: #f2f2f2;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}

.game-over-review-list {
  /* ...既存のコード... */
  scrollbar-width: thin;          /* Firefox用: 細くする */
  scrollbar-color: #444 transparent; /* Firefox用: バーの色を暗く */
}

.game-over-review-item {
  margin-bottom: 0.65em;
  padding-right: 0.2em;
}

/* 間違えた問題*/
.game-over-review-kanji {
  font-size: 5cqw;
  color: #ffffff;
  font-weight: 800;
}

/* ローマ字読み*/
.game-over-review-meta {
  font-size: 3.4cqw;
  margin-top: 0.5cqw;
  color: rgba(255, 255, 255, 0.62);
}

/* 　英語の意味*/
.game-over-review-answer {
  color: #b3e5fc;
  font-size: 3.6cqw;
  line-height: 2;
  margin-top: 3cqw;
}

/* Defの文字*/
.game-over-review-label {
  color: #00e676;
  margin-right: 0.2em;
}

/* */
.game-over-review-empty {
  width: 100%;
  font-size: 5cqw;
  color: #ffffff;
  text-align: center;
  margin: 4cqw 0;
}

/* 境界線*/
.game-over-review-item {
  margin-bottom: 0.75em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

/* 最後の項目の線は消すとスッキリします */
.game-over-review-item:last-child {
  border-bottom: none;
}

/* ===========================
   ピカピカアニメーション
==============================*/

@keyframes flash-animation {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(2.5);
  }
  100% {
    filter: brightness(1);
  }
}

.is-flashing {
  animation: flash-animation 0.5s infinite;
}

/* =========================
   Streak表示
  ==========================*/

/* ベース配置：左下に固定 */
.streak-display {
  position: absolute;
  bottom: 25%;
  left: 3%;
  z-index: 50;
  pointer-events: none;
  /* スライドインアニメーション */
  animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

.streak-number {
  font-size: 6cqw;
  font-weight: 900;
  letter-spacing: 2px;
  filter: drop-shadow(0 0 5px rgb(0, 0, 0));
}

/* --- 色の定義 --- */

/* 5未満：白 */
.white { color: #ffffff; }

/* 5以上：青 */
.blue { 
  color: #00d2ff;
  text-shadow: 0 0 15px #00d2ff;
}

/* 10以上：赤 */
.red { 
  color: #ff4b2b;
  text-shadow: 0 0 15px #ff4b2b;
}

/* 20以上：金 */
.gold { 
  color: #ffd700;
  text-shadow: 0 0 20px #ffd700, 0 0 40px #ffae00;
  animation: streakGlow 0.8s ease-in-out infinite;
}

/* 40以上：レインボー */
.rainbow .streak-number {
  background: linear-gradient(to right, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
  animation: rainbowScroll 2s linear infinite;
  background-size: 200% auto;
}

@keyframes rainbowScroll {
  to { background-position: 200% center; }
}

/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
/* ==========================================================================
   スキルパネル（アイテム選択）
========================================================================== */

#skill-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  pointer-events: auto;
}

.panel-content {
  position: absolute;
  bottom: 30%;
  width: 70%;
  height: 25%;
  padding: 2cqw;
  text-align: center;
  z-index: 10000;
  container-type: inline-size;
}

.panel-content h2 {
  margin: 0 0 1cqw;
  font-size: 8cqw;
  line-height: 1;
}

/* =======================
   アイテム選択リスト
==========================*/

.item-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10cqw;
  justify-items: center;
  align-items: center;
  width: 100%;
  margin-top: 20%; 
}

/* ===================
   アイテムボタン
=====================*/

.item-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background:#000000;
  border: 1.5cqw solid #d4af37;
  color: white;
  width: 100%;
  height: 170%;
  
  box-sizing: border-box;
  border-radius: 5cqw;
  justify-content: center; /* 中身を中央に */
}

.item-choice:active {
  transform: scale(0.96);
}

/* =======================
   アイテムアイコン
=========================*/

.item-icon {
  aspect-ratio: 1 / 1;
  width: auto;
  height: 100%;
  image-rendering: pixelated;
}

.item-icon-wrapper {
  width: 100%;
  height: 40%;
  display: flex;
  margin-top: 3cqw;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: 2cqw;
}

/* ===========================
   アイテム情報（名前・説明）
==============================*/

.item-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0cqw;
  line-height: 8cqw;
}

.item-name {
  font-weight: bold;
  font-size: 7cqw;
}

.item-description {
  color: #4eb3fa;
  font-size: 5cqw;
  line-height: 15cqw;
}

/* =============================
   アイテムレアリティ（Common）
================================*/

.item-choice.rarity-common {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* ==============================
   アイテムレアリティ（Uncommon）
================================*/

.item-choice.rarity-uncommon {
  border-color: #007bff;
  box-shadow: 0 0 10px rgba(74, 228, 255, 0.45);
}

/* =========================
   アイテムレアリティ（Rare）
===========================*/

.item-choice.rarity-rare {
  border-color: #ff2a2a;
  box-shadow: 0 0 10px rgba(255, 42, 42, 0.45);
}

/* ============================
   アイテムレアリティ（Legendary）
================================*/

.item-choice.rarity-legendary {
  border-color: #fbff00;
  box-shadow: 0 0 12px rgba(255, 255, 48, 0.55);
}

/* =====================================
   アイテムレアリティ（Mythic - レインボー）
========================================*/

.item-choice.rarity-mythic {
  border-color: #ffffff;
  animation: item-rainbow-border 1.2s linear infinite;
}

@keyframes item-rainbow-border {
  0% {
    border-color: #ff3b30;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.55);
  }
  25% {
    border-color: #ffd84a;
    box-shadow: 0 0 12px rgba(255, 216, 74, 0.55);
  }
  50% {
    border-color: #2aa8ff;
    box-shadow: 0 0 12px rgba(42, 168, 255, 0.55);
  }
  75% {
    border-color: #d36bff;
    box-shadow: 0 0 12px rgba(211, 107, 255, 0.55);
  }
  100% {
    border-color: #ff3b30;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.55);
  }
}

.battle-status-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
}
