/* Utopia — サムネイル未設定時の表示 (inc/thumb-placeholder.php)
   Own class names only (.utp-ph*), so nothing else in the theme or blocks is affected.
   Colours come from CSS variables set inline: --utp-ph-bg / --utp-ph-fg / --utp-ph-line (r, g, b) / --utp-ph-sheen. */
.utp-ph {
  --utp-ph-line: 73, 139, 166;
  --utp-ph-sheen: 1;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-sizing: border-box;
  padding: 8%;
  margin: 0;
  background: var(--utp-ph-bg, #E5F2F7);
  color: var(--utp-ph-fg, #222);
  text-align: center;
  font-family: inherit;
  container-type: inline-size;
}
.utp-ph__title {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  max-width: 100%;
  color: inherit;
  font-size: clamp(10px, 7cqi, 32px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .06em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* Fill a thumbnail box that already has its own size / aspect ratio. */
.utp-ph.utp-ph--fill {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}
/* Cover a positioned thumbnail box completely (ignores its padding). */
.utp-ph.utp-ph--cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

/* 01：斜線レイヤー */
.utp-ph--01 { background: var(--utp-ph-bg, #E5F2F7); }
.utp-ph--01::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(125deg, transparent 0, transparent 24px, rgba(var(--utp-ph-line), .09) 25px, rgba(var(--utp-ph-line), .09) 26px);
  clip-path: polygon(55% 0, 100% 0, 100% 100%, 20% 100%);
  z-index: -1;
}
.utp-ph--01::after {
  content: "";
  position: absolute;
  width: 65%;
  height: 160%;
  right: -28%;
  top: -30%;
  background: rgba(255, 255, 255, calc(.35 * var(--utp-ph-sheen)));
  transform: rotate(25deg);
  border-left: 1px solid rgba(var(--utp-ph-line), .18);
  z-index: -1;
}

/* 02：斜めの半透明面 */
.utp-ph--02 { background: var(--utp-ph-bg, #E8F4F8); }
.utp-ph--02::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0 40%, rgba(255, 255, 255, calc(.55 * var(--utp-ph-sheen))) 40% 65%, rgba(var(--utp-ph-line), .12) 65% 100%);
  z-index: -1;
}
.utp-ph--02::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(var(--utp-ph-line), .2);
  z-index: -1;
}

/* 03：細い斜線とコーナーライン */
.utp-ph--03 { background: var(--utp-ph-bg, #E3F0F5); }
.utp-ph--03::before {
  content: "";
  position: absolute;
  top: -50%;
  right: 12%;
  width: 1px;
  height: 200%;
  background: rgba(var(--utp-ph-line), .3);
  transform: rotate(35deg);
  box-shadow: 18px 0 0 rgba(var(--utp-ph-line), .08), 36px 0 0 rgba(var(--utp-ph-line), .08), 54px 0 0 rgba(var(--utp-ph-line), .08), 72px 0 0 rgba(var(--utp-ph-line), .08);
  z-index: -1;
}
.utp-ph--03::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 10%;
  width: 12%;
  max-width: 45px;
  aspect-ratio: 1;
  border-right: 1px solid rgba(var(--utp-ph-line), .45);
  border-bottom: 1px solid rgba(var(--utp-ph-line), .45);
  z-index: -1;
}

/* 04：円弧 */
.utp-ph--04 { background: var(--utp-ph-bg, #EAF5F9); }
.utp-ph--04::before {
  content: "";
  position: absolute;
  width: 75%;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--utp-ph-line), .2);
  border-radius: 50%;
  right: -24%;
  top: -65%;
  box-shadow: 0 0 0 30px rgba(var(--utp-ph-line), .045), 0 0 0 60px rgba(var(--utp-ph-line), .035);
  z-index: -1;
}
.utp-ph--04::after {
  content: "";
  position: absolute;
  left: -15%;
  bottom: -95%;
  width: 65%;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--utp-ph-line), .16);
  border-radius: 50%;
  z-index: -1;
}

/* 05：斜めパネル */
.utp-ph--05 { background: var(--utp-ph-bg, #E1EFF5); }
.utp-ph--05::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 52%, rgba(255, 255, 255, calc(.35 * var(--utp-ph-sheen))) 52% 68%, rgba(var(--utp-ph-line), .18) 68% 68.2%, transparent 68.2% 100%);
  z-index: -1;
}
.utp-ph--05::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -45%;
  width: 42%;
  height: 190%;
  border-left: 1px solid rgba(var(--utp-ph-line), .25);
  border-right: 1px solid rgba(var(--utp-ph-line), .12);
  transform: rotate(25deg);
  z-index: -1;
}

/* Where a template's box has no size of its own, keep the old "no image" box size. */
.utopia-related-post__thumb--ph > .utp-ph {
  height: 140px;
  aspect-ratio: auto;
}
.utp-ph.utp-lp-post-img {
  display: flex;
}
.utopia-card-thumb--ph {
  display: block;
  text-decoration: none;
}
.utopia-widget-popular-posts__thumb > .utp-ph,
.utopia-post-list__thumb > .utp-ph {
  padding: 6px;
}
.utopia-card-thumb--ph > .utp-ph {
  max-width: 300px;
}
