/* Flow Field Lab - minimal styling
   说明：为了不污染主题样式，全部以 .flowfield-lab 为作用域。
*/
.flowfield-lab {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 12px;
  margin: 20px 0;
  background: rgba(0,0,0,0.02);
}

.flowfield-lab .ff-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.flowfield-lab .ff-head .ff-sub {
  font-size: 0.9em;
  opacity: 0.75;
}

.flowfield-lab .ff-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 12px;
  align-items: start;
}

.flowfield-lab .ff-canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  max-width: none !important;
  min-width: 0 !important;
  justify-self: stretch;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}

.flowfield-lab .ff-panel {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,0.7);
}

.flowfield-lab .ff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.flowfield-lab .ff-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.9);
  cursor: pointer;
}

.flowfield-lab .ff-btn:active {
  transform: translateY(1px);
}

.flowfield-lab .ff-options {
  align-items: center;
}

.flowfield-lab .ff-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92em;
}

.flowfield-lab input[type="range"] {
  width: 120px;
}

.flowfield-lab .ff-hint {
  font-size: 0.92em;
  opacity: 0.9;
  margin-top: 6px;
  border-top: 1px dashed rgba(0,0,0,0.15);
  padding-top: 8px;
}

.flowfield-lab .ff-hint ul {
  margin: 6px 0 0 18px;
}

.flowfield-lab .ff-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.92em;
  opacity: 0.9;
}

.flowfield-lab .ff-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.flowfield-lab .ff-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.25);
}

.flowfield-lab .ff-dot-start { background: #2b7cff; }
.flowfield-lab .ff-dot-goal { background: #ff3b30; }
.flowfield-lab .ff-dot-unit { background: #34c759; }
.flowfield-lab .ff-dot-wall { background: #333; }

@media (max-width: 860px) {
  .flowfield-lab .ff-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .flowfield-lab input[type="range"] {
    width: 100%;
  }
}
