/* GPTGenie: gemeinsamer Farbwähler (js/color-picker.js): Farbmuster | Spektrum, Werte, zuletzt benutzt, Abbrechen / OK */
.ggcp-root { position: fixed; inset: 0; z-index: 9700; }
.ggcp-back { position: absolute; inset: 0; background: hsl(0 0% 0% / 0); transition: background .18s ease; }
.ggcp-root.on .ggcp-back { background: hsl(0 0% 0% / 0.18); }
.ggcp-root.ggcp-picking { visibility: hidden; }
.ggcp {
  --cp-bg: hsl(249 11% 12.7% / 0.97); --cp-ink: hsl(240 11% 96.5%); --cp-ink2: hsl(240 11% 96.5% / 0.55); --cp-line: hsl(0 0% 100% / 0.12);
  --cp-seg: hsl(0 0% 100% / 0.08); --cp-seg-on: hsl(0 0% 100% / 0.18); --cp-field: hsl(0 0% 100% / 0.07);
  position: absolute; left: 0; top: 0; width: min(340px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto;
  box-sizing: border-box; padding: 14px 14px 6px; border-radius: 24px;
  background: var(--cp-bg); color: var(--cp-ink);
  box-shadow: 0 18px 50px hsl(0 0% 0% / 0.45), 0 0 0 0.5px var(--cp-line);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  font-family: inherit; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  opacity: 0; transform: scale(.85); transition: opacity .16s ease, transform .28s cubic-bezier(.2, 1.2, .35, 1);
}
.ggcp-root.on .ggcp { opacity: 1; transform: none; }
html[data-theme="light"] .ggcp {
  --cp-bg: hsl(240 20% 99% / 0.98); --cp-ink: hsl(240 3% 11.4%); --cp-ink2: hsl(240 3% 11.4% / 0.5); --cp-line: hsl(0 0% 0% / 0.10);
  --cp-seg: hsl(0 0% 0% / 0.04); --cp-seg-on: hsl(0 0% 0% / 0.12); --cp-field: hsl(0 0% 0% / 0.04);
  box-shadow: 0 18px 50px hsl(0 0% 0% / 0.18), 0 0 0 0.5px var(--cp-line);
}
html.gg-perf .ggcp { -webkit-backdrop-filter: none; backdrop-filter: none; transition: none; }
html.gg-perf .ggcp-back { transition: none; }
@media (prefers-reduced-motion: reduce) { .ggcp, .ggcp-back { transition: none; } }

.ggcp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; }
.ggcp-tabs button {
  appearance: none; border: 0; margin: 0; padding: 9px 6px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--cp-ink2); font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
  transition: background .15s, color .15s;
}
.ggcp-tabs button.on { background: var(--cp-seg-on); color: var(--cp-ink); }
.ggcp-tabs button:focus-visible { outline: 2px solid hsl(210 100% 52% / 0.8); outline-offset: 1px; }

.ggcp-pane[hidden] { display: none; }
.ggcp-grid {
  display: grid; grid-template-columns: repeat(13, 1fr); border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 0.5px var(--cp-line);
}
.ggcp-cell {
  appearance: none; border: 0; margin: 0; padding: 0; aspect-ratio: 1; background: var(--c); cursor: pointer; position: relative;
  border-radius: 0;
}
.ggcp-cell.on { z-index: 1; border-radius: 4px; box-shadow: 0 0 0 2.5px hsl(0 0% 100%), 0 0 0 3.5px hsl(0 0% 0% / 0.35); transform: scale(1.12); }
.ggcp-cell:focus-visible { z-index: 2; outline: 2px solid hsl(210 100% 52% / 0.9); outline-offset: 1px; }

.ggcp-spec { display: flex; flex-direction: column; gap: 14px; }
.ggcp-sv {
  position: relative; aspect-ratio: 13 / 12; border-radius: 10px; cursor: crosshair; touch-action: none; outline: none;
  background: linear-gradient(to top, hsl(0 0% 0%), hsl(0 0% 0% / 0)), linear-gradient(to right, hsl(0 0% 100%), hsl(0 0% 100% / 0)), hsl(var(--hue, 0), 100%, 50%);
  box-shadow: inset 0 0 0 0.5px var(--cp-line);
}
.ggcp-sv-th {
  position: absolute; left: var(--x, 0%); top: var(--y, 100%); width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: var(--col, hsl(0 0% 0%)); border: 2.5px solid hsl(0 0% 100%); box-sizing: border-box; box-shadow: 0 0 0 1px hsl(0 0% 0% / 0.3), 0 2px 6px hsl(0 0% 0% / 0.35); pointer-events: none;
}
.ggcp-hue {
  position: relative; height: 22px; margin: 0 11px 2px; border-radius: 999px; cursor: pointer; touch-action: none; outline: none;
  background: linear-gradient(to right, hsl(0 100% 50%) 0%, hsl(60 100% 50%) 16.66%, hsl(120 100% 50%) 33.33%, hsl(180 100% 50%) 50%, hsl(240 100% 50%) 66.66%, hsl(300 100% 50%) 83.33%, hsl(0 100% 50%) 100%);   /* accent-keep: Farbauswahl */
}
.ggcp-hue-th {
  position: absolute; top: 50%; left: var(--x, 0%); width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: hsl(var(--hue, 0), 100%, 50%); border: 2.5px solid hsl(0 0% 100%); box-sizing: border-box; box-shadow: 0 0 0 1px hsl(0 0% 0% / 0.3), 0 2px 6px hsl(0 0% 0% / 0.35); pointer-events: none;
}
.ggcp-sv:focus-visible, .ggcp-hue:focus-visible { box-shadow: 0 0 0 2px hsl(210 100% 52% / 0.85); }

.ggcp-vals { display: flex; align-items: center; gap: 4px; margin: 14px 0 0; padding-bottom: 12px; border-bottom: 1.5px dotted var(--cp-line); }
.ggcp-prev { display: flex; flex: 0 0 64px; height: 40px; border-radius: 10px; overflow: hidden; margin-right: 4px; box-shadow: inset 0 0 0 0.5px var(--cp-line); }
.ggcp-prev i { flex: 1; }
.ggcp-old { border-right: 1px solid hsl(0 0% 100% / 0.5); }
.ggcp-f { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; gap: 2px; }
.ggcp-f-hex { flex: 1.9 1 0; }
.ggcp-f span { font-size: 12px; color: var(--cp-ink2); }
.ggcp .ggcp-f input {
  width: 100%; min-width: 0; box-sizing: border-box; text-align: center; margin: 0; padding: 4px 2px !important;
  border: 0 !important; border-radius: 7px; background: transparent !important; box-shadow: none !important; outline: none;
  color: var(--cp-ink) !important; font-family: inherit !important; font-weight: 500 !important; font-size: 16px !important; line-height: 1.2 !important; font-variant-numeric: tabular-nums;
  -webkit-user-select: text; user-select: text;
}
.ggcp .ggcp-f input:focus { background: var(--cp-field) !important; }
.ggcp .ggcp-f input.bad { color: hsl(3 100% 66.1%) !important; }

.ggcp-recent { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 2px 4px; }
.ggcp-dot {
  appearance: none; margin: 0; padding: 0; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; cursor: pointer;
  background: var(--c); border: 0; box-shadow: inset 0 0 0 1px hsl(0 0% 50.2% / 0.35);
  transition: transform .12s;
}
.ggcp-dot.on { box-shadow: 0 0 0 2px var(--cp-bg), 0 0 0 4px var(--cp-ink); }
.ggcp-dot:active { transform: scale(.9); }
.ggcp-dot-empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cp-line); cursor: default; }
.ggcp-eye {
  appearance: none; border: 0; margin: 0; padding: 0; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--cp-ink); display: grid; place-items: center;
}
.ggcp-eye svg { width: 24px; height: 24px; }
.ggcp-eye:hover { background: var(--cp-seg); }

.ggcp-acts { display: flex; align-items: center; margin: 4px -6px 0; }
.ggcp-acts button {
  appearance: none; border: 0; margin: 0; flex: 1; padding: 14px 6px; background: transparent; cursor: pointer; border-radius: 14px;
  color: var(--cp-ink); font-family: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
}
.ggcp-acts button:hover { background: var(--cp-seg); }
.ggcp-acts button:focus-visible { outline: 2px solid hsl(210 100% 52% / 0.8); outline-offset: -2px; }
.ggcp-acts i { width: 1px; height: 22px; background: var(--cp-line); }
