html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #f5f5f5;
}

canvas {
  display: block;
}

/* 中央テキスト＋ロゴ（見た目用） */
#center-wrap {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

#logo-text {
  font-family: 'Comic Relief', cursive;
  font-size: 42px;
  color: #5fd0df;
  margin-bottom: 24px;
  letter-spacing: .5px;
}

#center-logo {
  width: 320px;
  pointer-events: none;
  user-select: none;
}

/* === 横並びの中央下付け（bottom:14vh） === */
#controls {
  position: fixed;
  left: 50%;
  bottom: 14vh;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 既存のpillボタン定義（ベース） */
.ctrl-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: 13px/1.1 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  padding: 10px 14px;
  min-width: 160px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  background: #111;
  color: #fff;
}

.ctrl-btn:active {
  transform: translateY(1px);
}

/* 丸い絵文字ボタン（共通） */
.icon-btn {
  min-width: auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

/* 🎵 サウンド（ONで #5fd0df） */
#soundToggle {
  background: #d6dcdd;
  color: #fff;
}

#soundToggle.on {
  background: #5fd0df;
  color: #111;
}

/* 📸 ショットは白ベース */
#shotBtn {
  background: #fff;
  color: #111;
}

/* 🤪 モーション（ONで #5fd0df） */
#motionBtn {
  background: #ffffff;
  color: #fff;
}

#motionBtn.on {
  background: #5fd0df;
  color: #111;
}

/* 🏢 会社概要 */
#aboutBtn {
  background: #ffffff;
  color: #fff;
}


/* ==== Bottom Sheet ==== */
#sheetBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 20;
}

#aboutSheet {
  width: 100%;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0);
  transition: transform .28s ease;
  z-index: 21;
  display: grid;
  grid-template-rows: auto 1fr;
  will-change: transform;
  font-family: "Noto Sans JP",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;

  /* ▼ これを追加（初期は画面下に隠す） */
  transform: translateY(100%);

  -webkit-overflow-scrolling: touch;

}

#aboutSheet[aria-hidden="false"] {
  transform: translateY(0);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .2);
}

#sheetBackdrop[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.sheet-handle {
  height: 28px;
  display: grid;
  place-items: center;
}

.sheet-handle::before {
  content: "";
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #e0e0e0;
}

.sheet-body {
  padding: 16px 40px 40px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 15px;
  line-height: 1.6;
  /* ← 本文16px */
  color: #111;
}

.sheet-body h2 {
  font-family: "Cormorant Garamond",
    serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 32px;
  color: #111;
}



.about-list {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 10px 10px;
  font-size: 16px;
}

.about-list dt {
  color: #555;
  font-weight: 600;
}

.about-list dd {
  margin: 0;
}

.sheet-close {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

/* 右上 × ボタン */
.sheet-close-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #999;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .08s ease;
}

.sheet-close-icon:hover {
  background: rgba(0, 0, 0, .06);
  color: #333;
}

.sheet-close-icon:active {
  transform: scale(.96);
}

.sheet-close-icon:focus-visible {
  outline: 2px solid #5fd0df;
  outline-offset: 2px;
}


/* スマホ向け微調整 */
@media (max-width: 768px) {
  #center-logo {
    width: 40vw;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  #logo-text {
    font-size: 32px;
    margin-bottom: 14px;
  }

  .ctrl-btn {
    font-size: 14px;
    padding: 10px 14px;
  }

  .icon-btn {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  #controls {
    bottom: 10vh;
  }

  .sheet-close-icon {
    width: 40px;
    height: 40px;
    font-size: 24px;
    top: 8px;
    right: 8px;
  }

  .sheet-body {
    padding: 8px 18px 40px;
  }

}