/* フォントと基本レイアウト設定 */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  font-family: "Noto Serif JP", serif;
  background-color: black;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ユーザー操作の制限（画像の選択やタッチ制御） */
html {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: none;
}

/* 全体をラップするターゲット要素（16:9比率を維持） */
#target {
  width: 100vw;
  height: 100vh;
  aspect-ratio: 9 / 16;
  position: relative;
  background-color: black;
  overflow: hidden;
  max-width: 100vh * (9 / 16);
}

/* カメラ映像（画面フィット） */
#camera {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  object-fit: cover;
  z-index: 1;
}

/* ラベル表示（明朝体＋白文字＋黒縁） */
#label-wrapper {
  position: absolute;
  top: 3%;
  left: 3%;
  color: white;
  font-family: 'Noto Serif JP', serif;
  text-shadow:
    -1px -1px 0 black,
    1px -1px 0 black,
    -1px 1px 0 black,
    1px 1px 0 black;
  z-index: 10;
  pointer-events: none;
  line-height: 1;
  text-align: center;
}

#date-label {
  font-family: "Noto Serif Dives Akuru", serif;
  font-weight: 400;
  font-style: bold;
  font-size: 5vh;
  text-decoration: underline;
}

#museum-label {
  font-style: bold;
  font-size: 2.5vh;
  margin-top: 0vh;
}

/* ヘッダー・フッター画像 */
#picture_header,
#picture_footer {
  position: absolute;
  width: 100%;
  z-index: 2;
}

#picture_header {
  top: 0%;
  left: 0%;
  transform: scaleY(-1);
}

#picture_footer {
  position: fixed;
  bottom: 0%;
  left: 0%;
}

/* ロゴ画像 */
#picture_logo {
  position: absolute;
  right: 5%;
  top: 5%;
  height: 5%;
  z-index: 3;
}

/* キャラクター画像（可動・配置調整） */
#target img.draggable-img {
  z-index: 3;
  width: 25%;
  height: auto;
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  touch-action: none;
  pointer-events: auto;
}

#Chibanosuke {
  left: 10%;
}

#Kisago {
  left: 37%;
}

#Nomao {
  right: 10%;
}

/* 撮影ボタン */
#button {
  z-index: 10;
  position: absolute;
  right: 5%;
  bottom: 5%;
  width: 8vh;
  pointer-events: auto;
}

/* 撮影後の画像表示 */
.photo img#photo {
  position: absolute;
  z-index: 20;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  border: 3px #fff solid;
}

/* 撮影後の文字（日時など） */
#text {
  position: absolute;
  bottom: 10%;
  z-index: 99;
  height: 6.8%;
  left: 50%;
  transform: translateX(-50%);
  color: white; 
  text-align: center;
}

/* 閉じるボタン */
#close {
  position: absolute;
  bottom: 3%;
  z-index: 99;
  height: 5%;
  left: 50%;
  transform: translateX(-50%);
  color: white; 
  text-align: center;
  font-size: 32px;
}

/* 横画面時の補正 */
@media (orientation: landscape) {
  #target {
    max-height: 100vw * (16 / 9);
    aspect-ratio: 9 / 16;
  }
}