@charset "UTF-8";

#photo {
  text-align: center;   /* 画像を中央に */
  margin: 0 auto;
  max-width: 700px;     /* 写真の最大幅を決める */
}

#photo img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-credit {
  text-align: right;    /* 右寄せ */
  font-size: 0.75rem;
  color: #555;
  margin-top: 4px;      /* 写真と少し間隔 */
}

/* === overlay（後ろを透かして見せる）=== */
.loader-wrap{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.6); /* 透け具合は0.4〜0.8で調整 */
  backdrop-filter: blur(2px);        /* 対応ブラウザで軽くぼかす */
  z-index: 9999;
  transition: opacity .25s ease;
}
.loader-wrap.is-hidden{
  opacity: 0;
  pointer-events: none;
}

/* 中央に置くためのラッパ（将来他のローダーにも使える） */
.loader-inner{
  display: inline-block;
}

/* === your self-building-square-spinner === */
.self-building-square-spinner, .self-building-square-spinner * {
  box-sizing: border-box;
}
.self-building-square-spinner {
  width: 40px;
  height: 40px;
  /* 位置調整の top は不要（中央揃えは overlay 側でやる） */
}

.self-building-square-spinner .square {
  width: 10px;
  height: 10px;
  margin-right: calc(10px / 3);
  margin-top: calc(10px / 3);
  background: #555; /* ← 色はここで変更可能 */
  float: left;
  position: relative;
  opacity: 0;
  animation: self-building-square-spinner 6s infinite;
}
.self-building-square-spinner .square:nth-child(1){ animation-delay: calc(300ms * 6); }
.self-building-square-spinner .square:nth-child(2){ animation-delay: calc(300ms * 7); }
.self-building-square-spinner .square:nth-child(3){ animation-delay: calc(300ms * 8); }
.self-building-square-spinner .square:nth-child(4){ animation-delay: calc(300ms * 3); }
.self-building-square-spinner .square:nth-child(5){ animation-delay: calc(300ms * 4); }
.self-building-square-spinner .square:nth-child(6){ animation-delay: calc(300ms * 5); }
.self-building-square-spinner .square:nth-child(7){ animation-delay: calc(300ms * 0); }
.self-building-square-spinner .square:nth-child(8){ animation-delay: calc(300ms * 1); }
.self-building-square-spinner .square:nth-child(9){ animation-delay: calc(300ms * 2); }
.self-building-square-spinner .clear{ clear: both; }

@keyframes self-building-square-spinner {
  0%   { opacity: 0;   transform: translateY(-6px); }
  5%   { opacity: 1;   transform: translateY(0); }
  50.9%{ opacity: 1;   transform: translateY(0); }
  55.9%{ opacity: 0;   transform: translateY(-6px); }
}


/* サイズはCSS変数で可変（スマホで小さく） */
:root{
  --spinner-size: 40px;
  --square: 10px;
}
@media (max-width: 480px){
  :root{
    --spinner-size: 28px;
    --square: 7px;
  }
}

/* 画面全体オーバーレイ（半透明＆ぼかし：iOS対応） */
.loader-wrap{
  position: fixed;
  inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px); /* iOS Safari */
  z-index: 9999;
  transition: opacity .25s ease;
}
.loader-wrap.is-hidden{ opacity: 0; pointer-events: none; }

/* スピナー本体（サイズは上の変数に同期） */
.self-building-square-spinner{ width: var(--spinner-size); height: var(--spinner-size); }
.self-building-square-spinner, .self-building-square-spinner * { box-sizing: border-box; }
.self-building-square-spinner .square{
  width: var(--square);
  height: var(--square);
  margin-right: calc(var(--square) / 3);
  margin-top: calc(var(--square) / 3);
  background: #555555; /* 色はお好みで */
  float: left;
  position: relative;
  opacity: 0;
  animation: self-building-square-spinner 6s infinite;
}
.self-building-square-spinner .square:nth-child(1){ animation-delay: calc(300ms * 6); }
.self-building-square-spinner .square:nth-child(2){ animation-delay: calc(300ms * 7); }
.self-building-square-spinner .square:nth-child(3){ animation-delay: calc(300ms * 8); }
.self-building-square-spinner .square:nth-child(4){ animation-delay: calc(300ms * 3); }
.self-building-square-spinner .square:nth-child(5){ animation-delay: calc(300ms * 4); }
.self-building-square-spinner .square:nth-child(6){ animation-delay: calc(300ms * 5); }
.self-building-square-spinner .square:nth-child(7){ animation-delay: calc(300ms * 0); }
.self-building-square-spinner .square:nth-child(8){ animation-delay: calc(300ms * 1); }
.self-building-square-spinner .square:nth-child(9){ animation-delay: calc(300ms * 2); }
.self-building-square-spinner .clear{ clear: both; }
@keyframes self-building-square-spinner{
  0%{ opacity:0; transform: translateY(-6px); }
  5%{ opacity:1; transform: translateY(0); }
  50.9%{ opacity:1; transform: translateY(0); }
  55.9%{ opacity:0; transform: translateY(-6px); }
}

/* ローディング中はスクロール固定（任意だがスマホで体験良くなる） */
body.loading{ overflow: hidden; touch-action: none; }