/* Photo attribution captions. Applies only to audited semantic markers and search credits. */
:root body :is(p,span,div,small,figcaption)[data-sh-photo-credit][data-sh-credit-context],
:root body figure.shout-search-photo-credit>figcaption{
  box-sizing:border-box!important;
  display:block;
  position:static!important;
  inset:auto!important;
  float:none!important;
  z-index:auto!important;
  margin:6px 0 0!important;
  padding:0!important;
  max-width:100%!important;
  min-width:0;
  color:var(--sh-photo-credit-ink,#606878)!important;
  background:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  text-shadow:none!important;
  opacity:1!important;
  font-family:inherit!important;
  font-size:.6875rem!important;
  font-weight:400!important;
  font-style:normal!important;
  line-height:1.4!important;
  letter-spacing:normal!important;
  text-align:start!important;
  overflow-wrap:anywhere;
}
/* Nested attribution follows its caption's reading-preference enlargement. */
:root body :is(figcaption,p)>span[data-sh-photo-credit][data-sh-credit-context]{
  font-size:max(.6875rem,.8em)!important;
  line-height:inherit!important;
}
:root body [data-sh-photo-credit][data-sh-credit-context] a,
:root body [data-sh-photo-credit][data-sh-credit-context] a:visited,
:root body figure.shout-search-photo-credit>figcaption a,
:root body figure.shout-search-photo-credit>figcaption a:visited{
  color:inherit!important;
  font-family:inherit!important;
  font-size:inherit!important;
  font-weight:inherit!important;
  line-height:inherit!important;
  text-decoration:underline!important;
  text-decoration-color:#8b93a2!important;
  text-underline-offset:2px;
}
:root body [data-sh-photo-credit][data-sh-credit-context] a:hover,
:root body [data-sh-photo-credit][data-sh-credit-context] a:focus-visible,
:root body figure.shout-search-photo-credit>figcaption a:hover,
:root body figure.shout-search-photo-credit>figcaption a:focus-visible{
  text-decoration-color:currentColor!important;
}
:root body [data-sh-photo-credit][data-sh-credit-context] a:focus-visible,
:root body figure.shout-search-photo-credit>figcaption a:focus-visible{
  outline:2px solid currentColor;
  outline-offset:2px;
  border-radius:2px;
}
:root body [data-sh-photo-credit][data-sh-credit-context] .shv2-photo-credit-row{
  font-size:inherit!important;
  line-height:inherit!important;
  color:inherit!important;
}
:root body :is(p,span,div,small,figcaption)[data-sh-photo-credit][data-sh-credit-context="archive-card-credit"],
:root body :is(p,span,div,small,figcaption)[data-sh-photo-credit][data-sh-credit-context="archive-overlay-credit"],
:root body :is(p,span,div,small,figcaption)[data-sh-photo-credit][data-sh-credit-context="homepage-city-card"],
:root body :is(p,span,div,small,figcaption)[data-sh-photo-credit][data-sh-credit-context="property-neighbourhood-card"]{
  padding-inline:16px!important;
}
:root body :is(p,span,div,small,figcaption)[data-sh-photo-credit][data-sh-credit-context="blog-featured-photo"],
:root body :is(p,span,div,small,figcaption)[data-sh-photo-credit][data-sh-credit-context="mixed-blog-featured-credit"],
:root body :is(p,span,div,small,figcaption)[data-sh-photo-credit][data-sh-credit-context="destination-photo-caption"]{
  padding-inline:12px!important;
}
:root body [data-sh-credit-media]{margin-block-end:0!important;}
:root body :is(img,picture)[data-sh-credit-media]{display:block;}
:root body figure.shout-search-photo-credit{margin:0!important;padding:0!important;}
:root body figure.shout-search-photo-credit>figcaption{padding:0 16px!important;}
:root body.search .sh-layout-post__thumbnail__link:has(+figure.shout-search-photo-credit){margin-bottom:0!important;}
:root body figure.shout-search-photo-credit>:is(img,picture){display:block;margin-bottom:0!important;}
/* Preserve the visibility of closed dialogs and native hidden caption states. */
:root body [data-sh-photo-credit][hidden]{display:none!important;}
/* A light, muted variant for the existing dark viewer; no gallery credit is invented. */
.shv2-lightbox{--sh-photo-credit-ink:#b6bfcc;}
:root body .shv2-lightbox .shv2-photo-credit{
  color:#b6bfcc!important;
  font-size:.6875rem!important;
  line-height:1.4!important;
}
:root body .shv2-lightbox .shv2-photo-credit a{color:inherit!important;text-decoration-color:#8b93a2!important;}
@media(forced-colors:active){
  :root body [data-sh-photo-credit][data-sh-credit-context],
  :root body figure.shout-search-photo-credit>figcaption{color:CanvasText!important;}
  :root body [data-sh-photo-credit][data-sh-credit-context] a,
  :root body figure.shout-search-photo-credit>figcaption a{color:LinkText!important;text-decoration-color:LinkText!important;}
}

/* Existing reading preferences take precedence over the quiet default. */
:root body.sh-owned-contrast [data-sh-photo-credit][data-sh-credit-context],
:root body .sh-owned-contrast [data-sh-photo-credit][data-sh-credit-context],
:root body .sh-owned-contrast figure.shout-search-photo-credit>figcaption{color:#000!important;}
:root body.sh-owned-bigger-line-height [data-sh-photo-credit][data-sh-credit-context],
:root body .sh-owned-bigger-line-height [data-sh-photo-credit][data-sh-credit-context],
:root body .sh-owned-bigger-line-height figure.shout-search-photo-credit>figcaption{line-height:1.9!important;}
/* The existing tool buttons expose their local state, including dynamic search captions. */
:root body:has([data-tool="bigger-text"][aria-pressed="true"]) [data-sh-photo-credit][data-sh-credit-context],
:root body:has([data-tool="bigger-text"][aria-pressed="true"]) figure.shout-search-photo-credit>figcaption{
  font-size:max(.859375rem,.8em)!important;
}
:root body:has([data-tool="bigger-line-height"][aria-pressed="true"]) [data-sh-photo-credit][data-sh-credit-context],
:root body:has([data-tool="bigger-line-height"][aria-pressed="true"]) figure.shout-search-photo-credit>figcaption{line-height:1.9!important;}
:root body:has([data-tool="contrast"][aria-pressed="true"]) [data-sh-photo-credit][data-sh-credit-context],
:root body:has([data-tool="contrast"][aria-pressed="true"]) figure.shout-search-photo-credit>figcaption{color:#000!important;background-color:#fff!important;}
:root body:has([data-tool="highlight-links"][aria-pressed="true"]) [data-sh-photo-credit][data-sh-credit-context] a,
:root body:has([data-tool="highlight-links"][aria-pressed="true"]) figure.shout-search-photo-credit>figcaption a{text-decoration-thickness:3px!important;text-underline-offset:4px;}
/* Legacy card thumbnails carry a 20px link margin; a following credit owns that gap. */
:root body a.sh-layout-post__thumbnail__link:has(+[data-sh-photo-credit][data-sh-credit-context]){margin-bottom:0!important;}
/* Credit text in an enabled dark viewer follows the same existing reading state. */
:root body:has([data-tool="bigger-text"][aria-pressed="true"]) .shv2-lightbox .shv2-photo-credit{font-size:max(.859375rem,.8em)!important;}
:root body:has([data-tool="bigger-line-height"][aria-pressed="true"]) .shv2-lightbox .shv2-photo-credit{line-height:1.9!important;}
:root body:has([data-tool="contrast"][aria-pressed="true"]) .shv2-lightbox .shv2-photo-credit{color:#000!important;background-color:#fff!important;}

/* Captions moved out of full-bleed frames retain comfortable side insets. */
:root body .sh-hero[data-sh-credit-media]+[data-sh-photo-credit][data-sh-credit-context],
:root body [data-sh-credit-group="exit"]>[data-sh-photo-credit][data-sh-credit-context],
:root body [data-sh-credit-group="editorial"]>[data-sh-photo-credit][data-sh-credit-context],
:root body [data-sh-credit-group="gallery"]>[data-sh-photo-credit][data-sh-credit-context]{padding-inline:16px!important;}
/* Native multirow attribution keeps each title/creator/change notice on its own row. */
:root body .shv2-photo-credit-rows[data-sh-photo-credit][data-sh-credit-context]{display:grid;gap:2px;}

/* Draft placement adapters. Image attrs/srcsets and object-fit stay exact; the featured desktop 2x2 slot reserves caption space. */
:root body [data-sh-credit-group="editorial"],
:root body [data-sh-credit-group="exit"],
:root body [data-sh-credit-group="gallery"]{min-width:0;}
:root body [data-sh-credit-group="gallery"]>.sh-gallery-thumb{
  width:100%;grid-column:auto;grid-row:auto;aspect-ratio:4/3;height:auto;
}
/* A real group occupies the original desktop 2x2 slot; the caption has its own flow row. */
:root body [data-sh-credit-group="gallery"][data-sh-credit-gallery-featured]{display:grid;grid-column:1/3;grid-row:1/3;grid-template-rows:minmax(0,1fr) auto;row-gap:6px;}
:root body [data-sh-credit-group="gallery"][data-sh-credit-gallery-featured]>.sh-gallery-thumb{
  grid-column:auto;grid-row:auto;aspect-ratio:auto;height:100%;min-height:0;
}
:root body [data-sh-credit-group="gallery"][data-sh-credit-gallery-featured]>[data-sh-photo-credit]{
  grid-column:auto;grid-row:auto;margin-block-start:0!important;
}
:root body [data-sh-credit-group="italy-card"]{
  display:block;padding:1.25rem;border:1px solid #ddd;border-radius:.5rem;background:#fff;color:#222;
}
:root body [data-sh-credit-group="italy-card"]>a.sh-country-guide-card{
  display:block;padding:0;border:0;border-radius:0;background:none;
}
:root body [data-sh-credit-group="italy-card"]>[data-sh-photo-credit]{margin-block-end:.75rem!important;}
@media(max-width:768px){:root body [data-sh-credit-group="editorial"]{order:-1;}}
/* Preserve the original protected licence-anchor path and readable qualification. */
:root body :is(span,a)[data-sh-credit-context="mixed-licensed-illustration-caption"]{
  display:inline!important;margin:0!important;padding:0!important;
  color:var(--sh-photo-credit-ink,#606878)!important;font-size:max(.6875rem,.8em)!important;line-height:inherit!important;
}
:root body a[data-sh-credit-context="mixed-licensed-illustration-caption"]{
  text-decoration:underline!important;text-decoration-color:#8b93a2!important;text-underline-offset:2px;
}
:root body a[data-sh-credit-context="mixed-licensed-illustration-caption"]:focus-visible{outline:2px solid currentColor;outline-offset:2px;}
:root body [data-sh-credit-group="archive-caption"]{padding:0!important;margin:0!important;}
@media(max-width:768px){
  :root body [data-sh-credit-group="gallery"][data-sh-credit-gallery-featured]{display:block;grid-column:1/-1;grid-row:auto;}
  :root body [data-sh-credit-group="gallery"][data-sh-credit-gallery-featured]>.sh-gallery-thumb{
    grid-column:1/-1;grid-row:auto;aspect-ratio:16/9;height:auto;
  }
  :root body [data-sh-credit-group="gallery"][data-sh-credit-gallery-featured]>[data-sh-photo-credit]{
    grid-column:auto;grid-row:auto;margin-block-start:6px!important;
  }
}
