/* Shared post behavior; each gallery supplies its own palette and chrome. */
.mg-main{max-width:1200px;margin:24px auto 0;padding:0 clamp(12px,2vw,24px)}
.mg-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,300px);gap:24px;align-items:start}
.mg-primary,.mg-rail,.mg-related{min-width:0}
.mg-rail:not(:has(.ad-slot:not([hidden]),.mg-share:not([hidden]),.mg-neighbors)){display:none}
.mg-viewer h1{font-size:clamp(23px,3vw,36px);margin:0 0 16px;line-height:1.12}
.mg-frame{margin:0;width:100%;min-width:0}
body[data-site-theme] .mg-frame img{display:block;width:100%;height:auto;max-width:100%;object-fit:contain;margin:auto}
.mg-tags,.mg-neighbors,.mg-topics{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.mg-tags,.mg-neighbors{margin:14px 0}.mg-neighbors{justify-content:space-between}.mg-neighbors [rel=next]{margin-left:auto}
.mg-neighbors a,.mg-tags a,.mg-topics a{padding:4px 8px;text-decoration:underline}
.mg-topics h2{width:100%;margin:0 0 6px;font-size:1rem}
.mg-related{margin-top:32px}.mg-related>h2{font-size:clamp(20px,2.8vw,28px);margin:0 0 14px}
.mg-viewer .ad-slot:not([hidden]){max-width:100%;margin:14px auto}
/* Search controls are shared by the three photo feeds with an inline search. */
.mg-search-form{display:flex;flex:1;min-width:0}
.mg-search-form[hidden],.mg-share[hidden]{display:none}
.mg-search-form input,.mg-search-form button{min-width:0;border:0;border-radius:0;background:var(--mg-search-bg,#eee);color:inherit;font:700 14px/1 Arial,sans-serif}
.mg-search-form input{height:34px;flex:1;width:100%;padding:0 10px}
.mg-search-form button{display:grid;place-items:center;width:40px;cursor:pointer;color:var(--mg-search-color,#777)}
.mg-footer.site-footer{padding:30px 10px;border:0;color:inherit;background:transparent;text-align:center}
.mg-footer nav{display:flex;justify-content:center;flex-wrap:wrap;gap:5px 14px}
.mg-credit{margin:12px 0 0}.mg-footer-description{margin:0;padding:24px 0;font-size:15px;line-height:20px}
.mg-footer nav a:is(:hover,:focus-visible){text-decoration:underline}
.mg-full-image{display:block;line-height:0;cursor:zoom-in}
.mg-post-controls{display:grid;grid-template-columns:1fr 1fr 2fr;gap:9px;margin:0;padding:12px 0}
.mg-post-controls>div{min-width:0}
body[data-site-theme] .mg-post-controls a{display:flex;align-items:center;justify-content:center;gap:5px;height:52px;padding:0;color:white;background:var(--mg-nav-bg,#222);border-radius:var(--mg-radius,5px);font:800 22px/1 Helvetica,Arial,sans-serif;text-transform:uppercase;text-decoration:none}
body[data-site-theme] .mg-post-controls a[rel=next]{background:var(--mosaic-red,var(--theme-accent))}
.mg-post-controls a:is(:hover,:focus-visible){filter:brightness(.85)}
.mg-post-controls svg{width:24px;height:24px}.mg-post-controls [rel=prev] svg{transform:scaleX(-1)}
.mg-share{display:flex;flex-wrap:wrap}.mg-share input{flex:1;min-width:0;background:#eee;border:none;padding:0 8px}.mg-share button{border:0;color:white;background:#1470a7;padding:9px 15px;font-weight:700}.mg-share span:not(:empty){width:100%}
body[data-site-theme="media-catalog"] .mg-main{max-width:1170px;margin:20px auto;padding:0 15px}
body[data-site-theme="media-catalog"] .mg-primary{background:white;padding:10px}
body[data-site-theme="media-catalog"] .mg-viewer h1{font:600 22px/1.2 "Open Sans",Arial,sans-serif;margin:0 0 12px}
body[data-site-theme="media-catalog"] .mg-topics{display:none}
body[data-site-theme="media-catalog"] .mg-tags a{color:#a92b2c}
body[data-site-theme="media-catalog"] .mg-neighbors{display:grid;gap:12px;margin:0}
body[data-site-theme="media-catalog"] .mg-neighbors a{display:flex;align-items:center;gap:10px;background:white;padding:8px;width:100%;font-weight:600}
body[data-site-theme="media-catalog"] .mg-neighbors img{width:30%;height:auto}
body[data-site-theme="media-catalog"] .mg-neighbors small{display:block;color:#555}
body[data-site-theme] :is(.mg-viewer,.ma-rail) .ad-slot:not([hidden])::before{content:"Advertisement";display:block;font:11px/18px Arial,sans-serif;text-align:center;opacity:.8}
@media(min-width:1200px){body[data-site-theme="media-catalog"] .mg-stage:has(.mg-topics){grid-template-columns:160px minmax(0,1fr) 300px;gap:20px}body[data-site-theme="media-catalog"] .mg-topics{display:block;padding:12px;background:white}body[data-site-theme="media-catalog"] .mg-topics a{display:block}}
body[data-site-theme="media-mosaic"] .mg-main{max-width:1900px;padding:0 12px}
body[data-site-theme="media-mosaic"] .mg-viewer{max-width:900px;margin:auto}
body[data-site-theme="media-mosaic"] .mg-frame img{border-radius:5px}
body[data-site-theme="media-mosaic"] .mg-viewer h1{font:700 26px/30px Helvetica,Arial,sans-serif;margin:12px 0}
body[data-site-theme="media-mosaic"] .mg-stage{grid-template-columns:minmax(0,1fr) 300px;gap:36px}
body[data-site-theme="media-mosaic"] .mg-rail:has(.mg-share:not([hidden])){display:block}
body[data-site-theme="media-mosaic"] .mg-frame{position:relative}
body[data-site-theme="media-mosaic"] .mg-full-image::after{content:"⛶";position:absolute;right:0;top:0;display:grid;width:44px;height:44px;place-items:center;background:#0006;color:white;border-radius:0 5px 0 5px;font:24px/1 Arial}
body[data-site-theme="media-albums"] .mg-main{max-width:1000px;padding:0 15px}
body[data-site-theme="media-albums"] .mg-stage{grid-template-columns:minmax(0,1fr) 310px;gap:30px}
body[data-site-theme="media-albums"] .mg-primary{background:#ffffff14;padding:20px;border-radius:5px}
body[data-site-theme="media-albums"] .mg-viewer h1{text-align:center;font:700 24px/28px Helvetica,Arial,sans-serif;padding:15px;margin:0 0 15px}
body[data-site-theme="media-albums"] .mg-tags a{background:#efc263;color:#191919;border-radius:5px;text-decoration:none}
body[data-site-theme="media-albums"] .mg-post-controls{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:0}
body[data-site-theme="media-albums"] .mg-post-controls a,body[data-site-theme="media-albums"] .mg-post-controls a[rel=next]{font-size:clamp(13px,3.5vw,20px);background:linear-gradient(151deg,hsl(283 100% 65%),hsl(283 98% 50%));white-space:nowrap}
.mm-post-main{max-width:1000px;margin:0 auto;background:#fff;padding:0 0 24px}
.mm-post h1{font:700 28px/30px var(--mm-type);margin:0;padding:12px 6px}
.mm-post-stage{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"image" "browse" "mobile-ad" "share"}
.mm-post-image{grid-area:image;min-width:0}
.mm-post-browse{grid-area:browse;min-width:0}
.mm-post-rail{display:contents}
.mm-post-rail>.ad-slot{grid-area:mobile-ad}
.mm-share{grid-area:share;display:flex;flex-wrap:wrap;align-items:stretch;max-width:300px;margin:12px auto;color:#333}
.mm-share[hidden]{display:none}
.mm-share input{display:block;flex:1;min-width:0;border:0;border-radius:0 2px 2px 0;background:#ddd;color:#444;padding:0 12px}
body[data-site-theme="media-magazine"] .mm-share :is(button,input){font:700 14px/1 var(--mm-type)}
.mm-share button{border:0;border-radius:2px 0 0 2px;background:#0077b4;color:white;padding:0 16px;height:52px}
.mm-share button:hover{background:#006699}.mm-share svg{width:16px;height:16px;vertical-align:middle}
.mm-share [role=status]:not(:empty){flex-basis:100%;font-size:12px}
.mm-post-photo{position:relative;line-height:0}
.mm-post-photo :is(.mm-full,.mm-pin){position:absolute;right:0;width:44px;height:44px;display:grid;place-items:center;background:#0006;color:white}
.mm-post-photo :is(.mm-full,.mm-pin):is(:hover,:focus-visible){background:#000a}
.mm-full{bottom:0}.mm-full svg{width:24px;height:24px}
.mm-pin{top:0}.mm-pin svg{width:24px;height:24px}
.mm-sponsored-grid{width:100%;min-width:0}
.mm-post-controls{display:grid;grid-template-columns:1fr 1fr 2fr;padding:12px 0}
.mm-post-controls>div{min-width:0;padding:0 2px}
body[data-site-theme="media-magazine"] .mm-post-controls a{display:flex;align-items:center;justify-content:center;gap:5px;height:58px;border-radius:2px;color:white;background:#333}
body[data-site-theme="media-magazine"] .mm-post-controls a:is(:hover,:focus-visible){background:#222}
body[data-site-theme="media-magazine"] .mm-post-controls .mm-next a{background:#e00;font:800 24px/58px Tahoma,Arial,sans-serif;letter-spacing:1px;text-transform:uppercase}
body[data-site-theme="media-magazine"] .mm-post-controls .mm-next a:is(:hover,:focus-visible){background:#e00000}
.mm-post-controls svg{width:22px;height:22px}.mm-prev svg{transform:scaleX(-1)}.mm-random svg{width:24px;height:24px}
.mm-story-section{font:17px/1.65 Tahoma,Arial,sans-serif}.mm-story-section p{margin:14px 0}
.mm-post-more{margin-top:0;padding-top:24px}
.mm-post-more>h2{text-align:center;text-transform:uppercase;font:italic 700 26px/28px var(--mm-type);margin:0 0 12px}
body[data-site-theme="media-magazine"] :is(.mm-post-main,.mt-main) .ad-slot:not([hidden]){display:block;max-width:100%;margin:12px auto;text-align:center;overflow-x:auto}
body[data-site-theme="media-magazine"] :is(.mm-post-main,.mt-main) .ad-slot:not([hidden])::before{content:"Advertisement";display:block;font:11px/18px Arial,sans-serif;color:#595959;text-align:center}
body[data-site-theme="media-magazine"] .mm-post>.ad-slot-top{max-width:728px}
body[data-site-theme="media-magazine"] .mm-post-rail>.ad-slot{width:min(100%,300px)}
body[data-site-theme="media-magazine"] .mm-post>.ad-slot-bottom:not([hidden]){margin:24px auto}
@media(min-width:768px){
 .mm-post-main{padding-inline:12px}.mm-post h1{font-size:24px;line-height:28px;padding:12px 0}
 .mm-post-stage{grid-template-columns:minmax(0,1fr) 324px;grid-template-areas:"image rail" "browse rail";align-content:start}
 .mm-post-rail{display:block;grid-area:rail;min-width:0;padding-left:24px}
 .mm-post-stage:not(:has(.mm-share:not([hidden]),.mm-post-rail .ad-slot:not([hidden]))){grid-template-columns:minmax(0,1fr) 0}
 .mm-post-rail>.ad-slot:not([hidden]){margin-top:0}.mm-share{width:100%;margin:0}
 .mm-post-controls{padding:24px 0}.mm-post-more>h2{font-size:30px;line-height:32px}
}
@media(min-width:880px){.mm-post h1{font-size:28px;line-height:32px;padding:18px 0}}
body[data-site-theme="media-captions"] .mg-main{max-width:1600px;padding:0 10px}
body[data-site-theme="media-captions"] .mg-viewer{max-width:920px;margin:auto;background:black;border-radius:2px;padding:20px;--mg-nav-bg:#444;--mg-radius:2px}
body[data-site-theme="media-captions"] .mg-viewer .mg-stage{grid-template-columns:minmax(0,1fr) 300px;gap:30px}
body[data-site-theme="media-captions"] .mg-frame img{max-height:85vh}
body[data-site-theme="media-captions"] .mg-viewer h1{font-size:26px;line-height:28px;margin:20px 0}
@media(max-width:759px){
 .mg-main{margin:12px auto 0;padding:0 10px}
 .mg-stage,body[data-site-theme] .mg-viewer .mg-stage{display:flex;flex-direction:column;gap:12px}
 .mg-primary,.mg-rail{width:100%}.mg-topics{display:none}.mg-rail:not(:has(.ad-slot:not([hidden]),.mg-share:not([hidden]),.mg-neighbors)){display:none}
 body[data-site-theme="media-captions"] .mg-main,body[data-site-theme="media-albums"] .mg-main{padding:0}
 body[data-site-theme="media-captions"] .mg-viewer{padding:10px}
 body[data-site-theme="media-albums"] .mg-primary{padding:15px}
 body[data-site-theme="media-catalog"] .mg-main,body[data-site-theme="media-catalog"] .mg-primary{padding:0}
 body[data-site-theme="media-catalog"] :is(.mg-viewer h1,.mg-tags,.mg-neighbors){padding-inline:5px}
 .mg-related{margin-top:20px}
}
