.ae-app .ae-color-dialog { position: fixed; inset: auto; z-index: 100020; width: min(340px, calc(100vw - 16px)); max-width: 340px; max-height: min(370px, calc(100dvh - 24px)); margin: 0; padding: 12px; overflow: auto; border: 1px solid #ccd8dc; border-radius: 13px; background: #fff; box-shadow: 0 10px 34px #10263726; color: var(--ae-navy); font-size: 12px; }
.ae-app .ae-color-dialog::backdrop { background: transparent; backdrop-filter: none; }
.ae-app .ae-color-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ae-app .ae-color-heading h2 { margin: 0; font-size: 14px; line-height: 1.3; letter-spacing: 0; }
.ae-app .ae-color-close { display: grid; place-items: center; width: 24px; height: 24px; min-width: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ae-muted); font-family: inherit; font-size: 21px; cursor: pointer; }
.ae-app .ae-color-close:hover { background: var(--ae-soft); }
.ae-app .ae-color-tabs { display: flex; gap: 3px; margin-bottom: 10px; padding: 2px; border-radius: 8px; background: #f0f4f5; }
.ae-app .ae-color-tabs button { flex: 1; min-width: 0; min-height: 26px; margin: 0; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: #526777; font-family: inherit; font-size: 10px; font-weight: 650; cursor: pointer; }
.ae-app .ae-color-tabs button[aria-selected="true"] { background: white; color: #143e49; box-shadow: 0 1px 4px #18323a15; }
.ae-app .ae-color-dialog [hidden] { display: none !important; }
.ae-app .ae-color-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 26px)); justify-content: space-between; gap: 6px; }
.ae-app .ae-color-swatch { display: block; width: 100%; aspect-ratio: 1; min-width: 0; height: auto; min-height: 0; padding: 0; border: 1px solid #18323a26; border-radius: 50%; box-shadow: inset 0 0 0 1px #ffffff30; cursor: pointer; }
.ae-app .ae-color-swatch:hover { outline: 2px solid #18323a70; outline-offset: 2px; }
.ae-app .ae-color-swatch[aria-pressed="true"] { outline: 2px solid var(--ae-teal); outline-offset: 2px; }
.ae-app .ae-color-saved-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; margin-bottom: 5px; }
.ae-app .ae-color-saved-heading h3 { margin: 0; color: var(--ae-muted); font-size: 10px; font-weight: 650; }
.ae-app .ae-color-saved-heading button { min-height: 20px; margin: 0; padding: 2px 6px; border: 0; border-radius: 5px; background: #eef5f6; color: #235960; font-family: inherit; font-size: 10px; cursor: pointer; }
.ae-app .ae-color-favorite { position: relative; min-width: 0; }
.ae-app .ae-color-remove { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 22px; height: 22px; min-width: 22px; margin: 0; padding: 0; border: 1px solid #c9d3d9; border-radius: 50%; background: white; color: #a33c35; font-family: inherit; font-size: 17px; cursor: pointer; box-shadow: 0 1px 3px #18323a25; }
.ae-app .ae-color-dialog .ae-color-empty { grid-column: 1 / -1; margin: 0; color: var(--ae-muted); font-size: 10px; line-height: 1.5; }
.ae-app .ae-color-dialog form { display: grid; gap: 10px; margin: 0; }
.ae-app .ae-color-custom { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 12px; align-items: center; }
.ae-app .ae-color-wheel { position: relative; width: 138px; height: 138px; margin: auto; flex-shrink: 0; touch-action: none; user-select: none; }
.ae-app .ae-color-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 19px), #000 calc(100% - 18px)); mask: radial-gradient(farthest-side, transparent calc(100% - 19px), #000 calc(100% - 18px)); }
.ae-app .ae-color-hue-thumb, .ae-app .ae-color-sv-thumb { position: absolute; z-index: 2; width: 12px; height: 12px; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #18323a, 0 1px 3px #18323a55; transform: translate(-50%, -50%); pointer-events: none; }
.ae-app .ae-color-square { position: absolute; inset: 24%; border-radius: 2px; background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); touch-action: none; box-shadow: 0 0 0 1px #18323a25; }
.ae-app .ae-color-controls { display: grid; gap: 4px; min-width: 0; }
.ae-app .ae-color-value { display: flex; align-items: flex-end; gap: 7px; min-width: 0; margin-bottom: 3px; }
.ae-app .ae-color-preview { display: block; width: 28px; height: 30px; flex: 0 0 28px; border: 1px solid #18323a40; border-radius: 6px; }
.ae-app .ae-color-value label { display: grid; gap: 2px; min-width: 0; color: var(--ae-muted); font-size: 9px; font-weight: 650; }
.ae-app .ae-color-value input { display: block; width: 100%; min-width: 0; height: 30px; min-height: 30px; margin: 0; padding: 5px; border: 1px solid var(--ae-line); border-radius: 6px; background: white; color: var(--ae-navy); font-family: ui-monospace, monospace; font-size: 11px; text-transform: uppercase; }
.ae-app .ae-color-value input[aria-invalid="true"] { border-color: #bd3e36; outline-color: #bd3e36; }
.ae-app .ae-color-range { display: grid; grid-template-columns: 53px minmax(25px, 1fr); gap: 4px; align-items: center; min-height: 22px; margin: 0; font-size: 9px; font-weight: 500; }
.ae-app .ae-color-range input { display: block; width: 100%; min-width: 0; height: 22px; margin: 0; padding: 0; accent-color: var(--ae-teal); cursor: pointer; }
.ae-app .ae-color-actions { display: flex; gap: 8px; justify-content: flex-end; }
.ae-app .ae-color-actions .ae-button { min-height: 32px; padding: 5px 10px; font-size: 10px; }
.ae-app .ae-color-dialog .ae-color-message { margin: 7px 0 0; color: var(--ae-muted); font-size: 10px; line-height: 1.4; }
.ae-app .ae-color-dialog .ae-color-message:empty { display: none; }
.ae-app .ae-color-dialog button:focus-visible, .ae-app .ae-color-dialog input:focus-visible { outline: 2px solid #1977b7; outline-offset: 2px; }
.ae-app button.ae-color-trigger.ae-custom-color { position: sticky; right: 0; display: grid; place-items: center; width: 43px; height: 43px; min-width: 43px; min-height: 43px; padding: 7px; border: 1px solid var(--ae-line); border-radius: 9px; background: var(--ae-paper); cursor: pointer; }
.ae-app .ae-color-wheel-icon { display: block; width: 25px; height: 25px; border: 2px solid white; border-radius: 50%; background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); box-shadow: 0 0 0 1px #18323a30; }
@media (max-width: 600px) { .ae-app .ae-color-dialog { max-height: min(370px, 55dvh); padding: 10px; } }
@media (max-height: 500px) { .ae-app .ae-color-dialog { max-height: calc(100dvh - 16px); } }
