/* Salon Cerchio — photo placeholder boxes shared by all templates.
   Usage: <div class="ph ph-3x4"><span>写真</span></div>
   Each template sets --ph-bg and --ph-fg on :root to match its palette. */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--ph-bg, #e9e4dc);
  color: var(--ph-fg, rgba(0, 0, 0, 0.42));
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 4 / 3;
}
.ph > span {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  font-weight: 400;
  user-select: none;
}
/* faint grain so the box reads as material, not a flat swatch */
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    radial-gradient(rgba(0,0,0,0.045) 0.5px, transparent 0.6px),
    radial-gradient(rgba(255,255,255,0.05) 0.5px, transparent 0.6px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
  pointer-events: none;
}
/* real photo inside the same frame: <div class="ph ph-3x4 has-img"><img …></div> */
.ph.has-img > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ph.has-img > span,
.ph.has-img::after { display: none; }

.ph-1x1  { aspect-ratio: 1 / 1; }
.ph-3x4  { aspect-ratio: 3 / 4; }
.ph-4x3  { aspect-ratio: 4 / 3; }
.ph-4x5  { aspect-ratio: 4 / 5; }
.ph-16x9 { aspect-ratio: 16 / 9; }
.ph-21x9 { aspect-ratio: 21 / 9; }
.ph-round { border-radius: 50%; aspect-ratio: 1 / 1; }
.ph-fill { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
