.palette-toggle { position:fixed; bottom:20px; right:20px; z-index:20; border:1px solid #ffffff55; background:#17352f; color:#fff; border-radius:100px; padding:15px 22px; box-shadow:0 4px 24px #0003; font:600 15px Arial,sans-serif; cursor:pointer; }
.palette-dialog { box-sizing:border-box; width:min(440px,calc(100% - 24px)); max-height:85dvh; overflow:auto; margin:auto; padding:24px; border:1px solid #dedde4; border-radius:20px; background:#fff; color:#24212e; font:15px/1.5 Arial,sans-serif; box-shadow:0 20px 80px #0003; }
.palette-dialog::backdrop { background:#16132480; }
.palette-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.palette-head h2 { margin:0; font:500 28px Georgia,serif; }
.palette-head button { border:0; background:#f1f0f4; border-radius:50%; width:44px; height:44px; font-size:20px; cursor:pointer; color:#24212e; }
.palette-dialog p { margin:12px 0 18px; }
.palette-presets { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:18px 0; }
.palette-presets button { background:#fff; color:#24212e; border:1px solid #d4d1dc; border-radius:10px; padding:12px; text-align:left; font:14px Arial,sans-serif; cursor:pointer; }
.palette-presets button[aria-pressed="true"] { outline:2px solid #544273; outline-offset:1px; }
.palette-swatches { display:flex; margin:8px 0 0; }
.palette-swatches span { width:22px; height:18px; }
.palette-fields { display:grid; gap:8px; }
.palette-field { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #efedf2; padding:7px 0; }
.palette-field input { width:62px; height:44px; padding:4px; border:1px solid #d4d1dc; border-radius:8px; background:#fff; cursor:pointer; }
.palette-dialog .palette-note { font-size:13px; color:#615c6a; }
.palette-actions { display:flex; gap:10px; }
.palette-actions button { min-height:44px; padding:12px 16px; border:1px solid #d4d1dc; border-radius:9px; background:#f5f3f8; color:#24212e; font:600 14px Arial,sans-serif; cursor:pointer; }
.palette-actions #palette-copy { flex:1; background:#544273; color:white; border-color:#544273; }
#palette-status { margin:12px 0 0; min-height:1.5em; font-size:14px; }
@media (max-width:650px) { .palette-toggle { bottom:max(16px,env(safe-area-inset-bottom)); right:16px; } }
