:root{--studio-theme-overlay:.8;--studio-theme-canvas:none;--studio-theme-navigation:none;--studio-theme-editor:none;--studio-theme-collaboration:none}
:root[data-studio-theme="on"] body{background-image:linear-gradient(rgba(10,12,11,var(--studio-theme-overlay)),rgba(10,12,11,var(--studio-theme-overlay))),var(--studio-theme-canvas);background-size:cover;background-position:center;background-attachment:fixed}
:root[data-studio-theme="on"] .rail,:root[data-studio-theme="on"] .sidebar{background-image:linear-gradient(rgba(13,16,15,var(--studio-theme-overlay)),rgba(13,16,15,var(--studio-theme-overlay))),var(--studio-theme-navigation)!important;background-size:cover;background-position:center}
:root[data-studio-theme="on"] .main,:root[data-studio-theme="on"] .project-library{background-image:linear-gradient(rgba(12,15,14,var(--studio-theme-overlay)),rgba(12,15,14,var(--studio-theme-overlay))),var(--studio-theme-canvas);background-size:cover;background-position:center}
:root[data-studio-theme="on"] .conversation-panel,:root[data-studio-theme="on"] .doc-paper,:root[data-studio-theme="on"] .editor-center,:root[data-studio-theme="on"] .prompt-detail{background-image:linear-gradient(rgba(13,16,14,var(--studio-theme-overlay)),rgba(13,16,14,var(--studio-theme-overlay))),var(--studio-theme-editor);background-size:cover;background-position:center}
:root[data-studio-theme="on"] .context-panel,:root[data-studio-theme="on"] .team-panel{background-image:linear-gradient(rgba(14,17,15,var(--studio-theme-overlay)),rgba(14,17,15,var(--studio-theme-overlay))),var(--studio-theme-collaboration);background-size:cover;background-position:center}
.theme-ambience{position:fixed;z-index:0;inset:-35%;pointer-events:none;opacity:0;filter:blur(46px);transition:opacity .8s ease;background-size:180% 180%;}
:root[data-theme-motion="aurora"] .theme-ambience{opacity:.22;background-image:radial-gradient(ellipse at 18% 28%,#5c66e6 0,transparent 35%),radial-gradient(ellipse at 78% 42%,#35c5bd 0,transparent 31%),radial-gradient(ellipse at 54% 78%,#bd65c8 0,transparent 34%);animation:studioAurora 32s ease-in-out infinite alternate}
:root[data-theme-motion="embers"] .theme-ambience{opacity:.23;filter:none;background-image:radial-gradient(2px 2px at 12% 78%,#f1ae63 98%,transparent),radial-gradient(2px 2px at 28% 54%,#e9824e 98%,transparent),radial-gradient(1.5px 1.5px at 46% 88%,#ffd288 98%,transparent),radial-gradient(2px 2px at 67% 70%,#f38b52 98%,transparent),radial-gradient(1.5px 1.5px at 83% 82%,#f1c17a 98%,transparent),radial-gradient(ellipse at 50% 100%,#7c392d44,transparent 62%);background-size:100% 100%;animation:studioEmbers 24s linear infinite}
:root[data-theme-motion="stardust"] .theme-ambience{opacity:.2;filter:none;background-image:radial-gradient(1px 1px at 12% 15%,#d9eaff 98%,transparent),radial-gradient(1px 1px at 31% 42%,#88cafa 98%,transparent),radial-gradient(1.5px 1.5px at 55% 19%,#e7d7ff 98%,transparent),radial-gradient(1px 1px at 75% 63%,#a1dcf5 98%,transparent),radial-gradient(1px 1px at 91% 34%,#f3e7ff 98%,transparent),radial-gradient(ellipse at 60% 35%,#426eb455,transparent 55%);background-size:100% 100%;animation:studioStars 42s ease-in-out infinite alternate}
@keyframes studioAurora{from{transform:translate3d(-4%,1%,0) rotate(-3deg) scale(.95)}to{transform:translate3d(4%,-2%,0) rotate(4deg) scale(1.05)}}
@keyframes studioEmbers{from{background-position:0 0}to{background-position:0 -180px}}
@keyframes studioStars{from{transform:translate3d(-1%,0,0);background-position:0 0}to{transform:translate3d(2%,-1%,0);background-position:22px -16px}}
@media(prefers-reduced-motion:reduce){.theme-ambience{animation:none!important;transition:none!important}}
.top-actions #theme-studio{flex-shrink:0;padding:7px 9px;font-size:9px}
.theme-studio-modal{width:min(1040px,calc(100% - 24px));max-height:92vh;overflow:auto;padding:20px 22px}
.theme-studio-modal #modal-fields{max-height:calc(92vh - 90px);overflow:auto;padding:0 3px 5px}
.theme-studio-modal .modal-actions{display:none!important}
.theme-studio-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:2px 0 17px;border-bottom:1px solid #303730}
.theme-studio-intro p{margin:7px 0 0;color:#929c91;font-size:11px;line-height:1.55}
.theme-studio-intro .primary{white-space:nowrap}
.theme-library-section{padding:16px 0 5px}
.theme-library-section>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.theme-library-section>header div{display:grid;gap:4px}
.theme-library-section>header b{font:600 14px 'Playfair Display',serif;color:#e4e6df}
.theme-library-section>header small,.theme-library-empty{font-size:9px;color:#828c81}
.theme-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.theme-card{overflow:hidden;border:1px solid #343d35;border-radius:8px;background:#151a16}
.theme-card-art{height:130px;padding:12px;display:flex;align-items:flex-end;justify-content:space-between;background-size:cover;background-position:center;color:#f1f0e8}
.theme-card-art>div{display:grid;gap:4px;text-shadow:0 1px 8px #000}
.theme-card-art b{font:600 15px 'Playfair Display',serif}
.theme-card-art small{max-width:230px;color:#e0e3dc;font-size:9px;line-height:1.4}
.theme-card-mark{align-self:flex-start;color:#fff9;font-size:16px;text-shadow:0 0 12px #fff}
.theme-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 9px;color:#828b82;font-size:9px}
.theme-use-button{border:1px solid #3e4940;border-radius:5px;background:#202720;color:#d2dbce;padding:6px 9px;font-size:9px;cursor:pointer;white-space:nowrap}
.theme-use-button:hover{border-color:var(--theme-accent);color:#fff}
.theme-library-empty{padding:16px;border:1px dashed #374137;border-radius:7px;text-align:center}
.theme-builder-head{display:flex;align-items:center;gap:13px;margin:18px 0 12px}
.theme-builder-head>div{display:grid;gap:4px}
.theme-builder-head b{font:600 16px 'Playfair Display',serif}
.theme-builder-head small{font-size:9px;color:#8d978a;line-height:1.5}
.theme-builder-fields{display:grid;grid-template-columns:2fr 2fr 100px minmax(150px,1fr) 1fr;gap:9px}
.theme-field{display:grid;gap:6px;color:#9ea89b;font-size:9px}
.theme-field input,.theme-field select{width:100%;min-width:0;border:1px solid #384139;border-radius:5px;background:#111512;color:#dfe4dc;padding:8px;font:10px 'DM Sans',sans-serif}
.theme-field input[type=color]{height:34px;padding:3px}
.theme-field input[type=range]{padding:0;accent-color:var(--theme-accent)}
.theme-panel-uploads{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:14px}
.theme-panel-upload{display:grid;align-content:start;gap:7px;min-width:0;padding:9px;border:1px solid #343d35;border-radius:7px;background:#171c18}
.theme-panel-upload>span{font-size:9px;font-weight:700;color:#cbd2c8}
.theme-panel-upload input{width:100%;font-size:9px;color:#b6beb4}
.theme-panel-upload small{color:#788278;font-size:8px;line-height:1.4}
.theme-upload-preview{height:70px;display:grid;place-items:center;border:1px dashed #3d483e;border-radius:5px;background:#111512 center/cover no-repeat;color:#657064;font-size:9px;text-align:center}
.theme-upload-preview.has-image{color:transparent}
.theme-builder-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:13px;padding-top:12px;border-top:1px solid #303730}
.theme-builder-actions .primary{font-size:10px}
@media(max-width:760px){.theme-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-builder-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-panel-uploads{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:510px){.theme-studio-modal{padding:15px}.theme-studio-intro{align-items:flex-start;flex-direction:column}.theme-card-grid{grid-template-columns:1fr}.theme-card-art{height:110px}.theme-builder-head{align-items:flex-start;flex-direction:column}.theme-builder-fields{grid-template-columns:1fr 1fr}.theme-panel-uploads{grid-template-columns:1fr 1fr}.top-actions .theme-picker{gap:2px;padding:3px 5px}.top-actions .theme-picker select{max-width:46px}}

/* Fifty still backgrounds receive their own tempo and layered ambience effect. */
:root[data-studio-theme="on"][data-photo-motion="on"] body{background-size:cover,cover;background-position:center center,50% 50%;animation:studioPhotoDrift var(--studio-motion-duration,32s) ease-in-out var(--studio-motion-delay,0s) infinite alternate}
@keyframes studioPhotoDrift{0%{background-position:center center,48% 50%}100%{background-position:center center,52% 50%}}
.theme-search{position:sticky;top:-1px;z-index:2;display:flex;align-items:center;gap:8px;margin:13px 0 5px;padding:8px 11px;border:1px solid #374139;border-radius:7px;background:#111512;color:#95a396}
.theme-search input{width:100%;border:0;outline:0;background:transparent;color:#edf0e9;font:11px 'DM Sans',sans-serif}
.theme-search input::placeholder{color:#69756c}
.theme-card[hidden],.theme-library-section[hidden]{display:none}
.theme-card-art{position:relative;overflow:hidden;isolation:isolate}
.theme-card-art:before{content:"";position:absolute;inset:-4%;z-index:0;background:inherit;background-size:cover;background-position:center;animation:studioCardDrift 24s ease-in-out infinite alternate}
.theme-card-art>*{position:relative;z-index:1}
@keyframes studioCardDrift{from{transform:scale(1.02);background-position:47% center}to{transform:scale(1.09);background-position:53% center}}
.theme-ambience{background-repeat:no-repeat;mix-blend-mode:screen}
:root[data-theme-motion="mist"] .theme-ambience{opacity:.17;background-image:radial-gradient(ellipse at 15% 62%,#b6d4ca 0,transparent 38%),radial-gradient(ellipse at 74% 45%,#7da5bd 0,transparent 39%),radial-gradient(ellipse at 44% 82%,#b4a6c7 0,transparent 36%);animation:studioMist var(--studio-motion-duration,34s) ease-in-out var(--studio-motion-delay,0s) infinite alternate}
:root[data-theme-motion="snowfall"] .theme-ambience{opacity:.25;filter:none;background-image:radial-gradient(2px 2px at 13% 12%,#f4f7ff 98%,transparent),radial-gradient(1px 1px at 31% 45%,#d8eaff 98%,transparent),radial-gradient(2px 2px at 57% 24%,#fff 98%,transparent),radial-gradient(1px 1px at 78% 62%,#e2ecfa 98%,transparent),radial-gradient(1.5px 1.5px at 90% 84%,#fff 98%,transparent);background-size:100% 100%;animation:studioSnow var(--studio-motion-duration,36s) linear var(--studio-motion-delay,0s) infinite}
:root[data-theme-motion="fireflies"] .theme-ambience{opacity:.32;filter:none;background-image:radial-gradient(3px 3px at 17% 39%,#f6e59b 48%,transparent 70%),radial-gradient(2px 2px at 38% 72%,#d4ee96 45%,transparent 70%),radial-gradient(3px 3px at 63% 31%,#ffedaa 48%,transparent 70%),radial-gradient(2px 2px at 81% 64%,#d6ee90 45%,transparent 70%),radial-gradient(ellipse at 50% 70%,#b4d87a22,transparent 55%);animation:studioFireflies var(--studio-motion-duration,32s) ease-in-out var(--studio-motion-delay,0s) infinite alternate}
:root[data-theme-motion="leaves"] .theme-ambience{opacity:.16;filter:none;background-image:radial-gradient(ellipse 7px 3px at 18% 28%,#b6c879 45%,transparent 55%),radial-gradient(ellipse 7px 3px at 39% 62%,#77a96d 45%,transparent 55%),radial-gradient(ellipse 7px 3px at 64% 34%,#d5c47a 45%,transparent 55%),radial-gradient(ellipse 7px 3px at 83% 71%,#8fb879 45%,transparent 55%);animation:studioLeaves var(--studio-motion-duration,38s) ease-in-out var(--studio-motion-delay,0s) infinite alternate}
:root[data-theme-motion="rain"] .theme-ambience{opacity:.15;filter:none;background-image:repeating-linear-gradient(108deg,transparent 0 54px,#9fcbda22 55px,#9fcbda22 56px,transparent 57px 110px),linear-gradient(180deg,#192d3b00,#62839822);animation:studioRain 13s linear var(--studio-motion-delay,0s) infinite}
:root[data-theme-motion="moonlight"] .theme-ambience{opacity:.24;background-image:radial-gradient(ellipse at 72% 18%,#f1e8cb 0,transparent 10%),radial-gradient(ellipse at 72% 18%,#b3c7d5 0,transparent 43%),linear-gradient(118deg,transparent 45%,#c3d9e51c 52%,transparent 66%);animation:studioMoonlight var(--studio-motion-duration,40s) ease-in-out var(--studio-motion-delay,0s) infinite alternate}
:root[data-theme-motion="runes"] .theme-ambience{opacity:.17;background-image:repeating-radial-gradient(ellipse at 52% 48%,transparent 0 54px,#b5a2e333 55px,#b5a2e333 56px,transparent 57px 93px),radial-gradient(ellipse at 48% 48%,#846ac633,transparent 53%);animation:studioRunes var(--studio-motion-duration,28s) linear var(--studio-motion-delay,0s) infinite}
@keyframes studioMist{from{transform:translate3d(-3%,2%,0) scale(.98);background-position:0 0}to{transform:translate3d(3%,-2%,0) scale(1.04);background-position:50px -25px}}
@keyframes studioSnow{from{transform:translateY(-24px);background-position:0 0}to{transform:translateY(24px);background-position:16px 120px}}
@keyframes studioFireflies{from{transform:translate3d(-1%,1%,0);filter:brightness(.85)}to{transform:translate3d(2%,-2%,0);filter:brightness(1.3)}}
@keyframes studioLeaves{from{transform:translate3d(-2%,-1%,0) rotate(-2deg);background-position:0 0}to{transform:translate3d(3%,3%,0) rotate(2deg);background-position:70px 90px}}
@keyframes studioRain{from{background-position:0 -180px}to{background-position:0 360px}}
@keyframes studioMoonlight{from{transform:translateX(-2%) scale(.98);filter:brightness(.8)}to{transform:translateX(2%) scale(1.04);filter:brightness(1.12)}}
@keyframes studioRunes{from{transform:rotate(0) scale(.96)}to{transform:rotate(18deg) scale(1.05)}}
:root[data-theme-motion="aurora"] .theme-ambience,:root[data-theme-motion="embers"] .theme-ambience,:root[data-theme-motion="stardust"] .theme-ambience{animation-duration:var(--studio-motion-duration,32s);animation-delay:var(--studio-motion-delay,0s)}
@media(prefers-reduced-motion:reduce){:root[data-studio-theme="on"][data-photo-motion="on"] body,.theme-card-art:before,.theme-ambience{animation:none!important}}

/* Browse flow: orient first, filter by mood, then reveal a light page of previews. */
.theme-studio-modal{width:min(1120px,calc(100% - 24px));padding:19px 22px 16px}
.theme-studio-modal #modal-fields{max-height:calc(92vh - 72px);padding:0 3px 3px}
.theme-studio-intro{padding-bottom:13px}
.theme-studio-intro .eyebrow{color:#9baf9d;letter-spacing:.16em}
.theme-studio-intro p{max-width:520px;font-size:11px}
.theme-sync-note{margin-top:10px;padding:8px 11px;border:1px solid #6b5937;border-radius:6px;background:#3b2f1b55;color:#d8c18f;font-size:10px}
.theme-current-preview{min-height:75px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:13px 0 12px;padding:12px 15px;border:1px solid #59634d;border-radius:8px;background-position:center;background-size:cover;box-shadow:inset 0 0 0 1px #12161088}
.theme-current-preview>div{display:grid;gap:3px;text-shadow:0 1px 8px #000}
.theme-current-preview>div>span{font-size:8px;letter-spacing:.17em;color:#d1d4c9}
.theme-current-preview b{font:600 18px 'Playfair Display',serif;color:#f1f0e8}
.theme-current-preview small{font-size:10px;color:#d4d9d0}
.theme-current-check{align-self:flex-start;padding:5px 8px;border:1px solid #c5b16b88;border-radius:20px;background:#111712aa;color:#dfd49e;font-size:9px;white-space:nowrap}
.theme-browser-tools{display:grid;grid-template-columns:minmax(220px,1fr) auto;align-items:center;gap:13px}
.theme-search{position:relative;top:auto;margin:0;padding:9px 12px}
.theme-results{color:#9ba698;font-size:9px;white-space:nowrap}
.theme-category-tabs{position:sticky;top:0;z-index:3;display:flex;gap:6px;overflow-x:auto;margin:10px -2px 9px;padding:5px 2px 8px;background:#111411ee;scrollbar-width:thin}
.theme-category-tabs button{display:inline-flex;align-items:center;gap:7px;flex:none;padding:7px 10px;border:1px solid #343e35;border-radius:20px;background:#171c18;color:#aeb8ac;font:500 9px 'DM Sans',sans-serif;cursor:pointer;white-space:nowrap}
.theme-category-tabs button span{display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;border-radius:10px;background:#242c25;color:#aab6a8;font-size:8px}
.theme-category-tabs button:hover{border-color:#62725e;color:#eef1e8}
.theme-category-tabs button[aria-pressed=true]{border-color:var(--theme-accent,#9cba83);background:color-mix(in srgb,var(--theme-accent,#9cba83) 14%,#171c18);color:#f0f3e9}
.theme-category-tabs button[aria-pressed=true] span{background:#344337;color:#f0f3e9}
.theme-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.theme-card{transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.theme-card:hover{transform:translateY(-2px);border-color:#65745f;box-shadow:0 9px 24px #0005}
.theme-card-art{height:145px;padding:10px 11px;background-position:center 48%}
.theme-card-art>div{display:block;text-shadow:none}
.theme-card-badges{position:absolute;inset:8px 8px auto;display:flex!important;justify-content:space-between;gap:6px}
.theme-card-badges span{max-width:65%;overflow:hidden;padding:4px 7px;border:1px solid #ffffff27;border-radius:14px;background:#090d0bb5;color:#e1e6de;font-size:8px;line-height:1.1;text-overflow:ellipsis;white-space:nowrap;backdrop-filter:blur(8px)}
.theme-card-badges span+span{max-width:45%;color:#d7d1aa}
.theme-card-caption{display:grid!important;gap:3px;text-shadow:0 1px 8px #000!important}
.theme-card-caption b{font:600 15px 'Playfair Display',serif;color:#f2f0e8}
.theme-card-caption small{max-width:270px;overflow:hidden;color:#e0e3dc;font-size:9px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.theme-card-foot{min-height:39px;padding:7px 9px}
.theme-card-foot>span{max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.theme-use-button{padding:6px 11px;transition:background .15s ease,border-color .15s ease}
.theme-use-button.is-active{border-color:#768263;background:#303b2e;color:#e7eddb}
.theme-browser-footer{display:flex;justify-content:center;gap:8px;min-height:39px;padding:9px 0 2px}
.theme-browser-footer button{min-width:116px}
.theme-browser-footer button[hidden]{display:none}
.theme-empty-state{display:grid;gap:5px;padding:30px 12px;border:1px dashed #3a453b;border-radius:8px;text-align:center}
.theme-empty-state b{font:600 15px 'Playfair Display',serif;color:#d7ddd2}
.theme-empty-state span{font-size:10px;color:#859084}
.theme-empty-state[hidden]{display:none}
.theme-card-art:before{animation:none}
.theme-card:hover .theme-card-art:before{animation:studioCardDrift 18s ease-in-out infinite alternate}
@media(max-width:760px){.theme-studio-modal{padding:15px}.theme-current-preview{min-height:70px}.theme-category-tabs{margin-top:8px}.theme-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:510px){.theme-browser-tools{grid-template-columns:1fr;gap:6px}.theme-results{text-align:right}.theme-current-preview{padding:10px}.theme-card-grid{grid-template-columns:1fr}.theme-card-art{height:124px}.theme-card-badges span{font-size:7px}}
@media(prefers-reduced-motion:reduce){.theme-card,.theme-card-art:before{transition:none!important;animation:none!important}.theme-card:hover{transform:none}}

/* Theme dialog: one fixed frame, compact top row, scrollable content without a gutter. */
.theme-studio-modal{width:min(1140px,calc(100vw - 28px));height:min(860px,calc(100dvh - 28px));max-height:calc(100dvh - 28px);display:flex;flex-direction:column;overflow:hidden;padding:0}
.theme-studio-modal #modal-form{height:100%;min-height:0;display:flex;flex-direction:column}
.theme-studio-modal .modal-top{position:absolute;top:14px;right:17px;z-index:8;padding:0}
.theme-studio-modal .modal-top>.eyebrow,.theme-studio-modal #modal-title{display:none}
.theme-studio-modal .modal-top .icon-button{width:31px;height:31px;display:grid;place-items:center;border:1px solid #ffffff23;border-radius:8px;background:#101411bf;color:#dce2d9;font-size:19px;backdrop-filter:blur(8px)}
.theme-studio-modal #modal-fields{flex:1;min-height:0;max-height:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;padding:18px 22px 14px}
.theme-studio-modal #modal-fields::-webkit-scrollbar{display:none;width:0;height:0}
.theme-studio-modal .theme-studio-intro{padding-right:40px;padding-bottom:10px}
.theme-studio-modal .theme-studio-intro p{margin-top:4px}
.theme-layout-panel{margin:10px 0 7px;padding:10px 11px;border:1px solid #303a31;border-radius:8px;background:#101411b8}
.theme-layout-panel>header{display:flex;align-items:baseline;gap:9px;margin:0 0 8px}
.theme-layout-panel>header b{font:600 12px 'Playfair Display',serif;color:#e3e8df}
.theme-layout-panel>header small{font-size:9px;color:#818d82}
.theme-appearance-panel{margin:9px 0 12px;padding:12px 14px;border:1px solid #39463d;border-radius:9px;background:#111a15e8}
.theme-appearance-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.theme-appearance-panel>header b,.theme-appearance-panel>header small{display:block}
.theme-appearance-panel>header b{font:600 14px 'Playfair Display',serif;color:#e5e9df}
.theme-appearance-panel>header small,.theme-appearance-hint{font-size:10px;color:#9ca99c}
.theme-appearance-controls{display:grid;grid-template-columns:repeat(3,minmax(95px,1fr)) minmax(185px,2fr);gap:10px;align-items:end}
.theme-appearance-controls label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px 9px;min-width:0;color:#c4d0c2;font-size:11px}
.theme-appearance-controls input[type=color]{width:42px;height:31px;padding:2px;border:1px solid #526454;border-radius:7px;background:#172019;cursor:pointer}
.theme-appearance-controls .theme-opacity-label{display:flex;flex-wrap:wrap;align-content:center}
.theme-opacity-label output{margin-left:auto;color:var(--theme-accent-strong)}
.theme-opacity-label input{width:100%;accent-color:var(--theme-accent);cursor:pointer}
.theme-appearance-hint{display:block;margin-top:8px}
@media(max-width:750px){.theme-appearance-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}
.theme-layout-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.theme-layout-choice{display:grid;gap:3px;min-width:0;padding:7px 9px;border:1px solid #384239;border-radius:7px;background:#171c18;color:#c2cbc0;text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
.theme-layout-choice:hover{border-color:#71806b}
.theme-layout-choice.active{border-color:var(--theme-accent,#a6be87);background:color-mix(in srgb,var(--theme-accent,#a6be87) 12%,#171c18);color:#f0f2ec;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--theme-accent,#a6be87) 25%,transparent)}
.theme-layout-choice b{font-size:10px}
.theme-layout-choice small{font-size:8px;line-height:1.3;color:#899489}
.theme-anchor-frames{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:8px}
.theme-anchor-hint{grid-column:1/-1;margin:0;color:#879286;font-size:8px;line-height:1.35}
.theme-anchor-frame{display:grid;grid-template-columns:minmax(0,1fr) 54px;align-items:center;gap:7px;min-width:0;padding:6px;border:1px solid #333d34;border-radius:7px;background:#171c18}
.theme-anchor-art{position:relative;display:flex;align-items:flex-end;min-width:0;height:78px;overflow:hidden;border-radius:5px;background-color:#101512;background-size:cover;color:#eef0e9}
.theme-anchor-art b{width:100%;padding:6px 5px;background:linear-gradient(transparent,#080b0bdd);font-size:8px;line-height:1.2;text-shadow:0 1px 5px #000}
.theme-anchor-controls{display:grid;justify-items:center;gap:4px}
.theme-anchor-controls>small{font-size:7px;color:#96a094;text-align:center}
.theme-anchor-pad{display:grid;grid-template-columns:repeat(3,14px);gap:2px;padding:3px;border:1px solid #39433a;border-radius:5px;background:#101411}
.theme-anchor-pad button{width:14px;height:14px;display:grid;place-items:center;padding:0;border:0;border-radius:3px;background:transparent;cursor:pointer}
.theme-anchor-pad button:hover,.theme-anchor-pad button[aria-pressed=true]{background:#374337}
.theme-anchor-pad i{width:4px;height:4px;border-radius:50%;background:#7f8c80}
.theme-anchor-pad button[aria-pressed=true] i{width:6px;height:6px;background:var(--theme-accent,#c6a96a);box-shadow:0 0 6px var(--theme-accent,#c6a96a)}
.theme-browser{margin-top:7px}
.theme-browser-tools{gap:8px}
.theme-category-tabs{margin-top:6px;margin-bottom:6px;padding-top:3px;padding-bottom:5px}
.theme-card-scroll{max-height:min(48vh,420px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#687864 #171c18;padding-right:4px}
.theme-card-scroll:focus-visible{outline:2px solid var(--theme-accent,#a6be87);outline-offset:2px}
.theme-card-grid{gap:8px}
.theme-card-art{height:118px}
.theme-card-foot{min-height:34px}
.theme-browser-footer{min-height:32px;padding-top:6px}
@media(max-width:800px){.theme-anchor-frames{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.theme-studio-modal{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}.theme-studio-modal #modal-fields{padding:13px 12px 10px}.theme-layout-panel>header{display:grid;gap:2px}.theme-layout-controls{gap:4px}.theme-layout-choice{padding:6px}.theme-layout-choice small{font-size:7px}.theme-anchor-frames{grid-template-columns:1fr 1fr}.theme-anchor-art{height:66px}.theme-card-scroll{max-height:40dvh}}
@media(max-width:390px){.theme-anchor-frames{grid-template-columns:1fr}.theme-anchor-frame{grid-template-columns:minmax(0,1fr) 58px}}

/* Full keeps one continuous image behind all frames; other modes retain panel images. */
:root[data-studio-theme="on"] body{background-position:var(--studio-theme-canvas-position,center);}
:root[data-studio-theme="on"] .rail,:root[data-studio-theme="on"] .sidebar{background-position:var(--studio-theme-navigation-position,center)!important}
:root[data-studio-theme="on"] .main,:root[data-studio-theme="on"] .project-library{background-position:var(--studio-theme-canvas-position,center)}
:root[data-studio-theme="on"] .conversation-panel,:root[data-studio-theme="on"] .doc-paper,:root[data-studio-theme="on"] .editor-center,:root[data-studio-theme="on"] .prompt-detail{background-position:var(--studio-theme-editor-position,center)}
:root[data-studio-theme="on"] .context-panel,:root[data-studio-theme="on"] .team-panel{background-position:var(--studio-theme-collaboration-position,center)}
:root[data-studio-theme="on"] .studio-editor{background:rgba(8,11,10,.5)}
:root[data-studio-theme="on"][data-studio-image-mode="full"] .rail,:root[data-studio-theme="on"][data-studio-image-mode="full"] .sidebar,:root[data-studio-theme="on"][data-studio-image-mode="full"] .main,:root[data-studio-theme="on"][data-studio-image-mode="full"] .project-library,:root[data-studio-theme="on"][data-studio-image-mode="full"] .topbar,:root[data-studio-theme="on"][data-studio-image-mode="full"] .editor-topbar,:root[data-studio-theme="on"][data-studio-image-mode="full"] .format-toolbar,:root[data-studio-theme="on"][data-studio-image-mode="full"] .conversation-panel,:root[data-studio-theme="on"][data-studio-image-mode="full"] .doc-paper,:root[data-studio-theme="on"][data-studio-image-mode="full"] .editor-center,:root[data-studio-theme="on"][data-studio-image-mode="full"] .prompt-detail,:root[data-studio-theme="on"][data-studio-image-mode="full"] .context-panel,:root[data-studio-theme="on"][data-studio-image-mode="full"] .team-panel,:root[data-studio-theme="on"][data-studio-image-mode="full"] .team-panel-head{background-image:linear-gradient(rgba(13,16,15,.32),rgba(13,16,15,.32))!important;background-color:transparent!important}
/* Compact studio header: flower opens Styles; the old color selector duplicates the library. */
.dev-app .theme-picker{display:none!important}
.style-flower-button{flex:0 0 38px;width:38px;height:38px;display:grid;place-items:center;padding:0;border:1px solid #d6bc8030;border-radius:50%;background:linear-gradient(145deg,#1c231e,#101411);color:var(--theme-accent,#d6bc80);cursor:pointer;transition:transform .2s,border-color .2s,background .2s,box-shadow .2s}
.style-flower-button svg{width:22px;height:22px;overflow:visible;filter:drop-shadow(0 0 5px color-mix(in srgb,currentColor 35%,transparent))}
.style-flower-button:hover{transform:rotate(12deg) scale(1.06);border-color:color-mix(in srgb,currentColor 70%,transparent);background:#222a23;box-shadow:0 0 18px color-mix(in srgb,currentColor 18%,transparent)}
.style-flower-button:focus-visible{outline:2px solid var(--theme-accent,#d6bc80);outline-offset:3px}
@media(max-width:700px){.style-flower-button{width:34px;height:34px;flex-basis:34px}.style-flower-button svg{width:20px;height:20px}}
.style-flower-button{flex-basis:30px;width:30px;height:30px}
.style-flower-button svg{width:19px;height:19px;filter:none}
@media(max-width:700px){.style-flower-button{flex-basis:28px;width:28px;height:28px}.style-flower-button svg{width:18px;height:18px}}
.top-actions #theme-studio{padding:0}
.style-flower-button:hover{color:var(--theme-accent-strong,var(--theme-accent,#d6bc80))}

/* Carry the chosen artwork into the immersive workbook editor. */
:root[data-studio-theme="on"] .editor-rail,:root[data-studio-theme="on"] .workbook-sidebar{background-image:linear-gradient(rgba(13,16,15,var(--studio-theme-overlay)),rgba(13,16,15,var(--studio-theme-overlay))),var(--studio-theme-navigation)!important;background-size:cover;background-position:var(--studio-theme-navigation-position,center)!important}
:root[data-studio-theme="on"] .editor-topbar{background-image:linear-gradient(rgba(13,16,15,var(--studio-theme-overlay)),rgba(13,16,15,var(--studio-theme-overlay))),var(--studio-theme-canvas);background-size:cover;background-position:var(--studio-theme-canvas-position,center)}
:root[data-studio-theme="on"] .format-toolbar{background-image:linear-gradient(rgba(13,16,15,var(--studio-theme-overlay)),rgba(13,16,15,var(--studio-theme-overlay))),var(--studio-theme-editor);background-size:cover;background-position:var(--studio-theme-editor-position,center)}
:root[data-studio-theme="on"] .editor-center,:root[data-studio-theme="on"] .doc-paper{background-position:var(--studio-theme-editor-position,center)}
:root[data-studio-theme="on"][data-studio-image-mode="full"] .studio-editor-app,:root[data-studio-theme="on"][data-studio-image-mode="full"] .editor-workarea{background:transparent!important}
:root[data-studio-theme="on"][data-studio-image-mode="full"] .editor-rail,:root[data-studio-theme="on"][data-studio-image-mode="full"] .workbook-sidebar{background-image:linear-gradient(rgba(13,16,15,.32),rgba(13,16,15,.32))!important;background-color:transparent!important}
.theme-section-controls{display:grid;align-content:center;justify-items:center;gap:7px;min-width:0}
.theme-section-controls>label{display:grid;gap:4px;width:100%;font-size:8px;color:#96a094}
.theme-section-controls select{width:100%;min-width:0;padding:5px 20px 5px 6px;border:1px solid #39433a;border-radius:5px;background:#101411;color:#dce3d9;font-size:8px;text-overflow:ellipsis}
.theme-anchor-frame{grid-template-columns:minmax(0,1fr) minmax(100px,136px)}
.theme-anchor-hint{font-size:9px;line-height:1.45}
@media(max-width:800px){.theme-anchor-frame{grid-template-columns:minmax(0,1fr) minmax(96px,128px)}}
@media(max-width:560px){.theme-anchor-frame{grid-template-columns:minmax(0,1fr) minmax(90px,115px)}}

/* Keep the style library button in the active palette; remove the quick style selector. */
.style-flower-button{border-color:color-mix(in srgb,var(--theme-accent,#d6bc80) 42%,transparent);background:linear-gradient(145deg,var(--theme-wash,rgba(214,188,128,.12)),#101411);color:var(--theme-accent,#d6bc80)}
.style-flower-button:hover{border-color:var(--theme-accent-strong,var(--theme-accent,#d6bc80));background:color-mix(in srgb,var(--theme-accent,#d6bc80) 16%,#101411);color:var(--theme-accent-strong,var(--theme-accent,#d6bc80));box-shadow:0 0 14px var(--theme-glow,rgba(214,188,128,.18))}
.theme-picker{display:none!important}
