/* A picture shown large (viewer.js, since 2026-10-17): the whole window, dark on both pages, over the picture's own
   colours blurred; the post it is in beside it (the page's colours) on a computer, over its lower edge on a phone.
   Clipped, not hidden: the blur and an enlarged picture reach past its edges, and nothing may scroll them in. */
.image-dialog{inset:0;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#05070b;color:#fff;box-shadow:none;overflow:hidden;overflow:clip;opacity:0;transition:opacity .22s ease,display .22s allow-discrete,overlay .22s allow-discrete}
.image-dialog[open]{display:flex;opacity:1}
.image-dialog::backdrop{background:#000;backdrop-filter:none;opacity:0;transition:opacity .22s ease,display .22s allow-discrete,overlay .22s allow-discrete}
.image-dialog[open]::backdrop{opacity:1}
@starting-style{.image-dialog[open],.image-dialog[open]::backdrop{opacity:0}}
.image-glow{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scale(1.25);filter:blur(42px) saturate(1.5) brightness(.5);opacity:calc(.9 - var(--pull,0) * .9);pointer-events:none}
.image-glow:not([src]){display:none}
.image-stage{position:relative;flex:1;min-width:0;overflow:hidden;overflow:clip;color-scheme:dark;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.image-frame{position:absolute;inset:68px 76px 24px;display:grid;place-items:center;pointer-events:none;transition:translate .22s cubic-bezier(.2,.8,.2,1)}
.image-dialog.many .image-frame{bottom:92px}
.image-frame>[hidden]{display:none}
.image-frame>:is(img,.image-card){display:block;max-width:100%;max-height:100%;object-fit:contain;transform-origin:center;pointer-events:auto;cursor:zoom-in;-webkit-user-drag:none}
.image-dialog.zoomed .image-frame>:is(img,.image-card){cursor:grab}
.image-dialog.zoomed.dragging .image-frame>:is(img,.image-card){cursor:grabbing}
/* A self-introduction card shown as a picture is (intro-card.js zoom, 2026-11-04): as large as the frame lets it be. */
.image-card{-webkit-user-select:none;user-select:none}
.image-dialog.easing .image-frame>:is(img,.image-card){transition:transform .22s cubic-bezier(.2,.8,.2,1)}
.image-dialog.dragging .image-frame{transition:none}
.image-dialog.failed :is(.image-frame>img,#zoom-image){visibility:hidden}
.image-dialog.loading .image-frame::after{content:"";position:absolute;inset:0;width:34px;height:34px;margin:auto;border:3px solid #ffffff40;border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}
/* Opened, it grows into place; another of them comes in from the side it was asked from. */
.image-dialog[open] .image-frame{animation:image-open .26s cubic-bezier(.2,.8,.2,1)}
.image-dialog[open] .image-frame.from-next{animation:image-from-next .24s cubic-bezier(.2,.8,.2,1)}
.image-dialog[open] .image-frame.from-previous{animation:image-from-previous .24s cubic-bezier(.2,.8,.2,1)}
@keyframes image-open{from{opacity:0;transform:scale(.94)}}
@keyframes image-from-next{from{opacity:.35;transform:translateX(48px)}}
@keyframes image-from-previous{from{opacity:.35;transform:translateX(-48px)}}

.image-bar{position:absolute;top:0;left:0;right:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;padding-top:max(14px,env(safe-area-inset-top));pointer-events:none}
.image-bar>*{pointer-events:auto}
.image-tools{display:flex;gap:8px}
.image-tool,.image-step{display:grid;place-items:center;border-radius:50%;background:#0f141c99;color:#fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:background .15s,opacity .2s,visibility .2s}
.image-tool{width:40px;height:40px}
.image-tool:hover,.image-step:hover{background:#0f141cd9}
.image-tool .icon{width:20px;height:20px}
.image-tool[aria-pressed=true]{background:#367bf5}
.image-count{position:absolute;left:50%;top:max(21px,calc(env(safe-area-inset-top) + 7px));translate:-50% 0;padding:4px 12px;border-radius:999px;background:#0f141c99;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:.04em;pointer-events:none}
.image-step{position:absolute;top:50%;z-index:2;translate:0 -50%;width:44px;height:44px;box-shadow:0 0 0 1px #ffffff1f}
.image-step:disabled{visibility:hidden}
.image-step-previous{left:16px}
.image-step-next{right:16px}
.image-step-previous .icon{transform:scaleX(-1)}
.image-dialog :is(.image-tool,.image-step,.image-thumb):focus-visible{outline:3px solid #82b6fa;outline-offset:2px}
.image-thumbs{position:absolute;left:50%;bottom:16px;z-index:2;translate:-50% 0;display:flex;gap:6px;max-width:calc(100% - 32px);padding:6px;border-radius:14px;background:#0f141c99;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);overflow-x:auto;transition:opacity .2s,visibility .2s}
.image-thumb{flex:none;width:52px;height:52px;padding:0;border-radius:9px;overflow:hidden;opacity:.5;transition:opacity .15s}
.image-thumb:hover{opacity:.85}
.image-thumb[aria-current]{opacity:1;box-shadow:0 0 0 2px #fff}
.image-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.image-message{position:absolute;left:50%;top:50%;z-index:3;translate:-50% -50%;width:max-content;max-width:calc(100% - 48px);margin:0;padding:11px 16px;border-radius:12px;background:#0f141ce0;font-size:13px;line-height:1.6;text-align:center}
.image-notice{top:auto;bottom:24px;translate:-50% 0}
.image-dialog.many .image-notice{bottom:92px}
.image-notice.error{color:#ffb4aa}
/* A tap on a phone leaves the picture alone; a swipe down fades all but the picture. */
.image-dialog.bare :is(.image-bar,.image-step,.image-thumbs){opacity:0;visibility:hidden}
.image-bar,.image-thumbs{transition:opacity .2s,visibility .2s;opacity:calc(1 - var(--pull,0) * 4)}

/* The post: as the timeline draws it, with a button to its conversation. */
.image-post{position:relative;z-index:1;flex:none;width:min(400px,36vw);overflow-y:auto;overscroll-behavior:contain;background:var(--surface);border-left:1px solid var(--line);color:var(--ink);transition:opacity .2s,visibility .2s}
.image-dialog.post-hidden .image-post{display:none}
/* Its picture and name in a row above its words, which take the panel's width with the buttons under them (as X's). */
.image-post .post,.image-post .post:hover{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:12px;padding:22px 20px 8px;border-bottom:0;background:none}
.image-post .post-content{display:contents}
.image-post .post-content>*{grid-column:1/-1}
.image-post .post-content>.post-heading{grid-column:2}
.image-post .post-body{margin-top:12px}
.image-post .post-actions{margin-top:4px}
.image-post .post-actions>button{padding-right:4px}
.image-post :is(.post-images,.post-video,.show-replies){display:none}
.image-post-thread{display:block;margin:0 20px 22px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;color:var(--blue-dark);font-size:13px;font-weight:600}
.image-post-thread:hover{background:var(--blue-soft)}

@media(max-width:800px){
  .image-frame,.image-dialog.many .image-frame{inset:0}
  .image-step,.image-post-toggle{display:none}
  /* Over the picture's lower edge, in the dark page's colours (on both pages: the picture is dark around it). */
  .image-post,.image-dialog.post-hidden .image-post{position:absolute;left:0;right:0;bottom:0;z-index:4;display:block;width:auto;max-height:min(48%,360px);padding-top:34px;border:0;background:linear-gradient(#0000,#000000b3 34px,#000000e0);color-scheme:dark;--ink:#eef2f8;--muted:#a9b1bd;--subtle:#c3cad4;--line:#ffffff24;--blue:#6aa0ff;--blue-dark:#9cc0ff;--blue-soft:#ffffff14;--surface:#0b0e13;--canvas:#05070b;opacity:calc(1 - var(--pull,0) * 4)}
  .image-dialog.bare .image-post{opacity:0;visibility:hidden}
  .image-post .post,.image-post .post:hover{padding:2px 14px 4px;gap:10px}
  .image-post .post-avatar{width:34px;height:34px;font-size:14px}
  .image-post .post-body{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:6px 0 2px;font-size:14px;line-height:1.7;cursor:pointer}
  .image-post .post-body.open{display:block}
  .image-post :is(.link-card,.quote-preview,.post-catalog,.reply-parent,.post-world){display:none}
  .image-post .post-actions{max-width:none}
  /* Its menu opens upward, the post being at the window's lower edge, and over the picture. */
  .image-post .post-menu-content{top:auto;bottom:32px}
  .image-post:has(.post-menu[open]){overflow:visible}
  .image-post-thread{margin:0 14px max(10px,env(safe-area-inset-bottom));padding:2px 0 4px;border:0;border-radius:0;font-size:12px}
  .image-post-thread:hover{background:none}
  /* The others are dots, over the post. */
  .image-thumbs{bottom:calc(max(var(--post-height,0px),env(safe-area-inset-bottom)) + 8px);gap:7px;padding:4px;background:none;-webkit-backdrop-filter:none;backdrop-filter:none;overflow:visible}
  .image-thumb{width:7px;height:7px;border-radius:50%;opacity:1;background:#ffffff73}
  .image-thumb img{display:none}
  .image-thumb[aria-current]{background:#fff;box-shadow:none}
  .image-notice,.image-dialog.many .image-notice{bottom:calc(var(--post-height,0px) + 36px)}
}
