

.touch-btn:hover {
  filter: brightness(1.05);
}

.touch-controls {
  position: absolute;
  inset: auto 0 calc(var(--touch-safe-bottom,env(safe-area-inset-bottom, 0px)) + var(--touch-buffer,24px) + var(--touch-y,0px)) 0;
  display: flex;
  justify-content: space-between;
  padding-left: calc(var(--touch-safe-left,env(safe-area-inset-left, 0px)) + var(--touch-buffer,24px) + var(--touch-x-left,0px));
  padding-right: calc(var(--touch-safe-right,env(safe-area-inset-right, 0px)) + var(--touch-buffer,24px) + var(--touch-x-right,0px));
  pointer-events: none;
  z-index: 4;
}

.touch-row {
  display: flex;
  gap: var(--touch-gap,14px);
}

.touch-btn {
  position: relative;
  cursor: pointer;
  border-radius: 14px;
  isolation: isolate;
  flex: 0 0 auto;
  width: var(--touch-target,72px);
  height: var(--touch-target,72px);
  font-size: 24px;
  font-weight: 800;
  color: white;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  transform: none;
  transition: none;
  --touch-fill: var(--touch-glass);
  --touch-stroke: rgba(255,255,255,.6);
  --touch-visual-width: var(--touch-visual,60px);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92), 0 0 8px rgba(255, 255, 255, 0.28);
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.touch-btn::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%; top: 50%;
  width: calc(var(--touch-visual-width) * var(--touch-scale,1));
  height: calc(var(--touch-visual-height,var(--touch-visual,60px)) * var(--touch-scale,1));
  transform: translate(-50%,-50%);
  border-radius: 12px;
  border: 2px solid var(--touch-stroke);
  box-sizing: border-box;
  background: var(--touch-fill);
  opacity: var(--touch-opacity,.82);
  box-shadow: inset 0 0 18px rgba(255,255,255,.04),0 4px 14px rgba(0,0,0,.14);
  pointer-events: none;
  transition: filter .08s ease,opacity .08s ease;
}

.touch-btn:hover { transform:none; }

.jump-btn {
  width: var(--touch-jump-target,110px);
  --touch-visual-width: var(--touch-jump-visual,94px);
  font-size: 18px;
  --touch-fill: var(--touch-accent);
  color: #fff9ef;
}

.hot-sauce-btn {
  display: none;
  --touch-visual-width: var(--touch-attack-visual,54px);
  font-size: 29px;
  align-items: center;
  justify-content: center;
  --touch-stroke: rgba(255, 197, 92, 0.72);
  --touch-fill: linear-gradient(145deg, rgba(150, 26, 42, 0.76), rgba(255, 92, 32, 0.56));
}

.hot-sauce-btn.phase3-eligible {
  display: inline-flex;
}

.hot-sauce-btn.is-ready {
  opacity: 1;
}

.hot-sauce-btn.is-disabled,
.hot-sauce-btn:disabled {
  opacity: 0.38;
  filter: grayscale(0.42) saturate(0.7);
}

.touch-btn.is-active {
  transform: none;
  --touch-fill: rgba(255, 255, 255, 0.38);
  --touch-stroke: rgba(255, 255, 255, 0.82);
}

.touch-btn.is-active::before { filter:brightness(1.14);opacity:1; }

.jump-btn.is-active {
  --touch-fill: rgba(255, 190, 76, 0.48);
}

.touch-btn:focus-visible {
  outline: 4px solid #fff1a6;
  outline-offset: 3px;
}

.touch-controls[data-custom-layout="true"] {
  inset: 0;
  display: block;
  padding: 0;
}

.touch-controls[data-custom-layout="true"] .touch-row {
  display: contents;
}

.touch-controls[data-custom-layout="true"] .touch-btn {
  position: absolute;
  translate: -50% -50%;
  flex: none;
}

@media (pointer: fine) and (min-width: 900px) {
  .touch-controls {
    opacity: 0.18;
  }
}
