.library-clear{display:block;width:100%;padding:10px;text-align:left;color:#fff;font-size:12px;font-weight:600;border-bottom:1px solid #ffffff18;margin-bottom:5px}
.library-clear:hover{background:#ffffff0b;border-radius:6px}
.free-pages button:disabled{opacity:.4;cursor:default}
.library-filter-options{overscroll-behavior:contain}
.storefront #top{animation:none;transform:none}
.storefront:has(dialog[open]) #campaign-corner{visibility:hidden}
dialog.project-dialog.wide{width:min(1000px,calc(100vw - 36px));max-width:1000px;max-height:88vh;max-height:88dvh;padding:24px;overflow:auto}
.project-dialog .project-detail{grid-template-columns:minmax(0,1fr) minmax(245px,285px);gap:24px}
.project-dialog .project-artwork{min-width:0}
.project-dialog .project-main-image{width:auto;max-width:100%;height:auto;max-height:56vh;max-height:56dvh;object-fit:contain;margin-inline:auto}
.project-dialog .project-information{min-width:0;padding:0;max-height:calc(88vh - 120px);overflow:auto;overflow-wrap:break-word}
.project-dialog .project-description{max-height:24vh;overflow:auto;line-height:1.65}
.project-dialog .project-image-controls{gap:12px;margin:12px 0}
.project-dialog .project-thumbs img{height:44px;max-width:90px}
.project-dialog .project-information h2{font-size:22px;line-height:1.35}
@media(max-width:760px){
 dialog.project-dialog.wide{width:calc(100vw - 24px);max-height:90vh;max-height:90dvh;padding:16px}
 .project-dialog .project-detail{grid-template-columns:1fr;gap:20px}
 .project-dialog .project-main-image{max-height:43vh;max-height:43dvh}
 .project-dialog .project-information{position:static;max-height:none;overflow:visible}
 .project-dialog .project-description{max-height:22vh}
}
@media(max-width:640px){
 .storefront .library-filter-options{position:fixed;left:16px;right:16px;top:calc(var(--store-header-height,60px) + 148px);width:auto;max-width:none;max-height:min(42vh,320px)}
 .storefront #main .free-controls .library-filter-field{min-width:0;flex:1 1 130px}
 .storefront #main .free-controls .project-saved-filter{height:44px;min-height:44px}
 .free-pages{gap:8px;flex-wrap:wrap;justify-content:center}
}

/* Studio density: shared spacing, independent from storefront typography. */
body:not(.storefront) #main{padding-top:22px}
body:not(.storefront) .lead{margin-bottom:18px;gap:12px}
body:not(.storefront) h1{font-size:28px;line-height:1.25}
body:not(.storefront) .lead p{margin-top:5px;font-size:13px}
body:not(.storefront) .editor-grid{gap:14px}
body:not(.storefront) .editor-section{padding:16px;gap:11px}
body:not(.storefront) .editor-section h3{font-size:15px}
body:not(.storefront) form{gap:12px}
body:not(.storefront) label{gap:5px;font-size:13px}
body:not(.storefront) input:not([type=checkbox]):not([type=radio]):not([type=file]),body:not(.storefront) select{min-height:36px;padding:7px 10px}
body:not(.storefront) textarea{min-height:72px;padding:8px 10px}
body:not(.storefront) .photo-field{padding:8px 10px}
body:not(.storefront) .photo-picker{gap:10px}
body:not(.storefront) .photo-preview,body:not(.storefront) .photo-empty{width:64px;height:64px}
body:not(.storefront) .note,body:not(.storefront) .photo-picker small{font-size:12px;line-height:1.5}
body:not(.storefront) .section{margin-top:20px}
body:not(.storefront) .panel{padding:16px}
body:not(.storefront) .section-head{gap:12px;margin-bottom:12px}
body:not(.storefront) .section-head h2{font-size:20px}
body:not(.storefront) #modal:not(.project-dialog){width:min(720px,calc(100vw - 28px));max-height:88dvh;padding:20px}
body:not(.storefront) #modal.compact-upload-editor{width:min(760px,calc(100vw - 28px))}
body:not(.storefront) #modal .section-head{margin-bottom:15px}
body:not(.storefront) #modal .photo-preview{width:72px;height:72px}
body:not(.storefront) .ad-edit-grid{gap:14px}
body:not(.storefront) .ad-body{padding:14px}
body:not(.storefront) .sample-banner{max-height:140px;overflow:hidden}
body:not(.storefront) .sample-banner img{max-height:140px;object-fit:contain}
body:not(.storefront) .author-admin-row{padding:12px;gap:12px}
body:not(.storefront) .author-admin-row .author-avatar{width:42px;height:42px}
body:not(.storefront) #main[data-page=trainingsettings] .editor-section{grid-template-columns:repeat(2,minmax(0,1fr))}
body:not(.storefront) #main[data-page=trainingsettings] .editor-section>h3,body:not(.storefront) #main[data-page=trainingsettings] .editor-section>.note{grid-column:1/-1}
@media(min-width:900px){body:not(.storefront) .editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){body:not(.storefront) h1{font-size:24px}body:not(.storefront) .editor-section{padding:13px}body:not(.storefront) #main[data-page=trainingsettings] .editor-section{grid-template-columns:1fr}body:not(.storefront) #modal:not(.project-dialog){padding:16px}}

.member-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,240px);gap:14px;margin:16px 0}.member-controls label{min-width:0}#member-results .status.member-student{color:#ffda7b;background:#bc871c24;border:1px solid #c5943b66;padding:4px 9px;border-radius:999px;font-weight:700}#member-results .status.member-community{color:#c1c5cf;background:#ffffff08;border:1px solid #ffffff18;padding:4px 9px;border-radius:999px}@media(max-width:600px){.member-controls{grid-template-columns:1fr}}

/* Balanced public detail dialogs, with predictable spacing and unbroken actions. */
.storefront #modal:is(.project-dialog,.resource-detail-dialog,.prompt-detail-dialog){width:min(1060px,calc(100vw - 40px));max-width:1060px;padding:24px;max-height:90dvh;overflow:auto}
.storefront #modal:is(.project-dialog,.resource-detail-dialog,.prompt-detail-dialog)>.section-head{gap:20px;margin-bottom:18px;align-items:flex-start}
.storefront #modal:is(.project-dialog,.prompt-detail-dialog)>.section-head h2{font-size:22px;line-height:1.35;text-wrap:balance;overflow-wrap:break-word;max-width:calc(100% - 48px)}
.storefront #modal>.section-head>.round{flex:none}
.storefront .project-dialog .project-detail{grid-template-columns:minmax(0,1fr) minmax(320px,340px);gap:28px}
.storefront .project-information{display:flex;flex-direction:column;gap:16px}
.storefront .project-information>*{margin:0}
.storefront .project-information h2{font-size:24px;line-height:1.35;text-wrap:balance;overflow-wrap:break-word}
.storefront .project-information .project-course{margin:0;padding:14px;gap:7px}
.storefront .project-course strong,.storefront .project-description{text-wrap:pretty;word-break:normal;overflow-wrap:break-word;line-height:1.65}
.storefront .project-description:empty,.storefront .project-login-note:empty{display:none}
.storefront .project-reactions{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:8px;align-items:center}
.storefront .project-reactions>button{display:inline-flex;justify-content:center;align-items:center;gap:7px;white-space:nowrap;min-height:40px;padding:9px 12px;font-size:12px}
.storefront .project-thumbs{justify-content:center;gap:8px;margin-top:10px}
.storefront .project-image-controls{gap:14px;margin:12px 0 0}
.storefront .project-image-controls button{white-space:nowrap;min-height:38px}
.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .free-detail{grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr);gap:28px;align-items:start}
.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .free-detail-media{min-width:0;display:grid;gap:18px}
.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .free-detail-info{min-width:0;display:flex;flex-direction:column;gap:14px;overflow-wrap:break-word}
.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .free-detail-info>*{margin:0}
.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .free-detail-info>.project-saved-filter{align-self:flex-start}
.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .author-credit{padding:12px;gap:12px;align-items:center}
.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .author-credit strong{text-wrap:balance}
.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .free-detail-info>p{text-wrap:pretty;line-height:1.65;white-space:pre-wrap}
.storefront .resource-detail-dialog .free-detail-info dl{padding:14px 0;gap:12px}
.storefront .resource-detail-dialog .free-detail-info dl>div{grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr);gap:18px}
.storefront .resource-detail-dialog .free-detail-info dt{white-space:nowrap}
.storefront .resource-detail-dialog .free-detail-info dd{text-wrap:pretty;overflow-wrap:break-word}
.storefront .resource-detail-title{text-wrap:balance}
.storefront .prompt-detail-dialog .taxonomy-tags{display:flex;flex-wrap:wrap;gap:6px}
.storefront .prompt-detail-dialog .taxonomy-tags:empty{display:none}
.storefront .prompt-detail-dialog .free-prompt-box{margin:0}
.storefront .prompt-detail-dialog .free-detail-prompt{min-height:150px;max-height:min(34dvh,290px);white-space:pre-wrap;word-break:normal;overflow-wrap:break-word;line-height:1.65;text-wrap:pretty}
.storefront .prompt-detail-dialog .free-prompt-toolbar{padding:9px 12px}
.storefront .prompt-detail-dialog .free-prompt-toolbar button{white-space:nowrap}
.storefront .prompt-detail-dialog .prompt-ai-tools{margin:0}
.storefront .prompt-detail-dialog .ai-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.storefront .prompt-detail-dialog .ai-tools article{min-width:0}
.storefront .prompt-detail-dialog .ai-tools .secondary{white-space:nowrap;padding:10px 12px;gap:7px;min-height:40px;font-size:12px}
@media(max-width:800px){
 .storefront #modal:is(.project-dialog,.resource-detail-dialog,.prompt-detail-dialog){width:calc(100vw - 24px);padding:18px;max-height:92dvh}
 .storefront .project-dialog .project-detail,.storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .free-detail{grid-template-columns:minmax(0,1fr);gap:22px}
 .storefront .project-dialog .project-information{max-height:none;overflow:visible}
 .storefront :is(.prompt-detail-dialog,.resource-detail-dialog) .free-detail-preview{max-height:42dvh}
}
@media(max-width:380px){.storefront .project-reactions{grid-template-columns:repeat(2,minmax(0,1fr))}.storefront .project-reactions>button:last-child{grid-column:1/-1}.storefront .prompt-detail-dialog .ai-tools{grid-template-columns:1fr}}

/* One saved state for thumbnails, detail dialogs and saved-only filters. */
.storefront :is(.free-quick-save,.project-saved-filter,[data-act="project-save"])[aria-pressed="true"]{background:#fff!important;border-color:#fff!important;color:#111!important;box-shadow:0 2px 9px #0002}
.storefront :is(.free-quick-save,.project-saved-filter,[data-act="project-save"])[aria-pressed="true"] .icon{color:#111!important;stroke:#111!important;fill:none!important}
.storefront :is(.free-quick-save,.project-saved-filter,[data-act="project-save"])[aria-pressed="true"]:hover{background:#e9e9ed!important;border-color:#e9e9ed!important;color:#111!important}

/* Legible primary navigation with clear current-page and keyboard states. */
.storefront #top>.store-nav{gap:4px;padding:4px;background:#1b1d23;border-color:#ffffff25}
.storefront #top>.store-nav a{font-size:13px;line-height:1.35;font-weight:600;letter-spacing:0;min-height:42px;padding:10px 12px;gap:8px;color:#d5d7df;transition:background .18s,border-color .18s,color .18s;transform:none}
.storefront #top>.store-nav a>.icon{width:17px;height:17px;stroke-width:1.8;color:#fff;flex:none}
.storefront #top>.store-nav a.active{color:#fff;background:#353840;border-color:#838792;font-weight:700;box-shadow:inset 0 1px 0 #ffffff12}
.storefront #top>.store-nav a:hover{background:#2b2e36;color:#fff;transform:none}
.storefront #top>.store-nav a:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media(min-width:1101px){.storefront #top{padding-inline:clamp(24px,4vw,64px);grid-template-columns:minmax(130px,1fr) max-content minmax(145px,1fr);column-gap:16px}.storefront #top>.store-nav a{padding-inline:11px}}
@media(min-width:701px) and (max-width:1100px){
 .storefront #top{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;height:auto;min-height:116px;padding:10px 24px;gap:8px 16px}
 .storefront #top>.logo{grid-column:1;grid-row:1;justify-self:start}
 .storefront #top>.tools{grid-column:2;grid-row:1;justify-self:end;margin-left:0}
 .storefront #top>.store-nav{grid-column:1/-1;grid-row:2;justify-self:center;justify-content:center;max-width:100%;overflow-x:auto;scrollbar-width:none}
}
@media(max-width:700px){
 .storefront #top>.store-nav{width:calc(100vw - 16px);max-width:640px;display:flex;align-items:stretch;gap:2px;padding:5px;border-radius:20px;background:#1b1d24f5;border-color:#ffffff35;bottom:max(8px,env(safe-area-inset-bottom));overflow:visible}
 .storefront #top>.store-nav a{flex:1 1 0;min-width:0;min-height:58px;max-width:none;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:5px 3px;border-radius:14px;font-size:11px;line-height:1.25;white-space:normal;text-align:center}
 .storefront #top>.store-nav a>span{text-wrap:balance;word-break:normal;overflow-wrap:normal}
 .storefront #top>.store-nav a>.icon{width:20px;height:20px}
 .storefront main{padding-bottom:100px}
}
