

.gp {
  --gp-size: 56px;
  --gp-gap: 12px;
  --gp-edge: 16px;
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
@media (pointer: coarse) { .gp { display: block; } }
.gp[data-always] { display: block; }
.gp[hidden] { display: none; }

.gp__cluster {
  position: absolute;
  bottom: calc(var(--dh-safe-bottom, env(safe-area-inset-bottom, 0px)) + var(--gp-edge));
  display: grid;
  grid-template-columns: repeat(var(--gp-cols, 2), var(--gp-size));
  grid-auto-rows: var(--gp-size);
  gap: var(--gp-gap);
  pointer-events: auto;
  touch-action: none;
}
.gp__cluster--left { left: calc(var(--dh-safe-left, env(safe-area-inset-left, 0px)) + var(--gp-edge)); }
.gp__cluster--right { right: calc(var(--dh-safe-right, env(safe-area-inset-right, 0px)) + var(--gp-edge)); }

.gp-btn {
  box-sizing: border-box;
  width: 100%;
  min-width: var(--gp-size);
  height: var(--gp-size);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font: 700 10px/1 var(--gc-mono, 'Ioskeley Mono', ui-monospace, Menlo, monospace);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--kit-ink, #dff3e8);
  background: color-mix(in srgb, var(--kit-bg, #07130d) 64%, transparent);
  border: 2px solid var(--kit-accent, #ff4500);
  border-radius: 0;
  opacity: 0.82;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  
}
.gp-btn svg { width: 22px; height: 22px; flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gp-btn svg.gp-fill { fill: currentColor; stroke-width: 1.2; }
.gp-btn svg .gp-dot { fill: currentColor; stroke: none; }
.gp-btn.is-down { opacity: 1; color: var(--kit-bg, #07130d); background: var(--kit-accent, #ff4500); }
.gp-btn:focus-visible { outline: 2px solid var(--kit-ink, #dff3e8); outline-offset: 2px; }
.gp-btn.is-disabled { opacity: 0.3; }

.gp-btn--swatch { background: var(--gp-swatch); border-color: rgba(0, 0, 0, 0.5); opacity: 1; backdrop-filter: none; -webkit-backdrop-filter: none; }
.gp-btn--swatch[aria-pressed='true'] { border-color: #fff; box-shadow: 0 0 0 2px #000, inset 0 0 0 3px #000; }
.gp-btn--swatch.is-down { background: var(--gp-swatch); }

.gp__cluster--free { display: block; position: absolute; }
.gp__cluster--free .gp-btn { position: absolute; }
.gp__cluster--through { pointer-events: none; }
.gp__cluster--through .gp-btn { pointer-events: auto; }
.gp-btn--big svg { width: 30px; height: 30px; }
.gp-btn--big { font-size: 12px; }

.gp-btn--auto.is-disabled { display: none; }
.gp-btn--auto:not(.is-disabled) {
  opacity: 1;
  color: var(--kit-ink, #dff3e8);
  background: color-mix(in srgb, var(--kit-accent, #ff4500) 55%, transparent);
  box-shadow: 0 0 0 2px var(--kit-bg, #07130d), 0 0 16px color-mix(in srgb, var(--kit-accent, #ff4500) 80%, transparent);
  animation: gp-lit 700ms ease-in-out infinite alternate;
}
.gp-btn--auto.is-down { background: var(--kit-accent, #ff4500); color: var(--kit-bg, #07130d); }
@keyframes gp-lit { to { box-shadow: 0 0 0 2px var(--kit-bg, #07130d), 0 0 28px var(--kit-accent, #ff4500); } }
@media (prefers-reduced-motion: reduce) { .gp-btn--auto:not(.is-disabled) { animation: none; } }

.gp-zone { position: absolute; pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent; }
.gp-zone--pad {
  box-sizing: border-box;
  border: 2px solid var(--kit-accent, #ff4500);
  background: color-mix(in srgb, var(--kit-bg, #07130d) 64%, transparent);
  opacity: 0.82;
}
.gp-zone--pad.is-down { opacity: 1; background: color-mix(in srgb, var(--kit-accent, #ff4500) 30%, transparent); }
.gp-zone--pad.is-held { background: color-mix(in srgb, var(--kit-accent, #ff4500) 60%, transparent); }
.gp-mark { position: absolute; display: block; color: var(--kit-ink, #dff3e8); opacity: 0.8; pointer-events: none; }
.gp-mark svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gp-mark svg.gp-fill { fill: currentColor; stroke-width: 1.2; }
.gp-mark svg .gp-dot { fill: currentColor; stroke: none; }
.gp-mark--c { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.gp-mark--c svg { width: 34px; height: 34px; }
.gp-mark--l { left: 8px; top: 50%; transform: translateY(-50%); }
.gp-mark--r { right: 8px; top: 50%; transform: translateY(-50%); }
.gp-mark--u { top: 8px; left: 50%; transform: translateX(-50%); }
.gp-mark--d { bottom: 8px; left: 50%; transform: translateX(-50%); }
.gp-zone[data-flick='left'] .gp-mark--l, .gp-zone[data-flick='right'] .gp-mark--r, .gp-zone[data-flick='up'] .gp-mark--u, .gp-zone[data-flick='down'] .gp-mark--d { color: var(--kit-accent, #ff4500); opacity: 1; }

.gp-strip {
  position: absolute;
  box-sizing: border-box;
  left: clamp(0px, calc(var(--gz-cx, 0px) - var(--gz-w, 160px) / 2), calc(100% - var(--gz-w, 160px)));
  bottom: var(--gz-by, 0px);
  width: var(--gz-w, 160px);
  height: var(--gz-h, 56px);
  display: flex;
  align-items: stretch;
  border: 2px solid var(--kit-accent, #ff4500);
  background: color-mix(in srgb, var(--kit-bg, #07130d) 64%, transparent);
  color: var(--kit-ink, #dff3e8);
  opacity: 0.82;
  pointer-events: none;
}
.gp-zone.is-down .gp-strip { opacity: 1; }
.gp-strip b { display: flex; align-items: center; justify-content: center; flex: 1; font-weight: inherit; }
.gp-strip__m { flex: none !important; width: calc(var(--gz-dead, 12px) * 2); border-left: 2px dashed color-mix(in srgb, var(--kit-ink, #dff3e8) 40%, transparent); border-right: 2px dashed color-mix(in srgb, var(--kit-ink, #dff3e8) 40%, transparent); }
.gp-strip svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gp-zone.is-left .gp-strip__l, .gp-zone.is-right .gp-strip__r { background: var(--kit-accent, #ff4500); color: var(--kit-bg, #07130d); }

.gp-ring {
  position: absolute;
  box-sizing: border-box;
  left: var(--gz-cx, 0px);
  top: var(--gz-cy, 0px);
  width: calc(var(--gz-r, 64px) * 2);
  height: calc(var(--gz-r, 64px) * 2);
  transform: translate(-50%, -50%);
  border: 2px solid var(--kit-accent, #ff4500);
  border-radius: 50%;
  background: color-mix(in srgb, var(--kit-bg, #07130d) 50%, transparent);
  opacity: 0.55;
  pointer-events: none;
}
.gp-zone.is-down .gp-ring { opacity: 0.95; }
.gp-pill { position: absolute; display: block; box-sizing: border-box; border: 2px solid color-mix(in srgb, var(--kit-ink, #dff3e8) 50%, transparent); border-radius: 10px; pointer-events: none; }
.gp-pill--l, .gp-pill--r { width: 30px; height: 54px; top: 50%; transform: translateY(-50%); }
.gp-pill--l { left: 6px; }
.gp-pill--r { right: 6px; }
.gp-pill--u, .gp-pill--d { width: 24px; height: 24px; left: 50%; transform: translateX(-50%); }
.gp-pill--u { top: 6px; }
.gp-pill--d { bottom: 6px; }
.gp-zone.is-left .gp-pill--l, .gp-zone.is-right .gp-pill--r, .gp-zone.is-up .gp-pill--u, .gp-zone.is-down-dir .gp-pill--d { background: var(--kit-accent, #ff4500); border-color: var(--kit-accent, #ff4500); }

.gp-knob {
  position: absolute;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  left: calc(var(--gz-cx, 0px) + var(--gz-kx, 0px));
  top: calc(var(--gz-cy, 0px) + var(--gz-ky, 0px));
  border-radius: 50%;
  border: 2px solid var(--kit-ink, #dff3e8);
  background: color-mix(in srgb, var(--kit-accent, #ff4500) 70%, transparent);
  opacity: 0;
  pointer-events: none;
}
.gp-zone--strip .gp-knob { top: calc(100% - var(--gz-by, 0px) - var(--gz-h, 56px) / 2); }
.gp-zone.is-down .gp-knob { opacity: 1; }
