:root {
  --bg-main: #070712;
  --bg-panel: rgba(10, 10, 25, 0.9);
  --accent: #ff82c6;
  --accent-soft: rgba(255, 130, 198, 0.15);
  --text-main: #f7f7ff;
  --text-sub: #a7a7c8;
}

/* ルイ画面の中だけに効くようにスコープする */
#screen-lui-game * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* セクション本体：表示/非表示は app.css の .screen / .screen.active に任せる */
#screen-lui-game {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  /* ルイCGをそのまま全面表示 */
  background-color: #000;
  background-image: url("./lui_bg1.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color: var(--text-main);
  min-height: 100vh;
  position: relative;
}

/* ===== ゲーム本体（UI） ===== */

#screen-lui-game .game-container {
  width: 100%;
  max-width: 420px;
  padding: 32px;;
  justify-content: center;
  position: relative;
  z-index: 2; /* エフェクトより前面 */

  /* ここで中央寄せする（セクションには display を書かない） */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

#screen-lui-game header {
  text-align: center;
  margin-bottom: 8px;
}

#screen-lui-game .title-main {
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  margin: 0;
}

#screen-lui-game .title-sub {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin: 4px 0 0;
}

#screen-lui-game .panel {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 12px;
}

/* メインメッセージ（通常時） */
#screen-lui-game #message {
  min-height: 2.2em;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text-sub);
  text-align: center;
}

/* ゲージコンテナ */
#screen-lui-game .gauge-container {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  /* ここを追加（見た目はほぼ変わらず、当たり判定だけ拡大） */
  padding: 32px 6px;       /* 上下16px・左右12pxぶんヒットエリア拡大 */
  box-sizing: border-box;   /* 余白を外側に出さず、幅はそのまま */
}

#screen-lui-game .gauge {
  position: relative;
  width: 300px;
  height: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  overflow: hidden;
}

#screen-lui-game .target-area {
  position: absolute;
  top: 0;
  left: 40%;
  width: 20%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

#screen-lui-game .target-inner {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: rgba(0, 255, 0, 0.5);
  border-radius: 8px;
}

#screen-lui-game .target-center {
  position: absolute;
  top: 0;
  left: 47%;
  width: 6%;
  height: 100%;
  background: rgba(255, 0, 0, 0.8);
  border-radius: 10px;
}

#screen-lui-game .cursor {
  position: absolute;
  top: 0;
  width: 4px;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  transition: none;
}

/* コントロール */
#screen-lui-game .controls {
  text-align: center;
  margin-top: 20px;
}

#screen-lui-game .btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

#screen-lui-game .btn-main {
  background: linear-gradient(135deg, #ff6bd4, #ffc46b);
  color: #1c0414;
  box-shadow: 0 6px 16px rgba(255, 120, 220, 0.55);
}

#screen-lui-game .btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-sub);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#gaugeContainer.disabled {
  pointer-events: none;
}



/* 横ゲージ */
.gauge {
  position: relative;
  width: 92%;
  margin: 0 auto;
  height: 14px;
  background: linear-gradient(90deg, #151726, #111320);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 目安エリア */
.target-area {
  position: absolute;
  top: 0;
  height: 100%;
  left: 35%;
  width: 30%;
  background: linear-gradient(
    90deg,
    rgba(255, 0, 128, 0.25),
    rgba(255, 90, 180, 0.45),
    rgba(255, 0, 210, 0.25)
  );
  box-shadow:
    0 0 12px rgba(255, 0, 128, 0.75),
    0 0 24px rgba(255, 0, 128, 0.4);
}

.target-inner {
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
}

.target-center {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 50%;
  width: 8%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.0),
    rgba(255, 255, 255, 0.65),
    rgba(255, 255, 255, 0.0)
  );
  opacity: 0.7;
}

/* 動く縦バー */
.cursor {
  position: absolute;
  top: -8px;
  width: 10px;
  height: 40px;
  border-radius: 999px;
  background: #ff0000;
  box-shadow:
    0 0 10px rgba(255, 0, 0, 0.9),
    0 0 18px rgba(255, 0, 0, 0.7);
  transform: translateX(0);
}

/* 判定テキスト */
.judge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(0, 0, 0, 0.6);
}

.judge.judge-safe {
  font-size: 22px;
  letter-spacing: 0.08em;
}

.judge.judge-good,
.judge.judge-great,
.judge.judge-excellent {
  font-size: 30px;
  letter-spacing: 0.06em;
}

.judge-good {
  color: #ffda6a;
}
.judge-great {
  color: #ffa8ff;
}
.judge-excellent {
  color: #ff4d9a;
}
.judge-safe {
  color: #ff8aa8; /* BAD... 用の色（お好みで変えてOK） */
}

.judge.show {
  animation: floatUp 800ms ease-out forwards;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -16px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -32px) scale(0.98);
  }
}

/* ボタン */
.controls {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.btn-main {
  background: var(--accent);
  color: #1b0014;
}

.btn-secondary,
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-sub);
  border: 1px solid rgba(255,255,255,0.1);
}

.note {
  margin-top: 8px;
  font-size: 10px;
  opacity: 0.65;
  text-align: center;
}

/* ラウンド間の会話ボックス（パネル内） */
.dialogue-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(5, 6, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 12px;
  line-height: 1.6;
  min-height: 44px;
  display: none;
}

.dialogue-box.show {
  display: block;
}

.dialogue-text {
  margin: 0;
}

/* スタート後、バー以外のUIを消す */
.panel.play-started .ui-header,
.panel.play-started .controls,
.panel.play-started .note {
  display: none;
}

/* 鷹嶺ルイ立ち絵：画面全体基準 */
#screen-lui-prologue .lui-stand {
  position: fixed;
  left: 50%;
  bottom: 0;

  /* ★ 画面全体基準で高さを決める */
  height: 90vh; /* 10%小さく */
  width: auto;

  transform: translateX(-50%);
  object-fit: contain;

  z-index: 5;          /* 背景より上、台詞より下 */
  pointer-events: none;
  user-select: none;
}

