.gallery{position:relative;min-width:0;max-width:100%;color:var(--text,var(--ink))}.gallery-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;outline-offset:2px}.gallery-track::-webkit-scrollbar{display:none}.gallery-slide{position:relative;flex:0 0 100%;min-width:0;scroll-snap-align:start}.gallery-image{height:300px;background:rgba(0,0,0,.04);display:flex;align-items:center;justify-content:center;overflow:hidden}.gallery-image img{display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;background:transparent!important}.gallery-image-actions{position:absolute;top:12px;right:12px;display:flex;gap:8px;opacity:0;transition:opacity .15s}.gallery-slide:hover .gallery-image-actions,.gallery-slide:focus-within .gallery-image-actions,.gallery-active .gallery-image-actions{opacity:1}.gallery-image-actions button,.gallery-arrow{width:28px;height:28px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:#ffffffe0;color:var(--ink,#2a2925);box-shadow:0 1px 3px #2a29251f;cursor:pointer;transition:background .15s,opacity .2s}.gallery-image-actions button:hover,.gallery-arrow:hover{background:#fff}.gallery-image-actions{gap:6px}.gallery-arrow{position:absolute;top:136px;z-index:2;opacity:0}.gallery:hover .gallery-arrow,.gallery-arrow:focus-visible{opacity:1}@media(hover:none){.gallery-arrow{display:none!important}}.gallery-arrow[hidden]{display:none}.gallery-prev{left:12px}.gallery-next{right:12px}.gallery-dots{display:flex;justify-content:center;gap:8px;min-height:24px;align-items:center}.gallery-dot{border:0;background:var(--sub,#aaa);width:6px;height:6px;border-radius:50%;padding:0;opacity:.4;cursor:pointer}.gallery-dot[aria-current=true]{opacity:1}.gallery-add-slide{height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border:1px dashed var(--sub,#aaa);box-sizing:border-box;border-radius:4px;background:rgba(0,0,0,.02)}.gallery-add{height:44px;width:44px;display:grid;place-items:center;border:0;border-radius:50%;background:#ffffffe0;box-shadow:0 1px 3px #2a29251f;color:var(--ink,#2a2925);cursor:pointer}.gallery-add:hover{background:#fff}.gallery-add-slide span{font:12px var(--sans)}.gallery-order{display:flex;gap:8px;overflow-x:auto;padding:5px 1px 8px}.gallery-thumb{padding:2px;border:1px solid transparent;background:transparent;border-radius:4px;min-width:56px;width:56px;height:44px;touch-action:none;cursor:grab}.gallery-thumb img{width:100%!important;height:100%!important;object-fit:cover!important;max-height:none!important}.gallery-thumb[aria-pressed=true]{border-color:var(--sub)}.gallery-order-dragging{opacity:.45}.gallery-feedback{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);z-index:9999;display:flex;align-items:center;gap:20px;max-width:calc(100vw - 40px);padding:12px 18px;background:#292925;color:#f5f2eb;box-shadow:0 4px 20px #0002;border-radius:12px;font:13px var(--sans)}.gallery-feedback button{border:0;background:none;color:inherit;text-decoration:underline;cursor:pointer;white-space:nowrap}.gallery-dialog{border:0;padding:0;width:1000px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);background:#171715;color:#eee;overflow:auto;border-radius:10px}.gallery-dialog::backdrop{background:#0008}.gallery-dialog header{display:flex;align-items:center;justify-content:space-between;padding:16px 22px;gap:16px;font:15px var(--sans)}.gallery-dialog header span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gallery-close{display:grid;place-items:center;border:0;background:none;color:inherit;width:32px;height:32px;border-radius:50%;cursor:pointer}.gallery-close:hover{background:#ffffff1a}.gallery-dialog .gallery-image{height:min(70dvh,700px)}.gallery-dialog .gallery-arrow{top:45%;width:36px;height:36px}.gallery-dialog .gallery-dots{min-height:36px}.gallery-dialog .gallery-dot{background:#eee}@media(max-width:700px){.gallery-image,.gallery-add-slide{height:240px}.gallery-arrow{top:106px}.gallery-dialog{max-width:calc(100vw - 20px)}.gallery-feedback{bottom:16px;width:max-content}.gallery-dialog .gallery-image{height:65dvh}}

.gallery-image.gallery-cropped{position:relative;height:auto;aspect-ratio:16/9}.gallery-image.gallery-cropped img{position:absolute;width:var(--crop-width)!important;height:var(--crop-height)!important;left:var(--crop-left);top:var(--crop-top);object-fit:fill!important}

.note-art,.archive-media,.journal-photo{position:relative}.note-media-count{position:absolute;right:10px;bottom:10px;border-radius:10px;padding:3px 8px;background:rgba(0,0,0,.55);color:#fff;font:11px/1.5 var(--sans);pointer-events:none}
.archive-media.note-art{display:block;width:100%;padding:0;border:0;background:none;pointer-events:auto;cursor:pointer}
