.media-gallery{--gallery-line:hsl(var(--border));--gallery-accent:hsl(var(--primary));--gallery-height:clamp(145px,13vw,222px);--gallery-tint:color-mix(in srgb,var(--gallery-accent) 9%,transparent);position:relative;isolation:isolate;min-width:0;padding:clamp(18px,3vw,54px);min-height:100%;color:hsl(var(--foreground));background:hsl(var(--background));container-type:inline-size}.gallery-actions,.gallery-head,.gallery-person,.gallery-section,.gallery-section>div,.gallery-selection,.gallery-tools{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.gallery-head,.gallery-section,.gallery-tools{justify-content:space-between}.gallery-head{margin-bottom:1.7rem}.gallery-head h1{font-size:clamp(2.1rem,3.5vw,3.5rem);letter-spacing:-.04em;line-height:1.1;font-weight:650}.gallery-head p{font-size:.86rem;margin:0 0 .35rem;color:hsl(var(--muted-foreground))}.gallery-form button,.gallery-form select,.gallery-launch,.gallery-section select,.media-gallery button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border-radius:10px;font-size:.82rem;font-weight:600}.gallery-actions button,.gallery-empty button,.gallery-form button,.gallery-launch,.gallery-more,.gallery-section button,.gallery-section select,.gallery-selection button{min-height:38px;padding:.45rem .8rem;background:hsl(var(--background));border:1px solid hsl(var(--border))}.gallery-form button:disabled,.gallery-launch:disabled,.media-gallery button:disabled{opacity:.5}.gallery-form .primary,.media-gallery .primary{background:hsl(var(--primary));border-color:transparent;color:hsl(var(--primary-foreground))}.gallery-actions svg,.gallery-search svg,.gallery-section button svg,.gallery-selection svg{width:16px;height:16px;flex-shrink:0}.gallery-section{margin:.8rem 0 1.1rem}.gallery-section h2{font-size:1.35rem;letter-spacing:-.035em;font-weight:650}.gallery-month{margin:0 0 1.35rem}.gallery-month h3{font-size:.85rem;color:hsl(var(--muted-foreground));margin-bottom:.6rem;text-transform:capitalize}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,155px),1fr));gap:7px}.gallery-grid article{position:relative;border-radius:10px;min-width:0;overflow:hidden;background:hsl(var(--muted));aspect-ratio:1.35}.media-gallery .gallery-tile{display:block;position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;overflow:hidden}.gallery-tile>div{width:100%;height:100%}.gallery-tile img{object-fit:cover}.gallery-grid article[data-selected=true]{outline:3px solid var(--gallery-accent);outline-offset:-3px}.gallery-grid article[data-selected=true] .gallery-tile{transform:scale(.94)}.media-gallery .gallery-check{position:absolute;top:6px;left:6px;width:30px;height:30px;border-radius:50%;border:1.5px solid white;background:#20203561;color:white;opacity:0}.gallery-check svg{width:18px}.gallery-check[aria-pressed=true],.gallery-grid article:focus-within .gallery-check,.gallery-grid article:hover .gallery-check{opacity:1}.media-gallery .gallery-check[aria-pressed=true]{background:var(--gallery-accent);color:hsl(var(--primary-foreground))}.gallery-caption{position:absolute;bottom:0;inset-inline:0;padding:16px 9px 7px;background:linear-gradient(transparent,#0009);color:white;font-size:.74rem;text-align:left;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;opacity:0}.gallery-tile:focus-visible .gallery-caption,article:hover .gallery-caption{opacity:1}.gallery-kind,.gallery-star{position:absolute;right:6px}.gallery-kind{display:inline-flex;gap:3px;align-items:center;color:white;background:#10131bbf;border-radius:5px;padding:2px 5px;bottom:6px;font-size:.65rem}.gallery-kind svg,.gallery-star{width:13px;height:13px}.gallery-star{top:7px;color:white;fill:#c58e1e}.gallery-selection{position:sticky;z-index:1;bottom:.5rem;padding:.6rem;border:1px solid var(--gallery-line);background:hsl(var(--background)/.96);box-shadow:0 8px 24px #17101e24;border-radius:14px}.gallery-selection b{font-size:.8rem;margin-right:auto}.gallery-drop,.gallery-empty{display:grid;place-content:center;justify-items:center;gap:12px;min-height:155px;text-align:center}.gallery-empty{background:hsl(var(--muted)/.45);border-radius:12px;color:hsl(var(--muted-foreground))}.gallery-empty>svg{width:32px;height:32px}.gallery-drop{position:absolute;z-index:3;inset:4px;pointer-events:none;border:2px dashed var(--gallery-accent);border-radius:20px;background:hsl(var(--background)/.94)}.gallery-more{margin:12px auto}.gallery-notice{padding:.75rem;background:var(--gallery-tint);border-radius:8px;font-size:.85rem}.gallery-form{display:grid;gap:14px}.gallery-form label{display:grid;gap:5px;font-size:.85rem}.gallery-form input,.gallery-form select{background:hsl(var(--background));border:1px solid hsl(var(--border));border-radius:8px;padding:.6rem}.gallery-person{justify-content:space-between;font-size:.8rem}.gallery-album-media{display:grid;place-items:center;min-height:72px}.gallery-album-media img,.gallery-album-media video{width:100%;height:100%;max-height:75vh;object-fit:contain}.media-gallery.compact{border:0;padding:0}.gallery-month{content-visibility:auto;contain-intrinsic-size:auto 420px}.gallery-book{content-visibility:auto;contain-intrinsic-size:auto 240px}.compact .gallery-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}@media (hover:none){.media-gallery .gallery-check{opacity:1}}@media (max-width:640px){.gallery-search{flex:1 1 100%}.gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.gallery-grid article{aspect-ratio:1}.gallery-actions button,.gallery-section button,.gallery-selection button{min-height:44px}}@media (prefers-reduced-motion:no-preference){.gallery-grid article{animation:galleryAppear .28s ease-out backwards}.gallery-grid article:nth-child(3n+2){animation-delay:35ms}.gallery-grid article:nth-child(3n+3){animation-delay:.07s}.gallery-actions button,.gallery-caption,.gallery-check,.gallery-launch,.gallery-tile{transition:transform .2s ease,opacity .16s ease,box-shadow .2s ease}.gallery-launch:hover{transform:translateY(-2px);box-shadow:0 3px 8px #12101c10}.gallery-actions button:active,.gallery-check:active{transform:scale(.95)}.gallery-selection{animation:galleryAppear .22s ease-out}@keyframes galleryAppear{0%{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}}.gallery-grid article[data-drop-target=true]{outline:3px dashed var(--gallery-accent);outline-offset:-4px}.gallery-page{min-height:calc(100dvh - 40px)}.gallery-head{flex-wrap:nowrap;gap:clamp(12px,2.3vw,40px);margin-bottom:clamp(22px,3vw,40px)}.gallery-title{margin-right:auto;min-width:0}.gallery-title p{font-size:.78rem;font-weight:550}.gallery-actions{flex-wrap:nowrap;gap:8px}.gallery-actions button,.gallery-welcome button{min-height:44px;padding:0 16px;border-radius:100px;white-space:nowrap}.gallery-search{display:flex;align-items:center;gap:10px;flex:0 1 315px;padding:0 15px;min-width:0;min-height:44px;border-radius:30px;background:hsl(var(--muted)/.72);color:hsl(var(--muted-foreground))}.gallery-search input{width:100%;min-width:0;outline:0;background:transparent;color:hsl(var(--foreground));font-size:.85rem}.gallery-search:focus-within{outline:2px solid var(--gallery-accent);outline-offset:2px}.gallery-search svg{flex-shrink:0}.gallery-rail-brand{display:flex;align-items:center;gap:9px;font-weight:650;padding:4px 8px 13px}.gallery-rail-brand svg{width:23px;height:23px}.gallery-rail nav button,.gallery-rail-albums button{display:flex;align-items:center;text-align:start;gap:10px;min-height:42px;width:100%;padding:7px 12px;font-size:.86rem;border-radius:10px;color:var(--dendrite-shell-muted)}.gallery-rail button svg{flex-shrink:0}.gallery-rail button span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gallery-rail button:hover{color:var(--dendrite-shell-ink);background:var(--dendrite-shell-soft)}.gallery-rail button[aria-pressed=true]{color:var(--dendrite-shell-ink);background:var(--dendrite-shell-active);font-weight:650}.gallery-rail-albums{margin:17px 0 0;border-top:1px solid var(--dendrite-shell-line);padding-top:15px}.gallery-rail-albums p{padding:0 12px 6px;font-size:.75rem;font-weight:600;color:var(--dendrite-shell-muted)}.gallery-local-nav{display:flex;align-items:stretch;gap:clamp(5px,2vw,28px);border-bottom:1px solid var(--gallery-line);margin-bottom:22px}.media-gallery .gallery-local-nav button{padding:8px 6px 11px;border-radius:0;min-height:44px;position:relative;color:hsl(var(--muted-foreground))}.gallery-local-nav button[aria-pressed=true]{color:var(--gallery-accent)}.gallery-local-nav button[aria-pressed=true]:after{content:"";position:absolute;inset:auto 0 0;height:3px;border-radius:3px;background:currentColor}body:has([data-collapsed=false] .gallery-rail) .gallery-page>.gallery-local-nav{display:none}.gallery-section{margin:0 0 16px}.gallery-section h2{font-size:clamp(1.55rem,2.5vw,2.3rem);font-weight:580}.gallery-section button,.gallery-section select{border-radius:30px}.gallery-density[aria-pressed=true]{color:var(--gallery-accent);background:var(--gallery-tint)}.gallery-date-jump{margin:-1px 0 14px;display:inline-flex;gap:5px;align-items:center;color:hsl(var(--muted-foreground))}.gallery-date-jump select{background:transparent;font-size:.8rem;padding:4px}.gallery-month{margin-bottom:clamp(22px,3vw,42px)}.gallery-month h3{margin:0 0 9px;font-size:.94rem;font-weight:590;color:hsl(var(--foreground));text-transform:none;scroll-margin-top:16px}.gallery-page .gallery-grid{display:flex;align-items:stretch;flex-wrap:wrap;gap:5px}.gallery-page .gallery-grid:after{content:"";flex:999 1 0px}.gallery-page .gallery-grid article{aspect-ratio:var(--photo-ratio);flex:var(--photo-ratio) 1 calc(var(--photo-ratio) * var(--gallery-height));max-width:100%;min-height:0;border-radius:6px}.gallery-page[data-density=dense]{--gallery-height:clamp(92px,9vw,145px)}.gallery-grid article[data-selected=true]{background:var(--gallery-tint)}.gallery-book-cover .gallery-album-media img,.gallery-grid .gallery-album-media img{object-fit:cover}.gallery-book-cover .gallery-album-media,.gallery-grid .gallery-album-media{width:100%;height:100%;min-height:0}.gallery-selection{width:fit-content;max-width:100%;margin:14px auto 0;bottom:12px;z-index:3;border:0;box-shadow:0 4px 24px hsl(var(--foreground)/.15);background:hsl(var(--popover))}.gallery-collections{margin:4px 0 28px}.gallery-collection-heading{display:flex;gap:14px;justify-content:space-between;align-items:center;margin:0 0 14px}.gallery-collection-heading h3{font-size:1.01rem;font-weight:600;letter-spacing:-.018em}.gallery-collection-heading button{min-height:36px;color:var(--gallery-accent)}.gallery-album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));gap:22px 16px}.recent .gallery-album-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.media-gallery button.gallery-book{min-width:0;display:flex;align-items:stretch;justify-content:start;flex-direction:column;gap:9px;text-align:start}.gallery-book-cover{display:grid;place-items:center;position:relative;isolation:isolate;width:100%;aspect-ratio:1.4}.recent .gallery-book-cover{aspect-ratio:2.35}.gallery-book-cover:before{content:"";position:absolute;inset:-4px 7px 0;border-radius:13px;background:hsl(var(--muted-foreground)/.22);z-index:-1}.gallery-cover-image{display:grid;place-items:center;height:100%;width:100%;overflow:hidden;border-radius:12px;color:hsl(var(--muted-foreground));background:hsl(var(--muted))}.gallery-book-caption{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:0 2px}.gallery-book-caption strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.92rem;font-weight:590}.gallery-book-caption svg{flex-shrink:0;color:hsl(var(--muted-foreground))}.gallery-albums-empty{padding:22px;min-height:95px;display:flex;align-items:center;flex-wrap:wrap;gap:12px;background:hsl(var(--muted)/.55);border-radius:12px;font-size:.9rem}.gallery-albums-empty button{color:var(--gallery-accent)}.gallery-source-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr));gap:10px}.gallery-album-grid+.gallery-collection-heading,.gallery-albums-empty+.gallery-collection-heading{margin-top:32px}.media-gallery .gallery-source-book{display:flex;justify-content:start;gap:12px;padding:6px 12px 6px 6px;background:hsl(var(--muted)/.5);text-align:start;min-width:0}.gallery-source-book>svg{margin-left:auto;color:hsl(var(--muted-foreground));flex-shrink:0}.gallery-source-symbol{width:54px;height:54px;border-radius:7px;overflow:hidden;flex-shrink:0;display:grid;place-items:center}[data-source=chat] .gallery-source-symbol{background:#d7e9e2;color:#30554f}[data-source=ai] .gallery-source-symbol{background:#e4dcf1;color:#5d497a}[data-source=captures] .gallery-source-symbol{background:#efdfca;color:#734d2b}.gallery-empty{padding:22px}.gallery-welcome{display:grid;grid-template-columns:1.05fr 1fr;align-items:center;overflow:hidden;border-radius:16px;background:hsl(var(--muted)/.58)}.gallery-welcome-art,.gallery-welcome-art img{height:100%;width:100%;object-fit:cover}.gallery-welcome-copy{padding:clamp(22px,3.8vw,62px)}.gallery-welcome-copy h3{font-size:clamp(1.65rem,2.6vw,2.6rem);line-height:1.12;letter-spacing:-.04em;font-weight:580}.gallery-welcome-copy p{font-size:.94rem;line-height:1.55;margin:12px 0 20px;max-width:34ch;color:hsl(var(--muted-foreground))}.gallery-welcome-copy button{gap:8px}.media-gallery.compact{min-height:0}.compact .gallery-head{margin-bottom:12px}.compact .gallery-search{flex:1}.compact .gallery-section h2{font-size:1.3rem}.compact .gallery-album-grid{grid-template-columns:repeat(auto-fill,minmax(115px,1fr))}.gallery-skeleton{display:grid;align-content:start;gap:22px;padding:clamp(20px,4vw,54px)}.gallery-skeleton i,.gallery-skeleton span{border-radius:8px;background:hsl(var(--muted))}.gallery-skeleton i{width:140px;height:34px}.gallery-skeleton i+i{margin-top:28px;width:90px;height:20px}.gallery-skeleton div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.gallery-skeleton span{aspect-ratio:1.4}.gallery-rail button:focus-visible,.media-gallery :is(button,select):focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}@container (max-width: 780px){.gallery-head{flex-wrap:wrap;gap:14px}.gallery-head .gallery-search{order:3;flex:1 1 100%}.gallery-source-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}}@container (max-width: 520px){.gallery-head{gap:13px 6px;margin-bottom:13px}.gallery-head .gallery-actions{gap:5px}.gallery-head .gallery-actions button{width:42px;height:42px;padding:0;min-height:42px;font-size:0;gap:0}.gallery-head .gallery-actions svg{width:20px;height:20px}.gallery-local-nav{gap:0;justify-content:space-between}.media-gallery .gallery-local-nav button{flex:1;flex-direction:column;font-size:.73rem;gap:3px}.gallery-section{gap:8px}.gallery-page .gallery-grid{--gallery-height:104px;gap:3px}.gallery-page[data-density=dense] .gallery-grid{--gallery-height:72px}.gallery-album-grid,.recent .gallery-album-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}.recent .gallery-album-grid{display:flex;overflow-x:auto;padding:5px 0;scroll-snap-type:x proximity}.recent .gallery-book{flex:0 0 46%;scroll-snap-align:start}.gallery-source-grid,.gallery-welcome{grid-template-columns:1fr}.gallery-welcome-art{max-height:240px}.gallery-welcome-copy{padding:24px}.gallery-selection{bottom:4px}}@media (prefers-reduced-motion:no-preference){.gallery-book-cover,.gallery-local-nav button,.gallery-rail button,.gallery-source-book{transition:transform .18s ease-out,background-color .16s,color .16s}.gallery-book:focus-visible .gallery-book-cover,.gallery-book:hover .gallery-book-cover{transform:translateY(-3px)}.gallery-source-book:hover{transform:translateY(-2px)}.gallery-book:active .gallery-book-cover{transform:scale(.985)}}.gallery-day-heading{display:flex;align-items:center;gap:8px;min-height:32px;margin-bottom:5px}.gallery-day-heading h3{margin:0}.media-gallery .gallery-day-select{height:28px;width:28px;border-radius:50%;color:hsl(var(--muted-foreground));background:hsl(var(--muted))}.gallery-day-select[aria-pressed=true]{background:var(--gallery-accent);color:hsl(var(--primary-foreground))}@media (hover:hover){.gallery-day-select{opacity:0}.gallery-day-heading:hover .gallery-day-select,.gallery-day-select:focus-visible,.gallery-day-select[aria-pressed=true]{opacity:1}}.gallery-welcome-copy h3,.media-gallery .gallery-head h1{font-family:var(--vibe-heading-font);font-weight:var(--vibe-heading-weight);letter-spacing:var(--vibe-heading-tracking)}.media-gallery .gallery-welcome{background:var(--vibe-card-surface);border:1px var(--vibe-divider-style) hsl(var(--border));border-radius:var(--vibe-card-radius);box-shadow:var(--vibe-card-shadow)}.gallery-welcome-art{padding:clamp(12px,2vw,26px);background:var(--studio-night)}.gallery-welcome-art img{transform:rotate(-2deg) scale(.97);box-shadow:0 8px 15px #0003}.gallery-search,.gallery-welcome button,.media-gallery .gallery-actions button{border-radius:var(--vibe-control-radius)}@media (prefers-reduced-motion:no-preference) and (hover:hover){:root:not([data-fx=low]) .gallery-welcome-art img{transition:transform .26s ease-out}.gallery-welcome:focus-within img,.gallery-welcome:hover img{transform:rotate(0deg)}}