body { background: var(--tb-bg); font-family: "Pretendard", sans-serif; margin:0; padding:0; }
.tb-view { max-width: 720px; margin: 0 auto; padding: var(--tb-top) 20px 80px; }
.tb-card { background: #fff; padding: 40px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.06); margin-bottom: 30px; }
.tb-progress-wrap { height: 6px; background: #e2e8f0; border-radius: 10px; margin-bottom: 40px; overflow: hidden; }
.bar { height: 100%; background: var(--tb-primary); transition: 0.5s; }
.sec-title { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.sec-desc { color: #666; margin-bottom: 40px; white-space: normal; }
.tb-q { margin-bottom: 50px; }
.tb-q.err { border-left: 4px solid #ef4444; padding-left: 15px; background: #fff5f5; border-radius: 8px; }
.q-label { font-size: 19px; font-weight: 700; margin-bottom: 10px; display: block; }
.req { color: #ef4444; margin-left: 4px; }
.tb-inp-full { width: 100%; padding: 14px; border: 1px solid #e4e4e7; border-radius: 10px; font-size: 16px; box-sizing: border-box; outline: none; transition: border 0.2s; }
.tb-inp-full:focus { border-color: var(--tb-primary); }
.tb-opt { display: flex; align-items: center; gap: 12px; padding: 16px 16px; border: 1px solid #e4e4e7; border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: 0.2s; }
.tb-opt:hover { border-color: var(--tb-primary); }

/* ✅ 라디오/체크박스 클릭 편의성 개선: 동그라미가 작아서 누르기 불편한 문제 해결 */
.tb-opt input[type="radio"],
.tb-opt input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 0 !important;
    flex: 0 0 auto;
    cursor: pointer;
}
.tb-opt .tb-opt-text { line-height: 1.45; }

/* ✅ 라디오/체크박스 클릭 영역 개선: 동그라미가 작아 눌기 불편한 문제 해결 */
.tb-opt input[type="radio"],
.tb-opt input[type="checkbox"] {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    cursor: pointer;
}
.tb-opt .tb-opt-text { flex: 1; }

/* ✅ 기타(주관식) 옵션: 체크하면 입력칸이 아래로 떨어지는 문제 방지 */
.tb-opt.tb-opt-other { gap: 10px; }
.tb-opt.tb-opt-other .tb-opt-text { white-space: nowrap; }
.tb-opt.tb-opt-other .tb-other-text {
    flex: 1;
    min-width: 200px;
    padding: 12px 14px;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
}
.tb-opt.tb-opt-other .tb-other-text:focus { border-color: var(--tb-primary); outline: none; }
/* ✅ 리니어(선형) 척도: 척도가 많아질 때 반응형/모바일에서 깨지는 문제 해결
   - 가로 스크롤 허용 (PC/모바일)
   - 아이템/라벨이 줄바꿈으로 무너지지 않게 nowrap
   - 터치 스크롤 부드럽게 (-webkit-overflow-scrolling)
*/
.tb-linear-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 10px;
    padding: 10px 10px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    justify-content: flex-start;
    white-space: nowrap;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    background: #fafafa;
}
.tb-linear-wrap::-webkit-scrollbar { height: 10px; }
.tb-linear-wrap::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 10px; }

.ln-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 0 0 auto;
    scroll-snap-align: center;
    padding: 4px 6px;
    border-radius: 10px;
}
.ln-item:hover { background: rgba(0,0,0,0.03); }

.ln-item input {
    width: 22px;
    height: 22px;
    margin: 0 !important;
    cursor: pointer;
}

.ln-item span { font-size: 13px; line-height: 1; }

.ln-label {
    font-size: 14px;
    color: #666;
    min-width: 60px;
    text-align: center;
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .tb-linear-wrap { gap: 12px; padding: 10px 8px 14px; }
    .ln-label { min-width: 44px; font-size: 13px; }
    .ln-item input { width: 24px; height: 24px; }
}

/* 이미지 나열형(Grid) 설정 */
.tb-img-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.tb-img-opt { border: 1px solid #e4e4e7; border-radius: 15px; padding: 15px; cursor: pointer; position: relative; transition: 0.2s; text-align: center; }
.tb-img-opt:hover { border-color: var(--tb-primary); }
.tb-img-opt input { position: absolute; top: 15px; left: 15px; width: 24px; height: 24px; accent-color: var(--tb-primary); }

/* ✅ 하단 섹션 페이지수 */
.tb-pagecount { margin-top: 14px; text-align: center; font-size: 13px; opacity: .65; }
.tb-img-opt .img-box { margin-bottom: 15px; border-radius: 10px; overflow: hidden; background: #f9f9f9; }
.tb-img-opt .img-box img { width: 100%; height: auto; display: block; border-radius: 8px; }
.tb-img-opt .img-text { font-size: 16px; font-weight: 600; color: #333; }
.tb-img-opts.is-uniform .img-box img { height: 200px; object-fit: cover; }

.rank-opt { padding: 16px 20px; border: 1px solid #e4e4e7; border-radius: 12px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.rank-opt.active { border-color: var(--tb-primary); background: #f0f7ff; font-weight: 800; }
.rank-badge { background: var(--tb-primary); color: #fff; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.info-only-block { padding: 25px; background: #f8fafc; border-radius: 15px; border-left: 5px solid #cbd5e1; line-height: 1.8; }
.tb-nav { display: flex; justify-content: space-between; margin-top: 50px; }
.tb-btn-base { padding: 14px 35px; border-radius: 35px; font-weight: 700; cursor: pointer; border: none; transition: 0.2s; font-size:16px; }
.tb-btn { background: var(--tb-primary); color: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.tb-btn-gray { background: #e2e8f0; color: #475569; }
.tb-spinner { width: 45px; height: 45px; border: 4px solid #f3f3f3; border-top-color: var(--tb-primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 15px; }
@keyframes spin { to { transform: rotate(360deg); } }
.table-scroll { overflow-x: auto; border-radius: 10px; border: 1px solid #eee; }
.tb-matrix-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.tb-matrix-table th, .tb-matrix-table td { padding: 15px; border: 1px solid #f1f1f1; text-align: center; }
.tb-matrix-table th { background: #fafafa; font-weight: 600; }

@media (max-width: 600px) {
    .tb-img-opts { grid-template-columns: 1fr; }
}

/* ✅ 메트릭스(행×열) 라디오/체크 박스 클릭 영역 확대 */
.tb-matrix-cell { padding: 10px !important; }
.tb-matrix-opt {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  min-width: 40px;
  cursor: pointer;
  user-select: none;
}
.tb-matrix-opt input[type="radio"],
.tb-matrix-opt input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0 !important;
  cursor: pointer;
}
.tb-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

