.pc-tier-palette {
    position: fixed;
    z-index: 2147483646;
    box-sizing: border-box;
    width: min(228px, calc(100vw - 16px));
    max-height: calc(100dvh - 16px);
    overflow: auto;
    padding: 12px;
    border: 1px solid #cad2d9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 20px #18233130;
    color: #253443;
    font: 13px/1.35 system-ui, sans-serif;
}
.pc-tier-palette[hidden] { display: none; }
.pc-palette-heading, .pc-palette-custom, .pc-palette-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pc-palette-heading { justify-content: space-between; margin-bottom: 8px; }
.pc-tier-palette label { display: grid; gap: 3px; margin: 0; color: #455464; font-size: 12px; }
.pc-tier-palette :is(button,select,input) {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    height: 30px;
    margin: 0;
    padding: 2px 6px;
    border: 1px solid #c8d1d9;
    border-radius: 4px;
    background: #fff;
    color: #253443;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
}
.pc-tier-palette button { cursor: pointer; }
.pc-tier-palette select, .pc-tier-palette input[type=text] { width: 100%; }
.pc-tier-palette input[type=color] { width: 38px; flex: none; padding: 2px; }
.pc-tier-palette [data-close] { height: 24px; width: 24px; border: 0; font-size: 18px; line-height: 1; }
.pc-palette-swatches { display: grid; grid-template-columns: repeat(6,1fr); gap: 5px; margin: 10px 0; }
.pc-palette-swatches button { height: 22px; border: 1px solid #0002; background: var(--pc-preset); }
.pc-palette-swatches button[aria-pressed=true] { outline: 1px solid #253443; outline-offset: 1px; }
.pc-palette-actions { justify-content: space-between; margin-top: 10px; }
.pc-tier-palette button:disabled { cursor: default; opacity: .5; }
[data-pc-palette-tier] { -webkit-touch-callout: none; user-select: none; }

g[data-pc-palette-tier] { pointer-events: bounding-box; -webkit-tap-highlight-color: transparent; }
[data-pc-palette-tier]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
[data-pc-palette-tier]:focus-visible { outline: 1px solid #637a91; outline-offset: 1px; }
