/* ===== Base ===== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #000;
  color: #f7f7ff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hidden { display: none !important; }

/* ===== Screen ===== */
#screen-laplus {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* wrapper（特に装飾しない。重なりの基点だけ） */
.laplus-wrapper{
  position: relative;
  width: min(520px, calc(100vw - 32px));
  z-index: 10;
}

/* ===== Background Layers ===== */
/* 黒ベース */
.lap-bgbase{
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 0;
}

/* お手本＆演出で色が変わるレイヤー */
.lap-color-layer{
  position: fixed;
  inset: 0;
  background: #000;
  transition: background-color 0.18s ease;
  z-index: 1;
}

/* 透過CG */
.lap-cg-layer{
  position: fixed;
  inset: 0;
  background-image: url("lap_bg1.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  pointer-events: none;
}

/* ===== Start Button ===== */
.laplus-controls{
  margin-top: 14px;
  text-align: center;
  position: relative;
  z-index: 20;
}

#laplus-start-btn{
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #a37fff, #ff82c6);
  color: #070712;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  transition: transform 0.08s ease, opacity 0.12s ease;
}

#laplus-start-btn:active{
  transform: scale(0.98);
  opacity: 0.92;
}

/* ===== Answer Buttons (center 2x2) ===== */
.laplus-answer{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 56px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  z-index: 40; /* UIよりさらに前に */
}

.laplus-btn{
  padding: 14px 10px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  color: #070712;
  transition: transform 0.08s ease, opacity 0.12s ease;
}

.laplus-btn:active{
  transform: scale(0.98);
  opacity: 0.9;
}

/* 色 */
.laplus-red    { background: #ff4b7a; }
.laplus-pink   { background: #ff9edf; }
.laplus-purple { background: #a37fff; }
.laplus-white  { background: #f7f7ff; }

/* ===== White Flash (game over) ===== */
.lap-flash{
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.15s ease;
}

.lap-flash.visible{
  opacity: 1;
}

/* ===== Remove old system (important) ===== */
/* 中央ボタン方式にするなら、これは使わない。残すと邪魔。 */
.lap-tapzones,
.lap-zone{
  display: none !important;
}

/* ===== ラプラスプロローグ：立ち絵サイズ・配置 ===== */
#screen-laplus-prologue {
  background: #000;
  position: relative;
}

#screen-laplus-prologue .laplus-stand {
  position: fixed;
  left: 50%;
  bottom: 0;

  height: 90vh; /* 他キャラと同じ縮尺（少し小さめ） */
  width: auto;

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

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