/* Full-width gallery and preview-first template details. */
#prompt-view{padding-top:var(--header)}
.gallery-navigation.sidebar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:24px;position:sticky;top:var(--header);left:auto;bottom:auto;width:100%;height:auto;min-height:64px;border:0;border-radius:0;padding:10px 24px;background:#0a0a0af5;z-index:20;overflow:visible;box-shadow:none}
.gallery-kind-tabs,.gallery-kind-tabs #kind-nav{display:flex;align-items:center;gap:4px;white-space:nowrap}
.gallery-kind-tabs{border:1px solid #292929;border-radius:24px;padding:4px;background:#101010}
.gallery-navigation .nav-item{width:auto;height:30px;min-width:max-content;font-size:12px;padding:0 12px;justify-content:center;border-radius:20px}
.gallery-navigation .nav-item .count,.gallery-navigation .nav-item svg{display:none}
.gallery-navigation .nav-item.active{background:#282828;color:#fff}
.gallery-category-tabs{display:flex;gap:4px;align-items:center;overflow-x:auto;scrollbar-width:none;min-width:0;border:1px solid #252525;border-radius:24px;padding:4px}
.gallery-category-tabs::-webkit-scrollbar{display:none}
.gallery-navigation .toolbar{margin:0;gap:0;position:relative;flex-wrap:nowrap}
.gallery-navigation .filters{width:auto;gap:6px}
.gallery-navigation .filters select{max-width:110px;height:36px;border-radius:20px;font-size:11px;background:#161616}
.gallery-navigation .filters select:first-child{max-width:120px;flex:none}
.gallery-navigation .filter-button{display:none}
.gallery-navigation .search-field{display:none}
.gallery-navigation .toolbar.search-open .search-field{display:flex;position:absolute;right:0;top:46px;width:340px;max-width:calc(100vw - 48px);height:42px;background:#181818;border-color:#444;box-shadow:0 10px 30px #0005;z-index:10}
.content{margin:0 24px!important;max-width:none!important;min-height:calc(100dvh - 144px)}
.page-heading{display:none}
.results-line{height:28px;margin-bottom:8px;font-size:10px;color:#777}
.results-line .view-label{font-size:10px}
.cards{display:grid;grid-template-columns:repeat(var(--gallery-columns,4),minmax(0,1fr));align-items:start;gap:16px}
.masonry-column{display:flex;flex-direction:column;gap:20px;min-width:0}
.card,.card:hover{background:transparent;border:0;border-radius:0;padding:0;overflow:visible}
.card-preview{height:auto;aspect-ratio:var(--preview-ratio,1.65);border-radius:20px;background:#111;isolation:isolate}
.card-preview img,.card-preview video{width:100%;height:100%;object-fit:cover}
.card-preview .preview-video{position:absolute;inset:0;z-index:1;transition:opacity .2s}
.card-preview img{transition:filter .2s}
.card:hover .card-preview img{filter:brightness(1.04)}
.media-tag{display:none}
.favorite{width:30px;height:30px;right:12px;top:12px;border-radius:50%;background:#171717b8;border-color:#ffffff20;z-index:2;opacity:0;transition:opacity .18s}
.card:hover .favorite,.card:focus-within .favorite,.favorite[aria-pressed=true]{opacity:1}
.card-caption{padding:14px 0 2px;min-height:52px;display:flex;align-items:baseline;gap:8px}
.card-title{width:auto;max-width:75%;font-size:15px;line-height:22px;font-weight:600;flex:none}
.card-caption-bottom{margin:0;min-width:0;font-size:10px;line-height:18px}
.card-caption-bottom span:last-child{display:none}
.card-placeholder{aspect-ratio:var(--preview-ratio,1.65);height:100%;font-size:11px;gap:12px}
.card-placeholder svg{width:24px;height:24px;color:#777}
.pagination{padding:40px 0}
.content-footer{margin-top:12px}
body.detail-open{overflow:hidden}
dialog#detail{width:calc(100vw - 48px);max-width:1800px;height:calc(100dvh - 48px);max-height:calc(100dvh - 48px);padding:0;overflow:visible;background:transparent;border:0;border-radius:0;box-shadow:none}
dialog#detail::backdrop{background:#000c;backdrop-filter:blur(8px)}
#detail .detail-layout{height:100%;display:grid;grid-template-columns:minmax(0,1fr) clamp(380px,29vw,490px);gap:24px}
#detail .detail-visual{padding:0;min-width:0;background:#0d0d0f;border:1px solid #252525;border-radius:24px;overflow:hidden;display:flex;flex-direction:column}
.preview-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:0 24px;height:64px;flex:none;border-bottom:1px solid #202020;font-size:11px;color:#999}
.preview-heading span:last-child{font-size:10px;color:#666}
#detail-media{width:100%;flex:1;min-height:0;display:grid;place-items:center;background:#0d0d0f;overflow:hidden}
#detail .detail-visual #detail-media img,#detail .detail-visual #detail-media video{display:block;width:100%;height:100%;max-height:100%;object-fit:contain;background:#0d0d0f;border-radius:0}
#detail .detail-visual #detail-media .card-placeholder{width:100%;height:100%;aspect-ratio:auto}
#detail .detail-copy{position:relative;min-width:0;height:100%;overflow:auto;border:1px solid #303030;border-radius:24px;background:linear-gradient(160deg,#1a1a1a,#101010 70%);padding:36px 28px 28px;display:flex;flex-direction:column}
#detail #close-detail{position:absolute;right:16px;top:16px;border-radius:50%;height:36px;width:36px;background:#111;border-color:#303030}
#detail .detail-copy>.eyebrow{display:flex;align-items:center;gap:9px;margin:4px 0 24px;font-size:11px;color:#aaa}
#detail .detail-copy>.eyebrow:before{content:"";display:block;width:2px;height:11px;background:#aaa}
#detail-title{font-size:30px;line-height:1.3;letter-spacing:-.8px;margin:0 0 16px;font-weight:650;padding-right:4px;overflow-wrap:anywhere}
#detail-kind{font-size:12px;color:#aaa}
#detail .detail-meta{margin-top:12px}
#detail .detail-meta span{padding:0;border:0;background:none;color:#777;font-size:11px}
.detail-description{font-size:13px;color:#aaa;line-height:1.9;margin:24px 0}
#detail #copy-prompt{display:flex;align-items:center;justify-content:center;gap:10px;flex:none;width:100%;height:48px;background:linear-gradient(#252525,#191919);border:1px solid #414141;border-radius:10px;color:#eee;font-size:13px;padding:0 16px;transition:background .18s,border-color .18s}
#detail #copy-prompt:hover{background:#303030;border-color:#666}
#detail #copy-prompt:disabled{opacity:.4}
#detail #copy-prompt svg{width:16px;height:16px;color:#bcbcbc}
#prompt-status{font-size:11px;line-height:18px;color:#777;min-height:18px;margin:12px 0 32px}
.detail-note{margin-top:auto;border-top:1px dashed #363636;padding-top:24px}
.detail-note>span{font-size:12px;color:#ccc}
.detail-note p{font-size:12px;line-height:1.9;color:#777;margin:10px 0 0}
body:not(.ui-active) #toggle-sidebar{display:none}
@media(min-width:1800px){#detail .detail-layout{grid-template-columns:minmax(0,1fr) 460px}}
@media(max-width:1400px){.gallery-navigation.sidebar{gap:12px}.gallery-navigation .nav-item{padding:0 9px;font-size:11px}.gallery-navigation .filters select{max-width:95px}.gallery-navigation .filters select:first-child{max-width:100px}}
@media(max-width:1100px){#detail .detail-layout{grid-template-columns:minmax(0,1fr) 350px;gap:16px}#detail .detail-copy{padding:32px 24px 24px}#detail-title{font-size:26px}.gallery-navigation.sidebar{grid-template-columns:minmax(0,1fr) auto}.gallery-category-tabs{grid-column:1/-1;grid-row:2}.gallery-kind-tabs{overflow-x:auto;scrollbar-width:none;max-width:max-content}.gallery-kind-tabs #kind-nav{gap:0}.gallery-navigation .nav-item{padding:0 12px}.gallery-navigation .toolbar{grid-column:2;grid-row:1}.cards{gap:14px}.masonry-column{gap:18px}.card-caption{display:block}.card-title{max-width:100%}.card-caption-bottom{margin-top:3px}}
@media(max-width:967px){.gallery-navigation.sidebar{top:64px;padding:10px 16px;box-shadow:none}.content{margin:0 16px!important}.topbar{gap:16px}.gallery-navigation .filters{gap:4px}.gallery-navigation .filters select{font-size:10px;padding:0 8px;max-width:90px}.gallery-navigation .filters select:first-child{max-width:94px}.gallery-navigation .nav-item{padding:0 9px}.card-preview{border-radius:16px}.card-title{font-size:14px}.favorite{opacity:1}}
@media(max-width:700px){dialog#detail{width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);overflow:auto;border-radius:18px}#detail .detail-layout{height:auto;display:flex;flex-direction:column;gap:12px}#detail .detail-visual{height:42dvh;min-height:250px;border-radius:18px}.preview-heading{height:44px;padding:0 16px}.preview-heading span:last-child{display:none}#detail .detail-copy{min-height:350px;height:auto;border-radius:18px;padding:28px 24px 24px;overflow:visible}#detail-title{font-size:24px}.detail-description{margin:20px 0}.detail-note{margin-top:20px;padding-top:20px}#prompt-status{margin-bottom:20px}}
@media(max-width:620px){#focus-search{display:flex;width:32px;height:32px}.header-actions{gap:5px}.brand strong{font-size:15px}.primary-tabs{gap:14px}.primary-tabs a{font-size:12px}.topbar{gap:14px}.gallery-navigation.sidebar{grid-template-columns:minmax(0,1fr);gap:8px}.gallery-kind-tabs{max-width:100%;overflow:auto}.gallery-navigation .nav-item{padding:0 12px;height:28px}.gallery-category-tabs{grid-column:1;grid-row:2;max-width:100%}.gallery-navigation .toolbar{grid-column:1;grid-row:3;justify-content:flex-end}.gallery-navigation .filters select:first-child{max-width:160px}.gallery-navigation .filters{width:auto}.gallery-navigation .toolbar.search-open .search-field{top:40px;width:calc(100vw - 32px);max-width:none}.results-line{height:28px;margin-top:6px}.card-caption{padding-top:12px}.cards{gap:12px}.masonry-column{gap:16px}.content-footer{font-size:10px}}

/* Center the resource switch independently of the side controls. */
html{scrollbar-gutter:stable}
.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:0;padding:0 24px}
.topbar .brand{min-width:0;justify-self:start}
.topbar .primary-tabs{justify-self:center;gap:32px;align-self:stretch}
.topbar .primary-tabs a{padding:0 2px;font-weight:500}
.topbar .header-actions{margin-left:0;justify-self:end}
.gallery-navigation.sidebar{gap:16px;min-height:68px;padding-top:12px;padding-bottom:12px}
.gallery-kind-tabs,.gallery-category-tabs{height:40px;align-items:center}
.gallery-navigation .filters select{height:40px}
.results-line{height:28px;margin-bottom:12px;align-items:center}
.masonry-column{gap:24px}
.card-caption{padding-top:12px;min-height:48px}
.feed-status{height:96px;display:flex;align-items:center;justify-content:center;gap:10px;color:#888;font-size:12px}
.feed-status:before{content:'';width:4px;height:4px;border-radius:50%;background:#777}
.feed-status.complete{color:#666}
.content-footer{margin-top:0}
.content-footer .admin-entry{margin-left:4px;color:#777}
@media(max-width:620px){.admin-header-entry{display:none}}
@media(max-width:967px){.topbar{padding:0 16px}.topbar .brand-description,.topbar .brand-divider{display:none}.topbar .primary-tabs{gap:22px}.gallery-navigation.sidebar{gap:10px}.masonry-column{gap:20px}}
@media(max-width:620px){.topbar .primary-tabs{gap:14px}.topbar .brand{gap:6px}.topbar .brand img{width:24px;height:24px}.topbar .brand strong{font-size:14px}.topbar .header-actions{gap:4px}.gallery-navigation.sidebar{padding:8px 16px;gap:8px}.gallery-kind-tabs,.gallery-category-tabs{height:38px}.gallery-navigation .filters select{height:36px}.masonry-column{gap:18px}.results-line{margin-bottom:10px}.feed-status{height:80px}}
