/* ライブ会場（ブヒ部屋の風景）。暗い会場＋上部のステージ＋スポットライト。 */
.room-stage[data-scene="live"] {
  background: linear-gradient(180deg, #170d2c 0%, #241640 46%, #34214f 74%, #43305c 100%);
}

/* セット全体（ブタより後ろ） */
.live-set { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* 背面の壁（上部の暗幕） */
.live-backwall {
  position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: linear-gradient(180deg, #120a24, #1d1136);
  box-shadow: inset 0 -16px 24px rgba(0, 0, 0, .35);
}

/* 上のトラス（バナー）＝ライブ中だけ表示。平常時は何も出さない。 */
.live-truss {
  position: absolute; left: 4%; top: 4%; width: 92%; min-height: 12px; padding: 4px 0;
  background: linear-gradient(180deg, #4b4b5a, #2b2b38);
  border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
  display: none; align-items: center; justify-content: center;
}
.room-stage[data-scene="live"].live-show .live-truss { display: flex; }
.live-sign {
  font: 700 clamp(10px, 3vw, 15px)/1 sans-serif; color: #fff;
  letter-spacing: 1px; white-space: nowrap; transform: translateY(-1px);
}
/* ライブ中だけ点灯（歌手名 - NOW ON STAGE） */
.live-sign.on { text-shadow: 0 0 6px #ff5db1, 0 0 12px #ff5db1; }

/* ステージの床（上部の一段高いプラットフォーム） */
.live-floor {
  position: absolute; left: 9%; top: 28%; width: 82%; height: 16%;
  background: linear-gradient(180deg, #6a4a86 0%, #4a3163 60%, #2f1f44 100%);
  border-radius: 8px 8px 10px 10px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, .4), inset 0 3px 6px rgba(255, 255, 255, .12);
}
.live-floor::after { /* 床の前面エッジ（光るリップ） */
  content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 4px;
  background: linear-gradient(90deg, #46e0ff, #ff5db1, #ffd23d); border-radius: 4px; opacity: .8;
}

/* スポットライト（トラスから降りる光の三角。左右でゆっくり振る） */
.live-spot {
  position: absolute; top: 5%; width: 38%; height: 70%;
  mix-blend-mode: screen; opacity: .5;
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
}
.live-spot-l { left: 10%; background: linear-gradient(180deg, rgba(70,224,255,.55), rgba(70,224,255,0) 78%);
  transform-origin: 50% 0; animation: liveSpotL 5.5s ease-in-out infinite; }
.live-spot-r { right: 10%; background: linear-gradient(180deg, rgba(255,93,177,.55), rgba(255,93,177,0) 78%);
  transform-origin: 50% 0; animation: liveSpotR 6.3s ease-in-out infinite; }
@keyframes liveSpotL { 0%,100% { transform: rotate(-13deg); } 50% { transform: rotate(10deg); } }
@keyframes liveSpotR { 0%,100% { transform: rotate(13deg); } 50% { transform: rotate(-10deg); } }

/* サイドのスピーカースタック */
.live-speaker {
  position: absolute; top: 30%; width: 9%; height: 22%;
  background: linear-gradient(180deg, #2a2a34, #16161d);
  border-radius: 4px; box-shadow: 0 3px 6px rgba(0, 0, 0, .45);
}
.live-speaker::before, .live-speaker::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  width: 62%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #50505e, #1a1a22 70%);
}
.live-speaker::before { top: 14%; aspect-ratio: 1; }
.live-speaker::after  { bottom: 14%; width: 44%; aspect-ratio: 1; }
.live-speaker-l { left: 3%; }
.live-speaker-r { right: 3%; }

/* ステージで歌っているブタ：はずむ＋淡く発光 */
.room-stage[data-scene="live"] .room-pig.live-singing { animation: liveSing .5s ease-in-out infinite; }
.room-stage[data-scene="live"] .room-pig.live-singing .roompig {
  filter: drop-shadow(0 0 7px rgba(255, 240, 180, .9)) drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}
@keyframes liveSing {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
}
/* オペラ（おじいさん）：金色のおごそかな光＋ゆったり大きく */
.room-stage[data-scene="live"] .room-pig.live-opera { animation: liveOpera 2.1s ease-in-out infinite; }
.room-stage[data-scene="live"] .room-pig.live-opera .roompig {
  filter: drop-shadow(0 0 10px rgba(255, 214, 120, .95)) drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}
@keyframes liveOpera {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.06); }
}

/* ===== ライブモード中の観客リアクション ===== */
/* うさこ：アイドルファンモード（目がハート＋うれしくはずむ） */
.room-stage[data-scene="live"] .room-pig.live-fan { animation: audFan .5s ease-in-out infinite; }
@keyframes audFan {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
}
.fan-eyes { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.fan-eyes .fe-h {
  position: absolute; top: 27%; font-size: clamp(9px, 3vw, 13px); line-height: 1;
  color: #ff4d8d; text-shadow: 0 0 3px #ff9ec4; animation: feBeat .5s ease-in-out infinite;
}
.fan-eyes .fe-h:nth-child(1) { left: 33%; }
.fan-eyes .fe-h:nth-child(2) { left: 55%; }
@keyframes feBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

/* Bu's のライブ：観客のコール（Bububoo / Bu,bu,bu）が頭上にぽっと出る */
.band-chant {
  position: absolute; left: 50%; top: -6%; transform: translateX(-50%);
  white-space: nowrap; pointer-events: none; z-index: 5;
  font-size: clamp(9px, 3vw, 13px); font-weight: 800; color: #ffe14d;
  text-shadow: 0 0 4px #ff4d8d, 0 1px 1px rgba(0,0,0,.4);
  animation: bandChant 1s ease-out forwards;
}
@keyframes bandChant {
  0% { opacity: 0; transform: translate(-50%, 4px) scale(.7); }
  25% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -22px) scale(1); }
}

/* U•F•O のライブ：歌手の足元のUFO（2人とも乗って歌う） */
.live-ufo {
  position: absolute; left: 50%; top: 62%; width: 132%; z-index: -1; pointer-events: none;
  transform: translate(-50%, -50%); animation: ufoHover 2.2s ease-in-out infinite;
}
.live-ufo svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 3px 5px rgba(40,60,90,.4)); }
.live-ufo .luf-glow { fill: rgba(130, 225, 255, .35); }
.live-ufo .luf-base { fill: #aeb9c7; stroke: #6f7c8c; stroke-width: 2; }
.live-ufo .luf-top { fill: #d2ecff; stroke: #8fb6d6; stroke-width: 2; opacity: .92; }
.live-ufo .luf-l { fill: #ffe14d; animation: ufoLights .6s steps(1, end) infinite; }
.live-ufo .luf-l:nth-child(odd) { fill: #6ad6ff; }
@keyframes ufoHover { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -60%); } }
@keyframes ufoLights { 0% { opacity: 1; } 50% { opacity: .25; } 100% { opacity: 1; } }
/* U•F•O のコールレスポンス：観客がぴょんと跳ねる（2段ジャンプ） */
.room-stage[data-scene="live"] .room-pig.ufo-jump { animation: ufoJump .7s ease-in-out; }
@keyframes ufoJump {
  0% { transform: translateY(0); }
  20% { transform: translateY(-14px); }
  45% { transform: translateY(0); }
  65% { transform: translateY(-9px); }
  100% { transform: translateY(0); }
}

/* ブチギレロック：ロックモード（ぴょんぴょん跳ねる） */
.room-stage[data-scene="live"] .room-pig.live-rock { animation: audRock .4s ease-in-out infinite; }
@keyframes audRock {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-11px); }
}

/* おじいさん：おとなしく横に揺れる */
.room-stage[data-scene="live"] .room-pig.live-sway { animation: audSway 1.6s ease-in-out infinite; }
@keyframes audSway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

/* うさこのライブ：ピンク系のライティング（スポット＆歌手の発光をピンクに） */
.room-stage[data-scene="live"].live-pink .live-spot-l {
  background: linear-gradient(180deg, rgba(255, 150, 205, .6), rgba(255, 150, 205, 0) 78%);
}
.room-stage[data-scene="live"].live-pink .live-spot-r {
  background: linear-gradient(180deg, rgba(255, 93, 177, .6), rgba(255, 93, 177, 0) 78%);
}
.room-stage[data-scene="live"].live-pink .room-pig.live-singing .roompig {
  filter: drop-shadow(0 0 9px rgba(255, 120, 200, .95)) drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}
.room-stage[data-scene="live"].live-pink .live-sign { text-shadow: 0 0 6px #ff8ec8, 0 0 12px #ff5db1; }

/* 動きを減らす設定：ライブ会場の常時アニメを止める（コール・跳ね・UFO・スポットライト等） */
@media (prefers-reduced-motion: reduce) {
  .room-stage[data-scene="live"] .room-pig.live-singing,
  .room-stage[data-scene="live"] .room-pig.live-opera,
  .room-stage[data-scene="live"] .room-pig.live-fan,
  .room-stage[data-scene="live"] .room-pig.live-rock,
  .room-stage[data-scene="live"] .room-pig.live-sway,
  .room-stage[data-scene="live"] .room-pig.ufo-jump,
  .fan-eyes .fe-h,
  .band-chant,
  .live-ufo,
  .live-ufo .luf-l,
  .live-spot-l,
  .live-spot-r {
    animation: none;
  }
  .band-chant { opacity: 1; } /* コールは動かず表示だけ（1秒後にJSが除去） */
}
