.bg-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #758069;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  margin: 16px auto;
  max-width: 420px;
}
.bg-hint > svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.bg-hint strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #586d4e;
}
.bg-hint small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
.bg-light-hint {
  text-align: left;
  gap: 13px;
}
.bg-light-hint .bg-cross-diagram {
  width: 48px;
  height: 48px;
}
.bg-feedback {
  min-height: 1.4em;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: #70825e;
  margin: 12px auto;
  max-width: 420px;
}
.bg-feedback:empty {
  display: none;
}
.bg-gesture-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-width: 0;
}
.bg-gesture-maze {
  max-width: 410px;
}
.bg-gesture-wrap > .arc-grid {
  box-sizing: border-box;
  width: 100%;
}
.bg-swipe-surface {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.bg-swipe-surface.bg-is-dragging {
  cursor: grabbing;
}
.bg-direction-preview {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 5px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: calc(100% - 20px);
  padding: 9px 12px;
  background: #f9f9eefa;
  color: #496950;
  border: 1px solid #c8d5be;
  border-radius: 20px;
  box-shadow: 0 4px 12px #34442d20;
  z-index: 5;
  font-size: 11px;
  line-height: 1.35;
  transition:
    opacity 0.12s,
    transform 0.12s;
}
.bg-direction-preview.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.bg-direction-preview > svg {
  width: 20px;
  height: 20px;
  flex: none;
  transform: rotate(var(--bg-angle, 0deg));
}
.bg-direction-preview.is-blocked {
  color: #9b7255;
  border-color: #dfc7ab;
  background: #fff6e9fa;
}
.bg-gesture-maze .bg-direction-preview {
  bottom: 8px;
}
.arc-slide .bg-drag-ready {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.arc-slide .bg-dragging {
  position: relative;
  z-index: 6;
  transform: translate(var(--bg-drag-x, 0), var(--bg-drag-y, 0)) !important;
  transition: none !important;
  cursor: grabbing;
  box-shadow: 0 6px 12px #72593750;
  outline: 2px solid #fff3be;
  outline-offset: -3px;
}
.arc-slide .bg-slide-target {
  visibility: visible;
  outline: 2px dashed #f7ebba;
  outline-offset: -5px;
  background: #ad956e;
  color: transparent;
  box-shadow: inset 0 2px 8px #624d3525;
}
.arc-lights .arc-lamp {
  position: relative;
  touch-action: manipulation;
}
.arc-lights .bg-light-preview {
  outline: 2px solid #ddca88;
  outline-offset: 3px;
}
.arc-lights .bg-light-will-on {
  box-shadow:
    0 3px 0 #263c30,
    inset 0 0 14px #edd68666;
}
.arc-lights .bg-light-will-off {
  outline-style: dashed;
}
.arc-lights .bg-light-center {
  outline: 3px solid #fff4c8;
  outline-offset: 3px;
}
.arc-lights .bg-light-center:after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #fffae599;
  border-radius: 50%;
  pointer-events: none;
}
.arc-lights .bg-light-pressed {
  transform: translateY(2px);
  filter: brightness(1.1);
}
.arc-lights .bg-light-changed {
  animation: bg-light-result 0.7s ease-out;
  outline: 2px solid #cfddbe;
  outline-offset: 2px;
}
@keyframes bg-light-result {
  0% {
    transform: scale(0.9);
    filter: brightness(1.4);
  }
  55% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}
@media (max-width: 400px) {
  .bg-hint {
    font-size: 11px;
  }
  .bg-light-hint .bg-cross-diagram {
    width: 42px;
    height: 42px;
  }
  .bg-direction-preview {
    font-size: 10px;
    padding: 8px 10px;
  }
  .arc-lights .bg-light-preview,
  .arc-lights .bg-light-center {
    outline-offset: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bg-direction-preview {
    transition: none;
  }
  .arc-lights .bg-light-changed {
    animation: none;
  }
  .arc-lights .bg-light-pressed {
    transform: none;
  }
}
