/* PlaCamp v0.8.7 — PHOTO STORY
 * Story-first detail page for placamp_gallery only.
 * No database edits, no forced media crop; native blocks stay editable.
 */
.pc087-story-page {
  --pc-story-ink: #20352b;
  --pc-story-muted: #6a786e;
  --pc-story-line: #e3e6dd;
  box-sizing: border-box;
  padding: clamp(2rem, 5.5vw, 5.3rem) clamp(18px, 4vw, 55px) clamp(3rem, 6vw, 6rem);
  background: #fcfbf7;
  color: var(--pc-story-ink);
}
.pc087-story-page > .pc087-story-head,
.pc087-story-page > .pc087-story-body {
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px !important;
  margin-inline: auto !important;
}
.pc087-story-page > .pc087-story-head {
  padding: 0 0 clamp(1.55rem, 3.3vw, 2.75rem);
  border-bottom: 1px solid var(--pc-story-line);
}
.pc087-story-head > * {margin-left: 0 !important; margin-right: 0 !important}
.pc087-story-head .pc07-kicker {
  color: #66756b;
  font-size: .68rem !important;
  letter-spacing: .16em;
  margin: 0 0 clamp(1.2rem, 2.4vw, 2.2rem) !important;
}
.pc087-story-head .wp-block-post-title {
  max-width: 900px;
  color: var(--pc-story-ink);
  font-size: clamp(2rem, 3.8vw, 3.7rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.045em;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
  text-wrap: pretty;
  margin: 0 0 1.4rem !important;
}
.pc087-story-head .wp-block-post-date {
  color: var(--pc-story-muted);
  font-size: .8rem;
  margin: 0 !important;
}
.pc087-story-head .wp-block-post-terms {
  margin: 0 0 1rem !important;
  font-size: .75rem;
  font-weight: 600;
}
.pc087-story-head .wp-block-post-terms a {
  color: #315340;
  border: 1px solid #d8e0d3;
  border-radius: 999px;
  background: #f0f3ec;
  padding: .27rem .75rem;
  text-decoration: none;
}
.pc087-story-head .pc087-story-count {
  color: var(--pc-story-muted);
  font-size: .75rem;
  letter-spacing: .035em;
  margin: .65rem 0 0 !important;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.pc087-story-page > .pc087-story-body {
  padding-top: clamp(1.8rem, 4vw, 3.3rem);
  padding-bottom: clamp(2.6rem, 4vw, 4rem);
}
.pc087-story-page .pc087-story-body .wp-block-post-content {
  width: 100%;
  max-width: none !important;
  font-size: clamp(.95rem, 1.1vw, 1.06rem);
  line-height: 1.95;
  counter-reset: pc087-scene;
}
/* Editorial text can be interleaved with images. It never becomes a false caption. */
.pc087-story-page .pc087-story-body .wp-block-post-content > :where(p, h2, h3, h4, ul, ol, blockquote) {
  width: 100%;
  max-width: 760px;
  margin-inline: 0 !important;
}
.pc087-story-page .pc087-story-body .wp-block-post-content > p:first-child {
  max-width: 810px;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 2.05;
  color: #526354;
  margin-top: 0;
  margin-bottom: clamp(1.8rem, 4vw, 3.4rem);
}
.pc087-story-page .pc087-story-body .wp-block-post-content > :where(h2,h3) {
  border: 0;
  padding: 0;
  letter-spacing: -.03em;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}
.pc087-story-page .pc087-story-body .wp-block-post-content > h2:before {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: #e8a470;
  margin: 0 0 .8rem;
}
/* If there is one media item, center it within a controlled editorial frame.
   Two media: asymmetric but aligned at top. Three: quiet feature + supporting pair. */
.pc087-story-page .pc087-story-sequence {
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px !important;
  margin: clamp(1.8rem, 3.8vw, 3.25rem) auto !important;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1rem, 2.2vw, 1.9rem);
  align-items: start;
  /* A quiet contact-sheet surface, not a new site within the site. */
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid #e6e7dd;
  border-radius: clamp(12px, 1.7vw, 18px);
  background: linear-gradient(155deg, #f7f7f1, #f4f4ee 80%);
  box-shadow: 0 10px 32px rgba(28, 41, 32, .035);
}
.pc087-story-page .pc087-story-sequence.pc087-count-1 {
  grid-template-columns: minmax(0, 720px);
}
.pc087-story-page .pc087-story-sequence.pc087-count-3 {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(.8rem, 1.9vw, 1.45rem) clamp(1rem, 2.2vw, 1.9rem);
}
.pc087-story-page .pc087-story-sequence.pc087-count-3 > :first-child {grid-row: span 2}
.pc087-story-page .pc087-story-sequence.pc087-count-3 > :first-child :is(img,video) {max-height:min(53svh,530px)!important}
.pc087-story-page .pc087-story-sequence.pc087-count-3 > :not(:first-child) :is(img,video) {max-height:min(25svh,235px)!important}
.pc087-story-page .pc087-story-sequence > .pc087-story-item {
  counter-increment: pc087-scene;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: transparent;
}
.pc087-story-item:before {
  content: counter(pc087-scene,decimal-leading-zero) ' / 写真';
  order: 0;
  display: block;
  color: var(--pc-story-muted);
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .08em;
  line-height: 1.5;
  margin: 0 0 .75rem;
  padding-bottom: .48rem;
  background: linear-gradient(currentColor,currentColor) left bottom / 24px 1px no-repeat;
  opacity: .82;
}
.pc087-story-item.pc087-scene-video:before {content: counter(pc087-scene,decimal-leading-zero) ' / 動画'}
.pc087-story-item.pc087-scene-gallery:before {content: counter(pc087-scene,decimal-leading-zero) ' / 写真集'}
/* The media itself stays fully visible. Portrait media does not take an entire screen. */
.pc087-story-item :is(img,video) {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(48svh, 485px) !important;
  object-fit: contain !important;
  border-radius: 8px !important;
}
.pc087-story-sequence.pc087-count-1 .pc087-story-item :is(img,video) {max-height: min(56svh, 560px) !important}
.pc087-story-item :is(a:has(>img), .pc085-video-preview) {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  min-height: 0;
  background: #edeee8;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(35, 52, 41, .08);
}
.pc087-story-item > img {align-self: flex-start}
.pc087-story-item img:not(:is(.pc085-dialog-content img)) {
  background: #f0f1eb;
}
.pc087-story-item > :is(a,div.pc085-video-preview) {order:1}
.pc087-story-item > :is(img,video) {order:1}
.pc087-story-item > figcaption,
.pc087-story-item > .wp-element-caption {
  order:2;
  font-size:.8rem;
  line-height:1.75;
  color: #657369;
  text-align: left;
  margin: .8rem 0 .1rem !important;
}
/* Portrait photo captions should sit under the image, not at an empty column edge. */
.pc087-story-item.pc087-portrait > figcaption {align-self:center;max-width:90%;}
.pc087-story-item.pc087-portrait > img {align-self:center}
.pc087-story-item .pc085-zoomable {transition:filter .24s ease}
.pc087-story-item .pc085-zoomable:hover {filter:brightness(.96)}
.pc087-story-item .pc085-video-preview {width:100%;background:#eef0e9}
.pc087-story-item .pc085-video-preview video {background:#1d2420}
.pc087-story-item .pc085-video-launch {
  background:linear-gradient(0deg,rgba(20,27,23,.30),rgba(20,27,23,0) 60%);
}
.pc087-story-item .pc085-video-launch .pc085-play-icon {
  background:rgba(255,255,255,.94);
  color:#1e382a;
  border:1px solid rgba(255,255,255,.75);
  box-shadow:0 5px 24px rgba(0,0,0,.10);
  transition:transform .25s ease;
}
.pc087-story-item .pc085-video-launch:hover .pc085-play-icon {transform:scale(1.08);background:#fff}
.pc087-story-item .pc085-video-launch .pc085-play-text {
  color:#fff;
  background:rgba(24,30,26,.68);
  font-weight:600;
}
/* WordPress Gallery blocks may contain multiple images; preserve their native order. */
.pc087-story-page .pc087-story-item.wp-block-gallery {
  display:flex;
  flex-wrap:wrap;
  flex-direction:row;
  gap:clamp(.6rem,1vw,1rem);
}
.pc087-story-item.wp-block-gallery:before {flex-basis:100%}
.pc087-story-item.wp-block-gallery .wp-block-image {
  flex:1 1 130px;
  min-width:0;
  margin:0 !important;
}
.pc087-story-item.wp-block-gallery figure img {max-height:min(36svh,360px)!important}
/* Conservative fallback for Gutenberg media wrapped in Groups (not direct children). */
.pc087-story-page .pc087-story-body .wp-block-post-content figure.wp-block-image:not(.pc087-story-item) img,
.pc087-story-page .pc087-story-body .wp-block-post-content figure.wp-block-video:not(.pc087-story-item) video {
  max-height:min(54svh,520px)!important;
  max-width:100%!important;
  width:auto;
  height:auto;
  object-fit:contain;
}
/* Text between photo spreads reads like a field note, not a floating caption.
   Content and order stay in Gutenberg; only the paper treatment changes. */
.pc087-story-page .pc087-story-body .wp-block-post-content > .pc087-story-sequence + p {
  max-width: 760px;
  margin: clamp(1.1rem, 2.5vw, 1.8rem) 0 clamp(2rem, 4vw, 3.1rem) !important;
  padding: .15rem 0 .15rem clamp(.85rem, 1.8vw, 1.25rem);
  border-left: 2px solid #c4b49a;
  color: #4f5e53;
}
/* Neutral navigation should not compete with the pictures. */
.pc087-story-page .pc087-story-navigation {
  gap:1rem;
  padding:1.7rem 0 0;
  border-top:1px solid var(--pc-story-line);
}
.pc087-story-page .pc087-story-navigation .wp-block-post-navigation-link {
  min-width:0;
  max-width:48%;
  font-size:.82rem;
  line-height:1.65;
}
.pc087-story-page .pc087-story-navigation a {
  color:#2a4939;
  text-decoration:none;
  text-underline-offset:.2em;
}
.pc087-story-page .pc087-story-navigation a:hover {text-decoration:underline}
@media (min-width:701px) and (max-width:1000px) {
  .pc087-story-page .pc087-story-sequence.pc087-count-3 {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px) {
  .pc087-story-page {padding:clamp(1.6rem,5vw,2.5rem) 16px 3.5rem}
  .pc087-story-head .wp-block-post-title {font-size:clamp(1.8rem,6.7vw,2.8rem);line-height:1.4}
  .pc087-story-page .pc087-story-sequence {grid-template-columns:minmax(0,1fr);gap:1.45rem;margin:1.8rem auto!important;padding:12px;border-radius:12px}
  .pc087-story-page .pc087-story-sequence.pc087-count-3 {grid-template-columns:minmax(0,1fr)}
  .pc087-story-page .pc087-story-sequence.pc087-count-3 > :first-child {grid-row:auto}
  .pc087-story-page .pc087-story-sequence.pc087-count-3 :is(img,video) {max-height:min(51svh,470px)!important}
  .pc087-story-item :is(img,video) {max-height:min(51svh,470px)!important}
  .pc087-story-page .pc087-story-navigation .wp-block-post-navigation-link {max-width:none}
}
@media(prefers-reduced-motion:reduce) {
  .pc087-story-item .pc085-video-launch .pc085-play-icon,.pc087-story-item .pc085-zoomable {transition:none}
}
