.image-viewer{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:var(--paper,#fff);color:var(--text,#151525);overflow:hidden;color-scheme:normal}
.image-viewer::backdrop{background:var(--bg,#fff)}.image-viewer-open{overflow:hidden}
.image-viewer .iv-shell{width:100%;max-width:760px;height:100%;margin:auto;display:flex;flex-direction:column;position:relative;background:var(--paper,#fff)}
.image-viewer button{color:var(--text,#151525);background:transparent;border:0;cursor:pointer;min-height:44px;font:inherit;border-radius:10px}
.image-viewer button:focus-visible{outline:2px solid var(--coral,#3155df);outline-offset:-2px}.image-viewer button:disabled{opacity:.35;cursor:default}.image-viewer svg{width:28px;height:28px;flex:none}
.iv-header{flex:none;display:flex;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top)) 16px 12px;border-bottom:1px solid var(--line,#e9e9ef)}
.iv-header>button:first-child{width:32px;flex:none}.iv-author{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.iv-author .avatar{width:44px;height:44px;border:2px solid var(--line,#e9e9ef);flex:none}.iv-author>div{min-width:0}.iv-author strong,.iv-author small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.iv-author strong{font-size:17px}.iv-author small{font-size:13px;color:var(--muted,#656575);margin-top:2px}
.image-viewer .iv-follow{border:1px solid var(--line,#e9e9ef);border-radius:10px;padding:0 16px;min-height:38px;font-weight:700;flex:none}
.iv-pages{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y mandatory;scrollbar-width:none;touch-action:pan-y pinch-zoom}.iv-pages::-webkit-scrollbar{display:none}
.iv-page{height:100%;width:100%;position:relative;scroll-snap-align:start;scroll-snap-stop:always;display:flex;justify-content:center;align-items:center;overflow:hidden}.iv-page>img{display:block;width:100%;height:100%;object-fit:cover}.image-viewer .iv-retry{position:absolute;padding:12px;background:var(--paper,#fff);border:1px solid #777}.iv-chat{max-height:100%;width:100%;overflow:auto;padding:16px;color:var(--text,#151525)}.iv-chat .chat-preview{margin:0}
.iv-position{height:36px;flex:none;display:flex;align-items:center;justify-content:center;gap:18px;color:var(--muted,#656575);font-size:12px}.image-viewer .iv-position button{min-height:32px;width:44px}.iv-position svg{width:18px;height:18px}
.iv-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:8px 10px calc(14px + env(safe-area-inset-bottom));gap:4px;flex:none;border-top:1px solid var(--line,#e9e9ef)}.iv-actions button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:5px 0}.iv-actions span{font-size:12px;white-space:nowrap}.iv-actions [aria-pressed=true]{color:var(--coral,#3155df)}.iv-actions [data-iv=like][aria-pressed=true] svg{fill:var(--coral,#3155df)}
.iv-status:empty{display:none}.iv-status{position:absolute;bottom:125px;left:16px;right:16px;background:var(--paper,#fff);box-shadow:0 5px 22px #0009;border:1px solid #555;border-radius:12px;padding:10px 14px;font-size:14px;z-index:2}.image-viewer .iv-status button{color:var(--coral,#3155df);margin-left:12px;text-decoration:underline}
.iv-count{font-size:12px;line-height:1}.iv-actions [data-iv=comments],.iv-actions [data-iv=share]{justify-content:flex-start}.iv-actions [data-iv=comments] span,.iv-actions [data-iv=share] span{margin-top:17px}.post-action[data-public-dislike] svg{width:20px;height:20px}.post-action[data-public-dislike].on{color:var(--coral,#db4c1e)}
.iv-hint{position:absolute;inset:35% 15% auto;display:flex;flex-direction:column;align-items:center;gap:5px;background:var(--paper,#fff);border:1px solid #ffffff30;border-radius:20px;padding:24px 16px;text-align:center;pointer-events:none;box-shadow:0 12px 50px #0008}.iv-hint svg{width:50px;height:56px;animation:iv-swipe 1.65s ease-in-out 4}.iv-hint strong{font-size:17px}.iv-hint span{font-size:13px;color:var(--muted,#656575)}.image-viewer .iv-hint button{pointer-events:auto;min-height:40px;text-decoration:underline;color:var(--coral,#3155df)}.iv-still svg{animation:none}
@keyframes iv-swipe{0%,100%{transform:translateY(7px);opacity:.4}35%{opacity:1}75%{transform:translateY(-15px);opacity:1}}
@media(prefers-reduced-motion:reduce){.iv-hint svg{animation:none}.iv-pages{scroll-behavior:auto}}
@media(max-width:370px){.iv-header{padding-left:8px;padding-right:8px;gap:6px}.iv-author strong{font-size:15px}.image-viewer .iv-follow{padding:0 10px}.iv-actions span{font-size:11px}}

/* Respect the selected theme in every conversation type. */
.iv-chat{color:var(--text,#151525);overscroll-behavior-y:auto}.iv-chat .chat{background:var(--paper,#fff);color:var(--text,#151525);border-radius:0;width:100%;max-height:none}.iv-chat .chat-header,.iv-chat .sender,.iv-chat .chat-footer{color:var(--muted,#656575)}.iv-chat .bubble{background:var(--bg,#f5f5fa);color:var(--text,#151525)}.iv-chat .right .bubble{background:var(--coral);color:#fff}.iv-hint{inset:0;justify-content:center;border:0;border-radius:0;background:var(--paper,#fff);box-shadow:none;gap:18px;padding:40px}.iv-hint svg{width:100px;height:110px;animation:iv-swipe 1.8s ease-in-out 4}.iv-hint strong{font-size:25px;line-height:1.25;max-width:320px}.iv-hint.iv-still svg{animation:none}.iv-position span{max-width:65%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.image-viewer [hidden]{display:none!important}.open-reader{margin:8px 0 14px}[data-read-post] .chat{cursor:pointer}.startup-note{color:var(--muted);font-size:.85rem}.startup-note+ .feed .post-head{gap:10px}

/* Keep legible media controls in every selected theme. */
.image-viewer .video-controls button{color:#fff;background:#17172780}
