/* 짝 맞추기(선 잇기) - match-lines.js. 색은 연령 색(--age) 또는 집중 묵상 색(--focus)을 따른다. */
.bt-match { --m: var(--age, var(--focus, #2f7d5b)); margin: 4px 0 16px; }
.bt-match-hint { margin: 0 0 12px; font-size: 13px; line-height: 1.7; color: #6b7280; word-break: keep-all; }
.bt-match-board { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(32px,.5fr) minmax(0,1fr); }
.bt-match-board .bt-match-col:first-of-type { grid-column: 1; }
.bt-match-board .bt-match-col:last-of-type { grid-column: 3; }
.bt-match-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bt-match-lines path { fill: none; stroke: var(--m); stroke-width: 2.5; stroke-linecap: round; }
.bt-match-lines circle { fill: var(--m); }
.bt-match-col { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.bt-match-col li { margin: 0; }
.bt-match-col button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 8px 10px; text-align: left; font: inherit; font-size: 15px; line-height: 1.5; color: #22262b; background: #fff; border: 1.5px solid #d1d5db; border-radius: 10px; cursor: pointer; touch-action: manipulation; word-break: keep-all; overflow-wrap: anywhere; }
.bt-match-col button b { flex: none; min-width: 1.4em; color: var(--m); font-weight: 700; }
.bt-match-col button[aria-pressed=true] { border-color: var(--m); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m) 22%, transparent); }
.bt-match-col button.is-paired { border-color: var(--m); background: color-mix(in srgb, var(--m) 8%, #fff); }
.bt-match-col button:focus-visible, .bt-match-reset:focus-visible { outline: 3px solid var(--m); outline-offset: 2px; }
.bt-match-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.bt-match-status { font-size: 13px; color: #6b7280; }
.bt-match-reset { min-height: 44px; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--m); background: transparent; border: 1px solid #d1d5db; border-radius: 10px; cursor: pointer; }
/* 선 잇기가 켜진 질문의 글 입력칸은 결과 확인·직접 수정용으로 작게 */
.bt-match-on textarea { height: auto !important; min-height: 64px !important; font-size: 15px; }
@media (max-width: 380px) { .bt-match-col button { font-size: 14px; padding: 8px; } .bt-match-board { grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr); } }
@media (prefers-reduced-motion: no-preference) { .bt-match-col button { transition: border-color .15s, background-color .15s, box-shadow .15s; } }
.question-container .bt-match { padding: 12px 16px 0; margin: 0; }

/* 좁은 칸(휴대폰·2단 화면의 쓰는 칸): 왼쪽은 짧은 이름, 오른쪽은 긴 구절이므로 오른쪽을 넓게 */
.question-container, .question-panel { container-type: inline-size; }
@container (max-width: 440px) {
  .bt-match-board { grid-template-columns: minmax(0, .8fr) 26px minmax(0, 1.2fr); }
  .bt-match-col button { font-size: 14px; padding: 8px; gap: 6px; }
  .question-container .bt-match { padding: 12px 12px 0; }
}
