/* Visitor gallery layouts: Even grid (default) and Magazine.
 * Loaded after gallery-unified.css by gallery.php, client-gallery.php, client-delivery-gallery.php,
 * the demos (demo-selection.php, demo-delivery.php, /e/demo-*) and client/preview.php.
 * The body carries gallery-layout-grid or gallery-layout-magazine; the grid carries data-gallery-layout.
 * Tile sizes, caption quote cards and the floating tool bar are set by assets/js/gallery-layout.js.
 * DEMO PARITY: demos use this same stylesheet and script (scripts/demo-gallery-parity-qa.js). */

/* ---------- Shared: header, counts, tool bar, tiles, selection ---------- */
.gallery-add-photos{gap:6px}
.gallery-add-photos .gallery-ui-icon{width:16px;height:16px;flex-basis:16px;stroke-width:2.2}
/* Header buttons: 44px pills, as on the Guest Upload page (assets/css/guest-upload.css). */
[class*="gallery-layout-"] .client-gallery-header-actions .gallery-header-link,
[class*="gallery-layout-"] .client-gallery-header-actions .gallery-share-button{min-height:44px!important;height:auto!important}
@media(max-width:420px){
  .gallery-add-photos{gap:4px;padding-inline:12px!important}
  .gallery-add-photos .gallery-ui-icon{width:14px;height:14px;flex-basis:14px}
}

/* The cover's media count: an icon and a number for each (photos, videos, guests, picks). */
.gallery-hero-media-count [class^="gallery-count-"]{display:inline-flex;align-items:center;white-space:nowrap}
.gallery-hero-media-count [class^="gallery-count-"]+[class^="gallery-count-"]{margin-left:12px}
@media(max-width:700px){
  .gallery-album-hero .gallery-hero-media-count{display:flex}
  .gallery-hero-media-count [class^="gallery-count-"]+[class^="gallery-count-"]{margin-left:9px}
}

/* Slideshow lives with Sort, Filter and Select; the cover's own button steps aside. */
body:has([data-gallery-unified-toolbar] .gallery-toolbar-slideshow) .gallery-hero .gallery-slideshow-launch{display:none!important}
.gallery-toolbar-slideshow .gallery-ui-icon{color:var(--theme-accent,currentColor)}
[class*="gallery-layout-"] .gallery-unified-toolbar .gallery-toolbar-control{min-height:44px!important}
.gallery-active-filter-count[hidden]{display:none!important}

@media(max-width:700px){
  [class*="gallery-layout-"] .gallery-unified-toolbar .gallery-toolbar-actions{display:flex!important;gap:5px}
  [class*="gallery-layout-"] .gallery-unified-toolbar .gallery-toolbar-actions>.gallery-toolbar-control{flex:1 1 auto;width:auto!important;padding-inline:6px}
  [class*="gallery-layout-"] .gallery-unified-toolbar .gallery-toolbar-actions>#select-media{width:auto!important;padding-inline:6px!important}
  /* Compact is an icon on phones, so four tools and Slideshow fit on one row. */
  [class*="gallery-layout-"] .gallery-unified-toolbar .gallery-toolbar-actions>.gallery-view-toggle{flex:0 0 44px}
  [class*="gallery-layout-"] .gallery-unified-toolbar .gallery-view-toggle .view-toggle-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}

.gallery-grid[data-gallery-layout] .media-card:focus-visible{outline:3px solid var(--theme-accent,#c6a56f);outline-offset:-3px}
.gallery-grid[data-gallery-layout] .media-card:focus-visible .media-overlay{opacity:1}

/* Select mode: tick circles on the tiles. */
[class*="gallery-layout-"] .selection-mode .select-media,
[class*="gallery-layout-"].selection-mode .proof-select,
[class*="gallery-layout-"].selection-mode .download-media,
[class*="gallery-layout-"] .selection-mode .download-media{top:7px;right:7px;width:28px;height:28px;border:2px solid #fff;border-radius:50%;background:rgba(18,22,20,.38) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-opacity='.55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-9'/%3E%3C/svg%3E") center/16px no-repeat;box-shadow:0 1px 6px rgba(0,0,0,.3)}
[class*="gallery-layout-"] .selection-mode .select-media:checked,
[class*="gallery-layout-"] .proof-select:checked,
[class*="gallery-layout-"] .download-media:checked{background:var(--theme-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-9'/%3E%3C/svg%3E") center/16px no-repeat;border-color:#fff}

/* Select mode: the bar at the bottom ("3 selected · Cancel · Download"), in both layouts. */
[class*="gallery-layout-"] .selection-panel.selection-toolbar{position:fixed!important;top:auto!important;left:50%;right:auto;bottom:max(12px,env(safe-area-inset-bottom));z-index:60;width:min(640px,calc(100% - 20px));margin:0!important;padding:7px 8px 7px 18px!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:999px!important;color:#fff;background:rgba(24,26,25,.9)!important;box-shadow:0 16px 40px rgba(0,0,0,.3)!important;backdrop-filter:blur(14px);transform:translateX(-50%);box-sizing:border-box}
[class*="gallery-layout-"] .selection-panel.selection-toolbar[hidden]{display:none!important}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-panel-top{display:flex!important;align-items:center;gap:6px}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-panel-top>strong{margin-right:auto;color:#fff;font-size:.88rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-link{min-height:44px;padding:6px 10px!important;border:0;border-radius:999px;color:#fff!important;background:transparent;font-size:.84rem}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-link:hover,
[class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-link:focus-visible{background:rgba(255,255,255,.12);outline:none}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .button{min-height:44px;margin:0!important;padding:8px 18px!important;border-radius:999px!important;font-size:.86rem!important}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .open-export-dialog{color:var(--theme-button-text,#fff);background:var(--theme-primary);border-color:var(--theme-primary)}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .open-export-dialog:disabled{opacity:.5}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .button-secondary{color:#fff!important;background:rgba(255,255,255,.12)!important;border-color:rgba(255,255,255,.2)!important}
[class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-message{margin:4px 0 6px!important;padding-right:10px;color:rgba(255,255,255,.85)!important;font-size:.76rem}
[class*="gallery-layout-"] .selection-panel.selection-toolbar:has(.selection-message:not(:empty)){border-radius:22px!important}
body[class*="gallery-layout-"]:has(.selection-panel:not([hidden])) .gallery-main{padding-bottom:96px}
body[class*="gallery-layout-"]:has(.selection-panel:not([hidden])) .back-to-top{opacity:0!important;pointer-events:none!important}
@media(max-width:700px){
  [class*="gallery-layout-"] .selection-panel.selection-toolbar{padding:6px 6px 6px 14px!important}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-panel-top{gap:2px}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-panel-top>strong{font-size:.8rem}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-link{padding-inline:8px!important;font-size:.76rem}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .button{padding-inline:12px!important;font-size:.78rem!important}
  /* Phones: count, Select all and Cancel on one row, then a full-width Download, so nothing is squeezed. */
  [class*="gallery-layout-"] .selection-panel.selection-toolbar{padding:8px 8px 8px 16px!important;border-radius:22px!important}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-panel-top{flex-wrap:wrap;row-gap:6px}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-panel-top>strong{font-size:.9rem;overflow:visible}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-link{font-size:.84rem}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .open-export-dialog{flex:1 0 100%;font-size:.9rem!important}
}
@media(max-width:380px){
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .selection-link{padding-inline:5px!important}
  [class*="gallery-layout-"] .selection-panel.selection-toolbar .button{padding-inline:9px!important}
}

/* ---------- Even grid: square tiles, 3px gaps ----------
   Three tile sizes, stepped through by the tile-size button (gallery-layout.js): large, the default
   (2 across on phones, 3 on tablets, 4 on computers), medium (3/4/5) and small (4/6/8, .is-list-view). */
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]>.media-card{aspect-ratio:1/1;min-height:0;border-radius:3px;box-shadow:none}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"][data-tile-size="medium"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"].is-list-view{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
@media(min-width:640px){
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]{grid-template-columns:repeat(3,minmax(0,1fr))}
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"][data-tile-size="medium"]{grid-template-columns:repeat(4,minmax(0,1fr))}
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"].is-list-view{grid-template-columns:repeat(6,minmax(0,1fr))}
}
@media(min-width:1000px){
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]>.media-card{border-radius:5px}
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"][data-tile-size="medium"]{grid-template-columns:repeat(5,minmax(0,1fr))}
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"].is-list-view{grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}
}
/* Small tiles: names show on hover or focus (and always in the viewer); likes stay finger-sized. */
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-overlay{padding:26px 9px 8px;opacity:0}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-overlay strong{font-size:.74rem}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-overlay span{font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(hover:hover){.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-card:hover .media-overlay{opacity:1}}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-card .image-social-actions,
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"] .media-card .image-social-actions{right:0;bottom:0}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-card .image-like-button,
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"] .media-card .image-like-button{min-width:44px;min-height:44px;gap:3px;padding:8px;border:0;background:rgba(16,22,19,.5) content-box;font-size:11px;line-height:1}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-card .image-like-button>*,
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"] .media-card .image-like-button>*{position:relative}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-card .image-like-button svg,
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"] .media-card .image-like-button svg{width:15px;height:15px;margin-left:6px}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-card .image-like-button span,
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"] .media-card .image-like-button span{margin-right:6px}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .video-badge{top:6px;left:6px;padding:3px 7px;font-size:.62rem}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .locked-badge{top:6px;left:6px;padding:4px 7px;font-size:.62rem}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .business-media-star{top:5px;left:5px}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]>.media-card.selected::after,
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]>.media-card.saved-selection::after{border-width:3px}
@media(max-width:700px){
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"] .media-overlay{display:none}
  .gallery-layout-grid .gallery-grid[data-gallery-layout="grid"].is-list-view .media-card .image-social-actions{display:none}
}

/* ---------- Magazine: mixed sizes, 6px gaps, rounded tiles, cream paper ---------- */
body.gallery-layout-magazine{--magazine-paper:color-mix(in srgb,var(--theme-background,#f6f1e7) 84%,var(--theme-accent,#c9a46a));background:var(--magazine-paper)}
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:var(--magazine-row,46vw);grid-auto-flow:row dense;gap:6px}
@media(min-width:700px){.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:var(--magazine-row,31vw)}}
@media(min-width:1100px){.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:var(--magazine-row,290px)}}
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]>.media-card{aspect-ratio:auto!important;height:auto;min-height:0;border-radius:14px;box-shadow:none}
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]>.media-card img,
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]>.media-card video{object-position:50% 35%}
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]>.is-lead{grid-column:span 2;grid-row:span 2}
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]>.is-tall{grid-row:span 2}
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"]>.is-wide{grid-column:span 2}
.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"] .media-overlay{padding:30px 12px 11px}
@media(max-width:700px){.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"] .media-overlay{opacity:0}}
@media(hover:hover){.gallery-layout-magazine .gallery-grid[data-gallery-layout="magazine"] .media-card:hover .media-overlay{opacity:1}}
/* The cover is the large first tile (gallery_cover_tile_html), using its focus points. */
.gallery-cover-tile{grid-column:span 2;grid-row:span 2;position:relative;min-width:0;min-height:0;margin:0;overflow:hidden;border-radius:14px;background:color-mix(in srgb,var(--theme-primary) 10%,#e9e4da)}
.gallery-cover-tile img{display:block;width:100%;height:100%;object-fit:cover;object-position:var(--cover-position,50% 50%)}
@media(max-width:700px){.gallery-cover-tile img{object-position:var(--cover-position-mobile,var(--cover-position,50% 50%))}}
.gallery-layout-grid .gallery-cover-tile{display:none}
/* No cover banner: the title block sits on the paper, in the theme's text colours. */
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover){min-height:0;background:transparent!important;color:var(--theme-text)}
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover)::before,
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover)::after{content:none!important}
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover) .gallery-hero-content{position:relative!important;inset:auto!important;width:min(1280px,calc(100% - 32px))!important;max-width:none!important;margin:0 auto!important;padding:26px 0 0!important;transform:none!important}
/* Magazine's title sits on the page, so its lines take the theme's text colours, unless the gallery chose its own (--hero-own-colour, set by the title styles). */
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover) .gallery-hero-title{color:var(--hero-own-colour,var(--theme-text))!important;text-shadow:none!important}
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover) .gallery-hero-subtitle{color:var(--hero-own-colour,var(--theme-muted))!important;text-shadow:none!important}
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover) .gallery-hero-eyebrow,
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover) .gallery-hero-date{color:var(--theme-muted)!important;text-shadow:none!important}
/* The accent line, deepened towards the text colour so it reads on a light page. Kept weak so a chosen colour wins. */
:where(html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover)) .gallery-hero-title-accent{color:color-mix(in srgb,var(--theme-accent,#c49a5f) 50%,var(--theme-text,#25342f))}
/* Stickers are made for a cover photo, so they stay off the paper. */
/* Counts sit under the title: an icon and a number for photos, videos and guests. */
html body.gallery-layout-magazine .gallery-hero.gallery-album-hero:not(.has-cover) .gallery-hero-media-count{position:static!important;display:flex!important;flex-wrap:wrap;width:min(1280px,calc(100% - 32px));margin:8px auto 4px;padding:0;border:0;border-radius:0;color:var(--theme-muted);background:transparent;backdrop-filter:none;font-size:.8rem}


/* Compact view is a grid feature; Magazine keeps its own rhythm. */
.gallery-layout-magazine [data-view-toggle]{display:none!important}

/* A guest's caption as a quote: tapping it opens that photo. */
.gallery-text-card{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:12px;padding:18px 16px;border:1px solid rgba(255,255,255,.06);border-radius:14px;color:#f7f0e3;background:color-mix(in srgb,var(--theme-primary-dark,#22302b) 55%,#151413);font:inherit;text-align:left;overflow:hidden;cursor:pointer}
.gallery-text-card.is-wide{grid-column:span 2;padding:22px 24px}
.gallery-text-card-quote{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden;font-family:var(--theme-heading-font,Georgia,serif);font-size:clamp(1rem,4.3vw,1.32rem);font-style:italic;line-height:1.28;overflow-wrap:anywhere}
.gallery-text-card-by{color:var(--theme-accent,#d8b67c);font-size:.74rem;font-weight:700;letter-spacing:.03em}
.gallery-text-card:hover{background:color-mix(in srgb,var(--theme-primary-dark,#22302b) 65%,#151413)}
.gallery-text-card:focus-visible{outline:3px solid var(--theme-accent,#c6a56f);outline-offset:-3px}
@media(min-width:700px){.gallery-text-card-quote{font-size:clamp(1.05rem,1.7vw,1.45rem)}}
body:has(.selection-panel:not([hidden])) .gallery-text-card:not(.gallery-message-card),
body.selection-mode .gallery-text-card:not(.gallery-message-card){opacity:.4;cursor:default}

/* Floating tool bar: hidden over the cover, slides up once the visitor has scrolled past it. */
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar{position:fixed!important;top:auto!important;left:50%;bottom:max(14px,env(safe-area-inset-bottom));z-index:55;width:auto;max-width:calc(100% - 20px);margin:0!important;padding:5px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:999px!important;background:rgba(22,24,23,.84)!important;box-shadow:0 16px 38px rgba(0,0,0,.3)!important;box-sizing:border-box;opacity:0;pointer-events:none;transform:translate(-50%,calc(100% + 34px));transition:transform .3s cubic-bezier(.2,.8,.2,1),opacity .2s ease}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar.is-revealed,
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar:focus-within{opacity:1;pointer-events:auto;transform:translate(-50%,0)}
.gallery-layout-magazine.has-floating-toolbar:has(.selection-panel:not([hidden])) .gallery-unified-toolbar,
.gallery-layout-magazine.has-floating-toolbar.selection-mode .gallery-unified-toolbar{opacity:0!important;pointer-events:none!important;transform:translate(-50%,calc(100% + 34px))!important}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-actions{display:flex!important;gap:2px}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-actions>.gallery-toolbar-control{flex:0 0 auto;width:auto!important;min-height:44px!important;padding:8px 14px;border:0;border-radius:999px;color:#fff;background:transparent;font-size:.82rem!important}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-actions>#select-media{width:auto!important;padding-inline:14px!important}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-control:hover,
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-control:focus-visible,
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-sort:focus-within{background:rgba(255,255,255,.12);outline:none}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-actions>.gallery-toolbar-slideshow{color:var(--theme-primary-dark,#1d1b17);background:var(--theme-accent,#d8b67c)}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-slideshow .gallery-ui-icon{color:currentColor}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-slideshow:hover,
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-slideshow:focus-visible{background:color-mix(in srgb,var(--theme-accent,#d8b67c) 86%,#fff)}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-control.has-active-filters{color:var(--theme-accent,#d8b67c)}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-sort .sort-select{color:var(--theme-text);background:var(--theme-surface)}
.gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-sort .sort-select option{color:var(--theme-text);background:var(--theme-surface)}
.gallery-layout-magazine.has-floating-toolbar .back-to-top{bottom:calc(max(14px,env(safe-area-inset-bottom)) + 66px)}
@media(max-width:700px){
  .gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-actions>.gallery-toolbar-control{padding:8px 11px;gap:5px;font-size:.76rem!important}
  .gallery-layout-magazine.has-floating-toolbar .gallery-main{padding-bottom:84px}
}
@media(max-width:360px){
  .gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar .gallery-toolbar-actions>.gallery-toolbar-control{padding:8px 8px}
}

@media(prefers-reduced-motion:reduce){
  .gallery-layout-magazine.has-floating-toolbar .gallery-unified-toolbar{transition:none}
  [class*="gallery-layout-"] .gallery-grid .media-card img,
  [class*="gallery-layout-"] .gallery-grid .media-card video{transition:none}
  [class*="gallery-layout-"] .gallery-grid .media-card:hover img,
  [class*="gallery-layout-"] .gallery-grid .media-card:hover video{transform:none}
}

/* A guest's written message (no photo): the same theme card as a caption quote, in both layouts.
   Placed by assets/js/gallery-layout.js; a long message opens in full in .gallery-message-dialog. */
.gallery-message-card .gallery-message-mark{position:absolute;top:-.12em;right:.18em;color:color-mix(in srgb,var(--theme-accent,#d8b67c) 32%,transparent);font-family:var(--theme-heading-font,Georgia,serif);font-size:5.4rem;line-height:1;pointer-events:none}
.gallery-message-card .gallery-text-card-quote{position:relative;font-style:normal;white-space:pre-line;-webkit-line-clamp:7}
.gallery-message-card:hover{background:color-mix(in srgb,var(--theme-primary-dark,#22302b) 55%,#151413)}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]>.gallery-message-card{aspect-ratio:1/1;min-height:0;padding:14px 13px;gap:8px;border-radius:3px}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]>.gallery-message-card.is-wide{grid-column:auto}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]>.gallery-message-card .gallery-text-card-quote{font-size:clamp(.82rem,3.4vw,1.05rem);-webkit-line-clamp:6}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]:is([data-tile-size="medium"],.is-list-view)>.gallery-message-card{padding:9px}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]:is([data-tile-size="medium"],.is-list-view)>.gallery-message-card .gallery-text-card-quote{font-size:.74rem;-webkit-line-clamp:5}
.gallery-layout-grid .gallery-grid[data-gallery-layout="grid"]:is([data-tile-size="medium"],.is-list-view)>.gallery-message-card :is(.gallery-text-card-by,.gallery-message-mark){display:none}
/* A message in the full-size view (gallery.js, gallery-swipe-viewer.js): the same card, large. */
.lightbox-message{position:relative;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;gap:18px;width:min(560px,calc(100vw - 48px));min-height:min(420px,62vh);max-height:80vh;margin:0 auto;padding:clamp(34px,7vw,56px) clamp(26px,6vw,48px);border-radius:18px;color:#f7f0e3;background:color-mix(in srgb,var(--theme-primary-dark,#22302b) 55%,#151413);overflow:auto;text-align:left}
.lightbox-message-mark{position:absolute;top:.02em;right:.16em;color:color-mix(in srgb,var(--theme-accent,#d8b67c) 32%,transparent);font-family:var(--theme-heading-font,Georgia,serif);font-size:clamp(7rem,22vw,10rem);line-height:1;pointer-events:none}
.lightbox-message-text{position:relative;margin:0;font-family:var(--theme-heading-font,Georgia,serif);font-size:clamp(1.3rem,5.2vw,1.9rem);line-height:1.32;white-space:pre-line;overflow-wrap:anywhere}
.lightbox-message-by{position:relative;color:var(--theme-accent,#d8b67c);font-size:.95rem;font-weight:700;letter-spacing:.03em}
.lightbox-swipe-slide .lightbox-message{max-height:80vh}
.gallery-message-card{cursor:pointer}
.selection-mode .gallery-message-card.selected::after{content:'';position:absolute;inset:0;z-index:3;border:4px solid var(--theme-accent,#c49a5f);border-radius:inherit;pointer-events:none}
.gallery-message-dialog{width:min(520px,calc(100vw - 32px));padding:26px 24px 20px;border:0;border-radius:18px;color:#f7f0e3;background:color-mix(in srgb,var(--theme-primary-dark,#22302b) 55%,#151413);box-shadow:0 24px 70px rgba(0,0,0,.35)}
.gallery-message-dialog::backdrop{background:rgba(6,12,10,.55);backdrop-filter:blur(2px)}
.gallery-message-dialog-text{margin:0 0 14px;font-family:var(--theme-heading-font,Georgia,serif);font-size:1.25rem;line-height:1.4;white-space:pre-line;overflow-wrap:anywhere}
.gallery-message-dialog-by{margin:0 0 18px;color:var(--theme-accent,#d8b67c);font-size:.8rem;font-weight:700;letter-spacing:.03em}
.gallery-message-dialog .button{min-height:44px;border-radius:999px;padding-inline:22px}
.gallery-album-hero .gallery-hero-media-count [class^="gallery-count-"]>span{font-weight:700}
@media(min-width:701px){.gallery-album-hero.has-cover .gallery-hero-media-count{padding:8px 13px;font-size:.84rem}.gallery-album-hero .gallery-hero-media-count .gallery-ui-icon{width:17px;height:17px;flex-basis:17px}}
