/* Theme picker: compact visual previews and clear selection hierarchy. */
html[data-ui-theme] :is(#portfolio-theme-panel,#background-panel){
 position:absolute;z-index:30;box-sizing:border-box;border-radius:12px;
 background:linear-gradient(145deg,#13283e,#0b192b 70%);border:1px solid #49647e;
 box-shadow:0 16px 36px #0007;isolation:isolate;
}
:is(#portfolio-theme-panel,#background-panel) h2{font-size:19px;line-height:26px;font-weight:600;margin:0 0 18px;color:#eff6ff}
:is(#portfolio-theme-panel,#background-panel) :is(.portfolio-theme-options,.theme-choices){gap:12px}
:is(#portfolio-theme-panel,#background-panel) :is(.portfolio-theme-options,.theme-choices) button{
 position:relative;min-width:0;height:auto;padding:10px 10px 12px;gap:10px;
 background:#101f31;border:1px solid #354b62;border-radius:8px;box-shadow:none;
 color:#b5c9da;font-size:13px;font-weight:500;line-height:20px;
}
:is(#portfolio-theme-panel,#background-panel) :is(.portfolio-theme-options,.theme-choices) button:hover{background:#152a40;border-color:#6f9ab8}
:is(#portfolio-theme-panel,#background-panel) :is(.portfolio-theme-options,.theme-choices) [aria-pressed=true]{background:#123047;border-color:#54c9e4;color:#effbff;box-shadow:none}
:is(#portfolio-theme-panel,#background-panel) :is(.portfolio-theme-options,.theme-choices) [aria-pressed=true]::after{content:'✓';position:absolute;right:15px;top:15px;width:17px;height:17px;border-radius:50%;background:#63d8ee;color:#072030;font-size:12px;line-height:17px;font-weight:700;text-align:center}
:is(#portfolio-theme-panel,#background-panel) .theme-swatch{width:100%;height:78px;border:0;border-radius:5px;background:none}
:is(#portfolio-theme-panel,#background-panel) .theme-swatch svg{display:block;width:100%;height:100%}
:is(#portfolio-theme-panel,#background-panel) p{font-size:12px;line-height:18px;color:#96afc4;margin:14px 0 18px}
:is(#portfolio-theme-panel,#background-panel) .portfolio-theme-actions{border-top:1px solid #69849c30;padding-top:15px;gap:8px}
:is(#portfolio-theme-panel,#background-panel) .portfolio-theme-actions button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;line-height:1;height:33px;padding:0 14px;border-radius:5px;font-size:13px;background:#14263a;border:1px solid #47617a;color:#bfd0df;box-shadow:none}
:is(#portfolio-theme-panel,#background-panel) .portfolio-theme-actions [data-action=done]{background:#207a9c;border-color:#53b9d5;color:#fff;font-weight:600}
:is(#portfolio-theme-panel,#background-panel) .portfolio-theme-actions button:hover{filter:brightness(1.12)}
:is(#portfolio-theme-panel,#background-panel) button:focus-visible{outline:2px solid #b0eafa;outline-offset:3px}
:is(#portfolio-theme-panel,#background-panel) button:disabled{opacity:.5;cursor:wait}

html[data-ui-theme] #portfolio-theme-panel{width:354px;padding:22px;top:66px;right:79px;max-height:960px;overflow:auto}
html[data-ui-theme] #background-panel{width:308px;padding:19px;top:38px;right:0;border-radius:10px;max-height:750px;overflow:auto}
#portfolio-theme-panel .portfolio-theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#portfolio-theme-panel .portfolio-theme-options button{display:flex;flex-direction:column;align-items:center;justify-content:center}
#portfolio-theme-panel .portfolio-theme-actions{display:flex;justify-content:flex-end;gap:8px}
:is(#portfolio-theme-panel,#background-panel)[hidden]{display:none}
#background-panel .theme-settings{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #69849c30}
#background-panel .theme-settings h3{font-size:16.5px;line-height:23px;font-weight:600;margin:0 0 15px;color:#eff6ff}
#background-panel .theme-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#background-panel .theme-choices button{padding:9px;font-size:11.3px;line-height:17px}
#background-panel .theme-swatch{height:68px;outline:none!important}
#background-panel .theme-choices [aria-pressed=true]::after{right:12px;top:12px}
#background-panel h2{font-size:14px;line-height:20px;margin-bottom:12px}
#background-panel #background-close{background:#207a9c;border:1px solid #53b9d5;color:#fff;box-shadow:none}
#background-panel #background-cancel{background:#14263a;border:1px solid #47617a;color:#bfd0df;box-shadow:none}
