/* 重設部分預設 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: sans-serif; padding: 20px; background-color: #f5f5f5; }

/* 電路板容器：固定在畫面上方靠左 */
#board-container {
  position: sticky; top: 0; z-index: 999;
  display: block; width: fit-content;
  margin: 10px 0 10px 10px; padding: 10px 0;
  border: 0; background: #f5f5f5;
}
 
/* PCB 圖片樣式 */
#pcbImage { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
#tmp1, #tmp2, #tmp3, #tmp4, #tmp5 { position: absolute; z-index: 3; }
#RL1-overlay, #RL2-overlay, #RL3-overlay, #RL4-overlay, #RL5-overlay,
#RL1-dPoint, #RL2-dPoint, #RL3-dPoint, #RL4-dPoint, #RL5-dPoint,
#sw-1, #sw-2 { position: absolute; z-index: 5; }
.RL { display: none; }

/* 接點標示的樣式 */
.point {
  position: absolute; width: 15pt; height: 15pt; line-height: 20pt;
  border: 0; border-radius: 50%; cursor: pointer; user-select: none;
  transition: transform 0.2s; z-index: 10;
}
.point:hover { transform: scale(1.1); }

/* 接點位置 */
#pointVin { top: 2.4%; left: 38.4%; }
#pointG   { top: 16.5%; left: 50.6%; }
#pointA   { top: 16.7%; left: 91.8%; }
#pointB   { top: 37.5%; left: 87.5%; }
#pointC   { top: 65.2%; left: 87.7%; }
#pointD   { top: 86.2%; left: 91.8%; }
#pointE   { top: 37.5%; left: 75.3%; }
#pointF   { top: 65.2%; left: 75.3%; }
#pointH   { top: 86.2%; left: 50.6%; }
#pointI   { top: 9.5%; left: 25.9%; }
#pointJ   { top: 37.5%; left: 25.9%; }
#pointK   { top: 65.2%; left: 25.9%; }
#pointL   { top: 37.5%; left: 13.6%; }
#pointM   { top: 65.2%; left: 13.6%; }
#pointN   { top: 37.5%; left: 1.3%; }
#pointO   { top: 65.2%; left: 1.3%; }

/* 電阻值文字樣式 */
.rText {
  position: absolute; text-align: left; color: #000;
  font-size: 18px; font-weight: bold; z-index: 20;
}

/* 電阻值位置 */
#R1   { top: 22.6%; left: 90.2%; }
#RL1  { top: 50.4%; left: 88.2%; }
#R2   { top: 78.8%; left: 90.2%; }
#RL2  { top: 22.6%; left: 76%; }
#R3   { top: 50.4%; left: 78%; }
#R4   { top: 78.8%; left: 78%; }
#R5   { top: 50.8%; left: 54%; }
#R6   { top: 22.6%; left: 28.6%; }
#RL3  { top: 50.4%; left: 30.6%; }
#R7   { top: 78.8%; left: 28.6%; }
#R8   { top: 22.6%; left: 16.5%; }
#R9   { top: 50.4%; left: 16.5%; }
#RL4  { top: 78.8%; left: 18.5%; }
#RL5  { top: 22.6%; left: 6.2%; }
#R10  { top: 50.4%; left: 4.2%; }
#R11  { top: 78.8%; left: 4.2%; }

.Ques {
  position: relative; display: inline-block; margin: 20px auto;
  border: 1px solid black; background: lightskyblue;
  font-size: 24pt; width: 90px; text-align: right;
}

label, input, span, [id^="ans"] { font-family: "標楷體"; font-size: 18pt; display: inline; }
select { text-align: left; font-family: "標楷體"; font-size: 12pt; display: inline; }
input { width: 50px; }
#studentId { width: 40px; }
.Vcc { width: 80px; font-size: 18pt; vertical-align: middle; text-align: center; }
.rNumerator, .rDenominator, [id^="DCAVccc"] { width: 140px; font-size: 12pt; text-align: center; }

#showInfoBtn, #AnswerBtn, #GameStart, #RestartBtn {
  font-family: "標楷體"; font-size: 18pt; padding: 5pt;
  background-color: #aaaaaa; border-radius: 5pt; border: none; cursor: pointer;
}

.rdin { margin: 0 2px 0 0; vertical-align: middle; padding: 0; }
input[type="radio"] { width: auto !important; margin: 0 2px 0 0; padding: 0; vertical-align: middle; }
[id^="VOMType"], [id^="openR"] { width: 120px; font-size: 18pt; vertical-align: middle; text-align: center; }
[id^="vomPR"], [id^="vomPB"] { cursor: pointer; }
table, td { border: 0; }

.question-block { margin: 18px 0 28px 0; }
.result-line { margin: 10px 0 24px 0; }
hr.section-sep { border: none; border-top: 2pt solid darkslategray; height: 32px; }
/* ===== 自訂 Tooltip：支援 <sub> 下標 ===== */
#customTooltip {
  position: fixed;
  display: none;
  z-index: 99999;
  max-width: 360px;
  padding: 8px 12px;
  background: #222;
  color: #fff;
  border-radius: 6px;
  font-family: "標楷體", sans-serif;
  font-size: 16pt;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  white-space: nowrap;
}

#customTooltip sub {
  font-size: 65%;
  vertical-align: sub;
}