/* Four steps and a bounded, independent folder browser. */
.editor-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.editor-tabs button{font-size:11px;white-space:nowrap}.editor-tabs button span{margin-right:5px}
#panel-design .style-browser{height:224px;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#ffffff02}
#style-folder-list{height:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#dcc49b55 transparent;overscroll-behavior:contain}
.style-folder-choice{display:flex;align-items:center;gap:10px;min-height:34px;width:100%;padding:6px 10px;border:0;border-bottom:1px solid var(--line);text-align:left;color:var(--paper);background:transparent;font-size:11px}
.style-folder-choice svg{width:17px;height:14px;flex:none;fill:none;stroke:var(--gold);stroke-width:1.5}.style-folder-choice .library-count{margin-left:auto;color:var(--muted);font-size:10px;float:none}.style-folder-choice.contains-current{background:#dcc49b0a}.style-folder-choice.contains-current svg{fill:#dcc49b22}.style-folder-choice:hover{background:#ffffff06}
#style-folder-view{height:100%;display:flex;flex-direction:column;min-height:0}
.style-folder-header{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px;padding:3px 8px;border-bottom:1px solid var(--line);flex:none}
#style-folder-back{border:0;background:transparent;color:var(--gold);font-size:11px;min-height:26px;padding:3px}
#panel-design #style-folder-title{font:500 14px 'Cormorant Garamond',serif;margin:0;color:var(--paper)}
.style-folder-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#dcc49b55 transparent;overscroll-behavior:contain;padding:4px}
#panel-design #background-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
#panel-design #background-gallery .background-card{min-width:0;min-height:98px;gap:4px;padding:2px;border-radius:7px;font-size:10px}
#panel-design #background-gallery .background-card>span{height:62px;border-radius:5px}
#panel-design #background-gallery strong{font:400 10px/13px Manrope,Arial,sans-serif;min-height:26px;white-space:normal;overflow-wrap:anywhere}
#panel-design #background-gallery .background-card:focus-visible{outline-offset:0}
#panel-design #custom-background-control{padding:8px;margin:0;font-size:11px}
#panel-design .style-catalogue-more{font-size:10px;margin-top:10px;padding-top:8px}
#panel-design .lunar-light-controls{margin:12px 0 0;padding:12px 0 0}
#panel-design .compact-lunar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px;margin-bottom:8px}
#panel-design .compact-lunar-heading h2{font:500 16px 'Cormorant Garamond',serif;margin:0;color:var(--gold)}
#panel-design .compact-lunar-sliders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}
#panel-design .lunar-light-controls label:not(.check){min-width:0;margin:0;color:var(--muted);font-size:10px;line-height:16px}
#panel-design .lunar-light-controls output{font-size:10px}
#panel-design .lunar-light-controls input[type=range]{appearance:none;height:24px;margin:2px 0 0;background:transparent;accent-color:var(--gold)}
#panel-design .lunar-light-controls input[type=range]::-webkit-slider-runnable-track{height:3px;border-radius:5px;background:#dcc49b88}
#panel-design .lunar-light-controls input[type=range]::-webkit-slider-thumb{appearance:none;width:17px;height:17px;margin-top:-7px;border-radius:50%;background:#ecd4b0;border:2px solid #171a26;box-shadow:0 0 0 1px #dcc49b88}
#panel-design .lunar-light-controls input[type=range]::-moz-range-track{height:3px;border-radius:5px;background:#dcc49b88}
#panel-design .lunar-light-controls input[type=range]::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#ecd4b0;border:2px solid #171a26}
#panel-design .lunar-light-controls .simple-checks{margin-top:10px;gap:10px;justify-content:flex-start;flex-wrap:wrap}
#panel-design .lunar-light-controls .check{margin:0;min-height:28px;font-size:10px}
#panel-design .lunar-light-controls .advanced{padding-top:10px;margin-top:8px}
#panel-design .lunar-light-controls .field-note{display:none}
#panel-design .lunar-light-controls .style-moon-selector{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0}
#panel-design .style-moon-selector select{width:110px;min-height:32px;height:32px;margin:0;padding:4px 8px;font-size:11px}
#panel-design .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(max-width:760px){
 .mobile-lunar-ui .mobile-sheet-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.mobile-lunar-ui .mobile-sheet-tabs button{font-size:10px}
 #panel-layout,#panel-design.style-panel{padding:12px 18px 20px}
 #panel-design .style-browser{height:132px}
 .style-folder-choice{min-height:32px;padding:5px 10px}
 #panel-design .lunar-light-controls{margin-top:10px;padding-top:10px}
 .mobile-lunar-ui #editor[data-mobile-tab=details] #details-texts,.mobile-lunar-ui #editor[data-mobile-tab=details] #details-moment{display:block}
 .mobile-lunar-ui #editor[data-mobile-tab=details] .details-card{border:1px solid var(--line);border-radius:10px;margin:0 0 12px}
 .mobile-lunar-ui #editor[data-mobile-tab=details] .details-card>summary{display:flex;font-size:15px;padding:12px;min-height:44px}
 .mobile-lunar-ui #editor[data-mobile-tab=details] .details-card-body{padding:0 12px 14px}
 .mobile-lunar-ui #editor[data-mobile-tab=details] #fine-adjustments>summary{font-size:13px}
 .mobile-lunar-ui #editor[data-mobile-tab=details] #fine-adjustments>summary:before{content:none}
 .mobile-lunar-ui #editor[data-mobile-tab=details] #fine-adjustments>summary:after{font-size:15px}
 .mobile-lunar-ui #editor[data-mobile-tab=details] .mobile-fine-back{margin-top:12px}
}

/* Keep the whole poster inside the existing desktop thumbnail slot. */
@media(min-width:761px){
 #panel-design #background-gallery .background-card>span>img:not(.thumbnail-moon),
 #panel-design #background-gallery .background-card>span>svg{object-fit:contain;width:auto;max-width:100%;height:100%;margin-inline:auto}
 #panel-design #background-gallery .background-card .thumbnail-moon{width:25px;height:25px;left:calc(50% - 12.5px);top:13px;object-fit:contain}
}
