/* Shared field and top-layer popup, also used inside the independent learner shell. */
.coherio-color-field,.coherio-color-popover{box-sizing:border-box;color:var(--ink,#191b1f);font:400 14px/1.45 var(--font-ui,Arial,sans-serif)}
.coherio-color-field{display:flex;align-items:center;width:100%;min-width:0;height:36px;background:var(--surface,#fff);border:1px solid var(--line,#dfe2e7);border-radius:8px;box-shadow:0 1px 2px #1018280d}
.coherio-color-field:focus-within{border-color:var(--muted,#7c8188);box-shadow:0 0 0 2px color-mix(in srgb,var(--muted,#70757c) 18%,transparent)}
.coherio-color-field>.coherio-color-trigger{display:grid;place-items:center;flex:none;width:39px;height:100%;min-height:0;margin:0;padding:0;background:transparent;border:0;border-radius:7px;color:inherit;cursor:pointer;box-shadow:none}
.coherio-color-trigger i{display:block;width:18px;height:18px;border-radius:4px;border:1px solid var(--line);background:var(--chosen-color)}
.coherio-color-field>input.coherio-color-code{flex:1;min-width:0;width:0;height:100%;min-height:0;margin:0;padding:0 9px 0 0;background:transparent;border:0;border-radius:0;font:inherit;color:inherit;box-shadow:none;outline:none}
.coherio-color-field>input[hidden]{display:none!important}
.coherio-color-popover{position:fixed;inset:auto;margin:0;z-index:10000;max-height:calc(100dvh - 16px);overflow:auto;padding:8px;border:1px solid var(--line,#dfe2e7);border-radius:12px;background:var(--surface,#fff);box-shadow:0 1px 3px #10182819;overscroll-behavior:contain}
.coherio-color-plane{position:relative;width:100%;aspect-ratio:5/3;max-height:48dvh;overflow:hidden;border-radius:8px;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--hue) 100% 50%));touch-action:none;cursor:crosshair}
.coherio-color-plane>i{position:absolute;box-sizing:border-box;width:16px;height:16px;border:2px solid white;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 1px #0009;pointer-events:none}
.coherio-color-popover input.coherio-color-hue{display:block;appearance:none;width:100%;height:16px;min-height:0;padding:0;margin:12px 0;border:0;border-radius:999px;background:linear-gradient(90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);box-shadow:none;cursor:pointer;touch-action:none}
.coherio-color-hue::-webkit-slider-thumb{appearance:none;box-sizing:border-box;width:14px;height:14px;border-radius:50%;border:2px solid white;background:transparent;box-shadow:0 0 1px #0008}
.coherio-color-hue::-moz-range-thumb{box-sizing:border-box;width:14px;height:14px;border:2px solid white;border-radius:50%;background:transparent}
.coherio-color-values,.coherio-color-channels{display:flex;gap:4px;min-width:0}
.coherio-color-channels{flex:1}
.coherio-color-values select,.coherio-color-channels input{box-sizing:border-box;height:36px;min-height:0;min-width:0;margin:0;padding:0 11px;border:1px solid var(--line,#dfe2e7);border-radius:8px;background-color:var(--surface,#fff);color:inherit;font:inherit;box-shadow:0 1px 2px #1018280c}
.coherio-color-values select{width:80px;flex:none;cursor:pointer}
.coherio-color-channels input{width:0;flex:1}
.coherio-color-popover :focus-visible,.coherio-color-trigger:focus-visible{outline:2px solid var(--muted,#7c8188);outline-offset:1px}
.coherio-color-code[aria-invalid=true],.coherio-color-channels [aria-invalid=true]{color:var(--error,#bc3434)}
.coherio-color-field:has(input:disabled){opacity:.55;pointer-events:none}
