.rpm-gallery-description{max-width:800px;color:var(--muted);white-space:pre-line;font-size:14px}.rpm-gallery-description:empty{display:none}.rpm-loop-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:50px;align-items:start}.rpm-loop-item{margin:0;min-width:0}.rpm-loop-media{position:relative;background:#101214;border-radius:6px;overflow:hidden}.rpm-loop-media video{display:block;width:100%;height:auto;object-fit:contain;aspect-ratio:var(--video-ratio,1)}.rpm-loop-item figcaption{font-size:12px;color:var(--muted);padding:8px 0}.rpm-loop-expand,.rpm-loop-play{position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:30px;height:30px;border:1px solid #777;border-radius:50%;background:#0b0d0faa;color:white;cursor:pointer}.rpm-loop-play{left:8px;right:auto}.rpm-loop-play[hidden]{display:none}.rpm-loop-dialog{position:fixed;max-width:none;max-height:none;width:min(1200px,calc(100vw - 64px));padding:0;border:0;background:transparent;overflow:visible;color:white}.rpm-loop-dialog::backdrop{background:#000e}.rpm-loop-dialog video{display:block;max-width:100%;max-height:80vh;width:auto;height:auto;margin:auto;background:black}.rpm-loop-close{position:absolute;right:0;top:-42px;border:1px solid #777;border-radius:50%;width:32px;height:32px;background:#111;color:white;font-size:24px;cursor:pointer}@media(max-width:900px){.rpm-loop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.rpm-loop-grid{grid-template-columns:1fr;gap:18px}.rpm-loop-dialog{width:calc(100vw - 28px)}}

.rpm-loop-media video{cursor:zoom-in}

/* Filled square cards; expanded player retains the video aspect ratio. */
.rpm-gallery-page .hero .lede{color:var(--accent)!important}
.rpm-gallery-description{animation:rpmGalleryCopyEnter .7s cubic-bezier(.22,.61,.36,1) .55s both}
@keyframes rpmGalleryCopyEnter{from{opacity:0;translate:0 20px}to{opacity:1;translate:0 0}}
.rpm-loop-media{aspect-ratio:1}
.rpm-loop-media video{width:100%;height:100%;aspect-ratio:1;object-fit:cover}
.rpm-loop-expand{inset:0;width:100%;height:100%;border:0;border-radius:0;background:transparent;font-size:0;cursor:zoom-in}
.rpm-loop-expand:focus-visible{outline:2px solid var(--accent);outline-offset:-4px}
.rpm-loop-play{z-index:2}
.rpm-loop-item{position:relative;transition:transform .35s cubic-bezier(.22,.61,.36,1),filter .35s;transform-origin:center}
@media(hover:hover) and (pointer:fine){
 .rpm-loop-grid:has(.rpm-loop-item:hover) .rpm-loop-item:not(:hover){filter:brightness(.62)}
 .rpm-loop-item:hover{transform:translateY(-4px) scale(1.05);z-index:2}
}
.rpm-loop-dialog{width:var(--rpm-player-width,min(1200px,calc(100vw - 112px)))}
.rpm-loop-dialog video{width:100%;height:auto;object-fit:contain;max-height:78vh}
.rpm-loop-close{top:-40px;right:0}
.rpm-loop-prev,.rpm-loop-next{position:absolute;top:50%;transform:translateY(-50%);width:32px;height:40px;padding:0;border:0;background:transparent;color:white;font-size:36px;line-height:1;cursor:pointer}
.rpm-loop-prev{left:-40px}.rpm-loop-next{right:-40px}
.rpm-loop-prev:hover,.rpm-loop-next:hover,.rpm-loop-close:hover{color:var(--accent)}
@media(max-width:560px){.rpm-loop-prev{left:-28px}.rpm-loop-next{right:-28px}.rpm-loop-prev,.rpm-loop-next{width:24px;font-size:30px}}
@media(prefers-reduced-motion:reduce){.rpm-gallery-description{animation:none}.rpm-loop-item{transition:none}.rpm-loop-item:hover{transform:none}}


.rpm-gallery-intro-row{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:40px;align-items:start;margin-top:18px}
.rpm-gallery-intro-row .rpm-gallery-description{margin:0;max-width:none}
.rpm-gallery-tags{font-size:14px;color:var(--muted);padding:0;scroll-margin-top:30px}
.rpm-gallery-tags p{margin:0 0 12px}
.rpm-gallery-tag-links{display:flex;flex-wrap:wrap;gap:7px}
.rpm-gallery-tag-links a{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:7px 11px;font-size:11px;text-decoration:none;color:var(--text)}
.rpm-gallery-tag-links a:hover,.rpm-gallery-tag-links a:focus-visible{border-color:var(--accent);color:var(--accent)}
@media(max-width:700px){.rpm-gallery-intro-row{grid-template-columns:1fr;gap:20px}}

/* Gallery-only typography and header alignment refinements. */
.rpm-gallery-intro-row{display:block;max-width:950px}
.rpm-gallery-intro-row .rpm-gallery-description{max-width:950px}
.rpm-gallery-tags{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin-top:18px}
.rpm-gallery-tags p{margin:0}
.rf-gallery .site-header .header-actions{align-items:flex-end!important}
.rf-gallery .site-header .main-nav,.rf-gallery .site-header .rpm-mobile-project-nav{align-items:flex-end!important;transform:none!important;top:0!important}
.rf-gallery .site-header .lang-switch{align-items:flex-end!important;align-self:flex-end!important}
.rf-gallery .site-header .lang-btn{display:flex!important;align-items:flex-end!important;height:18px!important;width:32px!important;padding:0!important}
.rf-gallery .site-header .lang-flag{width:28px!important;height:18px!important}
.rf-gallery .related-section{border-top:1px solid var(--line)!important}
@media(max-width:650px){.rf-gallery .site-header .lang-btn{width:24px!important;height:16px!important}.rf-gallery .site-header .lang-flag{width:24px!important;height:16px!important}}

/* 6.4.4: optical spacing from the approved gallery reference. */
.rf-gallery .site-header{min-height:94px!important;align-items:flex-end!important;padding-top:28px!important;padding-bottom:15px!important;border-bottom:1px solid #282d31!important;box-sizing:border-box}
.rf-gallery .site-header .brand{align-items:flex-end!important;gap:10px!important}
.rf-gallery .site-header .brand>span:first-child{top:0!important;line-height:0!important}
.rf-gallery .rpm-signature img{display:block;width:190px;height:auto;max-width:none}
.rf-gallery .site-header .brand .brand-descriptor{top:-2px!important}
.rf-gallery .site-header .header-actions{padding-bottom:0!important}
.rf-gallery .rpm-gallery-page .hero{padding-top:20px!important;padding-bottom:24px!important}
.rf-gallery .hero-title-row h1{margin-top:0}
.rf-gallery .hero>.lede{margin-top:15px!important}
.rf-gallery .rpm-gallery-intro-row{margin-top:20px;max-width:950px}
.rf-gallery .rpm-gallery-description{line-height:1.5;white-space:normal}
.rf-gallery .rpm-gallery-tags{margin-top:22px;align-items:center;gap:8px}
.rf-gallery .rpm-gallery-tag-links a{background:var(--accent);border-color:var(--accent);color:#0b0d0f;transition:background .2s,color .2s,border-color .2s}
.rf-gallery .rpm-gallery-tag-links a:hover,.rf-gallery .rpm-gallery-tag-links a:focus-visible{background:transparent;border-color:var(--line);color:var(--text)}
.rf-gallery .rpm-loop-grid{gap:14px;margin-bottom:76px}
.rf-gallery .related-section{margin-top:0;padding-top:58px;padding-bottom:52px}
.rf-gallery .related-section>h2{margin:0 0 16px}
.rf-gallery .related-card{display:flex;flex-direction:column;isolation:isolate}
.rf-gallery .related-card>img{position:static!important;display:block;width:100%!important;height:auto!important;aspect-ratio:16/9;object-fit:cover;transform:none!important;scale:1!important;translate:none!important;margin:0!important;flex:none}
.rf-gallery .related-copy{position:relative;z-index:1;background:var(--surface);flex:1;padding:12px}
@media(max-width:900px){.rf-gallery .rpm-signature img{width:170px}}
@media(max-width:650px){.rf-gallery .site-header{min-height:80px!important;padding-top:18px!important;padding-bottom:12px!important}.rf-gallery .rpm-signature img{width:140px}.rf-gallery .site-header .brand .brand-descriptor{top:0!important}.rf-gallery .rpm-loop-grid{margin-bottom:48px}.rf-gallery .related-section{padding-top:36px;padding-bottom:36px}.rpm-gallery-copy-break{display:none}}

/* 6.4.5: revised optical reference, signature with descriptor underneath. */
.rf-gallery .site-header .header-actions{transform:translateY(8px)!important}
.rf-gallery .site-header .brand{flex-direction:column!important;align-items:flex-end!important;gap:0!important}
.rf-gallery .rpm-signature img{width:250px}
.rf-gallery .site-header .brand .brand-descriptor{top:0!important;margin-top:-8px!important;align-self:flex-end!important}
.rf-gallery .site-header .brand .brand-descriptor i{display:none!important}
.rf-gallery .rpm-gallery-page .hero{padding-bottom:32px!important}
.rf-gallery .rpm-gallery-tag-links a{background:transparent;border-color:var(--accent);color:var(--accent)}
.rf-gallery .rpm-gallery-tag-links a:hover,.rf-gallery .rpm-gallery-tag-links a:focus-visible{background:var(--accent);border-color:var(--accent);color:#0b0d0f}
@media(max-width:900px){.rf-gallery .rpm-signature img{width:210px}}
@media(max-width:650px){.rf-gallery .rpm-signature img{width:160px}.rf-gallery .site-header .brand .brand-descriptor{margin-top:-4px!important}}

/* 6.5.5: selected-tag introduction follows the description, not the initial paint. */
.rf-gallery .rpm-gallery-tags{animation:rpmGalleryCopyEnter .7s cubic-bezier(.22,.61,.36,1) 1.25s both}
.rf-gallery .rpm-gallery-directory{display:grid!important;grid-template-columns:190px minmax(0,1fr);gap:28px;padding-top:36px;padding-bottom:58px;margin-top:48px;border-top:1px solid #282d31;scroll-margin-top:25px}
.rf-gallery .rpm-gallery-directory h2{margin:0;color:var(--accent);font-size:32px;font-weight:500}
.rf-gallery .rpm-gallery-directory .rf-project-directory-links{display:flex;align-content:flex-start;flex-wrap:wrap;gap:8px}
.rf-gallery .rpm-gallery-directory a{display:inline-block;color:var(--text);text-decoration:none;border:1px solid var(--line);border-radius:999px;padding:7px 11px;font-size:12px}
.rf-gallery .rpm-gallery-directory a:hover,.rf-gallery .rpm-gallery-directory a.is-project-tag{border-color:var(--accent);color:var(--accent)}
@media(max-width:650px){.rf-gallery .rpm-gallery-directory{grid-template-columns:1fr;gap:20px}}
@media(prefers-reduced-motion:reduce){.rf-gallery .rpm-gallery-tags{animation:none}}
