/* Gallery and Videos without Elementor. Palette matches the homepage. */
body.tc-media-page .tcm{--tcm-wine:#4E202C;--tcm-muted:#706057;--tcm-line:#D8CBBD;--tcm-paper:#FAF5EB;max-width:1180px;margin:0 auto;padding:8px 0 48px;}
body.tc-media-page .tcm-intro{margin:0 0 26px;color:var(--tcm-muted);font-size:17px;line-height:1.6;}
body.tc-media-page .tcm-grid,body.tc-media-page .tcm-vgrid{list-style:none;margin:0;padding:0;display:grid;}
body.tc-media-page .tcm-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
body.tc-media-page .tcm-item{margin:0;padding:0;}
body.tc-media-page .tcm-link{display:block;overflow:hidden;border-radius:14px;background:#EFE6DA;aspect-ratio:1/1;}
body.tc-media-page .tcm-link img.tcm-photo{display:block;width:100%;height:100%;max-width:none;object-fit:cover;border-radius:14px;transition:transform .35s ease;}
body.tc-media-page .tcm-link:hover img.tcm-photo{transform:scale(1.04);}
body.tc-media-page .tcm-link:focus-visible{outline:3px solid var(--tcm-wine);outline-offset:3px;}
body.tc-media-page .tcm-vgrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;}
body.tc-media-page .tcm-video{margin:0;padding:0;}
body.tc-media-page video.tcm-clip{display:block;width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:16px;background:#2b1a1e;}
body.tc-media-page .tcm-viewer{border:0;padding:0;background:transparent;max-width:min(92vw,1100px);max-height:92vh;overflow:visible;}
body.tc-media-page .tcm-viewer::backdrop{background:rgba(30,16,20,.86);}
body.tc-media-page .tcm-viewer-img{display:block;max-width:min(92vw,1100px);max-height:86vh;width:auto;height:auto;border-radius:14px;margin:0 auto;}
body.tc-media-page .tcm-viewer button{position:fixed;width:48px;height:48px;border:0;border-radius:50%;background:rgba(250,245,235,.92);color:var(--tcm-wine);font:400 30px/1 Georgia,serif;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;}
body.tc-media-page .tcm-close{top:18px;right:18px;}
body.tc-media-page .tcm-prev{left:18px;top:50%;transform:translateY(-50%);}
body.tc-media-page .tcm-next{right:18px;top:50%;transform:translateY(-50%);}
@media(max-width:1100px){body.tc-media-page .tcm-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:760px){
body.tc-media-page .tcm{padding:0 0 32px;}
body.tc-media-page .tcm-intro{font-size:15.5px;margin-bottom:18px;}
body.tc-media-page .tcm-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
body.tc-media-page .tcm-link,body.tc-media-page .tcm-link img.tcm-photo{border-radius:12px;}
body.tc-media-page .tcm-vgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
body.tc-media-page video.tcm-clip{border-radius:12px;}
body.tc-media-page .tcm-viewer button{width:42px;height:42px;font-size:26px;}
body.tc-media-page .tcm-prev{left:8px;}body.tc-media-page .tcm-next{right:8px;}
}
@media(max-width:340px){body.tc-media-page .tcm-vgrid{grid-template-columns:1fr;}}
@media(prefers-reduced-motion:reduce){body.tc-media-page .tcm-link img.tcm-photo{transition:none;}}

/* r-center: theme resets dialog margin, so the viewer stuck top-left; make it a full-screen centering layer */
body.tc-media-page dialog.tcm-viewer{position:fixed;inset:0;margin:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;padding:0;box-sizing:border-box;background:transparent;}
body.tc-media-page dialog.tcm-viewer[open]{display:flex;align-items:center;justify-content:center;}
body.tc-media-page .tcm-viewer .tcm-viewer-img{max-width:min(92vw,1100px);max-height:86vh;max-height:86dvh;margin:auto;object-fit:contain;}
