body{
  font-family: system-ui, sans-serif;
  background:#ddd;
   /* color:#eee;  */
  text-align:center;
  justify-content: center;
  align-items: center;
}

.ring{
  position:relative;
  width:335px; height:320px;
  margin:auto;
}

.node{
  width:64px; height:64px;
  border-radius:50%;
  background: #eee;
  border:5px solid #fff;
  position:absolute;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition:transform .3s;
}

/* 顏色樣式 */
.node.red    { background: #fa8787; }
.node.blue   { background: #7ce8f2; }
.node.yellow { background: #feecb9; }

.node.highlight{
  /* border: 10px solid transparent; */
  box-shadow: 0 0 16px 4px #f6acbd, 0 0 32px 8px rgba(124,232,242,0.4);
}

#steps{
  display:flex; flex-wrap:wrap; gap:1rem;
  justify-content:center; margin-top:1rem;
}

.step-card{
  border:1px solid #444; padding:.5rem; border-radius:.5rem;
  background:#888; color:#eee; width:180px; text-align:center;
}

.step-ring{
  position:relative; height:160px; margin:.5rem auto;
}

.step-card p{ margin:0; font-size:.9rem; }

/*--- 操作列：門檻 + 確定 -------------------------------------------*/
.controls{
  display:flex;               /* 按行水平排列 */
  align-items:center;         /* 垂直置中 */
  justify-content:center;
  gap:.75rem;                 /* 元件間距 */
  flex-wrap:wrap;             /* 窄螢幕時自動換行 */
  margin:1rem auto;           /* 與其他區塊留白 */
}

.controls input{
  width:5ch;                  /* 跟字數關係，比固定 px 彈性 */
}

/*--- 大環的自適應縮放 ---------------------------------------------*/
.ring{
  /* 原來就有 position/size，這裡只多加 scale */
  transform:scale(var(--ring-scale,1));
  transform-origin:center;
}

/* 平板以下：縮到 0.8；再小的手機：縮到 0.6 */
@media (max-width:640px){ :root{ --ring-scale:.8; } }
@media (max-width:400px){ :root{ --ring-scale:.6; } }