.loop-photo-viewer{position:fixed;inset:0;z-index:1040;display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,420px);background:#08090c;color:#fff;isolation:isolate}
.loop-photo-stage{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;background:#08090c}
.loop-photo-tools{height:64px;flex-shrink:0;display:flex;align-items:center;gap:10px;padding:8px 14px;z-index:2;background:#08090ce6}
.loop-photo-tools button,.loop-photo-stage>button{border:0;border-radius:50%;width:44px;height:44px;flex-shrink:0;display:grid;place-items:center;background:#282a30;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.loop-photo-stage button:disabled{opacity:.3;cursor:default}.loop-photo-stage button:focus-visible{outline:3px solid #b28aff;outline-offset:3px}
.loop-photo-counter{flex:1;font-size:13px;color:#dedee6}.loop-photo-canvas{flex:1;min-height:0;overflow:auto;display:grid;place-items:center;touch-action:pan-y pinch-zoom}
.loop-photo-canvas img{display:block;max-width:100%;max-height:calc(100dvh - 64px);object-fit:contain;transform-origin:center;transition:transform .16s ease}
.loop-photo-stage>.loop-photo-previous,.loop-photo-stage>.loop-photo-next{position:absolute;top:50%;z-index:2}.loop-photo-previous{left:14px}.loop-photo-next{right:14px}
.loop-photo-conversation{overflow-y:auto;overscroll-behavior:contain;background:var(--loop-surface);color:var(--loop-text);padding:18px 16px;padding-bottom:max(24px,env(safe-area-inset-bottom));border-left:1px solid var(--loop-border);min-width:0}
.loop-photo-conversation .wall-entry{margin:0!important;border:0!important;border-radius:0!important;overflow:visible!important}.loop-photo-conversation .panel{margin:0!important;border:0!important;background:transparent!important;border-radius:0!important}
.loop-photo-conversation .panel-body{padding:0!important}.loop-photo-conversation .loop-post-media-grid,.loop-photo-conversation .loop-photo-soundtrack,.loop-photo-conversation .loop-repost-card{display:none!important}
.loop-photo-conversation .wall-entry-links{flex-wrap:wrap!important;gap:12px!important;padding-block:14px!important}.loop-photo-conversation .stream-entry-addons>.comment-container{display:block!important;padding:0!important}
.loop-photo-conversation .comment_create{position:sticky;bottom:0;background:var(--loop-surface);padding-bottom:12px;z-index:3}.loop-photo-conversation .loop-comment-body{overflow-wrap:anywhere}
.loop-photo-conversation .wall-entry{min-height:calc(100dvh - 42px);display:flex;flex-direction:column}.loop-photo-conversation .wall-entry>.panel,.loop-photo-conversation .wall-entry>.panel>.panel-body{flex:1;display:flex;flex-direction:column}
.loop-photo-conversation .wall-entry-body{flex:1;display:flex;flex-direction:column}.loop-photo-conversation .stream-entry-addons{flex:1;display:flex;flex-direction:column}.loop-photo-conversation .stream-entry-addons>.comment-container{flex:1;display:flex!important;flex-direction:column}.loop-photo-conversation .stream-entry-addons>.comment-container>.comment{flex:1}
.loop-photo-conversation .wall-entry-footer{flex:1;display:flex;flex-direction:column}
.loop-photo-conversation .stream-entry-addons>.comment-container>.comment:not(:has(.loop-comment-row))::after{content:'No comments yet. Be the first to comment.';display:block;padding:24px 4px;color:var(--loop-muted);font-size:14px}
@media(max-width:700px){.loop-photo-viewer{grid-template-columns:1fr;grid-template-rows:42dvh minmax(0,1fr);bottom:calc(76px + env(safe-area-inset-bottom))}.loop-photo-tools{height:52px}.loop-photo-canvas img{max-height:calc(42dvh - 52px)}.loop-photo-conversation{border-left:0;border-top:1px solid var(--loop-border);padding:14px 16px}.loop-photo-stage>.loop-photo-previous,.loop-photo-stage>.loop-photo-next{width:40px;height:40px}.loop-photo-counter{font-size:12px}}
@media(max-width:700px){.loop-photo-conversation .wall-entry{min-height:calc(58dvh - 118px - env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.loop-photo-canvas img{transition:none}}

/* Center vector controls independently of font metrics and browser button padding. */
.loop-photo-tools button,.loop-photo-stage>button{padding:0}
.loop-photo-tools button>svg,.loop-photo-stage>button>svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.loop-photo-stage>.loop-photo-previous,.loop-photo-stage>.loop-photo-next{top:calc(50% + 32px);transform:translateY(-50%)}
@media(max-width:700px){.loop-photo-stage>.loop-photo-previous,.loop-photo-stage>.loop-photo-next{top:calc(50% + 26px)}}
/* Desktop controls overlay the image instead of reserving a strip above it. */
@media(min-width:701px){
 .loop-photo-tools{position:absolute;inset:0 0 auto;background:transparent}
 .loop-photo-counter{text-shadow:0 1px 4px #000}
 .loop-photo-canvas img{max-height:100dvh}
 .loop-photo-stage>.loop-photo-previous,.loop-photo-stage>.loop-photo-next{top:50%}
}
