/* TP V7.2.1 · Frame integration only. Do not alter approved artwork or page layout. */
/* Render after TP Portfolio Bridge stylesheet. Its 4/3 image box caused exposed felt. */
.tp-pb-gallery{max-width:1120px}
.tp-pb-grid{gap:26px;align-items:start}
.tp-pb-card{
  position:relative;min-width:0;padding:0;border:0;border-radius:0;
  background:transparent;box-shadow:none;overflow:visible;
}
.tp-pb-card::before{display:none}
.tp-pb-card-link{
  display:flex;flex-direction:column;height:100%;min-height:100%;
  background:transparent;border-radius:0;overflow:visible;backdrop-filter:none;
}
.tp-pb-card-link:hover,.tp-pb-card-link:focus-visible{outline:0;box-shadow:none}
.tp-pb-card-link:focus-visible .tp-pb-card-copy{outline:2px solid #785234;outline-offset:3px}

/* Reusable image holder: dynamic dimensions computed from the approved nine-slice test. */
.tp-pb-card-image,
.tp-piece-hero,
.tp-piece-content .tp-pb-detail-grid figure,
.tp-family-photo-frame,
.tp-family-lightbox-frame{
  position:relative!important;display:block!important;isolation:isolate;
  flex:0 0 auto;box-sizing:border-box;overflow:visible!important;
  border:0!important;border-radius:0!important;
  padding:0!important;margin-left:auto;margin-right:auto;
  aspect-ratio:auto!important;
  min-height:0;
  background:none!important;background-color:transparent!important;background-image:none!important;
  box-shadow:none!important;line-height:0;
  filter:drop-shadow(1px 4px 3px rgba(67,41,23,.32));
  --tp-frame-shell:url('wood-frame-shell.png');
  --tp-ornament:url('wood-frame-ornament.png');
}
.tp-pb-card-image{width:100%!important;margin-top:0;margin-bottom:10px!important}
.tp-piece-hero{width:100%;max-width:980px;margin-top:0;margin-bottom:25px!important}
.tp-piece-content .tp-pb-detail-grid figure{width:100%;margin:0!important}

/* Photo first, then frame, then independent ornament. Photo bleeds under wood. */
.tp-pb-card-image > img.tp-pb-image,
.tp-piece-hero > img.tp-piece-image,
.tp-piece-content .tp-pb-detail-grid figure > img.tp-pb-detail-photo,
.tp-family-photo-frame > img.tp-family-photo-image,
.tp-family-lightbox-frame > img.tp-family-lightbox-image{
  position:absolute!important;
  top:var(--tp-pt)!important;right:var(--tp-pr)!important;
  bottom:var(--tp-pb)!important;left:var(--tp-pl)!important;
  width:calc(100% - var(--tp-pl) - var(--tp-pr))!important;
  height:calc(100% - var(--tp-pt) - var(--tp-pb))!important;
  max-width:none!important;
  object-fit:cover;display:block;border:0;border-radius:0!important;
  margin:0;padding:0;z-index:1;
  background:none!important;box-shadow:none;
}
.tp-pb-card-image::before,
.tp-piece-hero::before,
.tp-piece-content .tp-pb-detail-grid figure::before,
.tp-family-photo-frame::before,
.tp-family-lightbox-frame::before{
  content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  border:solid transparent;
  border-width:var(--tp-bt) var(--tp-br) var(--tp-bb) var(--tp-bl);
  border-image-source:var(--tp-frame-shell);
  border-image-slice:470 352 344 636;
  border-image-width:var(--tp-bt) var(--tp-br) var(--tp-bb) var(--tp-bl);
  border-image-repeat:stretch stretch;
}
.tp-pb-card-image.tp-repeat-braid::before,
.tp-piece-hero.tp-repeat-braid::before,
.tp-piece-content .tp-pb-detail-grid figure.tp-repeat-braid::before,
.tp-family-photo-frame.tp-repeat-braid::before,
.tp-family-lightbox-frame.tp-repeat-braid::before{
  border-image-repeat:stretch round;
}
.tp-pb-card-image::after,
.tp-piece-hero::after,
.tp-piece-content .tp-pb-detail-grid figure::after,
.tp-family-photo-frame::after,
.tp-family-lightbox-frame::after{
  content:"";position:absolute;z-index:3;pointer-events:none;
  width:var(--tp-fw);height:auto;aspect-ratio:887/1774;
  top:var(--tp-ft);right:var(--tp-fr);
  background:transparent center/contain no-repeat var(--tp-ornament);
}
.tp-pb-card-image.tp-no-feathers::after,
.tp-piece-hero.tp-no-feathers::after,
.tp-piece-content .tp-pb-detail-grid figure.tp-no-feathers::after,
.tp-family-photo-frame.tp-no-feathers::after,
.tp-family-lightbox-frame.tp-no-feathers::after{display:none}

/* Restore approved card copy as a separate readable area below the framed image. */
.tp-pb-card-copy{
  display:flex;flex-direction:column;gap:0;padding:15px 18px 19px;
  border:1px solid rgba(126,92,60,.24);border-radius:14px;
  background:rgba(236,220,198,.58);box-shadow:0 2px 7px rgba(66,44,27,.06);
}
.tp-pb-card h2{font-size:clamp(1.45rem,1.7vw,1.86rem);margin:0 0 8px}
.tp-pb-category{margin:0 0 7px}.tp-pb-excerpt{margin:0 0 14px}
.tp-pb-view{margin-top:auto;padding-top:2px}
.tp-pb-filters{margin-bottom:32px}

.tp-piece-page{max-width:1180px}
.tp-piece-article{max-width:900px;margin:0 auto}
.tp-piece-heading{margin-bottom:26px}
.tp-piece-content{max-width:840px;margin:0 auto}
.tp-piece-content .tp-pb-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:1.15rem}

@media(max-width:780px){
  .tp-pb-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
}
@media(max-width:550px){
  .tp-pb-grid{grid-template-columns:1fr;max-width:430px;margin:0 auto;gap:20px}
  .tp-piece-hero{margin-bottom:22px!important}
}

/* v7.4.10: family photographs use the EXACT approved Portfolio frame assets.
 * Only new selector wiring and wrapper sizing; Portfolio styles are unchanged. */
.tp-family-photo-frame{width:100%!important;margin-top:0;margin-bottom:0!important}
.tp-family-lightbox-frame{width:min(72vw,760px);max-width:100%;margin:0 auto!important}
